Vim Common settings

Source: Internet
Author: User

. vimrc file

We have already learned that the configuration file for vim is VIMRC file and that the VIMRC file is divided into system VIMRC file and user vimrc file . Under normal circumstances, we do not make the system VIMRC file modification, but each user for their own needs of the user VIMRC file configuration.

path to the VIMRC file

Open Vim and enter the ": Version" command to see the path setting rules for VIMRC:

? Linux Systems

? Windows system

• User VIMRC file

Usually there will be a default VIMRC file in the user's home directory, and if not, create a plain text file named ". VIMRC".

Vim Common Configuration indent settings
 set   Smarttab   "  set tab length to 4 spaces  set  tabstop  =4   "  set  shiftwidth  =4   "  set tab character to automatically convert to a space  set   Expandtab   "  set smart indent, other selectable indents: Autoindent, cindent, indentexpr  set  smartindent  
• Font settings
" in a Windows system: Set Guifont=courier_new:h12:cansi Set Guifont=courier\ new\
• Display line numbers
" Set display line number, turn off line number display command: Set Nonumber Set  Number
• color scheme
" set a color scheme ColorScheme Desert

Vim Common settings

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.