-
Emacs file manager Dired [go]
-
-
Some Common commands
Emacs file manager Dired [go]
Bytes. M-x Dired or C-x D, you can enter Dired-mode, so that you can operate on the file, as a file manager is quite good. Add the following statement to. emacs:
>(Setq Dired-recursive-deletes T); recursively delete a directory (setq Dired-recursive-copies T); recursively copy (require 'd d-x ); some special functions (Global-set-key "/C-x/C-J" 'dired-jump ); jump to the current directory's Dired (setq Dired-guess-shell-alist-user (List (list "//. CHM $ "" xchm ") (List "//. rm $ "" gmplayer ") (List "//. rmvb $ "" gmplayer ") (List "//. avi $ "" gmplayer ") (List "//. ASF $ "" gmplayer ") (List "//. WMV $ "" gmplayer ") (List "//. htm $ "w3m") (List "//. HTML $ "w3m") (List "//. MPG $ "gmplayer"); sets the default open mode for some files. This function must be after (require 'd d-x)
Some Common commands
Open a directory like a file or use C-x D to access the directory's Dired buffer. This is the default binding after Dired-X is enabled. The meaning of the symbols in []: [*] serves on all the marked files (directories) or the current file (directories) where the cursor is located. [P] The prefix parameter indicates the number of files. Starting from the current file, the values are positive and negative. [U] uses the prefix parameter to change the default behavior. For commands that set the tag, the tag is generally removed. [X] Dired-x needs to be loaded.
View help
- ? Simple help
- H mode help
Move cursor
- N, P, SPC move cursor up/down [p]
- C-N, C-P move the cursor up and down [p]
- M-{, M-} Move Between marked files [p]
- Move the sub-directories in the C-m-P and C-m-N buffers [p]
- <,> Move the contents in the buffer between lines [p]
- Move the directory tree in the C-m-u buffer [p]
- Move the m-g cursor to a file
- The M-G cursor moves to a subdirectory in a buffer (inserted with I)
Mark a file
- M: Mark the file and move down a row [p].
- Remove the U mark and move down a row [p]
- Remove all tags in the buffer.
- M-Backspace removes all the tags in the buffer. The default value is *.
- Backspace and remove the flag of the previous row, and move up a row [p]
- T mark/unmark swap
- D. Delete all marked files/directories.
- D. Set "delete tag" (character D) and move the cursor down a line [p].
- X delete the files/directories marked with d
- ~ Mark the backup files in the buffer as deleted [u]
- & Useless files are marked for deletion
- # Marking the deletion of automatically saved files in the buffer [u]
- . Based on the backup file version, delete the backup file with the mark [u]
- % G mark all files with "regexp" [u]
- ** Mark all executable files [u]
- *. Mark all files with the same extension [ux]
- */Mark all directories [u]
- * @ Mark all symbols to connect [u]
- * C. Change the flag.
- % D deleted by matching regexp mark
- % M mark [u] By matching regexp
Copy, move, create files or directories, and connect
- C-x C-f: create a file
- + Create a directory
- Rename/move the R File
- C copy a file []
- S. Create the Symbol link (absolute path) of the file [p]
- Y: The Symbol link (relative path) of the created file [px *]
- H. Create a file's Hard link [p *]
- % C copy the file matching regexp [p *]
- % S create a Symbol link (absolute path) matching regexp [p *]
- % Y: Create a Symbol link (relative path) that matches regexp [p *]
- % H create a Hark link that matches regexp [p *]
Modify file name and attributes
- M. Modify the rwx permission attribute of the file.
- G. Modify the file Group attribute.
- O modifying file Owner attributes
- T modify the file Timestamp
- % L change the file names to lowercase [p *]
- Change % u file names to uppercase [p *]
- % R, % r rename/move the file matching regexp [p *]
Access files and directories
- E, f, RET open files or directories
- A. open the file or directory and replace the current buffer.
- V views files in view mode, and q exits. Some files are called by an external view program.
- O open a file or directory in another window
- C-o in another window, open the file or directory, but the current window does not change
- F Open (multiple) files [x *]
- I use Info mode to view files
- N view the file in man mode. If there is a prefix parameter, the system prompts you to enter the Processing Command [ux *].
- V view files in RMAIL mode [x]
Exit
- ^ The parent directory of the Access Directory. If the prefix parameter exists, open [u] in another window.
- Q: exit the buffer. If there is a prefix parameter, disable the buffer [u].
Hide/refresh content in the buffer
- Sort "file name/time" in s swap buffer [u]
- C-u s modifies the parameters passed to ls, that is, modifies the content of each line.
- I. Insert the subdirectories of the current row into the buffer.
- M-o hides/displays some secondary files, making buffering easier. If the prefix parameter is used to mark hidden files, [ux]
- $ Hide/show content in the current directory [p]
- M-$ hide/show all contents in the buffer
- K. Hide the file and press g to display it again. [p *]
- L refresh the buffer file [p *]
- G refresh and buffer all files
- C-/, C-_, C-x u dired mode undo
Others
- = Compare files
- M-= Comparison Between Files and backups. If there is a prefix parameter, the system prompts you to enter the diff option [u].
- W copy the file name to kill-ring [p *]
- Z compressed/decompressed file [p *]
- X execute the shell command on the file [p *]
- B compile (Emacs Lisp) file [p *]
- L load (Emacs Lisp) file [p *]
- Y indicates the file type information (using the file command)
- P print file [p *]
Other useful functions in the dired-x.el
- Dired-mark-extension mark by suffix
- Dired-flag-extension: delete by suffix
- Dired-clean-patch mark to delete the patch file
- The dired-clean-tex mark deletes the tex compilation file.
- Dired-very-clean-tex mark to delete the tex compilation File
- Dired-jump to the directory where the current buffer is located
- Dired-jump-other-window jump to the directory of the Current Buffer in another window
- Dired-omit-here-always generate the. dired file in the current directory