I have recently started to use dired
in earnest, having belatedly checked out the advice to use C-x C-j given in one of the answers to this question. The 'jump' function is as useful as promised and has led me to investigate dired
seriously. One snag is that I cannot group directories above files in dired
buffers. I have tried putting the following in my .emacs.d
file but it has no effect, presumably because I am running on Windows.
(setq dired-listing-switches "--group-directories-first -alh")
How can I achieve grouped directories above files in dired
buffers in Windows 7?
[EDIT] as per the answer below, dired-sort-menu
does seem to work - see following screenshot.
There is actually an option for this if you're using the ls emulation, as on Windows:
(setq ls-lisp-dirs-first t)
See (customize-group 'ls-lisp) for all the options. There are some useful ones -
; hide the link count, user, and group columns - default is '(links uid gid)
(setq ls-lisp-verbosity nil)
; use ISO dates (the first is for recent dates, second for old dates)
(setq ls-lisp-format-time-list '("%Y-%m-%d %H:%M" "%Y-%m-%d %H:%M"))
(setq ls-lisp-use-localized-time-format t)
Giving you a listing like this -
total used in directory 27734 available 171804716
dr-xr-xr-x 40960 2015-02-12 00:47 .
drwxrwxrwx 16384 2015-02-11 17:37 ..
dr-xr-xr-x 32768 2015-02-07 09:41 bookshelf
drwxrwxrwx 12288 2014-12-03 00:06 library
drwxrwxrwx 8192 2014-08-17 08:21 office
dr-xr-xr-x 16384 2015-02-10 19:54 projects
-rw-rw-rw- 14073 2015-01-31 17:25 android.org
-rw-rw-rw- 65736 2015-02-05 17:09 archive.org
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With