Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My problem with this method is that it's not convenient especially when there are lots of paragraphs. When you highlight all the paragraphs and press shift J, it unwraps everything into a single line. This results different paragraphs ending up on the same line. You also need to undo the changes you made to avoid disturbing the original file content.


"vapJ" might do the trick for one paragraph. So maybe you can make a mapping that does vapJ and moving to the next paragraph ("]]"?) in your vimrc will let you do this with a count.


qfvapJ]]q

to record a macro that joins a single paragraph together

<N>@f

to then replay that macro <N> times




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: