Change the Vim profile under Ubuntu to create a C + + style

Source: Internet
Author: User

Reprint: Change the Vim profile under Ubuntu to create a C + + style

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 Home Directory#cd ~
Touch a file named. VIMRC (starting with a. Hide file)
#touch. VIMRC
#vi. VIMRC
Enter the following configuration:
Set nocompatible does not use the VI default keyboard layout <----This is important, if not configured, press the arrow key in edit mode to enter characters, very inconvenient >
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
Set tabstop=4 Tab key is 4 spaces
Set shiftwidth=4
Set softtabstop=4
Set cindent C language format alignment
Set Nobackup do not back up files
Set clipboard+=unnamed shared clipboard with Windows

Syntax on support syntax highlighting

Save the exit on OK!

Change the Vim profile under Ubuntu to create a C + + style

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.