Skip to content

Instantly share code, notes, and snippets.

@darcyparker
Last active February 4, 2026 22:42
Show Gist options
  • Select an option

  • Save darcyparker/1886716 to your computer and use it in GitHub Desktop.

Select an option

Save darcyparker/1886716 to your computer and use it in GitHub Desktop.
Vim Modes Transition Diagram in SVG https://rawgithub.com/darcyparker/1886716/raw/eab57dfe784f016085251771d65a75a471ca22d4/vimModeStateDiagram.svg Note, most of the nodes in this graph have clickable hyperlinks to documentation.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@darcyparker
Copy link
Author

See vim/vim#13091 - A bug about the undocumented mode mentioned in this diagram was just fixed in vim and therefore nvim.

@AltitudeApps
Copy link

'd' and 'y' appear to be missing, but I'm assuming that it is intended that the lozenge labeled 'operator' is intended to cover these cases.

Is there a key or additional information which further defines these, perhaps enumerating the possible cases? For the 'Printable Character, NL or CR', but a list of known operators would be quite helpful for the learner.

What I've been looking for is some sort of state machine description or transition diagram or table which delineates valid normal mode commands. Meaning, those which end up either modifying the buffer, or end up with a value landing in a register, something like that. This is as opposed to a sequence of keystrokes that are nonsensical, and end up being ignored and dumping you right back to normal mode with no pending commands being authored. For instance, dm appears to be meaningless, and just results in landing back in normal mode as if you hadn't pressed any keys at all.

Another case of interest to me is something like dvvvvvvvvvvvvj, which seems to be equivalent to dvj. I'm not sure why this would be allowed, but it is.

Maybe the information I'm looking for is present, and I'm just not seeing it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment