For background, I have at this point spent over twenty years as a vim user. I have been dragging around an evolution of the same
.vimrcfile I had when I was a teenager and beginning to use Linux and Free/Net/OpenBSD at the time.
I have tried VSCode out a few different times now, looking for something that could fill the space between vim and an IDE for activities like writing Scala and Clojure. I quite like JetBrains' collection of tooling but, like many people, I am a creature of habit so I find it is easier to get things done when using my daily editor. I have continued to think that perhaps VSCode could fill that void, given its popularity and the range of extensions available. I have found that there are many things to like about VSCode: it is relatively lightweight, extensible, and there’s a large community of people who use and develop for it.
However, there has been enough frustration that I return to vim after a while
each time. But when compared to VSCode, my trusty sidekick
vim was starting to
look a little long in the tooth so I set out to try
neovim. People have been
saying really good things about it, so I had high hopes that I could find
something a little more like VSCode but still vim. I have long appreciated vim
for its simplicity and I largely enjoy the benefits of tmux + vim as my primary
development environment. It has most of the benefits of a tiling window manager
in terms of productivity without the unfortunate downsides they bring, and it’s portable
between operating systems.
Without igniting a holy war, let’s just say this – I do not want to have 800
running on my machine just so vim can have modern LSP integration. Yes, I know there
is neovim-native work going on, and hats off to the
developer of “Conquer of Completion” as a nice way to leverage existing VSCode LSP plugins
in vim but I’m going to have to pass. It just feels backwards and fragile; among other things
it just raises the complexity of my editor - needing to install node and now manage a separate version
of node for this plugin system that may or may not be the same as the one I am using for a project just
begs to cause problems. So, after all of these attempts, I finally did something
I never thought I would do – I tried emacs in earnest. (cue ominous music?)
I’m not certain I’m going to hang up my vim hat any time soon - I still find
myself using it for quick edits, and I suspect that will always be the case
given its ubiquity across UNIX systems. Using emacs has been quite pleasant thus
far and I have to say that I like it overall; I have been able to keep my vi
muscle memory thanks to
evil-mode, which is probably helping. There are quirks
and I’m still learning the core of the system but, if neovim is going to shove
Lua into its core (which is not necessarily bad, let’s face it, vimscript is
TypeScript that is VSCode, but I have always enjoyed programming in lisp so it
seemed like a reasonable thing to try.
Easing myself into the water
I tried spacemacs a while back at the recommendation of a friend but found it was slow and a bit too opinionated (which shouldn’t be a surprise, it’s right there in the marketing material). Searching for something a little lighter, I came across Doom emacs, which has been great at getting me started using emacs with a reasonably minimal framework. I am beginning to get the hang of org mode, and using hooks for the various other modes to accomplish what I want, and there’s even a built-in profiler for finding out what’s wrong when things go a little wacky. I would recommend it as a starting point for any new emacs user.
A modern look and feel
It’s even possible to get emacs to look like a modern application on macOS with a little theming and using a plugin that lets me embed WebKit in a window so I can live preview the site as I edit it without having to have a second window!
A programmer’s editor
I have come to realize that this is a pretty good slogan for emacs; it’s quickly becoming my go-to editor. Some specific things I like so far (all of these are available with Doom emacs):
- evil all my keyboard habits can come with me!
- treemacs is a great file browser, just the right combination of utility and explorer
- projectile is fantastic for managing projects, simple yet effective and searching is fast
- centaurtabs for tab management
- ansi-term provides a nice terminal in your editor, and since it’s a buffer it’s way easier to copy / paste / fix command mistakes, etc.
- scala-metal is way better in emacs than in vim - hands down it’s a delight to use
- org-mode is awesome, the org-roam plugin is a great mix of org-mode and the Roam note taking philosophy
- elisp I am beginning to really enjoy being able to programmatically hook into my editor in a natural way
So, this is my first week using emacs – look for more posts about how it goes and what new things I learn over time. If you have anything you think is worth sharing, pass it my way!