Fifteen Days with Dired

Ramit Mittal is a new Spacemacs user who decided that for 15 days he would use Dired for all his file operations. That’s not hard to do. I don’t always use Dired but it’s usually easier than bringing up or switching to a terminal to do it by hand. Especially since if I need to do a file operation, I am almost certainly in Emacs anyway.

For most operations, Dired provides the advantages of doing an ls followed by whatever file operation you need. In fact, it’s better because you can search for the file you want to operate on by typing the first few letters.

Mittal’s post demonstrates some of the ways he learned to use Dired to make his workflow easier. He mentions, for example, that when you open a terminal while in a Dired buffer, the terminal will open in the same directory as the buffer.

He also mentions using xdg-open to open a file in its default application. That works in Linux; for macOS, you would use open. Although he doesn’t mention it, you can also map xdg-open or open to the be the default action for the ! and & commands.

I don’t know for sure but my impression is that Dired is an underused feature of Emacs. It’s really powerful and useful and very much worth taking a bit of times to learn. It also helps to bookmark its refcard so you can bring it up if you forget one of its many commands. In any event, Mittal’s post is short and worth spending a couple of minutes to read.

This entry was posted in General and tagged . Bookmark the permalink.