justinmk / vim-dirvish

Directory viewer for Vim :zap:
Other
1.18k stars 64 forks source link

Delete buffer #225

Closed thevan96 closed 2 years ago

thevan96 commented 2 years ago

How to auto-delete buffer if the file is removed from the disk?

Peek 2022-06-17 09-40

justinmk commented 2 years ago

can use a ShellCmdPost handler, e.g.

autocmd ShellCmdPost * exe 'bdelete' expand('<afile>')

but that won't cover all cases. Vim doesn't have inotify events afaik. You could use something like https://github.com/clibs/entr