My VSCode + Vim Workflow

mbvissers.eth
Quick Programming
Published in
3 min readMar 10, 2024

--

If you don’t rush yourself, learning Vim is much easier than you think.

Photo by Boris Smokrovic on Unsplash

I wanted to learn Vim. Mostly because of the higher productivity one could achieve with it. Eventually I tried Neovim, NvChad, and the VSCode Vim plugin. And now I’m more productive than ever.

What is Vim?

Vim is a highly configurable text editor that’s often used in the terminal for editing code and text files. It’s known for its efficient keyboard shortcuts and powerful features, making it popular among programmers and developers.

Thanks ChatGPT.

But yes, Vim (Neovim and all other flavors) are simply text editors that work from within the terminal (except GVim and friends) that can be used for very efficient development.

It has an extensive history and has been used by developers for a lot of years. Even longer if you also include the older brother ‘Vi’, which was based on the ed editor.

Why should You learn Vim?

Honestly, I don’t think you should learn Vim if you’re just starting to learn developing software, or if you’re not interested in it at all.

But if you’re a developer with some experience and interested in more efficient editing, I think you should learn some basic Vim commands.

Or if you’re a developer working mostly on Unix based systems. For example, I work on Ubuntu and Arch, which means I spend a lot of time in the terminal.

And if you’re really interested in Vim, you might want to add (Neo)Vim to your regular daily workflow. But why?

For me, Vim is a lot of fun to use. I love that I don’t have to reach for my mouse for every small thing, and I love that I can still learn a lot. I am a life-long learner, and things like Vim pique my interest.

But to reiterate. You shouldn’t learn Vim if you don’t want to. But learning basic commands can still be useful for some professionals.

How do I Use Vim?

The basics of Vim rely on the different editing modes: Normal, Edit and Visual. The meme of not knowing how to quit Vim comes from these modes.

By default you’re in Normal mode. But if you press i you will go into Editing mode. You can now write text into the buffer. But if you press esc and then : you will go into command mode. The esc is necessary to go back to normal mode.

From command mode, you can enter commands such as q and press enter to execute them.

:q simply closes the current buffer. If you have changes it’ll give you a warning. :q! will quit without saving, and :wq will write and quit to a file.

But since this article isn’t about learning Vim I will leave that for another time.

My setup

For my daily work I use two flavors of Vim. I use Neovim within the terminal, and I use the VSCode Vim plugin within VSCode for my development work.

I use Neovim for all smaller tasks such as Git commit messages, todo lists, notes, et cetera.

I try to integrate Neovim more into my daily life with each day, but it’s a difficult change to make when all your colleagues use VSC. But to counter that and still improve my Vim skills I use a plugin in VSCode to use the Vim keybinds within my usual editor while still having the comfort of my prettier and proper syntax highlighting.

Conclusion

Don’t be frightened by Vim, just start using it as a plugin in your favorite editor and slowly learn more and more keybinds. Eventually you’ll be able to make the switch to Neovim fulltime and you’ll love every second of it.

Thank you so much for reading and have an excellent day.

I am not a part of the Medium partner program anymore so I don’t earn anything from this. Give me a follow and help me spread knowledge for free.

Follow me on Twitter (X) and here on Medium to keep up with me and my projects.

--

--

mbvissers.eth
Quick Programming

I occasionally write about programming. Follow me on Twitter @0xmbvissers