Andy Wokula wrote:
> Am 19.08.2018 um 18:37 schrieb Bram Moolenaar:
> > Currently, when making a list with continuation lines, it is not
> > possible to add a comment somewhere:
> >
> > let array = [
> > \ item,
> > \ item,
> > \ item,
> > \]
>
> Maybe you can't put a comment, but you can put something that is (evaluated
> but) ignored
> and serves as a comment:
>
> let array = [
> \ ['item', "my fancy comment for this item"][0],
> \ ['item2', "I like this item much more than the first item"][0],
> \ ['item3', "Is this a stupid way to comment items??"][0],
> \ ['item4', "I don't think so"][0],
> \ ['item5', "true: there is some unnecessary computation going on"][0],
> \ ['item6', "but it's negligible, right?"][0],
> \ ['item7', "right"][0],
> \ ]
>
> echo array
> => ['item', 'item2', 'item3', 'item4', 'item5', 'item6', 'item7']
That's clever, but I would not enjoy reading your script! :-)
--
Clothes make the man. Naked people have little or no influence on society.
-- Mark Twain (Samuel Clemens) (1835-1910)
/// 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 ///
--
--
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.