{{ message }}
v:last_reg global variable as feature request #12003#12063
Closed
cero1988 wants to merge 9 commits into
Closed
Conversation
Contributor
|
We should have a more generic mechanism for commands previously executed. The operator used is also relevant. Making a list of them will also be useful. I sometimes type something different from what I intended, it would then be good to be able to see what happened, the last few commands executed. At least for changes, possibly also for other commands. E.g. if you wonder why a window was closed. |
Contributor
Author
|
you mean like :history, but with the operators commands used ? |
Contributor
|
you mean like :history, but with the post operator commands used ?
The :history command only keeps command lines, as text.
That's probably the best we can do for Ex commands, since they are
largely unstructured.
For Normal mode commands we do have some structure, such as the count,
the register, movement command, operator, etc. I'm not sure what would
be useful to provide. Alternatively a list of commands as text could be
provided. For operators that's often what is in the redo buffer. But
it may get complicated, e.g. when using the Visual area.
…--
What is the difference between a professional and an amateur?
The ark was built by an amateur; professionals gave us the Titanic.
/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
Contributor
Author
|
I could create a new history like :history nvcmd with all the last normal mode command used, for the non printable keys i could translate the more commonly used like the Arrow keys in text |
Member
cyan12green
added a commit
to cyan12green/vim
that referenced
this pull request
May 27, 2026
Problem: Built-in tracing and profiling support of all the
commands/inputs/scripts/plugins.
Solution: Add configurable tracing support with documentation and
tests (Siddarth Balaji).
Built-in support to log and print the last few typed keys and executed
commands. To be used for debugging or understanding what when wrong.
Could also be used for statistics. Allows for various verbosity and
filtering levels.
related: vim#12046
related: vim#12063
Signed-off-by: Siddarth Balaji <49455519+cyan12green@users.noreply.github.com>
cyan12green
added a commit
to cyan12green/vim
that referenced
this pull request
May 27, 2026
Problem: Built-in tracing and profiling support of all the
commands/inputs/scripts/plugins.
Solution: Add configurable tracing support with documentation and
tests (Siddarth Balaji).
Built-in support to log and print the last few typed keys and executed
commands. To be used for debugging or understanding what when wrong.
Could also be used for statistics. Allows for various verbosity and
filtering levels.
related: vim#12046
related: vim#12063
Signed-off-by: Siddarth Balaji <49455519+cyan12green@users.noreply.github.com>
cyan12green
added a commit
to cyan12green/vim
that referenced
this pull request
Jun 3, 2026
Problem: Built-in tracing and profiling support of all the
commands/inputs/scripts/plugins.
Solution: Add configurable tracing support with documentation and
tests (Siddarth Balaji).
Built-in support to log and print the last few typed keys and executed
commands. To be used for debugging or understanding what when wrong.
Could also be used for statistics. Allows for various verbosity and
filtering levels.
related: vim#12046
related: vim#12063
related: vim#19377
Signed-off-by: Siddarth Balaji <49455519+cyan12green@users.noreply.github.com>
cyan12green
added a commit
to cyan12green/vim
that referenced
this pull request
Jun 21, 2026
Problem: Built-in tracing and profiling support of all the
commands/inputs/scripts/plugins.
Solution: Add configurable tracing support with documentation and
tests (Siddarth Balaji).
Built-in support to log and print the last few typed keys and executed
commands. To be used for debugging or understanding what when wrong.
Could also be used for statistics. Allows for various verbosity and
filtering levels.
related: vim#12046
related: vim#12063
related: vim#19377
Signed-off-by: Siddarth Balaji <49455519+cyan12green@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

added global variable v:last_reg with the latested putted register as feature request #12003