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

This commit is contained in:
josh committed 2013-01-15 14:01:45 -05:00
1 parent 27b0245886
commit a026e746b6
1 file changed
+12 -1
+12 -1
View File
@@ -177,7 +177,18 @@ function! PtagSymbolBeforeParen()
if a:symidx != -1
let a:line = strpart(a:line, a:symidx)
endif
execute 'silent! ptag ' . a:line
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
endif
endfunction
"==============================================================================