This Emacs package provides persistent quick sorting of Dired buffers in various ways with hydra.
dired-quick-sort can be installed from the MELPA repository. Follow the
instructions to set up MELPA and then run
package-install RET dired-quick-sort RET
to install.
dired-quick-sort can be installed via el-get. Follow the
instructions to set up el-get and then run
el-get-install RET dired-quick-sort RET
to install.
Download this package and add the following to your ~/.emacs
or ~/.emacs.d/init.el
:
(add-to-list 'load-path "~/path/to/dired-quick-sort")
(load "dired-quick-sort.el")
This extension requires GNU ls (part of GNU coreutils) to be present on the system. It is usually shipped by default on most GNU/Linux distributions. If you are on MacOS, please refer to this guide for installing GNU command line tools.
Add the following to your ~/.emacs
or ~/.emacs.d/init.el
for a quick setup:
(require 'dired-quick-sort)
(dired-quick-sort-setup)
This will bind "S" in dired-mode to invoke the quick sort hydra and new Dired buffers are
automatically sorted according to the setup in this package. See the document of
dired-quick-sort-setup
if you need a different setup. It is recommended that at least -l
should
be put into dired-listing-switches
. If used with dired+
, you may want to set
diredp-hide-details-initially-flag
to nil.
To use this extension, please make sure that the variable insert-directory-program
points to the
GNU version of ls.
Alternatively, to suppress warning and silently fail when you don't have the appropriate system
environment set up, set dired-quick-sort-suppress-setup-warning
to t:
(setq dired-quick-sort-suppress-setup-warning t)
You may be able to use this package when your are using TRAMP, but the actual sorting may be only working partly. This is likely due to the fact that TRAMP has its own way of listing files, of which I don't have a good grasp.
Please send all comments, questions, bug reports and feature requests to the issue tracker. To contribute, please create a merge request.