tags:

views:

81

answers:

3

I am using git configuration mentioned here

If I create a new tab and then if I do commmand W ( I am using mac) to discard that window then I get a popup for which I have to use mouse.

I have seen others use vim where in similar cases they get a prompt at the bottom which is something like

C for cacel N for No. S far Save(not sure).

What configuration change I need to do so that I start getting command prompt rather then GUI prompt?

I am using macvim.

A: 

command W is a standard the MacOS close tab key stroke. You can use vim's own :q or :q! to close it and forget any changes to the buffer.

hgimenez
somtimes I have too many tabs and I need to close certain tabs.
Roger
guioptions+=c is definitely the answer to your question. :tabo might also be helpful to you in that case, which closes all tabs except for the active one.
hgimenez
A: 

If you're using macvim (currently my favorite incarnation of Vim for the Mac), the prompt you get, while GUI-ish like the rest of Macvim, is keyboard-controllable: return to accept the default Save, Esc to Cancel, command-D to mean Don't Save (i.e. quit and lose changes). If you're using Apple=supplied vim on Apple's Terminal.app, the popdown from command W (which doesn't offer Save but just Cancel and Close) is similarly keyboard controllable: Esc to Cancel, return to accept the default Close (and lose unsaved changes, if any).

If you're using some other version of vim, it would help if you let us know which one!-)

Alex Martelli
+2  A: 

What you're looking for is:

:set guioptions+=c