Hi,

On Sat, May 18, 2019 at 6:41 AM chdiza <[email protected]> wrote:
>
> What is this for? We can already do e.g. :let foo="oof\nbar\tbaz", right?
>

When you want to assign a lot of lines with indentation (for example, a code
snippet) to a variable, it is more readable and maintainable to use the
list of lines without quotes and "\" at the beginning of the line for line
continuation. This is used in various places in the Vim test scripts.
Using a string with embedded newlines or a list with line continuation and
quotation makes it harder to read and understand what the test is doing.

>
> In particular I see no need for the stripping aspect. When using :let inside
> a script we can also already use line continuation. So just do
>

When using the here document syntax, you may want to align the lines in
the here document with the surrounding code. The support for stripping
the leading indentation is meant for aligning the lines.

https://riptutorial.com/bash/example/2135/indenting-here-documents

- Yegappan

> let foo="one
>     \two
>     \three
> \four"
>

-- 
-- 
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/CAAW7x7nRmL_La4uS59ga2Z1Q0GVMQkVs0io7ZrSBTekPwbMT3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui