In the process of learning vim, the following are recorded for common use tips:
1,: w!sudo tee% when you use ordinary users do not have write permission is very useful.
2,: Earlier 5s restore files to 5s before, you can m,h and so on
3, you learned CTRL + [instead of ESC but CTRL + C is also good
4, Command mode ni-<esc> continuous insertion n-, such as 29i-<esc> continuous insertion of 29-write split line when it is convenient
5, sometimes Ctrl + V paste, actual * and + these two global registers. "+p lets you paste content from the system Clipboard into Vim without losing formatting
6, put Vim:se ft=c ts=2 sw=2: Alone with a line of comments can let vim to not automatically identify the files to make some settings. Where: Between the commands, you can overload the settings in VIMRC. Can be placed at the beginning or end of a file
7, CTRL + X, CTRL + F can identify ~ and $HOME/variable
8, set Wildmenu can help you in the command line complete function, take you into the completion of the civilized era. But ask Laststus >= 2
9, set followed by a variable, followed by one? You can view the value of a variable e.g. SE ls? Output Laststatus=1 is particularly useful when setting options for VIMRC
Vim Common techniques