Anybody who has been an active Linux user for a while probably knows about the editor war. While you can see it as a bit of a meme it is also not. Emacs versus vi(m) discussions have a tendency of driving people to the extreme. Many flame wars have been fought in the name of the perfect text-editor.

I want to be clear. I have no interest in claiming that one is better than the other. It all depends on the use-case and personal preference. I merely want to give an idea of why I’ve chosen Emacs over anything else.

For the love of god what is Emacs?

You might think that Emacs is a text-editor. Well it is, but it is also much more than just a text-editor. At its core Emacs is an interpreter for Emacs Lisp, a dialect of the Lisp Programming language.

Why I decided to switch to Emacs

I switched from vi(m) to Emacs because I wanted to try out org-mode. By using Emacs more every day I fell in love with it.

Some of the reasons include:

  • Buffer management
  • File management with Dired
  • Editing remote files with Tramp
  • Magit: magic for git!

How I set up Emacs

The framework: Doom Emacs

I use the Doom Emacs configuration framework since it has great support for a lot of packages. Configuration of the framework is also user-friendly and easy.

You can check out my Doom Emacs configuration files on github.

Emacs built ins I can’t live without

While I was still getting to know Emacs there are two features that stood out. These are Tramp and Dired. Let’s have a look at what these do and why I need them.

TRAMP

TRAMP stands for “Transparent Remote (file) Access, Multiple Protocol”, and it provides remote file editing. I sometimes use it with ssh which makes it easy to modify remote files using Emacs. It is also easy to use. You can use the remote file path /ssh:user@host:/path/to/file with auto-completion to open a file.

If you need sudo you can combine it with ssh in the form of /ssh:user@host|sudo:user@host:/path/to/file. Now I can say goodbye to swearing if a server only has vi installed instead of the full vim package.

Dired

Dired is the Emacs directory editor. It’s an easy way to navigate the file system without leaving Emacs as well as performing several file operations.

My top 5 Emacs packages

Evil-mode to save the wrists

Evil is an extensible vi layer for Emacs. It emulates the main features of vi(m) inside of Emacs. While I like Emacs for its features I don’t really like the default set of keybindings.

I’ve been a vi(m) user for so long that I really got used to (and need) vim-style keyboard shortcuts. When I can’t use vim-style keyboard shortcuts there is a chance I will not even consider using an application.

Magit (+ vc-gutter)

To be honest I always thought the git command line couldn’t be beaten. Until I tried using magit, it’s the best way to use git by far! I can’t live without it anymore and use it every single day.

Git-gutter is also a nice addition. It’s simple: it adds a sidebar that shows the git status for the current buffer.

Projectile and treemacs

To navigate projects projectile is a lifesaver. It makes basic operations really easy and nice.

It will help me with:

  • Finding files in a project
  • Switching between different projects
  • Searching inside of project files
  • and more

Treemacs is also nice but I don’t use it often.

Vterm

Sometimes I quickly need a terminal while working in Emacs. Vterm helps me to do that with terminal emulation inside of Emacs.

Org-mode to save my life

There is really a lot I can say about org-mode. It is the main reason I decided to switch to Emacs. The org-mode tag line is Your life in plain text and that really is true for me. Before I started using org-mode I was switching between numerous to-do list managers. Since I switched to org-mode however I’ve never looked back.

It helps me with:

  • Task and project management
  • Personal wiki & journaling with org-roam
  • Calendaring

Org-mode in short

What is org-mode

Org-mode is an Emacs mode for working with outlines. All org-mode documents look something like this:

* A header
Some content.
** A sub header
More contents.

It uses a plain text format and has an incredible feature set that allows an unlimited amount of use cases. Among some of the features are:

  • Outlining
  • Taking notes
  • Keeping track of projects and to do’s
  • An agenda

Check out the official site for more information.

How I use org-mode

I use org-mode to track my:

  • Goals
  • Projects
  • Tasks

Other things I manage with it:

  • Notes
  • Journal
Structure
org                             # root directory for my git repository
├── agenda                      # org-files that are included by org-agenda
│   ├── clocktables.org         # in here i do some time tracking
│   ├── g_*.org                 # some calendar files (pulled from google calendar)
│   ├── goals.org               # my goals
│   ├── inbox.org               # the inbox, all todo items start here
│   ├── lists.org               # lists like reading list, ...
│   ├── <client>.org            # projects or to do items for specific clients
│   ├── personal.org            # personal projects or to do items
│   ├── someday.org             # someday/maybe list
│   └── tickler.org             # tickler (deferred items)
└── roam                        # org-roam (reference material, notes)
    └── daily                   # journal

For more details, I’m planning on writing a more detailed blog post on how I use org-mode.

To stay or not to stay

While I am a tool-hopper, I have plenty of reasons to stick with Emacs:

  • Org-mode
  • Some great packages
  • Great built in features