标签:tps pre code 修改 install arch encoding hls tom
看C++代码, 缺少合适的编辑器,捣鼓vim。
安装Vundle, 用于插件管理
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim --depth=1
安装YouCompleteMe,代码补全
cd ~/.vim/bundle/
git clone https://github.com/Valloric/YouCompleteMe.git --depth=1
cd YouCompleteMe/
git submodule update --init --recursive
./install.py --clang-completer --system-libclang
修改 ~/.vimrc
,增加下面一段, 管理其他插件
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'mileszs/ack.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'tyok/nerdtree-ack'
Plugin 'Xuyuanp/nerdtree-git-plugin'
Plugin 'tpope/vim-rails'
Plugin 'drmingdrmer/xptemplate'
" Begin Snippet
Plugin 'MarcWeber/vim-addon-mw-utils'
Plugin 'tomtom/tlib_vim'
Plugin 'garbas/vim-snipmate'
Plugin 'honza/vim-snippets'
Plugin 'altercation/vim-colors-solarized'
" End Snippet
Bundle 'Valloric/YouCompleteMe'
call vundle#end()
set nocompatible
nmap <F2> :NERDTreeToggle<CR>
let g:ycm_global_ycm_extra_conf= '~/.vim/.ycm_extra_conf.py'
let g:ycm_confirm_extra_conf=0
" 基本配置
"set mouse=a
syntax on
set ts=4
set sw=4
set expandtab
set autoindent
set nu et si ai paste
set ruler
set hlsearch
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1
安装插件命令 :PluginInstall
使用YouCompleteMe, 安装Bear
git clone https://github.com/rizsotto/Bear.git --depth=1
cd Bear
cmake -DCMAKE_INSTALL_PREFIX=/opt/Bear .
make all
make install
具体使用例子
cd ~/Documents/work/gitlab/ps-sdk
cp make Makefile
bear make
标签:tps pre code 修改 install arch encoding hls tom
原文地址:http://www.cnblogs.com/bregman/p/7986188.html