Vim Tips Wiki
We recommend that you log in before editing. This will allow other users to leave you a message about your edit, and will let you track edits via your Watchlist. Creating an account is quick and free.

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("<cword>") " get the word under cursor
+
let w = expand("&lt;cword&gt;") " 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 &amp;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 !&amp;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 <C-]> <Esc>:call PreviewTag(0)<CR>
+
inoremap &lt;C-]&gt; &lt;ESC&gt;:call PreviewTag(0)&lt;CR&gt;
nnoremap <C-]> :call PreviewTag(0)<CR>
+
nnoremap &lt;C-]&gt; :call PreviewTag(0)&lt;CR&gt;
 
" simple "above the caller" preview window,
 
" simple "above the caller" preview window,
nnoremap <M-]> :call PreviewTag(1)<CR>
+
nnoremap &lt;M-]&gt; :call PreviewTag(1)&lt;CR&gt;
inoremap <M-]> <Esc>:call PreviewTag(1)<CR>
+
inoremap &lt;M-]&gt; &lt;ESC&gt;:call PreviewTag(1)&lt;CR&gt;
 
" close preview
 
" close preview
noremap <M-[> <Esc>:pc<CR>
+
noremap &lt;M-[&gt; &lt;ESC&gt;:pc&lt;CR&gt;
 
</pre>
 
</pre>
   
Please note that all contributions to the Vim Tips Wiki are considered to be released under the CC-BY-SA
Cancel Editing help (opens in new window)