docs(autocmd): update docs to match implementation

docs(reg_recorded): add links to relevant docs

docs(Recording): update docs to match implementation

docs(Q) update references of Q to be gQ

docs(autocmd) add description about state of reg_record{ing,ed} for RecordingLeave

docs(vim_diff) add Recording{Enter,Leave} to features

docs(index) removed duplicate gQ

docs(options) removed line about gQ erroring in visual mode

Update runtime/doc/vim_diff.txt

Co-authored-by: zeertzjq <zeertzjq@outlook.com>

docs(vim_diff) removed double mention of Q
This commit is contained in:
Thomas Vigouroux 2021-10-01 09:40:22 +02:00 committed by Gregory Anders
parent 8a4e26c6fe
commit 684c782546
8 changed files with 20 additions and 13 deletions

View File

@ -829,13 +829,17 @@ SearchWrapped After making a search with |n| or |N| if the
search wraps around the document back to search wraps around the document back to
the start/finish respectively. the start/finish respectively.
*RecordingEnter* *RecordingEnter*
RecordingEnter When a macro starts to be recorded. RecordingEnter When a macro starts recording.
The pattern is the current file name, and The pattern is the current file name, and
|reg_recording()| is the current register that |reg_recording()| is the current register that
is used. is used.
*RecordinLeave* *RecordingLeave*
RecordingLeave When the is the end of a macro recording. RecordingLeave When a macro stops recording.
The pattern is the current file name. The pattern is the current file name, and
|reg_recording()| is the recorded
register.
|reg_recorded()| is only updated after this
event.
*SessionLoadPost* *SessionLoadPost*
SessionLoadPost After loading the session file created using SessionLoadPost After loading the session file created using
the |:mksession| command. the |:mksession| command.

View File

@ -7202,7 +7202,7 @@ mode([expr]) Return a string that indicates the current mode.
Rvc Virtual Replace mode completion |compl-generic| Rvc Virtual Replace mode completion |compl-generic|
Rvx Virtual Replace mode |i_CTRL-X| completion Rvx Virtual Replace mode |i_CTRL-X| completion
c Command-line editing c Command-line editing
cv Vim Ex mode |Q| or |gQ| cv Vim Ex mode |gQ|
r Hit-enter prompt r Hit-enter prompt
rm The -- more -- prompt rm The -- more -- prompt
r? A |:confirm| query of some sort r? A |:confirm| query of some sort
@ -7829,7 +7829,7 @@ reg_executing() *reg_executing()*
reg_recorded() *reg_recorded()* reg_recorded() *reg_recorded()*
Returns the single letter name of the last recorded register. Returns the single letter name of the last recorded register.
Returns an empty string string when nothing was recorded yet. Returns an empty string string when nothing was recorded yet.
See |q|. See |q| and |Q|.
reg_recording() *reg_recording()* reg_recording() *reg_recording()*
Returns the single letter name of the register being recorded. Returns the single letter name of the register being recorded.

View File

@ -339,7 +339,6 @@ tag char note action in Normal mode ~
insert text, repeat N times insert text, repeat N times
|P| ["x]P 2 put the text [from register x] before the |P| ["x]P 2 put the text [from register x] before the
cursor N times cursor N times
|Q| Q switch to "Ex" mode
|R| R 2 enter replace mode: overtype existing |R| R 2 enter replace mode: overtype existing
characters, repeat the entered text N-1 characters, repeat the entered text N-1
times times
@ -401,6 +400,7 @@ tag char note action in Normal mode ~
|q| q{0-9a-zA-Z"} record typed characters into named register |q| q{0-9a-zA-Z"} record typed characters into named register
{0-9a-zA-Z"} (uppercase to append) {0-9a-zA-Z"} (uppercase to append)
|q| q (while recording) stops recording |q| q (while recording) stops recording
|Q| Q replay last recorded macro
|q:| q: edit : command-line in command-line window |q:| q: edit : command-line in command-line window
|q/| q/ edit / command-line in command-line window |q/| q/ edit / command-line in command-line window
|q?| q? edit ? command-line in command-line window |q?| q? edit ? command-line in command-line window

View File

@ -953,7 +953,6 @@ A jump table for the options with a short description can be found at |Q_op|.
error Other Error occurred (e.g. try to join last line) error Other Error occurred (e.g. try to join last line)
(mostly used in |Normal-mode| or |Cmdline-mode|). (mostly used in |Normal-mode| or |Cmdline-mode|).
esc hitting <Esc> in |Normal-mode|. esc hitting <Esc> in |Normal-mode|.
ex In |Visual-mode|, hitting |Q| results in an error.
hangul Ignored. hangul Ignored.
insertmode Pressing <Esc> in 'insertmode'. insertmode Pressing <Esc> in 'insertmode'.
lang Calling the beep module for Lua/Mzscheme/TCL. lang Calling the beep module for Lua/Mzscheme/TCL.

View File

@ -489,6 +489,7 @@ In Insert or Command-line mode:
|q| q{a-z} record typed characters into register {a-z} |q| q{a-z} record typed characters into register {a-z}
|q| q{A-Z} record typed characters, appended to register {a-z} |q| q{A-Z} record typed characters, appended to register {a-z}
|q| q stop recording |q| q stop recording
|Q| Q replay last recorded macro
|@| N @{a-z} execute the contents of register {a-z} (N times) |@| N @{a-z} execute the contents of register {a-z} (N times)
|@@| N @@ repeat previous @{a-z} (N times) |@@| N @@ repeat previous @{a-z} (N times)
|:@| :@{a-z} execute the contents of register {a-z} as an Ex |:@| :@{a-z} execute the contents of register {a-z} as an Ex
@ -997,7 +998,7 @@ Short explanation of each option: *option-list*
|:version| :ve[rsion] show version information |:version| :ve[rsion] show version information
|:normal| :norm[al][!] {commands} |:normal| :norm[al][!] {commands}
execute Normal mode commands execute Normal mode commands
|Q| Q switch to "Ex" mode |gQ| gQ switch to "Ex" mode
|:redir| :redir >{file} redirect messages to {file} |:redir| :redir >{file} redirect messages to {file}
|:silent| :silent[!] {command} execute {command} silently |:silent| :silent[!] {command} execute {command} silently

View File

@ -103,7 +103,7 @@ Which is two characters shorter!
When using "global" in Ex mode, a special case is using ":visual" as a When using "global" in Ex mode, a special case is using ":visual" as a
command. This will move to a matching line, go to Normal mode to let you command. This will move to a matching line, go to Normal mode to let you
execute commands there until you use |Q| to return to Ex mode. This will be execute commands there until you use |gQ| to return to Ex mode. This will be
repeated for each matching line. While doing this you cannot use ":global". repeated for each matching line. While doing this you cannot use ":global".
To abort this type CTRL-C twice. To abort this type CTRL-C twice.
@ -149,6 +149,7 @@ q Stops recording.
*Q* *Q*
Q Repeat the last recorded register [count] times. Q Repeat the last recorded register [count] times.
See |reg_recorded()|.
*:@* *:@*
:[addr]@{0-9a-z".=*+} Execute the contents of register {0-9a-z".=*+} as an Ex :[addr]@{0-9a-z".=*+} Execute the contents of register {0-9a-z".=*+} as an Ex

View File

@ -180,6 +180,8 @@ Commands:
|:match| can be invoked before highlight group is defined |:match| can be invoked before highlight group is defined
Events: Events:
|RecordingEnter|
|RecordingLeave|
|SearchWrapped| |SearchWrapped|
|Signal| |Signal|
|TabNewEntered| |TabNewEntered|
@ -218,7 +220,6 @@ Input/Mappings:
Normal commands: Normal commands:
|gO| shows a filetype-defined "outline" of the current buffer. |gO| shows a filetype-defined "outline" of the current buffer.
|Q| replays the last recorded macro.
Options: Options:
'cpoptions' flags: |cpo-_| 'cpoptions' flags: |cpo-_|
@ -357,7 +358,8 @@ Motion:
The |jumplist| avoids useless/phantom jumps. The |jumplist| avoids useless/phantom jumps.
Normal commands: Normal commands:
|Q| is the same as |gQ| |Q| replays the last recorded macro instead of switching to Ex mode.
Instead |gQ| can be used to enter Ex mode.
Options: Options:
'ttimeout', 'ttimeoutlen' behavior was simplified 'ttimeout', 'ttimeoutlen' behavior was simplified

View File

@ -76,7 +76,7 @@ return {
'QuickFixCmdPre', -- before :make, :grep etc. 'QuickFixCmdPre', -- before :make, :grep etc.
'QuitPre', -- before :quit 'QuitPre', -- before :quit
'RecordingEnter', -- when starting to record a macro 'RecordingEnter', -- when starting to record a macro
'RecordingLeave', -- when stopping to record a macro 'RecordingLeave', -- just before a macro stops recording
'RemoteReply', -- upon string reception from a remote vim 'RemoteReply', -- upon string reception from a remote vim
'SearchWrapped', -- after the search wrapped around 'SearchWrapped', -- after the search wrapped around
'SessionLoadPost', -- after loading a session file 'SessionLoadPost', -- after loading a session file