Vim
Vim is probably one of the oldest text editors there is, rivaled only by eMacs.
What distingues it from any other editor is that it places the user in different modes
.
The insert mode
is exactly the same thing as normal editor, while in the normal mode
, every letter executes a command.
For example, typing A
places you in insert mode but with the cursor at the end of the line.\
Commands can be combined into more powerful combinations
|
|
I won’t go in depth on teaching vim as there are many tutorials online.
What’s worth noting is that vim on its own is kind of useless compared to VsCode for example.
However, where it shines is in the massive amount of community maintained plugins, along with its very customizable configuration.
There is tho, a learning curve in creating custom config, and finding the right plugins for the job.
As an example, I have 58 plugins installed, without which life would be hard.
Which vim to use
Be mindful that there are 3 popula implementations of vim:
- vi (oldest)
- vim (vi-improved)
- neo-vim (a modern fork with emphasis on scripting with lua)
Recommend plugins
Here’s a list of plugins I recommend to have as Must-Have:
- Fzf-lua which is based on the amazing Fzf tool
- Coc is an all-in-one plugins for autocomplete, language server, diagnostics, etc… It loads VsCode extensions when needed, and is highly extensible. Here’s the list of coc-plugins I use: 2.1. ‘coc-snippets’ 2.2. ‘coc-pairs’ 2.3. ‘coc-diagnostic’ 2.4. ‘coc-emoji’ 2.5. ‘coc-json’ 2.6. ‘coc-tsserver’ 2.7. ‘coc-pyright’ 2.8. ‘coc-tailwindcss’ 2.9. ‘coc-tabnine’ 2.10. ‘coc-vimlsp’ 2.11. ‘coc-prettier’ 2.12. ‘coc-spell-checker’ 2.13. ‘coc-cspell-dicts’
Note that there is a growing ecosystem of native lua plugins that can replace Fzf and Coc such as:
A full list of the plugins I use is available
here
You can scan my complete configuration in my
dotfiles.
Further reading: