vim-bbye
vim-bbye copied to clipboard
Bdelete unable to delete multi buffers
when I try to delete multi buffers with
:Bdelete 4 6
it doesn't work leaving the words like this
"no math for 4 6"
4 and 6 are buffers' name
Thanks for letting me know. You're right, this case isn't handled right now. At some point I guess it should be. :)
Thanks very much for BBye :-)
In the same spirit I noticed that Bdelete
doesn't support range:
:%Bdelete
Is there a good reason for that or are you open for a Pull-request implementing it?
I have created a Pull request #21 that support:
- Multiple arguments:
:Bdelete 2 4 5
- Ranges:
:%Bdelete
,:2,4Bdelete
or:2Bdelete
Thanks again. I'll leave this open instead if you don't mind as a reminder to come back to it someday and review whether the built-in :bdelete
supports multiple buffers and under what syntax.
Thanks for your interest for the pull request.
Here is the corresponding excerpt from the documentation
:[N]bd[elete][!] *:bd* *:bdel* *:bdelete* *E516*
:bd[elete][!] [N]
Unload buffer [N] (default: current buffer) and delete it from
the buffer list. If the buffer was changed, this fails,
unless when [!] is specified, in which case changes are lost.
The file remains unaffected. Any windows for this buffer are
closed. If buffer [N] is the current buffer, another buffer
will be displayed instead. This is the most recent entry in
the jump list that points into a loaded buffer.
Actually, the buffer isn't completely deleted, it is removed
from the buffer list |unlisted-buffer| and option values,
variables and mappings/abbreviations for the buffer are
cleared. Examples: >
:.,$-bdelete " delete buffers from the current one to
" last but one
:%bdelete " delete all buffers
<
:bdelete[!] {bufname} *E93* *E94*
Like ":bdelete[!] [N]", but buffer given by name, see
|{bufname}|.
:bdelete[!] N1 N2 ...
Do ":bdelete[!]" for buffer N1, N2, etc. The arguments can be
buffer numbers or buffer names (but not buffer names that are
a number). Insert a backslash before a space in a buffer
name.
:N,Mbdelete[!] Do ":bdelete[!]" for all buffers in the range N to M
|inclusive|.
In particular the following are valid commands:
Multiple arguments: :bdelete 2 4 5
Ranges: :%bdelete
, :2,4bdelete
or :2bdelete
And the pull request intention is only to provide their :Bd
counterpart.
The one that I'm using the most is :%Bd
.