Closed urbainvaes closed 4 years ago
Instead of mapping to
:Shdo
(with trailing whitespace), map to:Shdo
(without trailing whitespace). It makes it easier to type!
when operating on the arglist
I don't see what that gains, since [count].
is easier in all cases if you want to work with the arglist. Whereas with the suggested behavior change, the non-arglist case now always has an extra step.
If no range is given and the local arglist is empty, map to
:!| filename
instead,
Many thanks for implementing and merging! :)
I just wanted to say that I disagree with this:
I don't think the argc() > 0 check is necessary. It's too surprising for . to have all of these conditions.
Here is why:
First, I don't think it's very surprising: anyone who read the documentation to learn about the local arglist should have no problem adjusting to this behaviour. Personally, I would also find this more consistent with other programs, where actions are generally applied to all tagged items: e.g. mutt
, vifm
(when you tag many files and then yy
, all selected files are copied, for example).
Second, I find [count].
to be very unintuitive, considering that the count does not alter the behaviour of the command (and it doesn't work with count 0). Do any other vim
commands behave in this manner? It's also inconsistent with vim-fugitive
, where 2.
would just select one file and the file below.
So I would be in favor of mapping .
to :Shdo!
when the arglist is nonempty, but of course this is up to you!
Many thank for a great plugin! :)
Do any other
vim
commands behave in this manner?
1<c-g>
for example
I like the "." mapping to
:Shdo
, but I'd like to propose two changes:Instead of mapping to
:Shdo
(with trailing whitespace), map to:Shdo
(without trailing whitespace). It makes it easier to type!
when operating on the arglist.If no range is given and the local arglist is empty, map to
:!| filename
instead, because generating a script and thenZ!
feels cumbersome. This would also be more aligned with the.
mapping in fugitiveGstatus
window.