Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
add comment

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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