Programming Like I Was Playing Starcraft
Since I could think, I have been fascinated by virtuosos. People that master their tool like it was a finely tuned piano and they improvise the most complex fugue on it. People that use the keyboard to place structures and command units, as a direct extension of your brain.
Seeing other developers use Vim reminds of exactly that fascination. Vim is a keyboard only text editor usually embedded in your terminal. It has experience a ressurgence through it's offspring called NeoVim which by the community is referred to as Personalized Development Environment (PDE as opposed to IDE).
As a VS Code user I have been reevaluating my priorities enthralled by the dream of one day me too becoming a virtuoso.
What I don't like about VSCode:
- Search feels sluggish and unprecise
- being a polyglot working in different domains it got bloated
- The interface is generally a bit too much, I would like more minimalism
- The speed of editing and navigating code (with the mouse) sometimes loses a lot of time
- Inconsistent behavior across languages (language servers, syntax highlighting and language actions have very different degrees of support)
Things I'd like to have in a new editor when moving:
- Token lookup (definition, declaration)
- Quick file access and navigation
- Git integration with branch overview and infile diff
- debugging with state inspector
- Configurable scripts per environment language for common tasks like live server for webdev
- easily customizable theme
- the idea of workspaces or grouped accessible repositories
So before doing a switch and committing to that, I am going to explore the CLI based editors (besides Neovim), and first explore them in terms of their User Experience. With how much effort I can get these features.
Only then I will venture into vim motions. And this is where i have a confession to make. I have never been the virtuoso myself, and had to take shortcuts my entire life. As a result I have never adopted touch typing.
So after navigating a few days through the ecosystem and communities of each editor, I solidify my decision and will go with the OC Neovim. The plugin ecosystem on Github seems endless and it seems like a very vibrant community.
So to get there, first things first. I need to get into proper touch typing training. As my friend TX perfectly described me, I am a "master pecker" and I think my productivity would benefit greatly and synergies well with neovim's keybindings. And who knows, maybe I'll also start being able to play games like Starcraft.
After some training I started to become more fluent. Surprisingly I got more confident the more letters were introduced. This is when I felt that my existing index finger based typing memory was melting with the new typing style. Since you use the index (and poor pinky) predominantely for most keys anyways. However I am still writing this section of the article like a wood pecker. What is interesting though, is that once you start getting in the rhythm of typing the full range of characters you find back naturally. Moving away from the home row has always been a confusing movement for me. Instead now it feels natural, the home row is like a resting position, while the letters around it feel more like the actual working position (for which I need to bend my fingers to reach). And what I have also noticed is that certain words produce a very specific shape or finger configuration. Also I am getting a slight cramp in my armwrist.
Typing like this feels less like the party game twister, once I conceded my self to let my fingers flow freely over the keyboard. But I gotta say I now hate the letters "B V N P Q". When I was woodpecking away at my keyboard every letter required the same amount of effort. However now typing some letters feels more natural than others, which leads to a hierarchy of letters. I think that the next milestone will be to normalize this feeling, so that every key feels equal.
So off we go learning touch typing with a german keyboard layout yet.
I also thought it was a good idea to record my current style on typemonkey to have a benchmark and reference point in the future
This by comparison is my current touch typing speed. Yikes.
I would compare NeoVim with something like Dwarf Fortress. While the original Dwarf Fortress did not focus on fancy realtime graphics, most of the development effort could be put into developing features and extending the system. Similarly here the core editor is so simple and minimalistic, that extending it is very easy and since the UI threshhold is so low it exponentially raises the collaboration rate which leads to a blossoming ecosystem.
I can now say with absolute certainty that I am not going to miss VSCode again.
EDIT from the future: I actually did.
Quick Summary after 1 Week
I checked out a lot of things regarding neovim during the holidays. It is cool. Feels very modern and productive. The LSP, Treesitter and Telescope are killer features, more than Vim motions for me personally.
I got into Lua, I setup a config from scratch following a tutorial from the vim evangelist himself. I checked out Kickstart, and LazyVim (to explore the full IDE potential of a distro). I am now familiar with most options. I am familiar with the most basic commands and motions. And my takeaway is that for now, seeing how much problems I have with it on windows, it will stay a hobby.
I will probably use the neovim plugin for vscode, to get familiar with it. The entire PDE (Personal Dev Environment) concept is very attractive but not what I currently need. I felt the happiest with the LazyVim distro. Meaning out of the box is usually good enough for me. But my journey will not end here. The long term goal will be to adapt it into my main workflow. But right now there is simply too many problems that outweigh the benefits.
But the entire modal and keyboard driven input system has motivated me to pick up touch typing again. Which is a big part of the productivity equation.
I was pretty blown away by the progress that I have made. I tried to train touch typing regularly for about 40 min. a day and could already feel the effect of it on my muscle memory. The biggest benefit is the absolute confidence with wich I can now locate most keys without looking at the keyboard once. Eventho I still catch my self pecking away at the keyboard every now and then.
Now when I am typing in my usual pecking style I try to throw in some touch typing here and there to have a smooth transition without losing the ability to write fast.
Setting up Neovim on Windows
Up until now I was treating neovim as a little side game on my Linux Laptop.
I followed this guide to also integrate neovim in my main Workstation, which runs on Windows. I had problems getting the internals to work.
However the only thing that helped, was deleting nvim-data, install LLVM and use the clang tool chain to reinstall all the tree sitter parsers. Now it works.
Now two weeks have passed since I started this post and have been editing it since then, and the primeagen drops this This little metaphor. And by the way, yes I am the guy who always said, why would I use shortcuts?
Training for Vim
Reconfigure Keyboard (OME, PBT, ANSI-US, MX Cherry)
Due to a very tight deadline and the advent of multiple projects simultaneously I had to put my newly found ambitions to rest over a long stretch of time. And have both abandoned NeoVim, adjusting to it slowly through VSCode's Neovim Plugin and have adjusted to the EN Layout, now being able to peck with two fingers in ANSI.
Takeaway
After almost 2 years of rest I can now give a final conclusion. Through this experience I have now become more familiar with Vim
which is always helpful dealing in the terminal with CLIs such as git
. I have learned to use the EN-UK layout, which is very similar to the EN-US layout, mainly benefitting from an easier access to programming symbols. I have also consolidated the benefits of NeoVim with VSCode by sticking with the NeoVim extension.
Main reason for this, were all the nieche environments VSCode has access to, like attaching to Unity for debugging, Launching and Building Unreal from Source (now officially supported by Epic) and the sheer joy of using the builtin debugger with it's expression based watchers. Also I have smaller environments like TidalCycles, with REPL evaluation straight from the editor. These are just some of the environments and workflows I would have to write or customize from scratch for a dedicated Neovim environment. Now instead I enjoy the benefits of modal typing and keybinding of Vim, while when in Insert mode
still being able to enjoy the built-in features of VSCode (like the regex powered search and replace).