daa84 / neovim-gtk

gtk ui for neovim
GNU General Public License v3.0
716 stars 57 forks source link

NeovimGtk does not create swp files #150

Closed keeferrourke closed 5 years ago

keeferrourke commented 5 years ago

Describe the bug NeovimGtk does not appear to create swap files when a file is opened. This leads to data loss when the editor unexpectedly quits (e.g. due to power failure).

Upon opening and editing a file, swap files are not populated in $HOME/.local/share/nvim/swap, or in the current directory.

Technical information (please complete the following information):

daa84 commented 5 years ago

yes, it disabled because it sometime produce neovim-gtk freeze. the problem is that in case swap file exists - neovim show message at start and neovim currently does not allow gui show this message and gui just freeze.

New version of neovim fixes this but it still at development stage. https://github.com/neovim/neovim/pull/9024 So when new version come out I enable swap files back.

keeferrourke commented 5 years ago

Turns out that this has huge ramifications. When my computer lost power, all files that were open in NeovimGtk, regardless of whether or not they were being edited(!), ended up as 0byte files when I rebooted my computer.

I think that reliability is much more important than performance. I'd rather my editor freeze every now and then than lose hours of work. :(

elorest commented 5 years ago

Yeah that's my problem in general with NeoVim. Vim actually still works really well despite it's age. I switch to neo vim for a couple months every year or so but eventually go back to vim because it works as expected. Last time around I tried VimR for a couple months and really liked some things about it. No longer using Mac though so I'm looking for a similar NeoVim version of Gvim. This looks somewhat promising.

daa84 commented 5 years ago

Still think freeze with unknown reason is bad and i don't have issues with file content lose, not sure why this happens. Think can add temporary command line option to disable this behavior neovim-gtk.

keeferrourke commented 5 years ago

Would definitely appreciate a patch. It's frustrating having to rewrite a handful of classes more than once... let alone 3 times.

keeferrourke commented 5 years ago

@daa84 is there an update on this?

daa84 commented 5 years ago

I add option --enable-swap, think after nvim release i remove it

keeferrourke commented 5 years ago

I don't notice any lag or freezing with the new --enable-swap feature, fyi. I'll report back here if I do.

XVilka commented 5 years ago

@daa84 so I think it is time to remove it? It is part of Neovim release now.

keeferrourke commented 5 years ago

@daa84 is this officially fixed in the latest version of NeoVimGTK? Can this issue be closed?

justinmk commented 5 years ago

see also https://github.com/neovim/neovim/wiki/Following-HEAD#20180922