I'm using MacVim with the Taglist plugin, which I want to be open all the time when I start MacVim.

So in my .gvimrc I have the following

:TlistToggle

Which opens the sidebar when I load my MacVim editor. The thing is, when it opens it sets the taglist window to be the 'active' window rather than the new file window directly next to it.

Is there a way of setting the 'active window' at start up? I tried adding this to my rc file

:wincmd l

Which in theory should move the active window to the right, but this doesn't seem to have any affect.

Any help would be appreciated

link|improve this question

50% accept rate
feedback

1 Answer

up vote 1 down vote accepted

Try delaying the command until Vim has finished all initializations:

:autocmd VimEnter * TlistToggle

See:

:help :autocmd
:help VimEnter

link|improve this answer
that's done the trick, thanks! – djhworld Oct 10 '10 at 18:28
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.