Sunday, June 14, 2015

Re: Formatting of lists and paragraphs containing numbers with fo+=n

On 14.06.15 12:07, Marcin Szewczyk wrote:
> If I have time I will look into the formatexpr (mentioned earlier) as
> well.

A quick peek at the related help shows it can be used to throw e.g. some
awk or perl at the problem. That could accept "12. ", while rejecting
"2003. ", by imposing a numeric maximum. But what then when the list
goes to "7. ", and there is "5. " in the text, unfortunately wrapped, so
that it appears at the start of the line? Now neither strings nor
numbers resolve the ambiguity - in any language.

If the "1. " style were unavoidably mandated, one way to wriggle around
the problem would be to use e.g. "1* " while editing, then have a global
substitution mapped to some ^- or <Leader>- combined keystroke, so it
could easily be converted after editing.

Erik

--
Nothing in progression can rest on its original plan. We may as well
think of rocking a grown man in the cradle of an infant.
- Edmund Burke

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment