A rough attempt at characterizing Vim's Normal Mode grammar that I made while writing this Vim series. See the bibliography there for more context.
Notation: |
means or, []
means optional, *
means zero or more, <>
means literal class (e.g. <number>
could expand to 1, 2, etc.), ...
means there are more instances not enumerated here (these would need to be fleshed out to get a complete grammar).
It could be interesting to use a grammar like this one to organize an interactive Vim cheatsheet.
normal-command = motion-form
| verb-phrase