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代码编辑器补全能手的更多相关文章

  1. VIM 代码自动补全, YouCompleteMe安装及配置

    效果 下载 使用Vundle安装 YCM 1. 安装Vundle window用户安装vundle参考这里:Windows下 vundle的安装和使用 2.

  2. linux下vim python代码自动补全

    一.vim python自动补全插件:pydiction 可以实现下面python代码的自动补全: 1.简单python关键词补全 2.python 函数补全带括号 3.python 模块补全 4.p ...

  3. Linux下QTCreator代码自动补全(是真的自动补全,不是手动触发)

    在使用Windows下的QTCreator的时候,像visual studio一样代码自动补全十分方便,而在Linux下,QTCreator似乎不能做到. 网上有些说是可以设置成手动补全,今天试了一下 ...

  4. linux下让irb实现代码自动补全的功能

    我不知道其他系统上irb是否有此功能,但是在ubuntu上ruby2.1.2自带的irb默认是没有代码自动补全功能的,这多少让人觉得有所不便.其实加上也很简单,就是在irb里加载一个模块:requir ...

  5. python代码自动补全

    牛逼了!Python代码补全利器,提高效率告别996! Python之禅 Python之禅 微信号 VTtalk 功能介绍 人生苦短,我用Python,这里是一名老程序员分享Python技术的地方,欢 ...

  6. 新时代的Vim C++自动补全插件 clang_complete

    Vimer的福音 新时代的Vim C++自动补全插件 clang_complete   使用vim的各位肯定尝试过各种各样的自动补全插件,比如说大名鼎鼎的 OmniCppComplete .这一类的插 ...

  7. vim python自动补全插件:pydiction

    vim python自动补全插件:pydiction 可以实现下面python代码的自动补全: 1.简单python关键词补全 2.python 函数补全带括号 3.python 模块补全 4.pyt ...

  8. 这个 Python 代码自动补全神器搞得我卧槽卧槽的

    是时候跟你说说这个能让你撸代码撸得舒服得不要不要的神器了——kite. ​!   ​ 简单来说,它是一款 IDE 的插件,能做到代码自动补全,可能你会说了,这有什么牛逼的?一般的编辑器不都有这个功能么 ...

  9. notepad++代码自动补全功能

    可以代码自动补全功能,默认他是没有开启这个功能的,在首选项->备份与自动完成 里面有自动完成这一个设置,可以设置单词补全,也可以设置函数补全,这样写代码就快多了

随机推荐

  1. Laravel输出JSON时设定输出字段的几种情况总结

    1.如果输出json的时候需要屏蔽某些字段,或则想自定义显示的字段: 1.model里面设置 protected $hidden = ['password'];//要屏蔽的字段 2.model里面设置 ...

  2. 快速幂 cojs 1130. 取余运算

    cojs 1130. 取余运算 ★   输入文件:dmod.in   输出文件:dmod.out   简单对比时间限制:10 s   内存限制:128 MB [题目描述] 输入b,p,k的值,求b^p ...

  3. poj 2528 Mayor's posters 线段树区间更新

    Mayor's posters Time Limit: 1 Sec  Memory Limit: 256 MB 题目连接 http://poj.org/problem?id=2528 Descript ...

  4. Google Code Jam Africa 2010 Qualification Round Problem A. Store Credit

    Google Code Jam Qualification Round Africa 2010 Problem A. Store Credit https://code.google.com/code ...

  5. python函数 divmod

    divmod(a,b)函数 中文说明: divmod(a,b)方法返回的是a//b(除法取整)以及a对b的余数 返回结果类型为tuple 参数: a,b可以为数字(包括复数) from 2. Add ...

  6. ExtJs xtype一览

    标签: extjs xtype 分类: HTML 基本组件: xtype Class 描述 button Ext.Button 按钮 splitbutton Ext.SplitButton 带下拉菜单 ...

  7. JSP中Out和Request对象详解

    内置表示不需要new便可直接使用. 一.基础知识 1.缓冲区:IO最原始是一个一个字节的读取,这就像吃米饭的时候一粒一粒的吃,很没有效率,这时候就有了碗,一碗一碗的吃,岂不痛快. 2.Get提交不能超 ...

  8. 一步一步学习Vim 全图解释

    转载:http://linux.chinaunix.net/techdoc/desktop/2009/01/03/1056322.shtml 一步一步学习Vim 全图解释 以下注释,根据图示和自己实践 ...

  9. Git 报错:git - error: RPC failed; curl 18 transfer closed with outstanding read data remaining 解决方案

    error: RPC failed; curl 18 transfer closed with outstanding read data remaining because have error w ...

  10. 采用web service传输超大数据

    因为以前也没有做过相关的web service开发,对于Xfire也只是知道有这么一个框架.当然现在它已经变成apache基金会旗下的一个开源项目CXF.不过,现在依旧有很多公司还在用Xfire作we ...