diff options
author | Christian Clason <christian.clason@uni-due.de> | 2020-07-06 03:30:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-05 21:30:12 -0400 |
commit | 4ab7bbf3eaeacc32e8970b76a19c8682f98cc183 (patch) | |
tree | 602389793048292552211ac1f8f3f0281c345a8a /runtime/doc | |
parent | f9579d473e00c11c0b76ef5fe0934ef6ec13ed34 (diff) | |
download | rneovim-4ab7bbf3eaeacc32e8970b76a19c8682f98cc183.tar.gz rneovim-4ab7bbf3eaeacc32e8970b76a19c8682f98cc183.tar.bz2 rneovim-4ab7bbf3eaeacc32e8970b76a19c8682f98cc183.zip |
lua: add options to highlight.on_yank (#12549)
NOTE: Configuration options have changed for highlight.on_yank.
Check help for |:help highlight.on_yank()|
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/lua.txt | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 002fc523a1..0ee63eb523 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -711,25 +711,26 @@ VIM.HIGHLIGHT *lua-highlight* Nvim includes a function for highlighting a selection on yank (see for example https://github.com/machakann/vim-highlightedyank). To enable it, add > - au TextYankPost * silent! lua require'vim.highlight'.on_yank() + au TextYankPost * silent! lua vim.highlight.on_yank() < to your `init.vim`. You can customize the highlight group and the duration of the highlight via > - au TextYankPost * silent! lua require'vim.highlight'.on_yank("IncSearch", 500) + au TextYankPost * silent! lua vim.highlight.on_yank {higroup="IncSearch", timeout=150} < 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() + au TextYankPost * silent! lua vim.highlight.on_yank {on_visual=false} < -vim.highlight.on_yank([{higroup}, {timeout}, {event}]) - *vim.highlight.on_yank()* - Highlights the yanked text. Optional arguments are the highlight group - to use ({higroup}, default `"IncSearch"`), the duration of highlighting - in milliseconds ({timeout}, default `500`), and the event structure - that is fired ({event}, default `vim.v.event`). - +vim.highlight.on_yank({opts}) *vim.highlight.on_yank()* + Highlights the yanked text. The fields of the optional dict {opts} + control the highlight: + - {higroup} highlight group for yanked region (default `"IncSearch"`) + - {timeout} time in ms before highlight is cleared (default `150`) + - {on_macro} highlight when executing macro (default `false`) + - {on_visual} highlight when yanking visual selection (default `true`) + - {event} event structure (default `vim.v.event`) vim.highlight.range({bufnr}, {ns}, {higroup}, {start}, {finish}, {rtype}, {inclusive}) *vim.highlight.range()* @@ -739,7 +740,6 @@ vim.highlight.range({bufnr}, {ns}, {higroup}, {start}, {finish}, {rtype}, {inclu or blockwise, see |setreg|; default to characterwise) and whether the range is inclusive (default false). - ------------------------------------------------------------------------------ VIM.REGEX *lua-regex* |