update vimrc
This commit is contained in:
parent
ac3f2922ee
commit
1cb64b63f2
64
vim/vimrc
64
vim/vimrc
@ -87,8 +87,8 @@ let g:ycm_collect_identifiers_from_comments_and_strings = 1 " 注释和字符串
|
|||||||
"let g:ycm_global_ycm_extra_conf='~/.vim/bundle/YouCompleteMe/third_party/ycmd/.ycm_extra_conf.py'
|
"let g:ycm_global_ycm_extra_conf='~/.vim/bundle/YouCompleteMe/third_party/ycmd/.ycm_extra_conf.py'
|
||||||
let g:ycm_global_ycm_extra_conf='~/.vim/.ycm_extra_conf.py'
|
let g:ycm_global_ycm_extra_conf='~/.vim/.ycm_extra_conf.py'
|
||||||
let g:ycm_show_diagnostics_ui = 0 " 禁用语法检查
|
let g:ycm_show_diagnostics_ui = 0 " 禁用语法检查
|
||||||
inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<CR>" " 回车即选中当前项
|
"inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<CR>" " 回车即选中当前项
|
||||||
nnoremap <c-j> :YcmCompleter GoToDefinitionElseDeclaration<CR> " 跳转到定义处
|
nnoremap <c-d> :YcmCompleter GoToDefinitionElseDeclaration<CR> " 跳转到定义处
|
||||||
let g:ycm_min_num_of_chars_for_completion=2
|
let g:ycm_min_num_of_chars_for_completion=2
|
||||||
|
|
||||||
"python auto complete plugin
|
"python auto complete plugin
|
||||||
@ -98,6 +98,7 @@ let g:SuperTabDefaultCompletionType = "<c-n>"
|
|||||||
|
|
||||||
" xml html auto close
|
" xml html auto close
|
||||||
Plugin 'alvan/vim-closetag'
|
Plugin 'alvan/vim-closetag'
|
||||||
|
let g:jedi#documentation_command = ""
|
||||||
let g:closetag_filenames = '*.html,*.xhtml,*.phtml,*.launch'
|
let g:closetag_filenames = '*.html,*.xhtml,*.phtml,*.launch'
|
||||||
|
|
||||||
|
|
||||||
@ -123,8 +124,8 @@ let g:airline#extensions#tabline#left_sep = ' '
|
|||||||
let g:airline#extensions#tabline#left_alt_sep = ' '
|
let g:airline#extensions#tabline#left_alt_sep = ' '
|
||||||
" tabline中buffer显示编号
|
" tabline中buffer显示编号
|
||||||
let g:airline#extensions#tabline#buffer_nr_show = 1
|
let g:airline#extensions#tabline#buffer_nr_show = 1
|
||||||
nnoremap [b :bp<CR>
|
nnoremap <leader>] :bp<CR>
|
||||||
nnoremap ]b :bn<CR>
|
nnoremap <leader>[ :bn<CR>
|
||||||
" 映射<leader>num到num buffer
|
" 映射<leader>num到num buffer
|
||||||
"nmap <tab> :bn<cr>
|
"nmap <tab> :bn<cr>
|
||||||
map <leader>1 :b 1<CR>
|
map <leader>1 :b 1<CR>
|
||||||
@ -138,6 +139,18 @@ map <leader>8 :b 8<CR>
|
|||||||
map <leader>9 :b 9<CR>
|
map <leader>9 :b 9<CR>
|
||||||
map q :bwipeout<CR>
|
map q :bwipeout<CR>
|
||||||
|
|
||||||
|
nmap J 5j
|
||||||
|
nmap K 5k
|
||||||
|
nmap H 5h
|
||||||
|
nmap L 5l
|
||||||
|
|
||||||
|
nnoremap <c-h> <c-w>h
|
||||||
|
nnoremap <c-l> <c-w>l
|
||||||
|
nnoremap <c-j> <c-w>j
|
||||||
|
nnoremap <c-k> <c-w>k
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
" ctags 配置
|
" ctags 配置
|
||||||
map <F4> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --languages=Python,C++ -f .tags .<CR><CR>
|
map <F4> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --languages=Python,C++ -f .tags .<CR><CR>
|
||||||
imap <F4> <ESC>:!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --languages=Python,C++ -f .tags .<CR><CR>
|
imap <F4> <ESC>:!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --languages=Python,C++ -f .tags .<CR><CR>
|
||||||
@ -153,15 +166,41 @@ map <F3> :TagbarToggle<CR>
|
|||||||
let g:tagbar_ctags_bin="/usr/bin/ctags"
|
let g:tagbar_ctags_bin="/usr/bin/ctags"
|
||||||
|
|
||||||
Plugin 'The-NERD-tree'
|
Plugin 'The-NERD-tree'
|
||||||
|
let NERDTreeIgnore=['\.pyc','\~$','\.swp']
|
||||||
"NERDTree 配置:F2快捷键显示当前目录树
|
"NERDTree 配置:F2快捷键显示当前目录树
|
||||||
map <F2> :NERDTreeToggle<CR>
|
map <F2> :NERDTreeToggle<CR>
|
||||||
let NERDTreeWinSize=25
|
let NERDTreeWinSize=25
|
||||||
|
Plugin 'tiagofumo/vim-nerdtree-syntax-highlight'
|
||||||
|
Plugin 'Xuyuanp/nerdtree-git-plugin'
|
||||||
|
"Plugin 'ryanoasis/vim-devicons'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Plugin 'fatih/vim-go'
|
Plugin 'fatih/vim-go'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Plugin 'posva/vim-vue'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
call vundle#end() " required
|
call vundle#end() " required
|
||||||
|
|
||||||
" 在文件外修改时自动加载
|
" 在文件外修改时自动加载
|
||||||
@ -232,6 +271,11 @@ set nobackup
|
|||||||
set noswapfile
|
set noswapfile
|
||||||
"搜索忽略大小写
|
"搜索忽略大小写
|
||||||
set ignorecase
|
set ignorecase
|
||||||
|
" 搜索时忽略大小写,但在有一个或以上大写字母时仍大小写敏感
|
||||||
|
set ignorecase
|
||||||
|
set smartcase
|
||||||
|
|
||||||
|
|
||||||
"搜索逐字符高亮
|
"搜索逐字符高亮
|
||||||
set hlsearch
|
set hlsearch
|
||||||
set incsearch
|
set incsearch
|
||||||
@ -273,8 +317,16 @@ set whichwrap+=<,>,h,l
|
|||||||
map <space>ma :set mouse=a<CR>:set nu<CR>:set nopaste<CR>
|
map <space>ma :set mouse=a<CR>:set nu<CR>:set nopaste<CR>
|
||||||
map <space>mc :set mouse=c<CR>:set nu!<CR>:set paste<CR>
|
map <space>mc :set mouse=c<CR>:set nu!<CR>:set paste<CR>
|
||||||
set mouse=a
|
set mouse=a
|
||||||
set selection=exclusive
|
|
||||||
set selectmode=mouse,key
|
" 选中状态下 Ctrl+c 复制
|
||||||
|
vnoremap <c-c> "+y
|
||||||
|
|
||||||
|
" Ctrl+v
|
||||||
|
nmap <silent> <C-v> "+p
|
||||||
|
|
||||||
|
|
||||||
|
"set selection=exclusive
|
||||||
|
"set selectmode=mouse,key
|
||||||
" 通过使用: commands命令,告诉我们文件的哪一行被改变过
|
" 通过使用: commands命令,告诉我们文件的哪一行被改变过
|
||||||
set report=0
|
set report=0
|
||||||
" 在被分割的窗口间显示空白,便于阅读
|
" 在被分割的窗口间显示空白,便于阅读
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user