Vim modify basic configuration

Source: Internet
Author: User

Changing the basic configuration of vim in ubuntu12.04 does not support syntax highlighting, file type detection, and other configurations # sudo apt-get install vim default configuration is not satisfactory yet, you also need to configure the default configuration file:/etc/vim/vimrc. We can set up our own configuration file in the home directory to switch to the Home Directory # cd ~ Touch is named. vimrc file.) # vi. configure vimrc as follows: set nocompatible does not use vi default keyboard layout set number display line number set autoindent automatic alignment set smartindent smart alignment set showmatch matching mode set rdent display status line set incsearch query is very convenient, if you want to find the book word, when you enter/B, the first word starting with B is automatically found. When you enter/bo, the word starting with the first bo is automatically found, and so on. When searching, you can use this setting to quickly find the answer. When you are looking for a matching word, do not forget to press Enter. set tabstop = 4 The tab key is 4 spaces set shiftwidth = 4 when the line breaks, use 4 spaces to set softtabstop = 4 (soft) the tab width is 4 set cindent. The C format is aligned with set nobacku. P do not back up the file set clipboard + = unnamed and windows Shared clipboard. The above settings basically meet the needs of normal development. vim is very powerful and remains to be studied.
 

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.