vimrc: Add vim-indexer
This commit is contained in:
25
.vimrc
25
.vimrc
@@ -23,6 +23,7 @@ if filereadable(expand(vundle_dir) . "/README.md")
|
|||||||
Plugin 'airblade/vim-gitgutter'
|
Plugin 'airblade/vim-gitgutter'
|
||||||
Plugin 'jeetsukumaran/vim-pythonsense'
|
Plugin 'jeetsukumaran/vim-pythonsense'
|
||||||
Plugin 'easymotion/vim-easymotion'
|
Plugin 'easymotion/vim-easymotion'
|
||||||
|
Plugin 'file:///home/kuba/git/vim-indexer'
|
||||||
|
|
||||||
call vundle#end() " required
|
call vundle#end() " required
|
||||||
else
|
else
|
||||||
@@ -104,29 +105,6 @@ let g:ctrlp_working_path_mode = 'ra'
|
|||||||
let git_dir_location=finddir('.git', ';')
|
let git_dir_location=finddir('.git', ';')
|
||||||
let git_root_location=fnamemodify(git_dir_location, ':h')
|
let git_root_location=fnamemodify(git_dir_location, ':h')
|
||||||
|
|
||||||
" Locate cscope file
|
|
||||||
if has("cscope")
|
|
||||||
set csto=0 " Search cscope before ctags
|
|
||||||
set cst " <C-]> searches cscope also
|
|
||||||
set nocsverb " Not verbose when adding database
|
|
||||||
set cspc=3 " Display the last 3 components of file path
|
|
||||||
"add any database in current dir
|
|
||||||
if filereadable("cscope.out")
|
|
||||||
cs add cscope.out
|
|
||||||
"else search cscope.out in git folder
|
|
||||||
else
|
|
||||||
let cscope_file=findfile("cscope.out", git_dir_location)
|
|
||||||
if !empty(cscope_file) && filereadable(cscope_file)
|
|
||||||
exe "cs add" cscope_file git_root_location
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
command! Csc cscope find c <cword>
|
|
||||||
" Regen cscope
|
|
||||||
" sh ~/bin/gen_cscope.sh . .git/cscope.out
|
|
||||||
"
|
|
||||||
|
|
||||||
" Simulate maximize/minimize window
|
" Simulate maximize/minimize window
|
||||||
nnoremap <C-w>m :call ToggleMiniMaxiWin()<CR>
|
nnoremap <C-w>m :call ToggleMiniMaxiWin()<CR>
|
||||||
nnoremap <leader>wm :call ToggleMiniMaxiWin()<CR>
|
nnoremap <leader>wm :call ToggleMiniMaxiWin()<CR>
|
||||||
@@ -145,6 +123,7 @@ endfunction
|
|||||||
|
|
||||||
" Key binds
|
" Key binds
|
||||||
"
|
"
|
||||||
|
command! Csc cscope find c <cword>
|
||||||
|
|
||||||
" Replace the word under cursor
|
" Replace the word under cursor
|
||||||
nnoremap <leader>* :%s/\<<c-r><c-w>\>//g<left><left>
|
nnoremap <leader>* :%s/\<<c-r><c-w>\>//g<left><left>
|
||||||
|
|||||||
Reference in New Issue
Block a user