goneovim icon indicating copy to clipboard operation
goneovim copied to clipboard

quit by <cmd-q> loses some work

Open eyalk5 opened this issue 4 years ago • 5 comments

Hi,

It is recommended to save stuff following quit by <cmd-q> .

To replicate: You can run it, do :let a=3, and quit by <cmd-q>. Next time, you won't see it in command history.

Also, markers are lost, and pretty much everything probably. You can also alert on unsaved work in this case.

eyalk5 avatar Jun 05 '20 21:06 eyalk5

Hmmm, I've done some research and it seems to be a bit difficult to handle Cmd-q inside a Qt application.

But you can get the behavior you expect by following these steps:

  1. Override the application's keyboard shortcuts in the MacOS settings. Open System Preferences, click Keyboard, click Shortcut, click application in the left pane, then insert new shortcut of 'Quit goneovim' for goneovim. e.g. Ctrl-Shift-q. スクリーンショット 2020-06-06 18 25 41

  2. Add key mapping like the following in init.vim.

nnoremap <D-q> :qa!<CR>
inoremap <D-q> :qa!<CR>
tnoremap <D-q> :qa!<CR>

akiyosi avatar Jun 06 '20 09:06 akiyosi

This issue occurs as well when close goneovim by close button in window. seems viminfo(shada) file is not changed. Confirmed by latest release in OSX and Windows

orokasan avatar Jun 30 '20 00:06 orokasan

Is there a vim option to update viminfo at will?

eyalk5 avatar Jul 02 '20 13:07 eyalk5

See https://vi.stackexchange.com/questions/26939/how-to-avoid-losing-your-viminfo-command-history-and-so-on-on-abort for a vimscript mitigation.

eyalk5 avatar Aug 21 '20 22:08 eyalk5

cmd +q has no effect, means goneovim does not quit on by bigsur.

finviman avatar May 09 '21 02:05 finviman