PtagSymbolBeforeParen(): do :help instead of :ptag when editing .vim files
This commit is contained in:
parent
27b0245886
commit
a026e746b6
13
vimrc
13
vimrc
@ -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
|
||||||
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
|
endfunction
|
||||||
|
|
||||||
"==============================================================================
|
"==============================================================================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user