On Monday, August 20, 2018 at 1:37:53 AM UTC+9, Bram Moolenaar wrote:
> Currently, when making a list with continuation lines, it is not
> possible to add a comment somewhere:
> 
>       let array = [
>               \ item,
>               \ item,
>               \ item,
>               \]
> 
> Adding a comment after the comma causes all the rest to be included in
> the comment:
> 
>       let array = [
>               \ item,
>               \ item, " comment
>               \ item,
>               \]
> 
> Since this is equivalent to:
> 
>       let array = [ item, item, " comment  item, ]
> 
> Simple solutions will such as using \" fail, because just about anything
> following the backslash is valid if we are inside a string:
> 
>       echo "some
>               \ word
>               \" comment
>               \ word
> 
> Is equivalent to the valid command:
> 
>       echo "some word" comment word
> 
> So, a line starting with a backslash can't be used for a comment.
> Thinking about what would work (that is, currently it is an error), I
> thought of using |\":
> 
>       let array = [
>               \ item,
>               |\" comment
>               \ item,
>               \]
> 
> It looks a bit weird, but it would work.  Any thoughts?
> 
> -- 
> Mynd you, m00se bites Kan be pretty nasti ...
>                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
> 
>  /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
> ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
> \\\  an exciting new programming language -- http://www.Zimbu.org        ///
>  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

I like this.

https://go-gyazo.appspot.com/04e22439cfdc859e.png

Most of people expect comments can be written as syntax is.

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

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

Raspunde prin e-mail lui