Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I stop gvim opening dialogs?

Tags:

vim

dialog

config

I've managed to get gvim pretty close to console vim in feel, no scrollbars, no toolbars etc. However, whenever it needs to prompt me, rather than doing it below the status line it likes to open up a gui dialog. This dialog is annoying, it often appears on the wrong monitor, sometimes i miss it, and its extra keypresses/clicks to dismiss it.

Apparently I can disable simple choice dialogs using the 'c' flag for guioptions, but it doesnt seem to work for me. Perhaps my test dialogs are not considered 'simple'.

set guioptions+=lrbmTLce
set guioptions-=lrbmTLce

I'm testing against the dialog that can come up about swap files (read only, recover, edit anyway etc) and the dialog about the file changing outside of the vim instance.

like image 412
jhogendorn Avatar asked Feb 01 '12 23:02

jhogendorn


People also ask

How do I turn off lines in vim?

Make the vi/vim text editor show or hide line numbers Press ESC key. At the : prompt type the following command to run on line numbers: set number. To turn off line numbering, type the following command at the : prompt set nonumber.


3 Answers

I use the following in my .gvimrc

set guioptions=c
like image 169
Peter Rincker Avatar answered Oct 30 '22 12:10

Peter Rincker


Peter Rincker was in fact correct, however I found I was having some issues with whether or not things were being set in the guioptions set. The below config works to make GVim behave exactly as console vim, including disabling dialogs, console tabs, no menu's or scrollbars etc. I'm sure theres a more concise option so I'm putting this here as an answer and hoping someone comes back with the 'correct' method.

set guioptions+=lrbmTLce
set guioptions-=lrbmTLce
set guioptions+=c
like image 31
jhogendorn Avatar answered Oct 30 '22 10:10

jhogendorn


A small tip: I sometimes have a logfile open but I already have the portion I want from it so I don't want it to reload but I also don't want to close it in case I need something more, plus if I reload or close and reopen again the same data could be hard to find or it could have been rolled out. The popups are just a nuisance.

In this case a simple solution is to :file anything, the buffer is then renamed and so GVim won't look for changes in the original file anymore.

like image 1
Breno Salgado Avatar answered Oct 30 '22 11:10

Breno Salgado