I have the following mapping in my project:
nnoremap <F7> :execute '!gtags'<cr> :cscope kill -1<cr> :cscope add CTAGS<cr>
Under certain conditions I want to be able to execute this mapping from a script, i.e.
if (mycondition)
execute 'normal <F7>'
endif
The code above didn't work.
Does anybody know if it is possible to do something like that?
command! RerfreshTags !gtags<bar>cscope kill -1<bar>cscope add GTAGS
. Then map<f7>
to this command and execute your the command directly in your function. – Peter Rincker Sep 25 '15 at 1:03