.vimrc: .ctags recursive search
This commit is contained in:
parent
5b78c5a80d
commit
5560e429ad
23
.vimrc
23
.vimrc
|
@ -151,11 +151,24 @@ function! ToggleMyFontSize()
|
||||||
endfunction
|
endfunction
|
||||||
nnoremap <silent> <F12> :call ToggleMyFontSize()<CR>
|
nnoremap <silent> <F12> :call ToggleMyFontSize()<CR>
|
||||||
|
|
||||||
" теги
|
" ctags
|
||||||
set tags+=./.ctags
|
let local_tags = ".ctags"
|
||||||
set tags+=~/.big/ctags
|
let local_path = "/"
|
||||||
cscope add ./.cscope
|
let current_path = getcwd()
|
||||||
cscope add ~/.big/cscope
|
" If the current path is a child of $HOME directory, start from $HOME
|
||||||
|
if current_path =~ $HOME
|
||||||
|
let local_path = $HOME . local_path
|
||||||
|
let current_path = substitute(current_path, $HOME, '', "")
|
||||||
|
endif
|
||||||
|
let path_parts = split(current_path, "/")
|
||||||
|
for path_part in path_parts
|
||||||
|
let local_path = local_path . path_part . "/"
|
||||||
|
if filereadable(local_path . local_tags)
|
||||||
|
exe ":set tags+=" . local_path . local_tags
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
unlet local_tags local_path current_path path_parts
|
||||||
|
|
||||||
map <F4> [I:let nr = input("Which one: ")<Bar>exe "normal " . nr ."[\t"<CR>
|
map <F4> [I:let nr = input("Which one: ")<Bar>exe "normal " . nr ."[\t"<CR>
|
||||||
|
|
||||||
" Foldging
|
" Foldging
|
||||||
|
|
Loading…
Reference in New Issue