m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-19 00:53:42 -05:00

Add :Buffers customization that enables deleting buffers

Doron Behar
2020-06-01 08:30:59 +00:00
parent 32f24dcc02
commit fe64cf8557

@@ -0,0 +1,15 @@
This customization for `:Buffers` makes `D` delete buffers, and it reloads the list of available buffers upon deletion, while allowing to delete multiple buffers as well. The requirements are:
- https://github.com/mhinz/neovim-remote .
- fzf 19.0 or later.
```vim
command! -bar -bang -nargs=? -complete=buffer Buffers call
\ fzf#vim#buffers(
\ <q-args>,
\ {'options': [
\ '--bind=D:execute@nvr -c "bw $(echo {+1} | sed "s/\[\([0-9]\)\]/\1/g")"@+reload@nvr --remote-expr "join(map(fzf#vim#buflisted_sorted(), \"fzf#vim#format_buffer(v:val)\"), \"\n\")"@',
\ '--multi'
\ ]},
\ <bang>0)
```