Vim 's Grammar

Vim's Grammar

A grammar is - the rules describing how to we can combine the alphabet of a language using valid syntax and structure.

Vim 's alphabet = all of the keyboard

repetition = non-zero-digit { zero |digits-not-zero }

rule #1 = [repetition] motion

rule #2 = [repetition] operator [repetition] motion

text-obj = modifier object

modifier = a |i

object = w |W |s |p |[ |] |{ |} |( |) |" |' |` |< |>

refined rule #2 = [repetition] operator [repetition] ( motion | text - obj )

Show Optional