goneovim
goneovim copied to clipboard
quit by <cmd-q> loses some work
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.
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:
-
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.
-
Add key mapping like the following in
init.vim
.
nnoremap <D-q> :qa!<CR>
inoremap <D-q> :qa!<CR>
tnoremap <D-q> :qa!<CR>
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
Is there a vim option to update viminfo at will?
See https://vi.stackexchange.com/questions/26939/how-to-avoid-losing-your-viminfo-command-history-and-so-on-on-abort for a vimscript mitigation.
cmd +q has no effect, means goneovim does not quit on by bigsur.