Skip to main content

Questions tagged [repeated-commands]

Questions about replaying the same command. This includes the dot command (.), @ macros,  @:  and similar methods.

3 votes
1 answer
495 views

What does the r cpoptions flag do? Via :help cpo-r: Redo ("." command) uses "/" to repeat a search command, instead of the actually used search string. I understand that . ...
Evan Hahn's user avatar
  • 133
2 votes
1 answer
140 views

Is there a way to repeat my last navigation command like 10k or 7j or similar. I can use Ctrl + u or Ctrl + d but I like something like ; or ,.
oceano1970526's user avatar
0 votes
1 answer
130 views

A few weeks back my dot repeat functionality completed ceased working. I believe I broke some part of my configuration around the time I made changes to migrate the plugin manager from Packer to Lazy. ...
Mark's user avatar
  • 1
1 vote
1 answer
110 views

I've been trying to make a dot-repeatable (.) command that should work in both visual and normal mode. The command in question searches for a [] on a line and turns it into a [x], and vise versa. It ...
melvio's user avatar
  • 617
0 votes
4 answers
187 views

I need to copy a sequence of (normal mode) commands and then paste it to be executed in Vim. When I try that now though it inserts it for me into the document. How can I paste sequence of Vim (normal ...
Helmut M's user avatar
1 vote
1 answer
52 views

Repmo lets me repeat a motion, eg after typing 3j I can press ; to move another 3 lines down, or press , to move 3 lines up. I can map a new key with its forward and backward counterparts like so: ...
Tom Hale's user avatar
  • 2,801
0 votes
1 answer
152 views

Well I know it doesn't work because of the <Esc>, but is there any way to do it so that .(vim single redo) repeats the whole mapping and not only the part after the first <Esc> (without ...
Bog's user avatar
  • 569
0 votes
1 answer
99 views

Is there a way to repeat a normal mode sequence n times without making a macro for it? I thought 5:norm would be able to do that, but that actually runs the normal mode sequence once for each line of ...
user avatar
1 vote
1 answer
125 views

I'm quite used to the very basic action of inserting some text, entering normal mode, moving to somewhere else I'd like the same text, and hitting . to do so. This doesn't work if the insert needs to ...
Codemonkey's user avatar
1 vote
1 answer
119 views

I open the diff files between 2 code revisions using git difftool. I can use :qa to close the current diff and go to the next one. Rather than pressing :qa repeatedly, I would like to use @:, but I ...
Abhilash's user avatar
  • 113
2 votes
2 answers
85 views

I have a mapping that comments/uncomments lines like 5gc to comment/uncomment five lines, and I would like to make it repeatable with .. Here is my mapping and the function it uses: function! Comment()...
geb's user avatar
  • 31
2 votes
1 answer
98 views

If I do qq:diffthis<CR><C-w><C-w>@:q, the macro @q does not work as expected, since the command line history is not updated when ex commands are performed in macros, and ...
Andy Wang's user avatar
0 votes
1 answer
370 views

I need to repeat the delete of matching lines in vscode-vim. Unfortunately the g has not been implemented yet, so I'm trying to figure out a way to repeat the same change in command-line mode using ...
Antonio Santoro's user avatar
1 vote
1 answer
228 views

There seems to be quite a few questions around g@, its quite a confusing topic. And I can't get it to work. I created these two mappings to edit a line from python dictionary form to variable ...
run_the_race's user avatar
1 vote
2 answers
68 views

I have auto_pairs_gentle plugin installed and vim-repeat but the bracket insertion automatically generated by auto_pairs_gentle are not repeated by the dot command. e.g.: Suppose I insert f(x) by ...
Vivian De Smedt's user avatar
  • 24.9k

15 30 50 per page
1
2 3 4 5
8