1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 00:27:57 +01:00

new setCustomMode for plugin writers

This commit is contained in:
Marco Candrian
2008-01-04 11:50:49 +00:00
parent bd66b8522e
commit 9156dc4531
3 changed files with 46 additions and 5 deletions

View File

@@ -629,6 +629,12 @@ const vimperator = (function () //{{{
vimperator.globalVariables = {};
// namespace for plugins/scripts. Actually (only) the active plugin must/can set a
// v.plugins.mode = <str> string to show on v.modes.CUSTOM
// v.plugins.stop = <func> hooked on a v.modes.reset()
// v.plugins.onEvent = <func> function triggered, on keypresses (unless <esc>) (see events.js)
vimperator.plugins = {};
// TODO: move elsewhere
vimperator.registerCallback("submit", vimperator.modes.EX, function (command) { vimperator.execute(command); });
vimperator.registerCallback("complete", vimperator.modes.EX, function (str) { return vimperator.completion.exTabCompletion(str); });