First Time to Meet Vim

Tim Chang
3 min readFeb 11, 2022

--

As a programmer, IDE (Integrated Development Environment) must be the most important tool or editor you must use every day. In the past years, Visual Studio Code seems to be the most popular editor. There are still a lot of editors used in different areas, like Sublime, JetBrains and Atom. Those editors provide a lightweight and extensible environment, compared to others like Visual Studio and Android Studio. You can also install a lot of plugins to improve productivity. But even though, there is an editor which is favorite by some people. It is Vim.

I know you may know, hear or be familiar with this editor. The original one is called Vi. But we only focus on the editor based on Vim, Neovim, today.

I’m not a big fan of Vi/Vim, but I was inspired by a YouTuber, Takuya Matsuyama one day. He posted a video on his YouTube channel, and it showed how he built a markdown editor by several frameworks and libraries, also shared the development environment he was using. Then I started trying to use Neovim.

TypeScript file in Neovim with plugins

If you never heard Vim-liked editor, the most different thing is “there is no mouse”. You can only use the keyboard to move your cursor and do every task. For example, use “h”, “j”, “k” and “l” to move your cursor Left, Up, Down and Right. I know it needs some time to get used to. And sometimes I still forget to change the mode from “Insert” to “View”. Because you must exit from Insert Mode to run some hotkeys. But when you are familiar with those hotkeys, you can edit your code very quickly because you don’t need to leave your keyboard to use Mouse.

Neovim also supports a lot of plugins which and let your editor are more productivity and efficiently. Because Neovim is only a basic plain text editor without Auto-complete, Highlight, Intelligence and Tooltips. I have no idea how to find, install and use those plugins, but you can complete the environment by following this Video which was made by Takuya Matsuyama. With couple plugins, basically you can have auto-complete, intelligence, highlight, syntax and definition peak. And some key features like Diagnostics are also came with.

Diagnostics shows in Neovim

Cons

After using Neovim for a while, there are still some problems I met.

Scrolling

If your file has hundreds of lines, you must press “j” and “k” to scroll down, or “page down” and “page up” even Neovim can scroll quickly compared to other editors. But pressing hotkeys would not be more convenient than by Mouse wheel or dragging scroll bar.

Reliability

If you only installed a few plugins for your Neovim, it would not be a big problem. But if you installed couple of plugins to improve your productivity, you may hit warnings or errors when you are trying to use some features or opening a file. Because they are all implemented by other developers in Open Source. You also need to write some codes to integrate them with other plugins. I will recommend following some blogs or tutorials step by step, and install plugins one by one, not just copy and paste the configurations. It not only helps you understand the infrastructure, but also investigate easily if you hit issues.

Until now, I’m still using Visual Studio Code and Neovim at same time. Because I need time to be familiar with the hotkeys and tools, and it doesn’t support some languages and frameworks very well. Finally, they are all tool, which let you complete your apps, websites and jobs. So, I will not say which one is better or more convenient. It is based on the languages and libraries you are using. But it is a good experience to learn a new editor! Hope you enjoy it as well. :)

--

--

Tim Chang

A software engineer at Microsoft. I love to enjoy programming, playing games, listening to music, taking photos and making great latte.