The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 20: | Line 20: | ||
set previewheight=25 |
set previewheight=25 |
||
exe "silent! pclose" |
exe "silent! pclose" |
||
− | if &previewwindow " don't do this in the preview window |
+ | if &previewwindow " don't do this in the preview window |
return |
return |
||
endif |
endif |
||
− | let w = expand(" |
+ | let w = expand("<cword>") " get the word under cursor |
exe "ptjump " . w |
exe "ptjump " . w |
||
" if any non False arg, open in simple horiz window so simply return |
" if any non False arg, open in simple horiz window so simply return |
||
Line 31: | Line 31: | ||
" otherwise, make it vertical |
" otherwise, make it vertical |
||
exe "silent! wincmd P" |
exe "silent! wincmd P" |
||
− | if &previewwindow " if we really get there... |
+ | if &previewwindow " if we really get there... |
if has("folding") |
if has("folding") |
||
silent! .foldopen " don't want a closed fold |
silent! .foldopen " don't want a closed fold |
||
Line 37: | Line 37: | ||
wincmd L " move preview window to the left |
wincmd L " move preview window to the left |
||
wincmd p " back to caller |
wincmd p " back to caller |
||
− | if !&previewwindow " got back |
+ | if !&previewwindow " got back |
wincmd _ |
wincmd _ |
||
" make caller full size (I use minibufexplorer and for some reason |
" make caller full size (I use minibufexplorer and for some reason |
||
Line 47: | Line 47: | ||
" right hand window full height preview window |
" right hand window full height preview window |
||
− | inoremap |
+ | inoremap <C-]> <ESC>:call PreviewTag(0)<CR> |
− | nnoremap |
+ | nnoremap <C-]> :call PreviewTag(0)<CR> |
" simple "above the caller" preview window, |
" simple "above the caller" preview window, |
||
− | nnoremap |
+ | nnoremap <M-]> :call PreviewTag(1)<CR> |
− | inoremap |
+ | inoremap <M-]> <ESC>:call PreviewTag(1)<CR> |
" close preview |
" close preview |
||
− | noremap |
+ | noremap <M-[> <ESC>:pc<CR> |
</pre> |
</pre> |
||