Ubuntu10.10 sets Vim syntax highlighting and automatic indent

Source: Internet
Author: User

1. Install Vim
Sudo apt-Get install Vim

2. you can create your own configuration file in the home directory.
Switch to the Home Directory # Cd ~
Touch a file named. vimrc (hidden file starting)
# Touch. vimrc
# Vi. vimrc
Enter the following Configuration:
Set nocompatible does not use the default VI keyboard layout <---- this is very important. If it is not configured, it is annoying to enter characters by pressing the direction key in editing mode.
Set nu display row number
Set autoindent Automatic Alignment
Set smartindent smart alignment
Set showmatch matching mode
Set ruler display status line
Set incsearch
Set tabstop = 4 The Tab key is 4 spaces
Set shiftwidth = 4
Set softtabstop = 4
Set cindent C language format alignment
Set nobackup does not Back Up Files
Set clipboard + = unnamed shares the clipboard with Windows

Set fileencodings = UTF-8, gb2312 character encoding

Save and exit. If syntax highlighting is supported, the configuration is syntax on.

From: http://zhys1226.blog.163.com/blog/static/126217868201151011155437/

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.