vim-maktaba icon indicating copy to clipboard operation
vim-maktaba copied to clipboard

Resolve plugin[mappings] prefix value at initialization time

Open dbarnett opened this issue 9 years ago • 0 comments

Plugins that provide default mappings generally configure a default mapping prefix like <leader>= and then take a boolean value for plugin[mappings] as a shortcut for that prefix. For instance

Glaive codefmt plugin[mappings]

is a shortcut for

Glaive codefmt plugin[mappings]='<leader>='

But in the first shortcut form the default prefix isn't introspectable (:Glaive codefmt shows a value of {'mappings': 1} instead of {'mappings': '<leader>='}). We should add a hook to resolve it immediately so it's introspectable.

Related: When overriding the plugin[mappings] value, we could immediately create new mappings at that prefix, and possibly clean up any old ones we can detect as automatically created by the plugin at the old prefix.

dbarnett avatar Feb 25 '16 17:02 dbarnett