〖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++代码自动补全功能
可以代码自动补全功能,默认他是没有开启这个功能的,在首选项->备份与自动完成 里面有自动完成这一个设置,可以设置单词补全,也可以设置函数补全,这样写代码就快多了
随机推荐
- maven搭建企业级多模块项目
1.创建一个maven项目 选择pom 完成 2.创建模块 项目右键选择module,创建模块.创建子模块 其余的打包时都为jar 地址:https://github.com/LeviFromCN/m ...
- 工作中用到的git命令
1.git stash 将本地的修改藏匿,不进行commit也可切换分支 2.git stash apply 将之前藏匿的修改恢复出来 3.git cherry-pick commitId git在当 ...
- python3.5: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory
python3.5安装报错 python3.5: error while loading shared libraries: libpython3.5m.so.1.0: cannot open sha ...
- uoj 41 【清华集训2014】矩阵变换 婚姻稳定问题
[清华集训2014]矩阵变换 Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://uoj.ac/problem/41 Description 给出 ...
- JVM堆内存的分代
虚拟机的堆内存共划分为三个代:年轻代(Young Generation).年老代(Old Generation)和持久代(PermanentGeneration).其中持久代主要存放的是Java类的类 ...
- 学习笔记:Tab Bar 控件使用详解
注意这里是:Tab Bar 不是Tab Bar Controller. Tab bar是继承UIView,所以可以添加到ViewController里.是View就可以add到另一个View上去.Ta ...
- Level-shifting nixes need for dual power supply
The AD736 true-rms-to-dcconverter is useful for many applications that require precise calculation o ...
- J-LINK序列号修改
打开J-LINK COMMANDER中输入 exec setsn=xxxxxxxx 即可
- LM27313 (ACTIVE) 具有 30V 内部 FET 开关(采用 SOT-23 封装)的 1.6 MHz 升压转换器
The LM27313 switching regulator is a current-mode boost converter with a fixed operating frequency o ...
- C# 通过HttpWebRequest在后台对WebService进行调用
通过HttpWebRequest在后台对WebService进行调用 http://www.cnblogs.com/macroxu-1982/archive/2009/12/23/1630415.ht ...