1. viminfo
For operations in Vim, VIM automatically records the operations and stores them in ~ /. Viminfo file. To facilitate next processing, for example, when Vim opens a file, the cursor will automatically display it at the last exit. Previously searched string. When a new file is opened, it is automatically highlighted.
~ /. The viminfo file is automatically generated by the system.
2. vimrc
The vimrc file is the vim environment setting file. The overall Vim settings are in the/etc/vimrc file. It is not recommended to change the/etc/vimrc file. Each user can set Vim in the user root folder to create ~ /. Vimrc. Vim has many configuration options,
:set all
View All configuration items.
Frequently Used Configuration:
: Set nu: Set Nonu whether to display the row number: Set wrap: Set nowrap whether to wrap: Set hlsearch: Set nohlsearch whether to highlight: Set autoindent: Set noautoindent whether to voluntarily shrink the row: whether set backup actively backs up and modifies files. If set bakcup is used, filename ~ is automatically generated during the change ~ Backup file. : Set rmode display lower-right status bar: Set showmode display lower-left status bar, -- insert -- and the like: Set display different values from the system default value,: syntax on: syntax off program syntax switch: set BG = Dark: Set BG = light display color tones
3. My vimrc
Set number "display row number set nowrap" Do not wrap set shiftwidth = 4 "Default indent four spaces set softtabstop = 4" When tab is used, the number of tab spaces set tabstop = 4 "tab represents four space set laststatus = 2 "always display status line # backspace key" indent delete self-indented value "EOL Delete the carriage return at the end of the previous row, merge the two rows. In addition to the ones just entered, start also deletes the original character set backspace = indent, EOL, startset expandtab "replace tabset autoindent with spaces" automatically indent colorscheme evening "color mode SYN on" syntax highlight filetype on "file type set encoding = UTF-8" encoded as utf8
Address: http://blog.csdn.net/yonggang7/article/details/38457633
Use Vim (III):. viminfo and. vimrc