From a026e746b613c47f7af9d5a1d1f79f54e61bc155 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Tue, 15 Jan 2013 14:01:45 -0500 Subject: [PATCH] PtagSymbolBeforeParen(): do :help instead of :ptag when editing .vim files --- vimrc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/vimrc b/vimrc index a82b4b8..adc9b77 100644 --- a/vimrc +++ b/vimrc @@ -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\-" + setlocal winheight=10 + execute "normal \\" + startinsert + endif + else + execute 'silent! ptag ' . a:line + endif endfunction "==============================================================================