Wednesday, September 26, 2012

Re: Switch vim window with command line option

On Wed, September 26, 2012 15:31, Roy Fulbright wrote:
>
>
>
>
> I have the following in a batch file on Windows 7. My goal is to start
> gvim with the help window for dbext open, open a new window with a
> vertical split, switch to the new window, and open an SQL file. gvim -c
> ":help dbext" -c ":vsplit" -c "normal <c-w><c-w>" -c ":e tutorial.sql"
> Everything works except for switching to the new window with <c-w><c-w>.
> What am I doing wrong? Thanks.

normal doesn't understand the <key> notation. Either use exe:
:exe "normal \<c-w>\<c-w>"
or even better use
:wincmd w
to switch windows

See
:h :wincmd
:h :exe


regards,
Christian

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment