In ":help format-comments" one can find the following fragment:
#v+
Here is an example of alignment flags at work to make a comment stand out
(kind of looks like a 1 too). Consider comment string >
sr:/***,m:**,ex2:******/
/***
**<--right aligned from "r" flag
**
offset 2 spaces from the "2" flag--->**
******/
In this case, the first comment was typed, then return was pressed 4 times,
then "/" was pressed to end the comment.
#v-
Vim does not format comments as stated by this fragment. This is how
a similar fragment will be formatted by Vim:
#v+
/* vim: set fo+=o com=sr\:/***,m\:**,ex2\:******/ :*/
aaa /***
**<--right aligned from "r" flag
**
******/
#v-
What I noticed is that the additional indent specified for the end part
is ignored – no matter how large or small I set it, the fragment above
gets indented in the same way.
I'll be happy to fix both behaviours but the current documentation is
totally unclear to me with regard to the number specified for the end
comment and how the end comment is affected by the 'r' flag.
I expected that with the flags above the comment should be formatted as:
#v+
/* vim: set fo+=o com=sr\:/***,m\:**,ex2\:******/ :*/
aaa /***
**<--right aligned from "r" flag
**
******/<-- 2 specified for the end comment.
#v-
And only an offset of -2 should produce what the documentation mentions:
#v+
/* vim: set fo+=o com=sr\:/***,m\:**,ex-2\:******/ :*/
aaa /***
**<--right aligned from "r" flag
**
******/<-- -2 specified for the end comment.
#v-
Is there anyone who knows what should in fact happen?
Bram?
TIA
--
Cheers,
Lech
--
You received this message from the "vim_dev" 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