diff --git a/Examples-(vim).md b/Examples-(vim).md index b7801d5..86829d4 100644 --- a/Examples-(vim).md +++ b/Examples-(vim).md @@ -326,4 +326,23 @@ command! -bang -nargs=* LoadTemplate call fzf#run({ \ 'down': 20, \ 'sink': function('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( + \ , + \ {'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' + \ ]}, + \ 0) ``` \ No newline at end of file