Skip to main content
added 2 characters in body
Source Link
statox
  • 50.6k
  • 19
  • 153
  • 231

If you don't want to use a substitution or the dot command as suggested by the other answers your best bet is probably to create a macro which you can use when your cursor is next to a dot.

You can record the macro

qaf.vc->q>^[q

Which will go to the following dot on the line (f.) visually select it (v) and replace it (c->).

Now when you navigate your code and you spot a dot which should be changed you can call the macro with @a.

You can even put that in your .vimrc to keep the macro between you different coding sessions:

let @a="f.vc->^["

Edit @grochmal suggested in the comments to use a second register to have a backward moving macro which seems pretty useful:

let @e="F.vc->^["

If you don't want to use a substitution or the dot command as suggested by the other answers your best bet is probably to create a macro which you can use when your cursor is next to a dot.

You can record the macro

qaf.vc->q

Which will go to the following dot on the line (f.) visually select it (v) and replace it (c->).

Now when you navigate your code and you spot a dot which should be changed you can call the macro with @a.

You can even put that in your .vimrc to keep the macro between you different coding sessions:

let @a="f.vc->^["

Edit @grochmal suggested in the comments to use a second register to have a backward moving macro which seems pretty useful:

let @e="F.vc->^["

If you don't want to use a substitution or the dot command as suggested by the other answers your best bet is probably to create a macro which you can use when your cursor is next to a dot.

You can record the macro

qaf.vc->^[q

Which will go to the following dot on the line (f.) visually select it (v) and replace it (c->).

Now when you navigate your code and you spot a dot which should be changed you can call the macro with @a.

You can even put that in your .vimrc to keep the macro between you different coding sessions:

let @a="f.vc->^["

Edit @grochmal suggested in the comments to use a second register to have a backward moving macro which seems pretty useful:

let @e="F.vc->^["
added 160 characters in body
Source Link
statox
  • 50.6k
  • 19
  • 153
  • 231

If you don't want to use a substitution or the dot command as suggested by the other answers your best bet is probably to create a macro which you can use when your cursor is next to a dot.

You can record the macro

qaf.vc->q

Which will go to the following dot on the line (f.) visually select it (v) and replace it (c->).

Now when you navigate your code and you spot a dot which should be changed you can call the macro with @a.

You can even put that in your .vimrc to keep the macro between you different coding sessions:

let @a="f.vc->">^["

Edit @grochmal suggested in the comments to use a second register to have a backward moving macro which seems pretty useful:

let @e="F.vc->^["

If you don't want to use a substitution or the dot command as suggested by the other answers your best bet is probably to create a macro which you can use when your cursor is next to a dot.

You can record the macro

qaf.vc->q

Which will go to the following dot on the line (f.) visually select it (v) and replace it (c->).

Now when you navigate your code and you spot a dot which should be changed you can call the macro with @a.

You can even put that in your .vimrc to keep the macro between you different coding sessions:

let @a="f.vc->"

If you don't want to use a substitution or the dot command as suggested by the other answers your best bet is probably to create a macro which you can use when your cursor is next to a dot.

You can record the macro

qaf.vc->q

Which will go to the following dot on the line (f.) visually select it (v) and replace it (c->).

Now when you navigate your code and you spot a dot which should be changed you can call the macro with @a.

You can even put that in your .vimrc to keep the macro between you different coding sessions:

let @a="f.vc->^["

Edit @grochmal suggested in the comments to use a second register to have a backward moving macro which seems pretty useful:

let @e="F.vc->^["
Source Link
statox
  • 50.6k
  • 19
  • 153
  • 231

If you don't want to use a substitution or the dot command as suggested by the other answers your best bet is probably to create a macro which you can use when your cursor is next to a dot.

You can record the macro

qaf.vc->q

Which will go to the following dot on the line (f.) visually select it (v) and replace it (c->).

Now when you navigate your code and you spot a dot which should be changed you can call the macro with @a.

You can even put that in your .vimrc to keep the macro between you different coding sessions:

let @a="f.vc->"