gpt4 book ai didi

vim - Vimscript 是否允许多行字符串?

转载 作者:行者123 更新时间:2023-12-03 08:22:15 25 4
gpt4 key购买 nike

Vimscript 是否允许多行字符串?

python 和 ruby​​ 命令允许使用以下格式::python << EOF
你能用字符串做类似的事情吗?

最佳答案

Vimscript 确实允许通过以反斜杠开始下一行来继续上一行,但这不如您在 Ruby、PHP 或 Bash 中找到的 heredoc 字符串那么方便。

let g:myLongString='A string
\ that has a lot of lines
\ each beginning with a
\ backslash to continue the previous one
\ and whitespace before the backslash
\ is ignored'

看看 relevant documentation on line-continuation .

关于vim - Vimscript 是否允许多行字符串?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10526011/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com