I do a lot of plain text file editing, and many times I need to mark a section of text as 'DO NOT FORMAT' as it is pre-formatted, or even contains ascii art.
Many years ago I did this by marking the block as a comment, and telling vim NOT to format such blocks.
Looking across the road, I could see a large rectangular building with various shops underneath. Across the top half of the building was a sign. | | The Doctor's Folly | Discreet and confidential medical clinic | First time checkups, FREE |
I want the uncommented text to be re-formatted using 'gq' (EG: during a whole file re-format 'gggqG' ) but have it completely ignore the marked section of text as it is already pre-formatted.
:setl textwidth=79 :setl comments=b:\| :setl formatoptions=tcorjq1l
I had it working YEARS ago, but vim has changed, and started to format the commented text sections.
I'm thinking I may need a special purpose 'formatexpr' to get it to ignore the specially marked text.
OR use a special macro to itterate over paragraphs, but only reformat the ones that are not marked with '|' as the first characte.
Either of these solutions would let me still reformat 'comment' bullet lists.