Vim Configuration for ubuntu12.04

Source: Internet
Author: User

The version of Vim used in ubuntu12.04 does not support configurations such as syntax highlighting and file type detection

#sudo Apt-get Install Vim

Vim's default configuration is not satisfactory and requires its own configuration.
The default configuration file is:/ETC/VIM/VIMRC
We can set up our own configuration file in the home directory
Switch to ~
Touch a file named. VIMRC (starting with a. Hide file)

#cd ~
#touch VIMRC
#vi. VIMRC

Enter the following configuration:
Set nocompatible does not use the VI default keyboard layout
Set Number Displays line numbers
Set autoindent Auto Align
Set Smartindent Smart Alignment
Set Showmatch bracket matching pattern
Set ruler display status line
Set Incsearch query is very convenient, such as to find the book word, when input to/b, will automatically find the first B word,
When you enter/bo, the words that begin with the first Bo are automatically found, and so on, and when you look for words to match, don't forget to enter.
Set tabstop=4 Tab key is 4 spaces
Set shiftwidth=4 4 spaces between rows when swapping rows
Set softtabstop=4 setting (Soft) tab width is 4
Set cindent C language format alignment
Set Nobackup do not back up files
Set clipboard+=unnamed shared clipboard with Windows

The above settings basically meet the usual development, vim function is very strong to continue to study learning.

Vim Configuration for ubuntu12.04

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.