When I perform multiple shift :>
operations, vim shows me a notification for each line that's shifted. Is there a way to avoid these multiple notifications?
For example, I'm currently editing a file that's about 200,000 lines long. About 99% of the lines contain the pattern "4111". (The specific numbers and string aren't important.) I want to shift all the lines containing "4111" to the right using the :>
command.
When I type:
:g/1444/>
I get a notification for each affected line:
1 line >ed 1 time
1 line >ed 1 time
1 line >ed 1 time
1 line >ed 1 time
1 line >ed 1 time
...
I would have to type <space> several thousand times to dismiss all the notifications.
By contrast, if I instead use a substitution command to achieve the same effect:
:g/4111/s/^/ /
(I have set shiftwidth=4
) it performs all the substitutions in a couple of seconds and prints:
208295 substitutions on 208295 lines
As you can see I have a workaround, but is there a way to use the :>
command on multiple lines and not have to dismiss notifications for each affected line?
I see this problem with vim 8.2 and 9.0. I've seen it before with other versions. (I think it's a bug in vim, which I'll report after getting some feedback here.)
:>
for each matching line. There may be a shortmess flag you can use to silence it, or use:silent >
. Otherwise I would try pressing:
or Esc instead of Space for the messages.:
or Esc, it stops shifting.:silent g/4111/>/>
works, but it's annoying to type that every time. Do you know of some rationale for why>
is more verbose thans
?g/4111/norm >>
:verbose set report?