diff options
author | Tom Willemse | 2016-10-13 00:16:32 +0200 |
---|---|---|
committer | Tom Willemse | 2016-10-13 00:16:32 +0200 |
commit | c86529b5613dbdafe458e97e4061e578813cf3d8 (patch) | |
tree | 78f537d80400dad8eec6f42d7841e2bb3bc9cadf /emacs/.emacs.d/init | |
parent | 781e1f8c10cdb6249b36e930409e2258dbee4a4a (diff) | |
download | new-dotfiles-c86529b5613dbdafe458e97e4061e578813cf3d8.tar.gz new-dotfiles-c86529b5613dbdafe458e97e4061e578813cf3d8.zip |
Add Dired config
Diffstat (limited to 'emacs/.emacs.d/init')
-rw-r--r-- | emacs/.emacs.d/init/dired-init.org | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/emacs/.emacs.d/init/dired-init.org b/emacs/.emacs.d/init/dired-init.org new file mode 100644 index 0000000..17f90a1 --- /dev/null +++ b/emacs/.emacs.d/init/dired-init.org @@ -0,0 +1,29 @@ +#+TITLE: Dired + +#+BEGIN_SRC emacs-lisp + (require 'dired) + (require 'dired-x) +#+END_SRC + +Show human-readable sizes in dired buffers. + +#+BEGIN_SRC emacs-lisp + (setq dired-listing-switches "-alh") +#+END_SRC + +Show the same info for subdirectories, but don't show the =.= and =..= +directories, since those are most likely already shown in the buffer. + +#+BEGIN_SRC emacs-lisp + (setq dired-subdir-switches "-Alh") +#+END_SRC + +Add a keybinding to dired buffers to change to wdired. + +#+BEGIN_SRC emacs-lisp + (defun oni:dired-add-wdired-keybinding () + "Add a keybinding for wdired mode." + (define-key dired-mode-map (kbd "E") 'wdired-change-to-wdired-mode)) + + (add-hook 'dired-mode-hook 'oni:dired-add-wdired-keybinding) +#+END_SRC |