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 am working on Windows 7 and GVim 7.3. If I already have one Vim instance running, how to start up another Vim instance, preferably by using some Vim commands?

Currently I do this in the existing vim:

:!gvim

But a Windows CMD window is opened, along with the new Vim window. It's a little annoying.

Are there other (more elegant) ways to start a new vim instance? Thanks.

share|improve this question

migrated from stackoverflow.com Mar 18 '13 at 9:43

This question came from our site for professional and enthusiast programmers.

3  
Probably but this is already quite eloquent. –  romainl Mar 18 '13 at 8:16

3 Answers 3

up vote 4 down vote accepted

Question is, why would you even want another instance? Working with buffers and tabs is usually much more efficient than having multiple windows floating around.

However, if you really want a new window, start it with

:!start gvim.exe

which suppresses the command line window.

share|improve this answer
    
+ 1. You can open a new window for editing within the gvim window using CTRL + w + n –  Neha Karanjkar Mar 18 '13 at 8:44
    
I keep a bunch of files(notes, references, todos, emails, books, etc) opened all day in a Vim instance, separated from the one I am doing coding and stuff. –  user2181426 Mar 18 '13 at 8:49
    
@NehaKaranjkar that is not the same kind of window the OP was talking about. To avoid the console window from popping up, use :!start gvim.exe. –  Michael Wild Mar 18 '13 at 9:32

You can map this, i.e. ad to your .vimrc

map <C-S-n> :!gvim<CR>

Then pushing CtrlShiftN will open new window.

share|improve this answer
    
thanks for the help. –  user2181426 Mar 18 '13 at 10:20

If it's just the Windows cmd window annoying you, use:

:!start gvim
share|improve this answer
1  
thanks. Michael replied to my question first, so I accepted his answer. –  user2181426 Mar 18 '13 at 10:22

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.