Vim 中好用的插件
Vim 中好用的插件
Vundle 插件管理器
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
编辑 ~/.vim/vimrc
filetype off " required
set noswapfile
set encoding=utf-8
let &termencoding=&encoding
set fileencodings=utf-8,gb18030,gbk,gb2312,big5
set rtp+=~/.vim/bundle/vundle
call vundle#begin()
"文件管理器
Plugin 'scrooloose/nerdtree'
"注释
Plugin 'scrooloose/nerdcommenter'
"补全插件
Plugin 'Valloric/YouCompleteMe'
"Plugin 'Shougo/neocomplete'
Plugin 'rdnetto/YCM-Generator'
Plugin 'bling/vim-airline'
Plugin 'tagbar'
"快速移动
Plugin 'easymotion/vim-easymotion'
Plugin 'ctrlp.vim'
call vundle#end()
syntax on
set shiftwidth=4
set tabstop=4
set softtabstop=4
在vim中执行
:BundleInstall
其他配置:
"let g:ycm_global_ycm_extra_conf='~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
"set completeopt=longest,menu
set completeopt=menu,menuone
"let g:ycm_add_preview_to_completeopt = 0
let g:ycm_seed_identifiers_with_syntax = 1
let g:ycm_collect_identifiers_from_tag_files = 1
let g:ycm_confirm_extra_conf = 0
let g:ycm_key_invoke_completion = '<c-z>'
let g:ycm_use_clangd=1
"NERDTree
"f2
map <F2> :NERDTreeToggle<CR>
"tagbar
map <F3> :Tagbar<CR>
"ctrl+w,w ctrl+w,l ctrl+w,h
"NERDCommenter
let mapleader=","
set backspace=2
set smarttab
set expandtab
set autoindent
"colorscheme Tomorrow-Night-Blue
"colorscheme molokai
colorscheme darkblue
"set t_Co=256
"set background=dark
set timeoutlen=1 ttimeoutlen=0
set timeoutlen=500
filetype plugin on
"set nocompatible
map <c-]> g<c-]>
nmap <leader>D <plug>(YCMHover)