dotfiles/emacs/.emacs.d/init/dired-init.org
2016-10-13 00:16:32 +02:00

732 B

Dired

  (require 'dired)
  (require 'dired-x)

Show human-readable sizes in dired buffers.

  (setq dired-listing-switches "-alh")

Show the same info for subdirectories, but don't show the . and .. directories, since those are most likely already shown in the buffer.

  (setq dired-subdir-switches "-Alh")

Add a keybinding to dired buffers to change to wdired.

  (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)