Is there a way to edit the latest search / replace template in vi?

I made a mistake in the complex search pattern in vi editor and want to change it now.

I know that vi remembers the last search pattern, but can I view and edit it?

+5
source share
1 answer

Modern vi / vim keeps a history of the :and commands /used in vi. Therefore, you can simply press the arrow key to get the search template again and then edit it.

+9
source

All Articles