New answers tagged

3

It turns out, it's vim-peekaboo which is causing this behavior, and it is a known bug, filed in #30.


2

See the last sentence in :help :normal: Execution stops when an error is encountered. In this context, trying to go right at the end of the line is considered an error, so the D isn’t carried out. This "stop on error" behaviour is also visible in various other places where Vim plays a macro. e.g. mappings, recordings. In particular, it's useful ...


0

Having a space with the commenting character? Assumptions : commented lines are continuous and commenting character (# in your case) is at beginning of all those lines. Come to the beginning of the first commented line. Press Ctrl+v 👉 switches to visual-block mode. Type 52j 👉 selects beginning of next 52 lines. Use h / l or ◁ / ▷ respectively 👉 selecting ...


1

Thank you for answering the question. Although no body found what the problem is, I still be thank to you. The reason is timeout and ttimeout is off as the same time. It caused my vim waiting a operation forever. The solution is open the timeout. If you want to let your vim to be faster, you can turn on ttimeout and set ttimeoutlen to a low value. my is 100.


0

It works the way it works. In fact, all builtin commands behave consistently (the last line in range is chosen whenever Vim needs to choose). If you need other functionality just make a mapping.


1

What you're missing is that Vim will execute the whole command normal inewstring-\<C-c>ZZ for each line that matches the regexp. But the command ends with ZZ, which will save and quit. That's part of the normal command being executed by the :global. As such, Vim will execute it for the first line that matches, so the rest of the matches will not really ...


3

As sussed out in the comments, you have mappings that begin with <esc> somewhere (and the surprise indicates you didn’t ask for them). You can use :verbose imap <esc> to find out where the mappings are coming from; in general, mappings with a prefix cause a delay whenever the prefix is entered, as vim has to distinguish between the prefix ...


Top 50 recent answers are included