# vimplus **Repository Path**: phper95/vimplus ## Basic Information - **Project Name**: vimplus - **Description**: 用vim打造一款强大的IDE - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 15 - **Forks**: 6 - **Created**: 2017-05-13 - **Last Updated**: 2024-03-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ![此处输入图片的描述][1] An automatic configuration program for vim =============================================== 简介 ----- 前言 对于一个开发者而言,使用vim可以说是又爱又恨,一个追求高效的开发者决不能容忍一个开发工具不能自动补全,没有目录导航和函数导航,参考 vim实用技巧实用技巧后,我将常用的插件集成到vim,并做好配置,vimplus就运运而生了,如果喜欢的朋友请不要吝啬,给个star,废话不多说,直接上安装步骤: ------------ 下面是我配置的vim. ![enter image description here](https://raw.githubusercontent.com/chxuan/vimplus/master/screenshots/main.png) 安装 ------------ ### Ubuntu x64 Installation(Supported Ubuntu 16.04 LTS) ```bash git clone https://git.oschina.net/phper95/vimplus.git cd ./vimplus sudo ./install.sh ``` 现在vimplus支持ubuntu14.04之后的所有ubuntu 64位系列以及centos7 64位,运行install.sh脚本,你就可以一边喝咖啡,一遍看着屏幕刷刷刷的打印就安装部署好了开发环境了,整个过程大约持续40分钟,其中下载编译ycm耗费了大半时间,我有下载好了的YouCompleteMe.tar.gz,省得在github上去下载,很慢的,你懂的,若想要手动安装ycm,需要修改vimplus目录下的.vimrc文件。 Plugin 'Valloric/MatchTagAlways' #Plugin 'Valloric/YouCompleteMe' Plugin 'docunext/closetag.vim' 将ycm插件那行注释掉,不然还会再去下载ycm,ycm可以最后等vimplus执行完成后再安装~~,接下来需要手动编译ycm。 cd ~ mv ~/vimplus/YouCompleteMe ~/.vim/bundle/ cd ~/.vim/bundle/YouCompleteMe ./install.py --clang-completer 编译安装完成之后取消~/.vimrc中的#Plugin 'Valloric/YouCompleteMe'行的注释 vimplus将自动安装一些软件,比如说 - vim - g++ - ctags - cmake - python2 - python3 and some plugins below: - [Vundle][3] - [YouCompleteMe][4] - [NerdTree][5] - [nerdcommenter][6] - [Airline][7] - [auto-pairs][8] - [DoxygenToolkit][9] - [ctrlp][10] - [tagbar][11] - [vim-devicons][12] - [vim-surround][13] - [vim-commentary][14] - [vim-repeat][15] - [vim-endwise][16] - [tabular][17] - [vim-dirdiff][18] - [vim-coloresque][19] - [incsearch.vim][20] - [vim-startify][21] - [change-colorscheme][22](I am the author) - etc... ### Centos x64 的安装 ```bash git clone https://git.oschina.net/phper95/vimplus.git cd ./vimplus sudo ./install.sh ``` 运行 `install.sh` 脚本后会自动安装和配置 vim, 安装号是大约 40 minutes, 主要是由于下载和便宜 [Valloric/YouCompleteMe][23] 需要很长时间, 请耐心等待,安装完成之后将会安装如下软件: - vim - g++ - ctags - cmake - python2 - python3 和一些插件: - [Vundle][24] - [YouCompleteMe][25] - [NerdTree][26] - [nerdcommenter][27] - [Airline][28] - [auto-pairs][29] - [DoxygenToolkit][30] - [ctrlp][31] - [tagbar][32] - [vim-devicons][33] - [vim-surround][34] - [vim-commentary][35] - [vim-repeat][36] - [vim-endwise][37] - [tabular][38] - [vim-dirdiff][39] - [vim-coloresque][40] - [incsearch.vim][41] - [vim-startify][42] - [change-colorscheme][43](I am the author) - etc... 配置 YouCompleteMe ------------ 到这一步,安装已经完成,你会发现~目录有两个文件,一个是vim的配置文件.vimrc,一个是YouCompleteMe的配置文件[.ycm_extra_conf.py][44],一般来说建立一个main.cpp来写C、C++程序来说是没有问题的,都会有语法补全,当你需要写一些项目并涉及到第三方库时,就需要更改[.ycm_extra_conf.py][26]了,具体步骤如下。 将.ycm_extra_conf.py拷贝的项目的根目录。 更改.ycm_extra_conf.py里面的flags变量,添加三方库路径和工程子目录路径。 ------------ 桌面版linux使用[vim-devicons][46]插件会出现乱码,需要设置终端字体为Droid Sans Mono for Powerline Nerd Font Complete,使用xshell等工具连接服务器linux的用户就没有必要使用vim-devicons了,可以在插件目录将vim-devicons目录删除,不然会导致NerdTree的缩进有问题。 ## 快捷键 ------------ - Directory tree `` - Display functions, global variables, macro definitions `` - Display static code analysis `` - .h .cpp file quickly switch `` - Go to declaration `<, + u>` - Go to definition `<, + i>` - Open the include file `<, + o>` - Buffer switch `` - Cursor position switch `` - Fuzzy Find File `` - Surround `` - Comment code `` - DirDiff `:DirDiff ` - Repeat `.` - Change the colorscheme `` 特性展示 ------------ ### 语法补全 [YouCompleteMe][47]传说中最全最好用的补全插件 ![此处输入图片的描述][48] ### Full path fuzzy file, buffer, mru, tag [ctrlp][49] ctrlp提供文件搜索,支持模糊查询。 ![此处输入图片的描述][50] ### vim-airline 提供漂亮的状态栏支持 ![此处输入图片的描述][51] ### vim-surround Surround a vim text object with a pair of symmetrical chars. We can also remove or change the ones already there. ![此处输入图片的描述][52] ### vim-commentary An extremely easy tool to toggle commentary in lines and visual selections. We only need to enter a mapping and a movement to do the action, as simple as that. ![此处输入图片的描述][53] ### auto-pairs auto-pairs provides smart auto-completion for delimiters like (), {}, [], "", '', ``. ![此处输入图片的描述][54] ### incsearch.vim ![此处输入图片的描述][55] ### vim-devicons ![此处输入图片的描述][56] ![此处输入图片的描述][57] ![此处输入图片的描述][58] ### vim-coloresque ![此处输入图片的描述][59] ### vim-dirdiff ![此处输入图片的描述][60] ### vim-startify ![此处输入图片的描述][61] ### Change the colorscheme [change-colorscheme][62] plugin provides quick change theme function. ![此处输入图片的描述][63] 兴趣是最好的老师,我的github地址:https://git.oschina.net/phper95/ ### **Warning** ------------ 1. If poor network conditions may fail to install, basically [Valloric/YouCompleteMe][64] 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][65],download it and then `tar -xvf YouCompleteMe.tar.gz -C ~/.vim/bundle/`,then `cd ~/.vim/bundle/YouCompleteMe` and run `python ./install.py --clang-completer`. 1.如果网络条件不好可能安装失败,基本上是Valloric/YouCompleteMe安装失败,安装失败后需要将~/.vim/bundle文件夹下的YouCompleteMe目录删除,然后重新执行setup.sh即可,重新安装时,程序将自动安装安装失败的插件。 2.在ubuntu16.04LTS下安装可能会失败(Valloric/YouCompleteMe安装失败),因为vim默认支持python3进行插件编译,安装失败后,手动进入~/.vim/bundle/YouCompleteMe,然后运行python3 ./install.py --clang-completer即可。 [1]: https://raw.githubusercontent.com/chxuan/vimplus/master/screenshots/vimplus.png [2]: https://github.com/Valloric/YouCompleteMe [3]: https://github.com/VundleVim/Vundle.vim [4]: https://github.com/Valloric/YouCompleteMe [5]: https://github.com/scrooloose/nerdtree [6]: https://github.com/scrooloose/nerdcommenter [7]: https://github.com/vim-airline/vim-airline [8]: https://github.com/jiangmiao/auto-pairs [9]: https://github.com/vim-scripts/DoxygenToolkit.vim [10]: https://github.com/ctrlpvim/ctrlp.vim [11]: https://github.com/majutsushi/tagbar [12]: https://github.com/ryanoasis/vim-devicons [13]: https://github.com/tpope/vim-surround [14]: https://github.com/tpope/vim-commentary [15]: https://github.com/tpope/vim-repeat [16]: https://github.com/tpope/vim-endwise [17]: https://github.com/godlygeek/tabular [18]: https://github.com/will133/vim-dirdiff [19]: https://github.com/gorodinskiy/vim-coloresque [20]: https://github.com/haya14busa/incsearch.vim [21]: https://github.com/mhinz/vim-startify [22]: https://github.com/chxuan/change-colorscheme [23]: https://github.com/Valloric/YouCompleteMe [24]: https://github.com/VundleVim/Vundle.vim [25]: https://github.com/Valloric/YouCompleteMe [26]: https://github.com/scrooloose/nerdtree [27]: https://github.com/scrooloose/nerdcommenter [28]: https://github.com/vim-airline/vim-airline [29]: https://github.com/jiangmiao/auto-pairs [30]: https://github.com/vim-scripts/DoxygenToolkit.vim [31]: https://github.com/ctrlpvim/ctrlp.vim [32]: https://github.com/majutsushi/tagbar [33]: https://github.com/ryanoasis/vim-devicons [34]: https://github.com/tpope/vim-surround [35]: https://github.com/tpope/vim-commentary [36]: https://github.com/tpope/vim-repeat [37]: https://github.com/tpope/vim-endwise [38]: https://github.com/godlygeek/tabular [39]: https://github.com/will133/vim-dirdiff [40]: https://github.com/gorodinskiy/vim-coloresque [41]: https://github.com/haya14busa/incsearch.vim [42]: https://github.com/mhinz/vim-startify [43]: https://github.com/chxuan/change-colorscheme [44]: https://github.com/chxuan/vimplus/blob/master/.ycm_extra_conf.py [45]: https://github.com/chxuan/vimplus/blob/master/.ycm_extra_conf.py [46]: https://github.com/ryanoasis/vim-devicons [47]: https://github.com/VundleVim/Vundle.vim [48]: https://camo.githubusercontent.com/1f3f922431d5363224b20e99467ff28b04e810e2/687474703a2f2f692e696d6775722e636f6d2f304f50346f6f642e676966 [49]: https://github.com/ctrlpvim/ctrlp.vim [50]: https://camo.githubusercontent.com/e15ac916ab9a14dd07135cb2d985cc7333200a38/687474703a2f2f692e696d6775722e636f6d2f614f63774877742e706e67 [51]: https://camo.githubusercontent.com/ba79534309330accd776a8d2a0712f7c4037d7f9/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3330363530322f313037323632332f34346332393261302d313439352d313165332d396365362d6463616461336631633533362e676966 [52]: https://camo.githubusercontent.com/1f02cead8bdcf894f26b0006c44068a33a7dc8e5/687474703a2f2f6a6f65646963617374726f2e636f6d2f7374617469632f70696374757265732f737572726f756e645f656e2e676966 [53]: https://camo.githubusercontent.com/2f5cb5bc9a964b0d9e623b5b3aff0314294ac841/687474703a2f2f6a6f65646963617374726f2e636f6d2f7374617469632f70696374757265732f636f6d6d656e746172795f656e2e676966 [54]: https://camo.githubusercontent.com/372b34413e710cdbc95c5a5c1f901baf9e77791d/687474703a2f2f6a6f65646963617374726f2e636f6d2f7374617469632f70696374757265732f736d617274696e7075745f656e2e676966 [55]: https://raw.githubusercontent.com/haya14busa/i/master/incsearch.vim/incremental_regex_building.gif [56]: https://raw.githubusercontent.com/wiki/ryanoasis/vim-devicons/screenshots/v0.8.x/nerdtree-1.png [57]: https://raw.githubusercontent.com/wiki/ryanoasis/vim-devicons/screenshots/v0.8.x/nerdtree-2.png [58]: https://raw.githubusercontent.com/wiki/ryanoasis/vim-devicons/screenshots/v0.8.x/nerdtree-3.png [59]: https://camo.githubusercontent.com/70916a51f45b5729332803c5de303f6f1849fc50/68747470733a2f2f7261772e6769746875622e636f6d2f676f726f64696e736b69792f76696d2d636f6c6f7265737175652f6d61737465722f73637265656e2e706e67 [60]: https://raw.githubusercontent.com/will133/vim-dirdiff/master/screenshot.png [61]: https://github.com/mhinz/vim-startify/blob/master/pictures/startify-menu.png [62]: https://github.com/chxuan/change-colorscheme [63]: https://raw.githubusercontent.com/chxuan/vimplus/master/screenshots/change-colorscheme.gif [64]: https://github.com/Valloric/YouCompleteMe [65]: http://pan.baidu.com/s/1kVdgsRl