My Emacs Dired Settings
<set-frame-font "Dejavu Sans Mono 14" nil t>
<set-frame-font "Dejavu Sans Mono 12" nil t>
Custom set variables:
'(dired-clean-confirm-killing-deleted-buffers nil) ;; don’t ask whether to kill buffers visiting deleted files '(dired-listing-switches "-alt") ;; show hidden, long listing, sort by date '(dired-no-confirm t) ;; never confirm ‘byte-compile’, ‘chgrp’, ‘chmod’, ‘chown’, ‘compress’, ‘copy’, ‘delete’, ‘hardlink’, ‘load’, ‘move’, ‘print’, ‘shell’, ‘symlink’, ‘touch’ and ‘uncompress’ '(dired-dwim-target t) ;; guess target destination '(dired-omit-files "^\\.?#\\|^\\.\\(DS_Store\\|localized\\|AppleDouble\\)$\\|^\\.\\.$") ;; Filenames matching this regexp will not be displayed '(dired-omit-mode nil t) ;; Dired-Omit mode is enabled '(dired-recursive-copies 'always) ;; copy recursively without asking '(dired-recursive-deletes 'always) ;; delete recursively without asking
Global keys
(global-set-key "f" (quote find-name-dired)) (define-key global-map (kbd "C-x C-j") 'dired-jump) (define-key global-map (kbd "C-x 4 C-j") 'dired-jump-other-window)
Defalias
#+begin_#+beginsrc emacs-lisp
#+endsrc
(defalias 'dj 'dired-jump)
(defalias 'fd 'find-dired)
(defalias 'id 'image-dired)
#+endsrc
Other
(fset 'yes-or-no-p 'y-or-n-p) (setq dired-deletion-confirmer '(lambda (x) t)) ;; just delete, do not ask for confirmation
Hide details
(require 'dired-x) (add-hook 'dired-mode-hook 'dired-omit-mode) (add-hook 'dired-mode-hook (lambda () (dired-hide-details-mode))) (setq dired-deletion-confirmer '(lambda (x) t))
External packages
(global-set-key (kbd "C-x /") 'dired-narrow-regexp)
Main commands
C-x d – invoke dired
(global-set-key (kbd "<f5>") (lambda() (interactive)(find-file "~/")))
S-+ – create folder
m – mark
t – toggle / mark all
d – delete
m + shift d – delete
C – copy
c – compress
m – move
S – create a symbolic link (should say "to" not "from")
M - change mod spec (give example 777)
C – compress
B – Byte compile
%m – mark files by regexp
m + S-r – move files
z – uncompress or compress
g – refresh
! – runs a shell command on the file
U – to unmark all
* – mark only directories
~ – marks all backup files for deletion
C-x C-q – make a buffer editable
q – quits a dired window
Reduce the number of buffers in dired:
use a rather than RET.