#+date: 2021 #+options: toc:nil num:nil author:nil * Dired Dired is a directory manager. You can find, open copy, move, delete query and manipulate files and directories. ** Open a directory with dired and initialize mark regxexp: : %m Then, use regex to mark the files. This will mark all the html files in directory : \.html$ This includes all temporary files in dired : $~ This marks all files beginning with "_78" : ^_78 ** Delete, copy, move files or directories - To delete, first flag the files ("d"). Then, use "x" to execute delete. - To compare two files, mark the first file, then go to the other file and press "=" - To rename or move files first flag the file, then use "R" - Mark all files within a directory (except '.' or '..'): ~*s~ - Unmark all marked files in directory: ~U~ - To copy files use "C" over the file you want to copy - Convert files or directories to lower (~%l~) or upper case (~%u~) * Tips * 'f11' toggle full screen mode the current frame * ibuffer kill multiple buffers * After open a list of buffers "M-x ibuffer" mark itens with "m" and kill with "D" * Avoid ido auto complete to rename a file with similar name to those in directory * Once you've typed the filename you want, hit C-j instead of RET. * You can temporarily switch back to the "normal" minibuffer behaviour by hitting C-f. Then you can tab-complete the old filename, and edit it as needed. * From [[https://stackoverflow.com/questions/23741014/how-to-stop-auto-complete-from-overwriting-a-file-that-is-similarly-named][Stackoverflow]] * To use ~nano~ editor within emacs use 'CTRL+shift+x' instead of 'CTRL+X'