vimplus/README.md
2016-05-13 22:57:28 +08:00

5.6 KiB

vimplus: An automatic configuration program for vim

Intro

I usually use vim to write a C++ program, so in order to allow me to write C ++ more enjoyable, I made some vim automatically configured, the following I will be a presentation of my vimplus.

Screenshots

This figure is below a real shot after I configured vim. enter image description here

Installation

Ubuntu Installation

git clone https://github.com/chxuan/vimplus.git
cd ./vimplus
sudo ./install.sh

Run the install.sh script will automatically install and configure vim, installation takes about 40 minutes, mainly download compiler Valloric/YouCompleteMe time-consuming, please wait until the installation is complete ^ _ ^.

The installation script will automatically install some software below:

  • vim
  • g++
  • ctags
  • cmake
  • python2
  • python3

and some plugins below:

Centos Installation

git clone https://github.com/chxuan/vimplus.git
cd ./vimplus
sudo ./install.sh

Run the install.sh script will automatically install and configure vim, installation takes about 40 minutes, mainly download compiler Valloric/YouCompleteMe time-consuming, please wait until the installation is complete ^ _ ^.

The installation script will automatically install some software below:

  • vim
  • g++
  • ctags
  • cmake
  • python2
  • python3

and some plugins below:

Configuration ycm

Run the install.sh script after the installation is complete, HOME directory will exist .ycm_extra_conf.py and .vimrc, the file is YCM implement C++ and other languages syntax completion function profile, I would put a general in the HOME directory, then copy each project a .ycm_extra_conf.py,don't just copy/paste that file somewhere and expect things to magically work; your project needs different flags. Hint: just replace the strings in the flags variable with compilation flags necessary for your project. That should be enough for 99% of projects.

Features

Syntax completion

YouCompleteMe plugin provides syntax completion function, and YouCompleteMe is a fast, as-you-type, fuzzy-search code completion engine for Vim. 此处输入图片的描述

Beautiful theme

vimplus has some beautiful themes. 此处输入图片的描述

ShortcutKey

  • Directory tree <F3>
  • Display functions, global variables, macro definitions <F4>
  • Display static code analysis <F5>
  • .h .cpp file quickly switch <F2>
  • Go to declaration <f + u>
  • Go to definition <f + i>
  • Open the include file <f + o>
  • Buffer switch <Ctrl + P/Ctrl + N>
  • Cursor position switch <Ctrl + O/Ctrl + I>
  • Fuzzy Find File <Ctrl + f>

Warning

  1. If poor network conditions may fail to install, basically Valloric/YouCompleteMe installation fails, after a failed installation will need to rm -rf ~/.vim/bundle/YouCompleteMe, and then re-execute the install.sh can be re-installed, the program will automatically install the plug-in installation fails,or I have YouCompleteMe.tar.gz,download it and then tar -xvf YouCompleteMe.tar.gz -C ~/.vim/bundle/,then cd ~/.vim/bundle/YouCompleteMe and run python ./install.py --clang-completer.
  2. In ubuntu16.04LTS installation may fail(Valloric/YouCompleteMe installation fails), because vim default support for plug python3 compiled, after a failed installation, manually cd ~/.vim/bundle/YouCompleteMe, then run python3 ./install.py - -clang-completer.