Yegappan wrote:
> When converting test29 into a new style test, I came across several
> instances where multiple lines of text need to be stored in a variable.
> I used the following method to do it:
>
> new
> insert
> some text
> some text
> some text
> .
>
> let text = getline(1, '$')
>
> You can also use a list literal to store the lines. But it is not readable.
>
> It will be useful to support a HERE document syntax for assigning multiple
> lines of text to a variable. Something along the lines of (similar to the
> shell
> here document syntax):
>
> let text <<HERE
> some text
> some text
> HERE
Yeah, the list syntax is OK, but when the text contains quotes it gets a
bit messy.
We already use this for Python, Lua, etc.
--
BLACK KNIGHT: None shall pass.
ARTHUR: I have no quarrel with you, brave Sir knight, but I must cross
this bridge.
BLACK KNIGHT: Then you shall die.
"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 ///
--
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/201905141946.x4EJk2pK029152%40masaka.moolenaar.net.
For more options, visit https://groups.google.com/d/optout.