Search This Blog

Saturday, October 25, 2008

open a new gvim window from gvim

To open a new gvim window from an existing gvim window use

:silent !gvim

If there are any errors in the original window, the screen can be refreshed by

:redraw!

or by simply pressing ctrl-l.

For more help, see :!cmd, :silent in the vim help pages.

This tip was tested in vim 7.0 on a machine running Debian Etch.

2 comments:

NSK Nikolaos S. Karastathis said...

Good one. Here's another tip: to open gvim with multiple files in tabs type gvim -p firstfile secondfile etc. Tabs make it easy to edit two or more files concurrently.

Kamaraju Kusumanchi said...

Thanks for the tip NSK. You are right. Tabs in vim are very useful.

Followers