-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Description
Problem
This is a normal heredoc example.
let text =<< trim END
if ok
echo 'done'
endif
ENDIf we wants new flags like eol other than trim,
the existing code like below will not work.
" eol is not flag!
let text =<< trim eol
if ok
echo 'done'
endif
eolOr some useful flags if available
trim_left: if specified, trim only lefttrim_right: if specified, trim only righttemplate: if specified, template string can be used in heredoc (Support 'template string' ('string interpolation') #4634)escape(chars): if specified, specified characters are escaped by backslash
Solution
- Make flags is lowercase letters only
- Make marker is uppercase letters only (if omitted, "." is used)
It gets rid of ambiguity from :let-heredoc, and guarantees forward compatibility.
And, if possible, I would like marker to be required parameter.
Currently "." is used if omitted, but it may confuse users? 🤔
" oops! "END" is missing
let text =<< trim
if ok
echo 'done'
endif
ENDaiya000
Metadata
Metadata
Assignees
Labels
No labels