Mac – How to break a paragraph into sentences with Vim


By breaking into sentences I mean that each new sentence should start with a new line.

How to repeat )i<CR><Esc> to the end of the paragraph }? (<CR> = Enter)

If I make a macro )i<CR><Esc> as "q", can I execute it until the end of the paragraph?

Best Answer

You can do a search and replace. I just wrote this out. It works, but you could probably do better.

:%s/\v[ ]*([^\.]*\.)/\1\r/g
Related Question