Learn Essential Vim Skills
with Drew Neil, author of Practical Vim
Formatting text
category applies to 4 screencasts:
We can use pandoc as a filter to clean up WYSIWYG-generated HTML. Pandoc is a commandline program, but we can call it from inside Vim either using the bang Ex command, or by configuring the formatprg
option to make the gq
operator invoke pandoc.
‘Do one thing and do it well’ is the principle of the Unix toolkit. Editing text is a broad domain, and there are many related tasks with which it overlaps. Vim acknowledges this by enabling certain tasks to be outsourced to external programs which do that one thing, and do it well. This episode will demonstrate how the par program can be used for formatting text.
Watch screencastIt is sometimes preferable to format text with hard wrapped lines, for example when writing emails in plaintext. Vim can apply this style of formatting for you. This episode shows some of the options which allow you to customize Vim’s text formatting.
Watch screencastLong lines of text can be wrapped if they don’t fit inside the window. By default, Vim will happily split in the middle of a word. This episode demonstrates how to use the ‘linebreak’ option to make Vim break lines without breaking words.
Watch screencast