:vim: I learn new stuff every day, was unaware of the command in to reflow paragraphs, that'll save a chunk of time!


in normal mode for the record!

@lyndon yep, you can also use it to run bits of code (or the whole file even) through a tidier program by doing :set formatprg=<tidier>

You can also just reflow arbitrary pieces of text by selecting it in visual mode.

@splatt9990 What's the magic to run it on each paragraph in a document? Do I just make a macro with: }jgwip

@splatt9990 }wgwip being slightly better, next paragraph, next word then apply the formatting

@lyndon ggvGgq
gg => go to top of document
v => enter visual mode
G => go to bottom of document
gq => reformat selection


@splatt9990 I really did not think of that... That reformated my test document (a gutenberg book) instantly

Sign in to participate in the conversation

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.