Wednesday, May 27, 2015

reformatting comments

Hi,
Can someone explain this behaviour?

vim -u NONE -N --cmd ':set comments=e:%% tw=20' -c 'call setline(1, "%%
".repeat("foobar ", 10))' -c 'norm! Vgq'

Output:
,----
| %% foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar
`----
Note: not reformated to fit into the textwidth

Expected Output:
,----
| %% foobar foobar
| %% foobar foobar
| %% foobar foobar
| %% foobar foobar
| %% foobar foobar
`----
(Reformated to fit into textwidth, the comment leader might be left
away)

Is this a bug or a documentation inconsistency or even expected
behaviour?

I just noticed this in a latex document when I tried to reformat
overlong lines and comments starting with %% were not reformatted.

Perhaps the 'eO:%%' needs to be removed from the comments setting?

Best,
Christian
--
Der edlere Mensch verschlimmert sich mehr durch das Unterlassen guter
Menschen (Freunde) als das Unternehmen böser.
-- Jean Paul

--
--
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: