下面是我配置的vim.
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将自动安装一些软件,比如说
and some plugins below:
git clone https://git.oschina.net/phper95/vimplus.git
cd ./vimplus
sudo ./install.sh
运行 install.sh
脚本后会自动安装和配置 vim, 安装号是大约 40 minutes, 主要是由于下载和便宜 Valloric/YouCompleteMe 需要很长时间, 请耐心等待,安装完成之后将会安装如下软件:
和一些插件:
桌面版linux使用vim-devicons插件会出现乱码,需要设置终端字体为Droid Sans Mono for Powerline Nerd Font Complete,使用xshell等工具连接服务器linux的用户就没有必要使用vim-devicons了,可以在插件目录将vim-devicons目录删除,不然会导致NerdTree的缩进有问题。
<F3>
<F4>
<F5>
<F2>
<, + u>
<, + i>
<, + o>
<Ctrl + P/Ctrl + N>
<Ctrl + O/Ctrl + I>
<Ctrl + f>
<ys{motion or text-object}{char}/cs{orig_char}{dest_char}/ds{char}>
<gcc/gcap/gc/,ca/,cA>
:DirDiff <dir1> <dir2>
.
<F10/F9>
YouCompleteMe传说中最全最好用的补全插件
ctrlp ctrlp提供文件搜索,支持模糊查询。
提供漂亮的状态栏支持
Surround a vim text object with a pair of symmetrical chars. We can also remove or change the ones already there.
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 provides smart auto-completion for delimiters like (), {}, [], "", '', ``.
change-colorscheme plugin provides quick change theme function. 兴趣是最好的老师,我的github地址:https://git.oschina.net/phper95/
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即可。此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。