I want a prompt to save Vim edits when closing window with "X" button

17 views
Skip to first unread message

go

unread,
Sep 28, 2016, 9:06:29 PM9/28/16
to vim_use
Hi,
I normally close Vim with either ":q" or ":wq" or "ZZ".
However yesterday at the end of the day, I closed a bunch of windows
and accidentally closed a Vim window and lost some edits :-(
I wish that Vim would display a prompt to save changes when I close
with the "X" button at the right top of the window (windows 7).

When I run Gvim, and close the window with the "X" button, I
get a prompt to "save changes yes or no".
I wish I could get a similar prompt with Vim.

I run Vim with mintty.exe using a batch file:
SET PRINTER="\\SR\Brother"
start mintty.exe -p 0,0 /usr/bin/vim.exe %1

Maybe a different terminal instead of mintty?

I did find an old post where someone wanted to disable the
"X" button when using Vim. The suggestion was to edit Vim
source and recompile. That could turn into a non trivial effort.

Any comments?

thanks

windows7
cygwin64
Reply all
Reply to author
Forward
0 new messages