This is a reference sheet for our favorite dired commands and keybinds. Here some other prominent cheat sheets:
If the vanilla key is omitted, it’s because it’s the same as the evil key.
Entering dired
| Evil Key |
Vanilla Key |
Description |
|
SPCfd
|
C-cfd
|
Open directory in dired (prompts you) |
|
SPCo-
|
C-co-
|
Open current directory in dired |
|
SPCp. + RET
|
C-cpD
|
Open project root in dired |
Leaving dired
| Key |
Description |
| q |
Kill all dired buffers |
File IO
| Evil Key |
Vanilla Key |
Description |
| D |
|
Delete the file at point |
| R |
|
Rename the file at point |
| C |
|
Copy the file at point |
| + |
|
Create a directory |
|
SPC.
|
C-xC-f
|
Create a new file |
| = |
|
Diff files |
| Z |
|
Compress a file/directory |
File listing
| Evil Key |
Vanilla Key |
Description |
|
gr
|
g |
Refresh the dired buffer |
| ) |
|
dired-git-info-mode |
|
SPCmh
|
C-clh
|
Toggle hidden files |
Navigation
| Evil Key |
Vanilla Key |
Description |
| RET |
|
Visit the file/directory |
| gO |
o |
Visit file/directory in other window |
| - |
^ |
Go up one directory |
Marking files
| Key |
Description |
| m |
Mark files |
|
%m
|
Mark files by regexp |
| ! |
Run shell command on marked files |
| d |
Mark file(s) for deletion |
| x |
Delete marked files |
| u |
Unmark a file/directory |
| U |
Unmark all marked files/directories |
Renaming files/directories in bulk
-
C-cC-e to activate wgrep (a writable grep buffer).
- Make your modifications (or deletions) to the file paths like you’re editing plain text.
- Commit your changes with C-cC-c or abort with C-cC-k
9 Likes