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

2016-09-28 Thread go
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
 

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is it possible to redirect vim input?

2015-07-08 Thread GoTouch Go
Thanks all. Just took a quick look at clientserver (remote.txt) and 
netbeans.txt which give a lot info about this kind of integration of vim.

I probably can use them for my goal. I just want to make gdb easier to use, 
maybe spoiled by windows debugger key bindings but it is just so easier than 
gdb command line.

My motivation is to make it easy to try rust in a more interactive way: type in 
lines of code, compile (which is quite fast), run / step through it and display 
variable values and output. This will not support profound use of gdb easily 
but should be good enough as a start. Obviously this can apply to other 
languages as well.

On Monday, July 6, 2015 at 5:51:29 AM UTC-7, Benji Fisher wrote:
 On Sun, Jul 5, 2015 at 9:43 AM, Steve B b.s...@gmx.com wrote:
 On 07/03/2015 09:23 PM, GoTouch Go wrote:
 
 
 Hi there,
 
 
 
 I am looking to make vim work with gdb in an easy way I like. I
 
 looked around and does not seem to see a solution. There is gdbmgr
 
 but that means I still need to type in gdb command which is too
 
 long.
 
 
 
 What I prefer is to let vim get input from my program, which sends
 
 editing input to vim so as to show a file, go to specific line, etc.
 
 This way I can press Fn hot keys, send commands to gdb, and move the
 
 cursor in vim as well. I can still edit in vim, and save the change,
 
 recompile and restart gdb.
 
 
 
 So what I am looking to is basically sending input to vim through a
 
 pipe. Do you know a way to do so? vim probably does not get input
 
 from STDIN because reading from STDIN cannot respond to individual
 
 key strokes.
 
 
 
 Thanks for any clue.
 
 
 
 
 
 
 That's not what you asked for but in case of, cgdb is an ncurses interface to 
 GDB modeled after Vim.
 
 https://cgdb.github.io/
 
 
 
 Steve
 
 
 Also not what you asked for, but the client-server functionality was designed 
 for this sort of thing.  Have you read
 
 
 :help remote.txt
 
 
 yet?
 
 
 -- 
 HTH
 Benji Fisher 

-- 
-- 
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Is it possible to redirect vim input?

2015-07-04 Thread GoTouch Go
Hi there,

I am looking to make vim work with gdb in an easy way I like. I looked around 
and does not seem to see a solution. There is gdbmgr but that means I still 
need to type in gdb command which is too long.

What I prefer is to let vim get input from my program, which sends editing 
input to vim so as to show a file, go to specific line, etc. This way I can 
press Fn hot keys, send commands to gdb, and move the cursor in vim as well. I 
can still edit in vim, and save the change, recompile and restart gdb.

So what I am looking to is basically sending input to vim through a pipe. Do 
you know a way to do so? vim probably does not get input from STDIN because 
reading from STDIN cannot respond to individual key strokes.

Thanks for any clue.

-- 
-- 
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: netrw opens file in wrong directory

2014-01-21 Thread gideon . go
Hello DrChip,

Thank you for fixing this bug! The new version works beautifully on the test 
case. 

However, I pushed the test a bit further as follows:
1) Set up the initial state again with the treeview in mode 3.
2) Open fileA in a new window at the left using netrw-v.
3) Now, split the new left window using C-ws. The top window should be active.
4) Select fileB using C-w lj and hit P.

Then file dirA/fileB [RO] is opened again, instead of the existing fileB.

Hope you can fix this one too before issuing to Bram :)

Best regards,
Gideon

-- 
-- 
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


netrw opens file in wrong directory

2014-01-19 Thread gideon . go
I am quite happily using netrw, but I stumbled upon the following
bug (or feature?) Not sure if this is the right place to post, but
here it goes:

While using g:netrw_liststyle=3 and opening a file with netrw-P,
netrw sometimes tries to open the highlighted file from the 
wrong directory. 

Consider the following test case:

../
netrwtest/
|  dirA/ 
|  | fileA
|  fileB

and try the following: 

Go to fileA and hit v. As expected, dirA/fileA opens in a new 
window at the left.

Now, do C-w lj to highlight fileB and hit P. Notice that netrw 
has now opened a new file, dirA/fileB [RO], instead of the 
existing fileB.

Ubuntu 13.10
vim 7.4
netrw v150t

-- 
-- 
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.