My Vim configuration file

Source: Internet
Author: User
On the Linux server, VIM is used to editing configuration files and programming.

Generally, you need to configure the vim environment on your own to get a new server. Otherwise, you may not feel comfortable.

Vim initial configuration file location "~ /. Vimrc"

Generally, VIM has a default configuration file sample. I usually CP it to the user directory and then modify it.

"CP/usr/share/Vim/vim70/vimrc_example.vim ~ /. Vimrc"

Generally, this file can meet my requirements. You do not need to make too many modifications.

(If the function does not work after setting, check whether the vim-enhanced package is installed in the system .)

Configuration File Content:

Set nocompatible "removes the annoying Vim consistency mode to avoid bugs and limitations in earlier versions.

Set number "displays the row number.

Set background = Dark "the background color is dark. (I think it's good to protect your eyes .)

Syntax on "syntax highlighted. (This is definitely required .)

Set history = 50 "set the command history to 50.

Set autoindent "uses automatic start, that is, to apply the format of the current row to the next row.

Set smartindent "intelligently selects the start mode based on the preceding start format.

Set tabstop = 4 "set the tab key to 4 spaces.

Set shiftwidth = 4 "set to use four spaces when lines are staggered

Set showmatch "sets the matching mode, similar to the right brace that will be matched when a left brace is entered.

Set incsearch "search options. (For example, if you type"/bo ", the cursor automatically finds the location where the first" Bo "is located .)

"Whether to generate a backup file. (The backup file name is the original file name plus" ~ "Suffix .)

"(I don't like this backup setting. I usually comment it out .)

"If has (" VMS ")

"Set nobackup

"Else

"Set backup

"Endif

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.