I usually have the tw=80 option set when I edit files, especially LaTeX sources. However, say, I want to compose an email in Vim with the tw=80 option, and then copy and paste it to a web browser. Before I copy and paste, I want to unwrap the text so that there isn’t a line break every 80 characters or so. I have tried tw=0 and then gq, but that just wraps the text to the default width of 80 characters. My question is: How do I unwrap text, so that each paragraph of my email appears as a single line? Is there an easy command for that?
I usually have the tw=80 option set when I edit files, especially LaTeX sources.
Share
Go to the beginning of you paragraph and enter:
v
i
p
J
(The
Jis a capital letter in case that’s not clear)For whole document combine it with norm:
This command will only unwrap paragraphs. I guess this is the behaviour you want.