06 - Leaders

Created Sunday 08 June 2014


Basically -, H, <space>, <cr>, <bs> do things that you almost never need in normal mode. But that only give us 6 keys to work with.

Mapping key sequences

Pick a key that you don't care about (like '-') as a "prefix" key and create mappings on top of it.


Vim calls this "prefix" key the "leader".

Local leader

Vim has a second "leader" key called "local leader". This is meant to be a prefix for mappings that only take effect for certain types of files, like Python files or HTML files.