comparison runtime/doc/if_lua.txt @ 20045:04ef2ccf2519 v8.2.0578

patch 8.2.0578: heredoc for interfaces does not support "trim" Commit: https://github.com/vim/vim/commit/6c2b7b8055b96463f78abb70f58c4c6d6d4b9d55 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Apr 14 20:15:49 2020 +0200 patch 8.2.0578: heredoc for interfaces does not support "trim" Problem: Heredoc for interfaces does not support "trim". Solution: Update the script heredoc support to be same as the :let command. (Yegappan Lakshmanan, closes #5916)
author Bram Moolenaar <Bram@vim.org>
date Tue, 14 Apr 2020 20:30:05 +0200
parents af69c9335223
children 86dde5c4b375
comparison
equal deleted inserted replaced
20044:a5dca21836a2 20045:04ef2ccf2519
30 > 30 >
31 :lua print("Hello, Vim!") 31 :lua print("Hello, Vim!")
32 :lua local curbuf = vim.buffer() curbuf[7] = "line #7" 32 :lua local curbuf = vim.buffer() curbuf[7] = "line #7"
33 < 33 <
34 34
35 :[range]lua << [endmarker] 35 :[range]lua << [trim] [{endmarker}]
36 {script} 36 {script}
37 {endmarker} 37 {endmarker}
38 Execute Lua script {script}. 38 Execute Lua script {script}.
39 Note: This command doesn't work when the Lua 39 Note: This command doesn't work when the Lua
40 feature wasn't compiled in. To avoid errors, see 40 feature wasn't compiled in. To avoid errors, see
41 |script-here|. 41 |script-here|.
42 42
43 The {endmarker} must NOT be preceded by any white space.
44
45 If [endmarker] is omitted from after the "<<", a dot '.' must be used after 43 If [endmarker] is omitted from after the "<<", a dot '.' must be used after
46 {script}, like for the |:append| and |:insert| commands. 44 {script}, like for the |:append| and |:insert| commands. Refer to
45 |:let-heredoc| for more information.
47 46
48 This form of the |:lua| command is mainly useful for including Lua code 47 This form of the |:lua| command is mainly useful for including Lua code
49 in Vim scripts. 48 in Vim scripts.
50 49
51 Example: 50 Example: