Super-powerful VIM configuration (Vimplus)

Source: Internet
Author: User
Tags git clone

Super-powerful VIM configuration (Vimplus)

===============================================



I. Overview

-----


Contact Vim has been a few years now, but before using Vim is to find someone else to configure the vim, but others are configured to not be able to meet their own needs (you need to have strong C/s code hint completion function, header file/source file switching, static code analysis and other functions), So recently I have time, I summed up some of the vim plug-ins, and then made a key installation program for the same needs of the Vimer, GitHub address: Https://github.com/chxuan/vimplus, if you think you can please start Oh, thank you ^ _ ^, learn some of the high-level commands of vim I'm pushing to see "Vim tips".


Second, the screen

------------

The diagram is the truth of vim after I configured it.

! [Enter image description here] (https://raw.githubusercontent.com/chxuan/vimplus/master/screenshot/screenshot.png)


Third, installation

------------


# # Ubuntu Installation


git clone https://github.com/chxuan/vimplus.git

CD./vimplus

sudo./install.sh


Run ' install.sh ' one-click installation script will automatically configure Vim, installation takes about 40 minutes (mainly download [valloric/youcompleteme][1] spend more time), please wait patiently until the installation is complete ^ _ ^, * * If the installation failed * *, please see [precautions] (#注意事项).


The installation script will automatically install some software:

-Vim

-g++

-Ctags

-CMake

-Python2

-Python3


There are also some plugins:


-[vundle][2]

-[Youcompleteme][3]

-[Nerdtree][4]

-[Nerdcommenter][5]

-[Airline][6]

-[Taglist][7]

-[Auto-pairs][8]

-[Doxygentoolkit][9]

-[CTRLP][10]

-[tagbar][11]

-[change-colorscheme][12] (I am the author ^ _ ^)

-etc ...


# # CentOS Installation


git clone https://github.com/chxuan/vimplus.git

CD./vimplus

sudo./install.sh


Run ' install.sh ' one-click installation script will automatically configure Vim, installation takes about 40 minutes (mainly download [valloric/youcompleteme][13] spend more time), please wait patiently until the installation is complete ^ _ ^, * * If the installation fails * *, see [Considerations] (#注意事项).


The installation script will automatically install some software:

-Vim

-g++

-Ctags

-CMake

-Python2

-Python3


There are also some plugins:


-[vundle][14]

-[youcompleteme][15]

-[nerdtree][16]

-[nerdcommenter][17]

-[airline][18]

-[taglist][19]

-[AUTO-PAIRS][20]

-[doxygentoolkit][21]

-[ctrlp][22]

-[tagbar][23]

-[change-colorscheme][24] (I am the author ^ _ ^)

-etc ...


Iv. configuration ycm (optional)

------------


After running the ' install.sh ' script, the ' HOME ' directory will exist [. ycm_extra_conf.py][25] and '. VIMRC ' files, [. ycm_extra_conf.py][25] files are configuration files that implement the C + + syntax completion function. I generally put the file in the ' HOME ' directory, and then ' every item ' a [. ycm_extra_conf.py][26], only need to change the flag variable inside the configuration file to achieve the relevant header file syntax complement function.


Five, function

------------


# # # Grammar complements


[Youcompleteme] [27] The plug-in is a C + + syntax completion plug-in, the plugin through the clang compiler to the C + + syntax semantic analysis to achieve the completion of the grammar, faster than the CTAG with regular expressions (guess) to complete the syntax of a lot faster.

! [Enter a description of the picture here] [28]


# # # Quick Change Theme

[Change-colorscheme] [29] The plugin provides a quick change to the theme of the function

! [Enter a description of the picture here] [30]


Six, shortcut keys

------------


-Show directory tree ' <F3> '

-Display functions, macro definitions, global variables, etc. ' <F4> '

-Show static parsing results ' <F5> '

-. H. cpp file quick switch ' <F2> '

-Go To Definition ' <f + u> '

-Go to implement ' <f + i> '

-Open the Include (include) file ' <f + o> '

-Buffers (buffer) Fast Toggle ' <ctrl + P/ctrl + n> '

-Cursor Position Toggle ' <ctrl + O/ctrl + i> '

-Blur Find file ' <ctrl + f> '

-Quickly change theme ' <F11/F12> '


# # # <span id= "precautions" >** precautions **</span>

------------


1. If the network condition is not good may cause the program installation to fail, basically is [valloric/youcompleteme][31] installation failure, when the installation fails, you need to execute the ' rm-rf ~/.vim/bundle/youcompleteme ' command, and then execute ' install.sh ' to reinstall, after re-executing the script will automatically install the plugin that failed to install before, * * or I have * * [YOUCOMPLETEME.TAR.GZ][32] Compressed file, download and execute ' TAR-XVF Youcompleteme.tar.gz-c ~/.vim/bundle/' command, then execute ' CD ~/.vim/bundle/youcompleteme ' and ' Python./install.py-- Clang-completer ' installation is complete.

2. If you are using ' ubuntu16.04lts ' for installation vimplus, it is possible that the installation failed ([VALLORIC/YOUCOMPLETEME][33] installation failed), * * Because VIM supports the plugin python3 to compile by default * *, When the installation fails, execute the ' CD ~/.vim/bundle/youcompleteme ' and ' Python3./install.py--clang-completer ' commands to complete the installation.



[1]: Https://github.com/Valloric/YouCompleteMe

[2]: Https://github.com/VundleVim/Vundle.vim

[3]: Https://github.com/Valloric/YouCompleteMe

[4]: Https://github.com/scrooloose/nerdtree

[5]: Https://github.com/scrooloose/nerdcommenter

[6]: Https://github.com/vim-airline/vim-airline

[7]: Https://github.com/vim-scripts/taglist.vim

[8]: Https://github.com/jiangmiao/auto-pairs

[9]: Https://github.com/vim-scripts/DoxygenToolkit.vim

[Ten]: Https://github.com/kien/ctrlp.vim

[One]: Https://github.com/majutsushi/tagbar

[Https://github.com/chxuan/change-colorscheme]:

[]: Https://github.com/Valloric/YouCompleteMe

[]: Https://github.com/VundleVim/Vundle.vim

[Https://github.com/Valloric/YouCompleteMe]:

[+]: Https://github.com/scrooloose/nerdtree

[+]: Https://github.com/scrooloose/nerdcommenter

[]: Https://github.com/vim-airline/vim-airline

[]: Https://github.com/vim-scripts/taglist.vim

[]: Https://github.com/jiangmiao/auto-pairs

[+]: Https://github.com/vim-scripts/DoxygenToolkit.vim

[Https://github.com/kien/ctrlp.vim]:

[All]: Https://github.com/majutsushi/tagbar

[]: Https://github.com/chxuan/change-colorscheme

[]: https://github.com/chxuan/vimplus/blob/master/.ycm_extra_conf.py

[+]: https://github.com/chxuan/vimplus/blob/master/.ycm_extra_conf.py

[+]: Https://github.com/VundleVim/Vundle.vim

[+]: https://camo.githubusercontent.com/1f3f922431d5363224b20e99467ff28b04e810e2/ 687474703a2f2f692e696d6775722e636f6d2f304f50346f6f642e676966

[]: Https://github.com/chxuan/change-colorscheme

[+]: https://raw.githubusercontent.com/chxuan/vimplus/master/screenshot/screenshot2.gif

[]: Https://github.com/Valloric/YouCompleteMe

[+]: Http://pan.baidu.com/s/1kUIa1kN

[Https://github.com/Valloric/YouCompleteMe]:


Super-powerful VIM configuration (Vimplus)

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.