PtagSymbolBeforeParen(): do :help instead of :ptag when editing .vim files

This commit is contained in:
Josh Holtrop 2013-01-15 14:01:45 -05:00
parent 27b0245886
commit a026e746b6

11
vimrc
View File

@ -177,7 +177,18 @@ function! PtagSymbolBeforeParen()
if a:symidx != -1 if a:symidx != -1
let a:line = strpart(a:line, a:symidx) let a:line = strpart(a:line, a:symidx)
endif endif
if &syntax == 'vim'
execute 'silent! help ' . a:line
if &filetype == 'help'
" we successfully opened the help window
execute "normal 1000\<C-w>-"
setlocal winheight=10
execute "normal \<C-w>\<C-w>"
startinsert
endif
else
execute 'silent! ptag ' . a:line execute 'silent! ptag ' . a:line
endif
endfunction endfunction
"============================================================================== "==============================================================================