Author Topic: VIM - repeat  (Read 244 times)

photometer

  • Community Member
  • Posts: 56
  • Hero Points: 0
VIM - repeat
« on: August 09, 2020, 03:57:39 am »
If I have the following:

foo bar;
foo bar;
foo bar;
and I intend to replace all lines with bar foo;
I would do visual select (v) and select till end of line, type c and replace with bar foo;
Next I will press . on the next line to repeat the previous command.
I observe that pressing dot  (.) only deletes and does not paste the bar foo;

I also observed that repeat command does not work for substitute (s) command.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5749
  • Hero Points: 459
Re: VIM - repeat
« Reply #1 on: August 09, 2020, 03:09:25 pm »
Are you referring to substitute commands in visual mode?

photometer

  • Community Member
  • Posts: 56
  • Hero Points: 0
Re: VIM - repeat
« Reply #2 on: August 09, 2020, 04:41:22 pm »
Thanks for the prompt reply.
I am referring to "repeat" command.
The repeat command is not performing a sequence of actions but only the delete operation.
For e.g
original:
  foo_bar
  foo_bar
expected:
  hello_world
  hello_word
If I visually select (not block visual mode) the foo_bar and replace it using either "c" or "s" and then try do "." on the next line to repeat the action, I see next line getting deleted but the text "hello_world" does not get added.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5749
  • Hero Points: 459
Re: VIM - repeat
« Reply #3 on: August 09, 2020, 06:26:45 pm »
Fixed for beta 3

Thanks for posting