mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 16:45:38 -05:00
Show a way to delete buffers with D from :Buffers.
@@ -326,4 +326,23 @@ command! -bang -nargs=* LoadTemplate call fzf#run({
|
||||
\ 'down': 20,
|
||||
\ 'sink': function('<sid>read_template_into_buffer')
|
||||
\ })
|
||||
```
|
||||
|
||||
### Delete buffers from `:Buffers`
|
||||
|
||||
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.vim with this PR merged:
|
||||
- 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)
|
||||
```
|
||||
Reference in New Issue
Block a user