开发者

Is there a way to edit last search/substitution pattern in vi?

开发者 https://www.devze.com 2023-03-01 05:58 出处:网络
I made a mistake in a complex search pattern in vi editor and want to modify it now. I know v开发者_开发知识库i remembers the last search pattern but can I view and edit it ?Modern vi/vim keeps a hi

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

I know v开发者_开发知识库i remembers the last search pattern but can I view and edit it ?


Modern vi/vim keeps a history of : and / command used in vi. So you can just press up arrow key to get your search pattern again and then edit it.

0

精彩评论

暂无评论...
验证码 换一张
取 消