See former key sequences in vim
Posted
by
Vasiliy Sharapov
on Super User
See other posts from Super User
or by Vasiliy Sharapov
Published on 2011-11-29T20:55:49Z
Indexed on
2011/11/30
1:55 UTC
Read the original article
Hit count: 478
vim
Sometimes I share screen shots and clips of vim usage with others. It would be nice to expand on the part of the status bar highlighted in this picture:
I would like some way to make previous key sequences visible as well, such as:
y2w jj f[ p 2d
- You can see the key sequences leading up to the current one. I'll elaborate on my wish list at the bottom.
Is something like this is available as a plugin or vim script? The sheer number of scripts available on vim online makes this hard to find by keyword.
Some features I would hope for (but seem improbable):
- Delimit key sequences with a non-keyboard character instead of space, and a different one for the current command, so
y2w jj f[ p 2d
might becomey2w¦jj¦f[¦p » 2d
- Replace keys that have a letter alternative with the alternative, such as the right arrow key -
^[[C
with the equivalentl
. Edit: To clarify, the right arrow key is a valid key in vim, but has no character to represent it, thel
key preforms the same function and could/should substitute it. - Have previous keystrokes run all the way to the beginning of the line (instead of just one or two), and just have vim's command prompt overwrite it when necessary.
- Replace some keystrokes with a more elegant alternative, for example
hhhhh
with5h
or more impressivelyd2f)
withd%
(in the appropriate situation).
© Super User or respective owner