On 23/04/08 17:40, fritzophrenic wrote:
>
>
> On Apr 17, 1:12 pm, fritzophrenic<[EMAIL PROTECTED]> wrote:
>> See the vim_use
>> thread:http://groups.google.com/group/vim_use/browse_thread/thread/863a0ce08...
>>
>> It seems that a nested first line only comment will incorrectly
>> prepend the comment leader on the next line if it occurs in the middle
>> of a multiline comment or in a single-line comment.
>>
>> For example, in a new buffer:
>>
>> :set tw=20 comments=ns1:/*,nmb:*,nex:*/,nfb:NOTES: fo=tcqr cindent
>>
>> Type:
>>
>> /* NOTES: mary had a little lamb */
>>
>> The comments wrap exactly as expected, i.e.
>>
>> /* NOTES: mary had a
>> * little
>> * lamb */
>>
>> Now type:
>>
>> /*<CR>NOTES: Mary had a little lamb */
>>
>> This gives:
>>
>> /*
>> * NOTES: Mary had a
>> * NOTES: little
>> * NOTES: lamb */
>>
>> The same thing happens if you go into a pre-existing multiline comment
>> and start typing. If the first-line-only comment is inserted on the
>> first line of the multiline comment, it is fine. Otherwise, it fails.
>>
>> In addition:
>>
>> :set comments+=n://
>>
>> Type:
>>
>> // NOTES: mary had a little lamb
>>
>> to get:
>>
>> // NOTES: Mary had a
>> // NOTES: little
>> // NOTES: lamb
>>
>> I'm using gvim 7.1.293, 'Big' compile on MS Windows (I got it off the
>> 'cream' sourceforge page).
>
> Any comments on this? I'm pretty sure it is a bug, but if it isn't,
> I'd certainly like to know why!
> >
>
/*
* This is a three-piece comment
* with start, middle and end:
* a single comment starts at
* slash-star and ends at star-slash
*/
// This is a set of successive
// single-line comments:
// each double slash
// starts a new comment,
// which ends at the end of the line.
NOTE: This kind of comment
can be nested within
the above two kinds.
But nesting does not
overlap.
By "overlapping", I mean like brackets or HTML tags: ([]) is valid but
([)] isn't.
Best regards,
Tony.
--
ARTHUR: What does it say?
BROTHER MAYNARD: It reads ... "Here may be found the last words of Joseph of
Aramathea." "He who is valorous and pure of heart may find
the Holy Grail in the aaaaarrrrrrggghhh..."
ARTHUR: What?
BROTHER MAYNARD: "The Aaaaarrrrrrggghhh..."
"Monty Python and the Holy Grail" PYTHON (MONTY)
PICTURES LTD
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---