diff --git a/chrome/content/vimperator/commands.js b/chrome/content/vimperator/commands.js index 7174ed00..f31bc9d2 100644 --- a/chrome/content/vimperator/commands.js +++ b/chrome/content/vimperator/commands.js @@ -26,46 +26,6 @@ the provisions above, a recipient may use your version of this file under the terms of any one of the MPL, the GPL or the LGPL. }}} ***** END LICENSE BLOCK *****/ -/* [command, action, cancel_hint_mode, always_active] */ -var g_hint_mappings = [ //{{{ - /* hint action keys */ - ["o", "vimperator.hints.openHints(false, false);", true, false], - ["t", "vimperator.hints.openHints(true, false);", true, false], - ["", "vimperator.hints.openHints(false, true );", true, false], - ["s", "vimperator.echoerr('Saving of links not yet implemented');", true, false], - ["y", "vimperator.hints.yankUrlHints();", true, false], - ["Y", "vimperator.hints.yankTextHints();", true, false], - [",", "g_inputbuffer+=','; vimperator.hints.setCurrentState(0);", false, true], - [":", "vimperator.commandline.open(':', '', vimperator.modes.EX);", false, true], - /* movement keys */ - ["", "scrollBufferRelative(0, 1);", false, true], - ["", "scrollBufferRelative(0, -1);", false, true], - ["", "scrollBufferAbsolute(-1, 0);", false, true], - ["", "scrollBufferAbsolute(-1, 100);", false, true], - ["", "goDoCommand('cmd_scrollPageUp');", false, true], - ["", "goDoCommand('cmd_scrollPageUp');", false, true], - ["", "goDoCommand('cmd_scrollPageDown');", false, true], - ["", "goDoCommand('cmd_scrollPageDown');", false, true], - ["", "scrollBufferRelative(-1, 0);", false, true], - ["", "scrollBufferRelative(0, 1);", false, true], - ["", "scrollBufferRelative(0, -1);", false, true], - ["", "scrollBufferRelative(1, 0);", false, true], - /* tab managment */ - ["", "vimperator.tabs.select('+1', true)", true, true], // same as gt, but no count supported - ["", "vimperator.tabs.select('-1', true)", true, true], - /* navigation */ - ["", "vimperator.history.stepTo(g_count > 0 ? -1 * g_count : -1);", false, true], - ["", "vimperator.history.stepTo(g_count > 0 ? g_count : 1);", false, true], - ["", "vimperator.history.stepTo(g_count > 0 ? -1 * g_count : -1);", false, true], - ["", "vimperator.history.stepTo(g_count > 0 ? g_count : 1);", false, true], - ["", "vimperator.tabs.remove(getBrowser().mCurrentTab, g_count, false, 0);", true, true], - /* cancel hint mode keys */ - ["", "", true, true], - ["", "", true, true], - ["", "", true, true], - ["", "", true, true] -]; //}}} - function Command(specs, action, extra_info) //{{{ { if (!specs || !action) diff --git a/chrome/content/vimperator/mappings.js b/chrome/content/vimperator/mappings.js index fb2804f7..49037456 100644 --- a/chrome/content/vimperator/mappings.js +++ b/chrome/content/vimperator/mappings.js @@ -723,10 +723,12 @@ function Mappings() //{{{ "Also focuses the web page, in case a form field has focus and eats our key presses." } )); -//}}} + //}}} +} //}}} - // TODO: Convert these to the new mappings model - var hint_maps = [ //{{{ +// TODO: Convert these to the new mappings model +/* [command, action, cancel_hint_mode, always_active] */ +var g_hint_mappings = [ //{{{ /* hint action keys */ ["o", "vimperator.hints.openHints(false, false);", true, false], ["t", "vimperator.hints.openHints(true, false);", true, false], @@ -734,7 +736,7 @@ function Mappings() //{{{ ["s", "vimperator.echoerr('Saving of links not yet implemented');", true, false], ["y", "vimperator.hints.yankUrlHints();", true, false], ["Y", "vimperator.hints.yankTextHints();", true, false], - [",", "vimperator.input.count+=','; vimperator.hints.setCurrentState(0);", false, true], + [",", "g_inputbuffer+=','; vimperator.hints.setCurrentState(0);", false, true], [":", "vimperator.commandline.open(':', '', vimperator.modes.EX);", false, true], /* movement keys */ ["", "scrollBufferRelative(0, 1);", false, true], @@ -753,17 +755,16 @@ function Mappings() //{{{ ["", "vimperator.tabs.select('+1', true)", true, true], // same as gt, but no count supported ["", "vimperator.tabs.select('-1', true)", true, true], /* navigation */ - ["", "stepInHistory(vimperator.input.count > 0 ? -1 * vimperator.input.count : -1);", false, true], - ["", "stepInHistory(vimperator.input.count > 0 ? vimperator.input.count : 1);", false, true], - ["", "stepInHistory(vimperator.input.count > 0 ? -1 * vimperator.input.count : -1);", false, true], - ["", "stepInHistory(vimperator.input.count > 0 ? vimperator.input.count : 1);", false, true], - ["", "vimperator.tabs.remove(getBrowser().mCurrentTab, vimperator.input.count, false, 0);", true, true], + ["", "vimperator.history.stepTo(g_count > 0 ? -1 * g_count : -1);", false, true], + ["", "vimperator.history.stepTo(g_count > 0 ? g_count : 1);", false, true], + ["", "vimperator.history.stepTo(g_count > 0 ? -1 * g_count : -1);", false, true], + ["", "vimperator.history.stepTo(g_count > 0 ? g_count : 1);", false, true], + ["", "vimperator.tabs.remove(getBrowser().mCurrentTab, g_count, false, 0);", true, true], /* cancel hint mode keys */ ["", "", true, true], ["", "", true, true], ["", "", true, true], ["", "", true, true] - ]; //}}} -} //}}} +]; //}}} // vim: set fdm=marker sw=4 ts=4 et: