The simplest custom variable that makes dired a lot better:
(setq dired-dwim-target t)
dwim means "do what I mean" and is the perfect description for using dired with multiple buffers.
The idea is, I have multiple directories and I need to copy/move files between them. Dired is great for this because the keybindings are short, no typing rm -r
, cp -r
, mv
, etc. In addition, it's supported at the system level - so it will work on anything that runs emacs, so if you move to a Windows machine and don't know any of the shell commands then emacs will just work (TM).
This comes in particularly handy when dealing with remote dired windows. I can mark some files, press C
and dired will "figure out" that I want to copy the marked files from one server to the other.
Take this example, I want to copy all the files ending in .h
to my remote server:
Note, I still use scp
and rsync
a lot, but this has certainly reduced it and made a lot possible with fewer keystrokes.