Nathan

Learning Vim Motions Everywhere!

June 19, 2024

Motivation

I started using Linux, or as I've recently taken to calling it, GNU plus Linux seriously around 3 years ago. During most of which, I have been using VSCode as my main text editor. Although I learned the basics of Vim (mainly how to exit it) and some basic commands, I never really took the time to learn it properly. I love having a keyboard centric operating system, which is the main reason I use i3, so why not try to recreate that everywhere else!

Image

VSCode alongside Neovim

I was not keen on the idea of customizing and setting up Neovim from scratch. I opted for NvChad, a premade config very easy to use for new users. It makes Neovim feel like a typical IDE with all the productivity benefits of Vim keybindings.

Image

Now I have to admit that a lot more setup is necessary to make Neovim my new IDE, in the meantime, I will stick to using it for editing isolated files here and there. I simply do not have the time to set up the proper language servers and formatters for my current workflow as of the time of writing this. As a compromise, I installed the Vim extension, which gives me the power of Vim inside VSCode.

Browser Integration

To force myself to learn the vim keybindings, I decided to install the Vimium extension. Vimium allows you to browse the web almost exclusively mouse-less with Vim keybindings. I have to admit, being able to switch between my terminal and my browser without having to move my hands off of the keyboard has felt like magic at times.

Image

On pressing the [F] key, each link on the page gets assigned its own key combination which then leads you to said page, surprisingly intuitive. You can also use [Shift + F] to open in a new tab.

Note Taking with Obsidian

Obsidian is my software of choice when it comes to note-taking and maintaining an organized knowledge base. Thankfully it comes with a built-in Vim mode which can be toggled in the settings

Image

Conclusion

The journey to learn Vim will be a long one, however, I do believe it will be beneficial later on. Interacting with remote shell while knowing the intricacies of Vim should be a huge time saver later on in my career.