Select cleanup after running a lookup command

Is there any way to clear selected text after running substitute command in vim? For example, when I run:

:'<,'>s/<\([^>].*\)>/<!--\1-->/

to comment on the current line in the html file, after the command launches all the text in the document, it is highlighted, and I need to press the space bar to clear the selection.

Is there anything I can add right after or as part of the substitute command so that any selection is cleared automatically after the command is run, so I don’t need to hit the space bar to clear it?

+4
source share
1 answer

, <Space> , , - :nohl<CR>. , <Space> .

"" Ex |:

:'<,'>s/<\([^>].*\)>/<!--\1-->/|nohl
+2

Source: https://habr.com/ru/post/1672626/


All Articles