Does Vimscript allow multi-line strings?

Vimscript does allow continuation of the previous line by starting the next with a backslash, but that isn’t quite as convenient as a heredoc string such as you would find in Ruby, PHP, or Bash.

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'

Have a look at the relevant documentation on line-continuation.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)