<-- back RSS Feed

Dired - Using Emacs for browsing files

As you are probably aware by now, Emacs is much more than a text editor. I recently have been experimenting with using emacs for file browsing with dired and actually found it to be really good. Dired is built into emacs. To use dired you just need to use find-file on a directory. Then you will be presented with a screen similar to running ls -l. I personally find this to be a bit of an information overload so I disable the extra information by default and have a keybinding for adding it back.

    (add-hook 'dired-mode-hook (lambda ()
            (dired-hide-details-mode)
            (local-set-key (kbd "C-c d") 'dired-hide-details-mode)))
To mark files you can use m. Or to mark multiple files using regex, use % m. This is real useful to me, as you can use it for example to mark all files of a specific type; or as I take a lot of screenshots, to mark all screenshots so I can delete them. Once you have marked your files, press D to delete them, Z to gzip them, or R to move/rename them. There is also a bulk editing mode which can be accessed by pressing C-x C-q which makes the buffer writable and you can quickly bulk rename a big group of files.