Configure the custom LinuxVIM Editor

Source: Internet
Author: User
Article Title: configure the custom LinuxVIM editor. Linux is a technology channel of the IT lab in China. Including desktop applications, Linux system management, kernel research, embedded systems, open-source, and other basic categories. Linux servers use vim to edit configuration files and programming, now we are used to this text editing method.
 
Generally, you need to configure the vim environment on your own when getting 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 changes.
 
(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 "sets 50 command history records.
 
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. For C language programming.
 
Set tabstop = 4 "sets 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 will automatically find the position where the first "bo" is located .)
 
"Whether to generate a backup file. (Add "~" to the original file name. Suffix .)
 
"(I don't like this backup setting. I usually comment it out .)
 
"If has (" vms ")
 
"Set nobackup
 
"Else
 
"Set backup
 
"Endif
 

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.