add FindSymbolInProjectSources and Cf command
This commit is contained in:
parent
91214b8695
commit
33ce59d817
17
vimrc
17
vimrc
@ -133,3 +133,20 @@ function! LoadProject()
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! FindSymbolInProjectSources(...)
|
||||
if a:0 > 0
|
||||
let sym = a:1
|
||||
else
|
||||
let sym = expand("<cword>")
|
||||
endif
|
||||
if exists("b:project_sources")
|
||||
exec 'vimgrep /\<' . sym . '\>/gj ' . b:project_sources
|
||||
endif
|
||||
endfunction
|
||||
|
||||
"==============================================================================
|
||||
" Commands
|
||||
"==============================================================================
|
||||
|
||||
command! -nargs=? Cf call FindSymbolInProjectSources(<f-args>)
|
||||
|
Loading…
x
Reference in New Issue
Block a user