Charles E Campbell Jr wrote:
stri ker wrote:

Is there a way to visually highlight multiple non-adjacent lines at the same time?
For example, highlight lines 1, 4, 7, but no other lines.

Do you want to use ctrl-v, v, or V? With those, the answer is: (drumroll, please) ... No.

However, if you're talking about :set hls, then

/\%1l\|\%4l\|\%7l

will do the job.

Regards,
Chip Campbell




Also, to apply some ex-command (including ":execute" and ":normal", q.v.) to some set of disconnected lines defined by a search pattern, see ":help :g" (without the quotes of course).


Best regards,
Tony.

Reply via email to