tyru/savemap.vim

usage in other plugin

Closed this issue · 5 comments

Hello, your plugin could be useful in the Plugin FastFold to append the command :FastFoldUpdate!<CR> to all mappings that close or open folds such as za,zc,zo,... without overwriting user mappings.

Can the relevant parts of your plugin be copied and then it suffices to refer to your plugin, or does your plugin have to be installed alongside?

Edit: Regarding what the plugin's New BSD license says the first option sounds fine?

tyru commented

Hello, your plugin could be useful in the Plugin FastFold to append the
command :FastFoldUpdate! to all mappings that close or open folds such
as za,zc,zo,... without overwriting user mappings.

This plugin is not specific to folding mapping.

Can the relevant parts of your plugin be copied and then it suffices to
refer to your plugin, or does your plugin have to be installed alongside?

Both are allowed if you write you are using savemap plugin because this plugin
is MIT license.

tyru commented

And I'm happy if you tell me a repository when you publish the plugin :)

tyru commented

Please close if closable.

That said, by looking closer at your plugin, is it possible to append a command to a mapping? That is, if for example zx is remapped, then can your plugin achieve

execute 'nnoremap zx '.appendmap('n','zx',':MyCmd<CR>')

? You have to take care of expression, buffer local mappings and so on, but your plugin does that. Albeit I can only find a command to restore a map but nothing allowing for the above?

Perhaps easier: Is it possible to restore to a different key combination?

That is, nnoremap foo bar and now restore foo to a script mapping <SID>foo instead of foo?