Vim Installation and Configuration

Source: Internet
Author: User
Tags set background

Learning Linux using Vim to write C/D + + code is necessary, VIM plus some necessary plug-ins can make development more efficient, but in the online search of the data are copied each other and not very detailed, decided to summarize their own simple.

No Linux comes with vim, download source code from the official website ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2

Unzip, compile

TAR-XVF vim-7.3.tar.bz2

CD Vim73

./configure

Make

Makeinstall

Install to the default path, I don't care where to install

Then create a new folder under the root directory. Vim

Under root Authority

CD ~/

mkdir. Vim

CD. Vim

mkdir Doc Plugin

Doc places the plug-in document, and plugin places the. Vim Plugin

Copy the. VIMRC to the root directory

CP/ETC/.VIMRC ~/

Then modify the. vimrc

Syntax Enable color

Syntax true syntax highlighting

Set nu! Show line Numbers

Set Showmatch Auto Match

Set ai! Auto Indent

Set BACKSPCE setting fallback keys available

Set Smartindent Smart Alignment

Set tabstop=4 tab offset 4 spaces

Set Background=dark black background

Then install the plugin ctags http://ctags.sourceforge.net

Unzip, compile

TAR-XZVF ctags-5.6.tar.gz

CD ctags-5.6

Make

Make install

How to use Ctags:

CD-to-project root directory

Ctags-r

Generate a file of tags, add the set tags=xxx/xxx/tags in. VIMRC, change the function each time, modify the variable must re-enter the above command

Find the definitions of functions and variables in the code file with CTRL +] key combinations

Vim Installation and Configuration

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.