Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim set ex range to current paragraph without visual/mark etc

Tags:

vim

I'm wanting to apply a command to the currect paragraph but I'd like to automate it so I don't need to visually select/mark the paragraph before-hand.

I want something like

:{,}s/this isn't/important/g  

to specify the range to apply 's' (in this case) to.

Eventually I'm wanting to using range-accepting-commands to reformat a paragraph.

Does anyone know how to do this? Is there a better approach that I'm missing?

like image 442
eff Avatar asked Oct 20 '25 14:10

eff


1 Answers

:'{,'}s/this isn't/important/g

See:

:h '{
like image 86
Peter Rincker Avatar answered Oct 22 '25 03:10

Peter Rincker