1 Star 15 Fork 6

少林码僧 / vimplus

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

此处输入图片的描述 An automatic configuration program for vim

简介

前言 对于一个开发者而言,使用vim可以说是又爱又恨,一个追求高效的开发者决不能容忍一个开发工具不能自动补全,没有目录导航和函数导航,参考 vim实用技巧实用技巧后,我将常用的插件集成到vim,并做好配置,vimplus就运运而生了,如果喜欢的朋友请不要吝啬,给个star,废话不多说,直接上安装步骤:

下面是我配置的vim. enter image description here

安装

Ubuntu x64 Installation(Supported Ubuntu 16.04 LTS)

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:

Centos x64 的安装

git clone https://git.oschina.net/phper95/vimplus.git
cd ./vimplus
sudo ./install.sh

运行 install.sh 脚本后会自动安装和配置 vim, 安装号是大约 40 minutes, 主要是由于下载和便宜 Valloric/YouCompleteMe 需要很长时间, 请耐心等待,安装完成之后将会安装如下软件:

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

和一些插件:

配置 YouCompleteMe

到这一步,安装已经完成,你会发现~目录有两个文件,一个是vim的配置文件.vimrc,一个是YouCompleteMe的配置文件.ycm_extra_conf.py,一般来说建立一个main.cpp来写C、C++程序来说是没有问题的,都会有语法补全,当你需要写一些项目并涉及到第三方库时,就需要更改.ycm_extra_conf.py了,具体步骤如下。 将.ycm_extra_conf.py拷贝的项目的根目录。 更改.ycm_extra_conf.py里面的flags变量,添加三方库路径和工程子目录路径。

桌面版linux使用vim-devicons插件会出现乱码,需要设置终端字体为Droid Sans Mono for Powerline Nerd Font Complete,使用xshell等工具连接服务器linux的用户就没有必要使用vim-devicons了,可以在插件目录将vim-devicons目录删除,不然会导致NerdTree的缩进有问题。

快捷键


  • Directory tree <F3>
  • Display functions, global variables, macro definitions <F4>
  • Display static code analysis <F5>
  • .h .cpp file quickly switch <F2>
  • Go to declaration <, + u>
  • Go to definition <, + i>
  • Open the include file <, + o>
  • Buffer switch <Ctrl + P/Ctrl + N>
  • Cursor position switch <Ctrl + O/Ctrl + I>
  • Fuzzy Find File <Ctrl + f>
  • Surround <ys{motion or text-object}{char}/cs{orig_char}{dest_char}/ds{char}>
  • Comment code <gcc/gcap/gc/,ca/,cA>
  • DirDiff :DirDiff <dir1> <dir2>
  • Repeat .
  • Change the colorscheme <F10/F9>

特性展示

语法补全

YouCompleteMe传说中最全最好用的补全插件 此处输入图片的描述

Full path fuzzy file, buffer, mru, tag

ctrlp ctrlp提供文件搜索,支持模糊查询。 此处输入图片的描述

vim-airline

提供漂亮的状态栏支持 此处输入图片的描述

vim-surround

Surround a vim text object with a pair of symmetrical chars. We can also remove or change the ones already there. 此处输入图片的描述

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. 此处输入图片的描述

auto-pairs

auto-pairs provides smart auto-completion for delimiters like (), {}, [], "", '', ``. 此处输入图片的描述

incsearch.vim

此处输入图片的描述

vim-devicons

此处输入图片的描述 此处输入图片的描述 此处输入图片的描述

vim-coloresque

此处输入图片的描述

vim-dirdiff

此处输入图片的描述

vim-startify

此处输入图片的描述

Change the colorscheme

change-colorscheme plugin provides quick change theme function. 此处输入图片的描述 兴趣是最好的老师,我的github地址:https://git.oschina.net/phper95/

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. 1.如果网络条件不好可能安装失败,基本上是Valloric/YouCompleteMe安装失败,安装失败后需要将~/.vim/bundle文件夹下的YouCompleteMe目录删除,然后重新执行setup.sh即可,重新安装时,程序将自动安装安装失败的插件。 2.在ubuntu16.04LTS下安装可能会失败(Valloric/YouCompleteMe安装失败),因为vim默认支持python3进行插件编译,安装失败后,手动进入~/.vim/bundle/YouCompleteMe,然后运行python3 ./install.py --clang-completer即可。

空文件

简介

用vim打造一款强大的IDE 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/phper95/vimplus.git
git@gitee.com:phper95/vimplus.git
phper95
vimplus
vimplus
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891