Every so often my programming productivity takes a steep dive as I try to use a new text editor.
Why do I put myself through this? Simply put, I'm a bit of an efficiency fanatic. Fanatic in the sense of pursuing some end with not-entirely-rational vigor and passion. I call it fanatical because the pursuit of ever more efficiency in and of itself takes quite a bit of time, thus actively working against my ostensible goal of being more productive.
Whatever, it's a hobby.
Let's make a timeline.
Oh yeah, I started there. This was when I first started learning web development and thought to myself "It's just text and images, how much harder than Word could it be?"
I'm not putting Dreamweaver down—it was actually a very good start. There were professional video tutorials about it since it was part of the Adobe suite. It even had code mode, which is just like any normal text editor.
However, it was not to last. Even with code mode I felt like I wasn't a programmer, whatever that meant. I felt like I needed more of a hacker-ish interface on which to work my magic.
Yes, same year as Dreamweaver. After a bit of Dreamweaver I discovered Coda, a pretty nifty text editor that's still around (as of 2020-08-20). Why do I say that as if it's a big deal? Well, I'd be surprised if anyone who started programming after 2013 knows about it. This is not to say anything bad about the product, I just never met a single other programmer who had used it.
The cool feature that drew me in to Coda was that it could know about your websites. As far as I remember it was pitched as a great editor for creating front-end sites (JS, CSS, HTML). Back then my move was to write some code, open an FTP app and then drag/drop the files into it. Coda handled this nicely and saved me time.
Then, the programming world collectively gasps as Sublime Text 2 sweeps over the industry (* I doubt the Vim/Emacs people cared much, but as you can see I was not yet among their numbers).
Sublime Text was just awesome. It was fast. It was minimal yet powerful which appealed to the power user in me. It was not intuitive, it was not discoverable, it was configured via JSON! It was exactly what I wanted.
For two whole years Sublime Was my primary editor and it was great. Along the way it taught me the power of dedicated tools, rather than an integrated suite. I used different apps for my terminal, my FTP client and my editor.
Of course my time with Sublime and the productivity it won me made me want more, and thus paved the way towards the black hole of text editors, the editor form which—once you have learned it—you will never fully detach yourself.
In 2015 it finally clicked. This was something of a watershed moment in my text editing career. After years of false starts Vim finally took hold of my fingertips and things have never been the same since.
Vim is hard to learn. Significantly harder than learning touch-typing. Anyone who already knows how to program but does't know Vim could probably pick it up in a month. However, it took me years. This was probably due to the fact that even I have my limits when it comes to "productivity hacking" and Vim will really, really decrease your productivity for a time. So I never used it much, just gave it another try here and there and eventually it stuck.
Yes, but it's not for everyone.
If you write a lot of code, or even just prose, using Vim is nothing short of magical. It feels like being in the future already, when computers simply do what we think.
A mouse is an imprecise device. Analog motion (i.e. your hand sliding a mouse across a desk) is relatively intuitive, but it's slow compared to directly telling the computer what you want. Anyone who's used software professionally for long enough understands this. Designers, architects, authors, anyone who uses a computer as a creative tool and uses it a lot eventually feels the strain of repetitive interactions. That's why professional software packages have numerous hotkeys. Even your operating system has numerous hotkeys, even if you don't know them or use them much.
When you're using Vim, everything is a hotkey. Every action you take you take with keys, which offers a great deal of precision and speed when it comes to editing text.
A quick example. Let's say you want to select all the text "here, within these quotes." What do you do? Normally, you just drag the mouse over all the text within the quotes and start typing. No problem! Now consider you have to do this many times a day, perhaps hundreds of times a day, with different text. Sometimes the text wraps around the screen, causing you to have to move your mouse further. Sometimes you accidentally drag too far or not far enough, causing you to have to hit undo and try again. This may all sound minor, but again, consider having to do it hundreds of times a day.
Now, if you're a Vim user you just type
ci". Three characters. The mnemonic for this sequence is "change inner
"." The interesting thing is you can use that same
ci "change inner ..." command with other characters. For instance
ci' will let you change all the text inside single quotes.
ci( will let you change all the text inside parens, and so on. It's quite a flexible and highly productive system (once you learn it).
2016Vim + Atom
Enter Atom. I actually don't have a lot to say about Atom. I used it as my secondary editor since, again, once you've internalized Vim you never go back. However, Vim has a significant drawback: You have to program it to make it play nicely with new languages. That's right, you have to write code just to get your editor to let you write more code in an appealing way.
This is where Atom came in. It's a mainstream text editor in the sense that it has lots of features built-in and it will do its best to help you along the way. It also has a plugin repository where you can search for new plugins that do things like support new programming languages. It even has—and this is key—a plugin to emulate Vim!
So I ended up using Atom whenever I had to work with code that I hadn't yet configured Vim for. It worked out of the box, it was intuitive and it sort of supported Vim-like editing.
Perhaps most importantly, at this point my company had hired other developers and as the senior member of the team I needed to be able to recommend a way to edit our codebase—that recommendation was Atom.
2018Vim + VSCode
So after a couple of years I decided to revisit VSCode. I honestly don't know why, but it became hugely popular and so it came across my radar again. It's a great text editor, but in my view it fills the space that Atom was in so I'm not sure why anyone switched 🤷♂️.
Regardless, I tried it out and thought "this is ok." The thing was, at this point I was a much more experienced programmer and really didn't want to spend time not directly solving whatever problem I was working on. I had little patience for configuring text editors, so whenever I tried a new language I would just open up VSCode instead of Vim since it would either immediately work well or have a plugin I could install.
VSCode still filled the space of secondary text editor until one day I discovered a plugin for VSCode that embeds Vim... 🤯
Thus the balance switched. Now I use VSCode (in Vim mode) as my primary text editor and Vim as the secondary.
2020Vim + VSCode + Emacs
And finally we're caught up. 2020 and I'm trying a new text editor. Why? Blame Clojure. Emacs and Lisp languages go very well together so I decided to try out Emacs, and it's pretty neat.
I only recently started using Emacs, so I can't actually speak to it's long-term utility but it's definitely interesting. Aside from being a lisp-based editor, which highly appeals to me, it also seems to fully support Vim. It emulates Vim but it does it so well that as far as I can tell you get the best of both worlds.
Since I haven't exactly come to any specific point, it's fortunate I didn't start writing this intending to make one. If there was one it would simply be: Pursue your hobbies.
Believe it or not fiddling with text editors brings me joy, so despite the occasional dips in productivity I continue to tinker. Besides, there's always the off chance that I'll become more productive.
This post was discussed on Hacker News: https://news.ycombinator.com/item?id=24290128
¹ Vim has become something of a catchall term for Vi and Vim, which are separate editors. Vi was first and Vim didn't show up until the 90s.
I write about life as well as my mistakes and successes as I learn to build a business. I'm building a self-funded startup (Pairwise).