Use Vim (III):. viminfo and. vimrc

Source: Internet
Author: User
Tags eol
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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.