Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I apply an ex-command on a set of visually selected lines?

Selected visually
0
Posted

How do I apply an ex-command on a set of visually selected lines?

0

register is set to the start of the visual region and the > register is set to the end of the visual region. You can use these registers to specify the range for an ex command. After visually selecting the lines, press “:” to go to the command mode. Vim will automatically insert the visual range ‘<,'>. You can run any ex-command on the visual range. For more information, read :help v_: :help ‘< :help '> 15.4.

Related Questions

Thanksgiving questions

*Sadly, we had to bring back ads too. Hopefully more targeted.