Vim or Neovim in 2023?

Prologue Vim is one of the most famous based text editors(somehow infamous for serveral reasons). Neovim is a really weel-known fork of Vim, which even has its own community. So which one should I choose? It depends on your workflow and usage scenarios. I will introduce the pros and cons of both from my point view. Hope it will help you with the selection. Neovim vs Vim Neovim Pros/Vim Cons: Neovim has better default settings, which means you don’t need to “set nocompatible”/“set backspace”/…, see “:h nvim-default” for details in Neovim. Neovim has a more open and active community. (Check the “job control” story if you are interested). However, it depends on your attitude towards open source practice. Neovim has built-in LSP/treesitter support. Neovim makes Meta key available by default. Neovim uses Lua as first-class configure language, with high performance Lua-JIT as its engine. Lua is more like a programming language. Basicly all plugins written for Vim is available for Neovim, because Vimscript is still supported. The Vimscript engine is reserved. There are still some others advantages, which I personally don’t so much care, see offical website for details. ...

August 1, 2023 · 2 min · ChaosNyaruko

How to learn (neo)/vim?

Prelude This article is for those who decide to use vim/neovim or the key bindings. If you want to figure out whether you should learn it, you can refer to my previous article. The followin’ suggestions are given in my experience, may or may not fit you. Just take them as a reference. Hope it helps. Learn Vim Step by Step Learning the key bindings first. You don’t have to know everything, just follow “vimtutor”, know the basic usage of vim’s “modal”/“operator”/“motion”/“text object”/“regex”/… stuff. You don’t have to remember all the details at once, everyone improves the retention by daily usage and training. Once you know the basic key bindings, you can use “vim” in most of your IDEs/editors/… . Download the vim plugin and you can get familiar with vim’s way to operate text. The only point is “sticking to it”, even it will slow you down at the beginning. Now it’s time to know vim’s wonderful features and plugins. There are indeed some “distributions”, such as LunarVim or SpaceVim. However I personally don’t recommend you to use it directly. Two reasons for this: There are often other “layer"s in these distributions. You will have to learn the design as well, otherwise you will struggle to cope with problems. You will lose the happiness about the process of assembling your own PDE, and nobody knows your habit more than yourself. But I strongly recommend you to take them as your references, such as some config snippets or awesome plugins. They are really good resources for you to build your own PDE from scratch. Write your own plugins, contribute it to the community! Epilogue Enjoy yourself in doing “useless” things!

May 8, 2023 · 2 min · ChaosNyaruko

Start I have tried several completion schemes in vim/neovim, here is my experience. Some cons may due to my lack of familiarity, and have solutions. I’m glad to have your feedback. YouCompleteMe Pros Almost IDE-like, shipped with many useful funtionalities. YCM also provides semantic IDE-like features in a number of languages, including: displaying signature help (argument hints) when entering the arguments to a function call (Vim only) finding declarations, definitions, usages, etc. of identifiers, and an interactive symbol finder displaying type information for classes, variables, functions etc., displaying documentation for methods, members, etc. in the preview window, or in a popup next to the cursor (Vim only) fixing common coding errors, like missing semi-colons, typos, etc., semantic renaming of variables across files, formatting code, removing unused imports, sorting imports, etc. Cons Almost perfect, but still have some problems, just for me, for now. ...

February 24, 2023 · 2 min · ChaosNyaruko