05 April 2022

Is there an easier way to reselect the previous selection?

https://www.reddit.com/r/vim/comments/6v4i4u/is_there_an_easier_way_to_reselect_the_previous/

In normal mode, you can use gv to re-select the previous visual selection.

If you just want to re-issue an additional ex command over the same range, you can use * on the command line, as long as "*" isn't in your 'cpoptions' setting.

:'<,'>s/foo/bar/g
:*s/baz/bat/g
:help cpo-star
:help :*
:help v_:

No comments:

Post a Comment