Skip to main content

Timeline for How can I repeat the cgn sequence?

Current License: CC BY-SA 4.0

7 events
when toggle format what by license comment
Jun 22, 2020 at 14:03 history edited Nelson Teixeira CC BY-SA 4.0
improved answer
Jun 22, 2020 at 13:32 comment added Nelson Teixeira @user938271 worked fine. Including VRapper. Thanks. Don't you want to create an answer so I can accept/upvote it ?
Jun 21, 2020 at 10:14 comment added user938271 You probably use an old Vim version which doesn't support the concatenation operator ..; replace it with a single dot ..
Jun 21, 2020 at 3:13 comment added Nelson Teixeira @user938271 I got an erro trying what you said: 5: Expressão inválida: .repeat('.', v:count1) E15: Expressão inválida: '^['..repeat('.', v:count1) . "Expressão inválida" is portuguese for "invalid expression". I don't have any experience in the keymap thing. If I needed to translate something, please clarify. Better still if you could create an answer with your solution. I confirm that it doesn't work with 2 targets in the same line.
Jun 20, 2020 at 12:02 history edited D. Ben Knoble CC BY-SA 4.0
added 6 characters in body
Jun 20, 2020 at 9:51 comment added user938271 It won't work as expected when you have several matches on the same line. That's because when you hit a count, it's translated into a range. And when :norm is prefixed by a range, the cursor is automatically positioned on the first column of each line in the range. IOW, after executing each ., :norm repositions the cursor on the next line. See :h :normal-range. Also, even if it worked, you would probably want a bang: :norm!. In any case, try this instead: nno <expr> <leader>. '<esc>'..repeat('.', v:count1).
Jun 20, 2020 at 4:07 history answered Nelson Teixeira CC BY-SA 4.0