vim配置

来源:互联网 发布:潘多拉淘宝 编辑:程序博客网 时间:2024/05/29 18:52
Vim for Linux:
Debian (or Ubuntu)
1.Make sure you have any of these packages:
  • vim-nox
  • vim-gtk
  • vim-gnome
  • vim-athena

2.bundle安装
  1. git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle  
  2. git clone https://github.com/Valloric/YouCompleteMe.git ~/.vim/bundle/YouCompleteMe  
  3. cd ~/.vim/bundle/YouCompleteMe  
  4. git submodule update --init --recursive  
  5. cd ~/.vim/bundle/YouCompleteMe  
  6. ./install.py --clang-completer  

3.在~/.vimrc中添加
[plain] view plain copy
  1. " Vunble  
  2. filetype off " required!  
  3. set rtp+=~/.vim/bundle/vundle/  
  4. call vundle#rc()  
  5.   
  6. " let Vundle manage Vundle  
  7. Bundle 'gmarik/vundle'  
  8.   
  9. " vim-scripts repos  
  10. Bundle 'Valloric/YouCompleteMe'  
  11.   
  12. filetype plugin indent on " required!  
  13.   
  14. let g:ycm_global_ycm_extra_conf='~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py' 

4.直接安装
  1. cd /home/acrobat/.vim/bundle/YouCompleteMe  
  2. git submodule update --init --recursive  
  3. cd /home/acrobat/.vim/bundle/YouCompleteMe  
  4. ./install.py --clang-completer  
  5. 执行  
  6. sed -i '$a"YouCompleteMe\nlet g:ycm_global_ycm_extra_conf="/usr/share/vim/vim74/plugin/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py"\nnmap <C-\>G :YcmCompleter GoTo<CR>' ~/.vimrc  


原创粉丝点击