Wikia

Vim Tips Wiki

Changes: Set up vtreeexplorer and taglist on left

Edit

Back to page

(change "anon" author to blank; trim "created" date; minor manual clean)
(Change <tt> to <code>, perhaps also minor tweak.)
 
Line 26: Line 26:
   
 
==Comments==
 
==Comments==
Not sure if Tlist and VTreeExplore can be used with <tt>|</tt>, but consider (untested):
+
Not sure if Tlist and VTreeExplore can be used with <code>|</code>, but consider (untested):
 
<pre>
 
<pre>
 
map <F12> <Esc>:Tlist <Bar> wincmd h <Bar> wincmd s <Bar> VTreeExplore <Bar> set nonu <Bar> wincmd l<CR>
 
map <F12> <Esc>:Tlist <Bar> wincmd h <Bar> wincmd s <Bar> VTreeExplore <Bar> set nonu <Bar> wincmd l<CR>

Latest revision as of 06:13, July 13, 2012

Tip 1203 Printable Monobook Previous Next

created 2006 · complexity basic · version 5.7


A simple mapping to quickly set up a couple of VTreeExplorer and TagList in the left side of your Vim window. Add the following to your vimrc:

map <F12> <Esc>:Tlist<CR><C-W>h<C-W>s:VTreeExplore<CR>:set nonu<CR><C-W>l

The mapping does the following:

  • Opens the TagList (opens left by default).
  • Switches to the TagList window and splits it.
  • Opens VTreeExplorer in the split window.
  • Turns of line numbering in the VTreeExplorer.
  • Switches back to the window where you started.

CommentsEdit

Not sure if Tlist and VTreeExplore can be used with |, but consider (untested):

map <F12> <Esc>:Tlist <Bar> wincmd h <Bar> wincmd s <Bar> VTreeExplore <Bar> set nonu <Bar> wincmd l<CR>

:help :wincmd

Also consider using 'nnoremap' and 'inoremap' and possibly 'vnoremap' rather than just 'map'.

Around Wikia's network

Random Wiki