Comprehensive Guide to Learning Vim
Recently, I organized some materials for learning Vim and summarized them briefly.
1. Vim Adventures
This is an edutainment way of learning Vim, using a game to teach Vim, which is quite unique.
2. Vim Cheatsheet
A clear explanation of commonly used commands in one image.
For example:
w Next word
W Next word (skips punctuation)
b Previous word
e End of current word
3. Plugins
3.1 Vim
Installation is done through the plugin manager Vundle,
https://github.com/VundleVim/Vundle.vim
Usage is quite simple:
Launch vim and run :PluginInstall
To install from the command line: vim +PluginInstall +qall
For auto-completion, YouCompleteMe plugin can be used:
Additionally, there are UltiSnips, Syntastic, Tabularize
3.2 VSCode
In VSCode, you can search for Vim plugins for installation, and after installation, the usage is similar to Vim on Linux.
4. Ace in the Hole: spf13
Novices might find configuring plugins cumbersome, especially as the number of plugins and themes increases, leading to bloating of the _vimrc
file.
Is there a better way? The emergence of spf13 makes this management simple. SPF13-VIM comes pre-configured with various plugins for tasks such as code navigation, syntax highlighting, auto-completion, and version control integration. It is organized very neatly, easy to extend, cross-platform, and easy to install and maintain.
Installation is quite simple, just:
curl http://j.mp/spf13-vim3 -L -o - | sh
Then, you’ll enter the Vim installation process.