neovim-component
neovim-component copied to clipboard
Better swap file handling with 'SwapExists' autocmd event
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.
- Add below command as an argument of
nvim
- Notify to NyaoVim that swap file is detected
- NyaoVim show dialog and user select a choice ('o', 'e', 'r', 'd', 'q', or 'a')
- Set
v:swapchoice
properly
augroup nyaovim-swap
autocmd SwapExists * call SendSwapNotification(v:swapname) | autocmd! nyaovim-swap
augroup END