- Mastering Vim
- Ruslan Osipov
- 380字
- 2021-06-10 18:51:26
Read the Vim manual using :help
The best learning tool Vim can offer is certainly a :help command, as can be seen in the following screenshot:

It's an enormous collection of resources and tutorials which comes installed with Vim. Scroll through using the Page Up and Page Down keys (bonus point for using Ctrl + b and Ctrl + f respectively), there is a lot of useful information there.
Whenever you are stuck, or want to learn more about a particular command, try searching it using :help (you can shorten it to :h). Let's try searching for a cc command we've learned :
:h cc

Help tells us the way the command works, as well as how different options and settings affect the command (for instance autoindent setting preserves the indentation).
:help is a command which navigates a set of help files. As you look through the help files, you'll notice that certain words are highlighted in color. These are tags, and can be searched for using the :help command. Unfortunately, not every tag name is intuitive. For instance, if we wanted to learn how to search for a string in Vim, we could try using the following:
:h search
However, it looks like this command takes us to the entry on expression evaluation, which is not exactly what we were looking for, as demonstrated by the following screenshot:

To find the right entry, type in :h search (don't hit Enter yet) followed by Ctrl + d. This will give you a list of help tags containing the substring search. One of the options shown is search-commands which is what we'd be looking for. Complete your command in the following way to get to the entry we were looking for:
:h search-commands
The following display shows the right help entry for search:

Don't forget to use Vim's help system any time you have questions or want to better understand the way Vim behaves.
- UI設(shè)計(jì)基礎(chǔ)培訓(xùn)教程
- Mastering Spring MVC 4
- Vue.js快跑:構(gòu)建觸手可及的高性能Web應(yīng)用
- AIRAndroid應(yīng)用開發(fā)實(shí)戰(zhàn)
- Mastering AndEngine Game Development
- MySQL數(shù)據(jù)庫管理與開發(fā)實(shí)踐教程 (清華電腦學(xué)堂)
- 單片機(jī)應(yīng)用與調(diào)試項(xiàng)目教程(C語言版)
- PHP 7+MySQL 8動態(tài)網(wǎng)站開發(fā)從入門到精通(視頻教學(xué)版)
- MATLAB 2020從入門到精通
- RSpec Essentials
- 詳解MATLAB圖形繪制技術(shù)
- 精通MySQL 8(視頻教學(xué)版)
- C++程序設(shè)計(jì)教程(第2版)
- Advanced Python Programming
- Python硬件編程實(shí)戰(zhàn)