〖Linux〗(2013.08.02)VIM74b+YouCompleteMe,VIM代码编辑器补全能手
1. 编译和安装vim74b(参考:http://t.cn/zQa8R7h )
sudo apt-get install -y hgsvn libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev ruby-dev mercurial cscope exuberant-ctagssudo apt-get remove vim vim-runtime gvim #这一步可以不做
cd ~
hg clone https://code.google.com/p/vim/
cd vim
./configure --with-features=huge \
--enable-rubyinterp \
--enable-pythoninterp \
--enable-perlinterp \
--enable-gui=gtk2 --enable-cscope --prefix=/usr
make VIMRUNTIMEDIR=/usr/share/vim/vim73
sudo make install
sudo update-alternatives --install /usr/bin/editor editor /usr/bin/vim
sudo update-alternatives --set editor /usr/bin/vim
sudo update-alternatives --install /usr/bin/vi vi /usr/bin/vim
sudo update-alternatives --set vi /usr/bin/vim
2. 编译Clang3_3(重点,参考:http://t.cn/zjD1V4d)
sudo apt-get install -y g++ subversion cmake
cd ~
mkdir Clang && cd Clang
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm/tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
cd ../../
mkdir build
cd build
../llvm/configure --prefix=/usr/clang_3_3 --enable-optimized --enable-targets=host
make -j
sudo make install
export PATH=/usr/clang_3_3/bin:$PATH #这一句最好写到~/.bashrc内
# 至参考链接后边编译libcxx神马的,就与这里无关了(不过推荐编译和使用一下,尤其是试试它出错的时候,比gcc的提示好多了)
3. 编译和安装、使用YouCompleteMe(https://github.com/Valloric/YouCompleteMe)
>> ----a. 安装管理插件的VIM插件(vunble)
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
>> ----b. 下载YouCompleteMe至本地
git clone https://github.com/Valloric/YouCompleteMe.git ~/.vim/bundle/YouCompleteMe
>> ----c. 配置vunble并安装YounCompleteMe
vim ~/.vimrc,往里边添加以下这段内容(示例):
""""""""""""""""""""""""""""""
" Vunble
""""""""""""""""""""""""""""""
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc() " let Vundle manage Vundle
Bundle 'gmarik/vundle' " vim-scripts repos
Bundle 'Valloric/YouCompleteMe' filetype plugin indent on " required!
在VIM中输入 :BundleInstall,在弹出的界面中使用jk上下移动,定位至Bundle 'Valloric/YouCompleteMe',回车即可完成安装
>> ----d. 手动编译YouCompleteMe所依赖的ycm_core.so(这一部分需要前边提示到的Clang)
cd ~
mkdir ycm_build
cd ycm_build
cmake -G "Unix Makefiles" . ~/.vim/bundle/YouCompleteMe/cpp
cmake -G "Unix Makefiles" -DPATH_TO_LLVM_ROOT=/usr/clang_3_3/ . ~/.vim/bundle/YouCompleteMe/cpp
make ycm_core
cp /usr/clang_3_3/lib/libclang.so ~/.vim/bundle/YouCompleteMe/python/libclang.so #这一步是为了使用新的libcang.so
>> ----e. 配置补全,在vimrc中加入
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" YouCompleteMe
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:ycm_global_ycm_extra_conf='~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py'
提示:一些比较大的项目,它索引结构体成员,索引类成员等会比较慢,会显示:No completions found; errors in the file?[just wait a moment, all are perfect! ;-) ]

〖Linux〗(2013.08.02)VIM74b+YouCompleteMe,VIM代码编辑器补全能手的更多相关文章
- VIM 代码自动补全, YouCompleteMe安装及配置
效果 下载 使用Vundle安装 YCM 1. 安装Vundle window用户安装vundle参考这里:Windows下 vundle的安装和使用 2.
- linux下vim python代码自动补全
一.vim python自动补全插件:pydiction 可以实现下面python代码的自动补全: 1.简单python关键词补全 2.python 函数补全带括号 3.python 模块补全 4.p ...
- Linux下QTCreator代码自动补全(是真的自动补全,不是手动触发)
在使用Windows下的QTCreator的时候,像visual studio一样代码自动补全十分方便,而在Linux下,QTCreator似乎不能做到. 网上有些说是可以设置成手动补全,今天试了一下 ...
- linux下让irb实现代码自动补全的功能
我不知道其他系统上irb是否有此功能,但是在ubuntu上ruby2.1.2自带的irb默认是没有代码自动补全功能的,这多少让人觉得有所不便.其实加上也很简单,就是在irb里加载一个模块:requir ...
- python代码自动补全
牛逼了!Python代码补全利器,提高效率告别996! Python之禅 Python之禅 微信号 VTtalk 功能介绍 人生苦短,我用Python,这里是一名老程序员分享Python技术的地方,欢 ...
- 新时代的Vim C++自动补全插件 clang_complete
Vimer的福音 新时代的Vim C++自动补全插件 clang_complete 使用vim的各位肯定尝试过各种各样的自动补全插件,比如说大名鼎鼎的 OmniCppComplete .这一类的插 ...
- vim python自动补全插件:pydiction
vim python自动补全插件:pydiction 可以实现下面python代码的自动补全: 1.简单python关键词补全 2.python 函数补全带括号 3.python 模块补全 4.pyt ...
- 这个 Python 代码自动补全神器搞得我卧槽卧槽的
是时候跟你说说这个能让你撸代码撸得舒服得不要不要的神器了——kite. ! 简单来说,它是一款 IDE 的插件,能做到代码自动补全,可能你会说了,这有什么牛逼的?一般的编辑器不都有这个功能么 ...
- notepad++代码自动补全功能
可以代码自动补全功能,默认他是没有开启这个功能的,在首选项->备份与自动完成 里面有自动完成这一个设置,可以设置单词补全,也可以设置函数补全,这样写代码就快多了
随机推荐
- 【8.26校内测试】【重构树求直径】【BFS模拟】【线段树维护DP】
题目性质比较显然,相同颜色联通块可以合并成一个点,重新建树后,发现相邻两个点的颜色一定是不一样的. 然后发现,对于一条链来说,每次把一个点反色,实际上使点数少了2个.如下图 而如果一条链上面有分支,也 ...
- pt-archive提速的实践经验
最近遇到很多业务需求,需要进行数据导出工作,由于有格式要求,故之前一直使用mysqldump的方法. mysqldump -uuser -ppassword -S mysql.sock -t db t ...
- Can't deserialize with binaryFormatter after changing namespace of class
After changing the namespace of my class I can no longer deserialize the objects. I've implemented S ...
- Matlab Command Window 进度提示
效果如下,
- Turn any Linux computer into SOCKS5 proxy in one command
src: http://www.catonmat.net/blog/linux-socks5-proxy/ I thought I'd do a shorter article on catonmat ...
- WebView 加载网页和java 与js交互
[mw_shl_code=java,true]WebView是一个可以显示网页的控件.需求:通过WebView加载assets下的html文件.实现页面的缩放.向menu键添加:前进.后退和刷新,实现 ...
- FIS3中使用less
安装插件: npm install -g fis-parser-less npm install -g fis3-postpackager-loader 配置:fis-conf.js 使用fis-pa ...
- 检查正则表达式的工具:Regex Match Tracer
Regex Match Tracer破解版下载 使用: 相关: 收藏几个好用的在线正则验证网
- 简单的内存缓存模块 - Smache
介绍 [sm]art + c[ache] = smache Smache 是一个方便的内存缓存模块,可以通过一些简单缓存策略避免无限占用更多的内存,同时确保最常用最应该被缓存的对象被缓存. GitHu ...
- ZooKeeper安装和配置(转)
原文链接:http://coolxing.iteye.com/blog/1871009 Zookeeper的安装和配置十分简单, 既可以配置成单机模式, 也可以配置成集群模式. 下面将分别进行介绍. ...