Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better swap file handling with 'SwapExists' autocmd event #20

Open
rhysd opened this issue Feb 23, 2016 · 0 comments
Open

Better swap file handling with 'SwapExists' autocmd event #20

rhysd opened this issue Feb 23, 2016 · 0 comments
Assignees

Comments

@rhysd
Copy link
Owner

rhysd commented Feb 23, 2016

Currently NyaoVim simply ignores swap files because message on detecting swap file is shown before Neovim opens screen and NyaoVim can't catch it yet.

But SwapExists auto command event may be available for this.

  1. Add below command as an argument of nvim
  2. Notify to NyaoVim that swap file is detected
  3. NyaoVim show dialog and user select a choice ('o', 'e', 'r', 'd', 'q', or 'a')
  4. Set v:swapchoice properly
augroup nyaovim-swap
    autocmd SwapExists * call SendSwapNotification(v:swapname) | autocmd! nyaovim-swap
augroup END
@rhysd rhysd self-assigned this Feb 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant