Reply to message «NERDTree on startup», 
sent 14:31:04 07 January 2011, Friday
by beo wulf:

``normal "<C-w>l"'' is a wrong syntax, you should use
``execute "normal \<C-w>l"''. With this everything works. In your original 
version normal command stops after «"<» because «"<» is «select register `<' 
for 
the next command» and register `<' does not exist. There are also some other 
notes: 1) <C-w>l in normal mode can be translated into «wincmd l»; 2) in any 
case, use «normal!» instead of just «normal» where possible.

Original message:
> Is it possible to have NERDtree loaded on startup, but to have the
> cursor not in the NERDTree buffer?
> 
> I have tried:
> 
> function! LoadNERDTree()
> 
>   :NERDTree
> 
>   normal "<c-w>l"
> endf
> 
> :au VimEnter * :call LoadNERDTree()
> 
> But the problem is that I end up starting in the NERDTree buffer
> rather than the buffer of the file I want to edit.
> 
> Thanks!

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to