diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-03-13 03:24:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-13 03:24:09 +0100 |
commit | 7fcf2f926fc6baf43d17ba47cb89d02c0ddc4329 (patch) | |
tree | 73e3893d076aa17e711c0e6e749e6b77d754e61a /runtime | |
parent | 2af1e232782a54b9af27578f76a2f730261e00ac (diff) | |
download | rneovim-7fcf2f926fc6baf43d17ba47cb89d02c0ddc4329.tar.gz rneovim-7fcf2f926fc6baf43d17ba47cb89d02c0ddc4329.tar.bz2 rneovim-7fcf2f926fc6baf43d17ba47cb89d02c0ddc4329.zip |
TextYankPost: add v:event["inclusive"] #9717
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/autocmd.txt | 14 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 1 | ||||
-rw-r--r-- | runtime/doc/motion.txt | 5 |
3 files changed, 13 insertions, 7 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 9310aeff2d..b0b36271e9 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -809,20 +809,25 @@ InsertCharPre When a character is typed in Insert mode, a different character. When |v:char| is set to more than one character this text is inserted literally. - It is not allowed to change the text |textlock|. - The event is not triggered when 'paste' is - set. + + Cannot change the text. |textlock| + Not triggered when 'paste' is set. *TextYankPost* TextYankPost Just after a |yank| or |deleting| command, but not if the black hole register |quote_| is used nor for |setreg()|. Pattern must be *. Sets these |v:event| keys: + inclusive operator regcontents regname regtype + The `inclusive` flag combined with the |'[| + and |']| marks can be used to calculate the + precise region of the operation. + Recursion is ignored. - It is not allowed to change the text |textlock|. + Cannot change the text. |textlock| *InsertEnter* InsertEnter Just before starting Insert mode. Also for Replace mode and Virtual Replace mode. The @@ -972,7 +977,6 @@ SwapExists Detected an existing swap file when starting It is not allowed to change to another buffer, change a buffer name or change directory here. - {only available with the +eval feature} *Syntax* Syntax When the 'syntax' option has been set. The pattern is matched against the syntax name. diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index da17faaaf6..b073c6b97c 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1539,6 +1539,7 @@ v:event Dictionary of event data for the current |autocommand|. Valid cmdlevel Level of cmdline. cmdtype Type of cmdline, |cmdline-char|. cwd Current working directory. + inclusive Motion is |inclusive|, else exclusive. scope Event-specific scope name. operator Current |operator|. Also set for Ex commands (unlike |v:operator|). For diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt index 84867318a4..d5a123e3ea 100644 --- a/runtime/doc/motion.txt +++ b/runtime/doc/motion.txt @@ -66,10 +66,11 @@ and end position. Generally, motions that move between lines affect lines characterwise). However, there are some exceptions. *exclusive* *inclusive* -A character motion is either inclusive or exclusive. When inclusive, the +Character motion is either inclusive or exclusive. When inclusive, the start and end position of the motion are included in the operation. When exclusive, the last character towards the end of the buffer is not included. -Linewise motions always include the start and end position. +Linewise motions always include the start and end position. Plugins can +check the v:event.inclusive flag of the |TextYankPost| event. Which motions are linewise, inclusive or exclusive is mentioned with the command. There are however, two general exceptions: |