add FindSymbolInProjectSources and Cf command

This commit is contained in:
Josh Holtrop 2012-12-09 16:17:32 -05:00
parent 91214b8695
commit 33ce59d817

17
vimrc
View File

@ -133,3 +133,20 @@ function! LoadProject()
endif endif
endif endif
endfunction 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>)