My Emacs productivity guide

Posted in Productivity, published on

Tags: Emacs

In this guide I'll document some of the features and packages I use in Emacs to be more productive. I've found that Emacs is a killer platform when used to it's fullest potential. It is however a very, very, very extensive platform and I find myself forgetting features, key combinations or useful packages very frequently. Documenting things is always a good thing so here we go :-)

Some useful links:

Basic Emacs editing

I won't go over the basic Emacs commands for navigation or editing, but I have listed some useful commands that I keep forgetting exist.

To kill a piece of text you press C-w, this literally kills the selected region from the current buffer. Pressing M-w will put the selected region in the kill ring but leave it in the buffer. Yanking text from the kill ring into the buffer is done using C-y. You can also yank text from the kill ring using M-y, which will show a list of text in kill ring from which you can select using C-n and C-p.

Avy - The fastest navigation

I've installed the Avy package that allows for very fast navigation using nothing but your keyboard. When I press the key combination M-p I get prompted for a character. After entering the character you want to navigate to Avy will impose one or more characters over all characters you're looking for. Pressing those imposed characters will jump point to the character you're looking after. My explanation here is complex so try it out for yourself. A huge benefit of Avy is that you can keep your hands on the keyboard, your eyes on the screen and quickly jump around. You focus your eyes on a position in the buffer you want to jump to, press some key combinations and you're where you want to be.

Org-mode

I'll update this at some point in the future. For now just go ahead and memorize the org-mode manual, it's all awesome stuff in there.

Projectile

Projectile is a library for project interaction in Emacs. Thanks to projectile you can quickly navigate in a project and between projects.

The basic projectile key combination is s-p. A complete list of projectile commands and key combinations can be found by pressing s-p ?.

Navigating to a file in the current project is done using s-p f after which you can enter part of a filename.

Switching between projects can be done using s-p p

Magit - The best Git tool out there

Trigger magit using the key combination C-x g. This will open the magic status window. Some useful key combinations when you're in the magic status window: