diff options
Diffstat (limited to 'runtime/doc/lua.txt')
-rw-r--r-- | runtime/doc/lua.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 19579a2a3c..5a49d36503 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -705,6 +705,10 @@ the highlight via > au TextYankPost * silent! lua require'vim.highlight'.on_yank("IncSearch", 500) < +If you want to exclude visual selections from highlighting on yank, use +> +au TextYankPost * silent! lua return (not vim.v.event.visual) and require'vim.highlight'.on_yank() +< vim.highlight.on_yank([{higroup}, {timeout}, {event}]) *vim.highlight.on_yank()* @@ -713,6 +717,16 @@ vim.highlight.on_yank([{higroup}, {timeout}, {event}]) in milliseconds ({timeout}, default `500`), and the event structure that is fired ({event}, default `vim.v.event`). + +vim.highlight.range({bufnr}, {ns}, {higroup}, {start}, {finish}, {rtype}, {inclusive}) + *vim.highlight.range()* + Highlights the range between {start} and {finish} (tuples of {line,col}) + in buffer {bufnr} with the highlight group {higroup} using the namespace + {ns}. Optional arguments are the type of rangeĀ (characterwise, linewise, + or blockwise, see |setreg|; default to characterwise) and whether the + range is inclusive (default false). + + ------------------------------------------------------------------------------ VIM.REGEX *lua-regex* |