diff options
author | Jurica Bradaric <jbradaric@gmail.com> | 2019-09-22 21:47:24 +0200 |
---|---|---|
committer | Jurica Bradaric <jbradaric@gmail.com> | 2019-10-07 14:14:13 +0200 |
commit | b1ada8ec2159fbc69b58cc40eb62a4e76edd8d45 (patch) | |
tree | c77dff9347629878c9b4a99acc6060020a871c26 /runtime | |
parent | dfed0e60d7e3af9a89f0e945227b9ed2e599aee4 (diff) | |
download | rneovim-b1ada8ec2159fbc69b58cc40eb62a4e76edd8d45.tar.gz rneovim-b1ada8ec2159fbc69b58cc40eb62a4e76edd8d45.tar.bz2 rneovim-b1ada8ec2159fbc69b58cc40eb62a4e76edd8d45.zip |
vim-patch:8.1.1354: getting a list of text lines is clumsy
Problem: Getting a list of text lines is clumsy.
Solution: Add the =<< assignment. (Yegappan Lakshmanan, closes vim/vim#4386)
https://github.com/vim/vim/commit/f5842c5a533346c4ff41ff666e465c85f1de35d5
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 5e6bfd0dbc..607e88b7c8 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -9779,6 +9779,44 @@ This does NOT work: > Like above, but append/add/subtract the value for each |List| item. + *:let=<<* *:let-heredoc* *E990* *E991* +:let {var-name} =<< [trim] {marker} +text... +text... +{marker} + Set internal variable {var-name} to a List containing + the lines of text bounded by the string {marker}. + {marker} must not contain white space. + The last line should end only with the {marker} string + without any other character. Watch out for white + space after {marker}! + If {marker} is not supplied, then "." is used as the + default marker. + + Any white space characters in the lines of text are + preserved. If "trim" is specified before {marker}, + then all the leading indentation exactly matching the + leading indentation before `let` is stripped from the + input lines and the line containing {marker}. Note + that the difference between space and tab matters + here. + + If {var-name} didn't exist yet, it is created. + Cannot be followed by another command, but can be + followed by a comment. + + Examples: > + let var1 =<< END + Sample text 1 + Sample text 2 + Sample text 3 + END + + let data =<< trim DATA + 1 2 3 4 + 5 6 7 8 + DATA +< *E121* :let {var-name} .. List the value of variable {var-name}. Multiple variable names may be given. Special names recognized |