mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 12:17:58 +01:00
move g_hint_mappings to mappings.js
This commit is contained in:
@@ -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.
|
the terms of any one of the MPL, the GPL or the LGPL.
|
||||||
}}} ***** END LICENSE BLOCK *****/
|
}}} ***** 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],
|
|
||||||
["<C-w>", "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 */
|
|
||||||
["<C-e>", "scrollBufferRelative(0, 1);", false, true],
|
|
||||||
["<C-y>", "scrollBufferRelative(0, -1);", false, true],
|
|
||||||
["<Home>", "scrollBufferAbsolute(-1, 0);", false, true],
|
|
||||||
["<End>", "scrollBufferAbsolute(-1, 100);", false, true],
|
|
||||||
["<C-b>", "goDoCommand('cmd_scrollPageUp');", false, true],
|
|
||||||
["<PageUp>", "goDoCommand('cmd_scrollPageUp');", false, true],
|
|
||||||
["<C-f>", "goDoCommand('cmd_scrollPageDown');", false, true],
|
|
||||||
["<PageDown>", "goDoCommand('cmd_scrollPageDown');", false, true],
|
|
||||||
["<Left>", "scrollBufferRelative(-1, 0);", false, true],
|
|
||||||
["<Down>", "scrollBufferRelative(0, 1);", false, true],
|
|
||||||
["<Up>", "scrollBufferRelative(0, -1);", false, true],
|
|
||||||
["<Right>", "scrollBufferRelative(1, 0);", false, true],
|
|
||||||
/* tab managment */
|
|
||||||
["<C-n>", "vimperator.tabs.select('+1', true)", true, true], // same as gt, but no count supported
|
|
||||||
["<C-p>", "vimperator.tabs.select('-1', true)", true, true],
|
|
||||||
/* navigation */
|
|
||||||
["<C-o>", "vimperator.history.stepTo(g_count > 0 ? -1 * g_count : -1);", false, true],
|
|
||||||
["<C-i>", "vimperator.history.stepTo(g_count > 0 ? g_count : 1);", false, true],
|
|
||||||
["<C-h>", "vimperator.history.stepTo(g_count > 0 ? -1 * g_count : -1);", false, true],
|
|
||||||
["<C-l>", "vimperator.history.stepTo(g_count > 0 ? g_count : 1);", false, true],
|
|
||||||
["<C-d>", "vimperator.tabs.remove(getBrowser().mCurrentTab, g_count, false, 0);", true, true],
|
|
||||||
/* cancel hint mode keys */
|
|
||||||
["<C-c>", "", true, true],
|
|
||||||
["<C-g>", "", true, true],
|
|
||||||
["<C-[>", "", true, true],
|
|
||||||
["<Esc>", "", true, true]
|
|
||||||
]; //}}}
|
|
||||||
|
|
||||||
function Command(specs, action, extra_info) //{{{
|
function Command(specs, action, extra_info) //{{{
|
||||||
{
|
{
|
||||||
if (!specs || !action)
|
if (!specs || !action)
|
||||||
|
|||||||
@@ -724,9 +724,11 @@ function Mappings() //{{{
|
|||||||
}
|
}
|
||||||
));
|
));
|
||||||
//}}}
|
//}}}
|
||||||
|
} //}}}
|
||||||
|
|
||||||
// TODO: Convert these to the new mappings model
|
// TODO: Convert these to the new mappings model
|
||||||
var hint_maps = [ //{{{
|
/* [command, action, cancel_hint_mode, always_active] */
|
||||||
|
var g_hint_mappings = [ //{{{
|
||||||
/* hint action keys */
|
/* hint action keys */
|
||||||
["o", "vimperator.hints.openHints(false, false);", true, false],
|
["o", "vimperator.hints.openHints(false, false);", true, false],
|
||||||
["t", "vimperator.hints.openHints(true, 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],
|
["s", "vimperator.echoerr('Saving of links not yet implemented');", true, false],
|
||||||
["y", "vimperator.hints.yankUrlHints();", true, false],
|
["y", "vimperator.hints.yankUrlHints();", true, false],
|
||||||
["Y", "vimperator.hints.yankTextHints();", 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],
|
[":", "vimperator.commandline.open(':', '', vimperator.modes.EX);", false, true],
|
||||||
/* movement keys */
|
/* movement keys */
|
||||||
["<C-e>", "scrollBufferRelative(0, 1);", false, true],
|
["<C-e>", "scrollBufferRelative(0, 1);", false, true],
|
||||||
@@ -753,17 +755,16 @@ function Mappings() //{{{
|
|||||||
["<C-n>", "vimperator.tabs.select('+1', true)", true, true], // same as gt, but no count supported
|
["<C-n>", "vimperator.tabs.select('+1', true)", true, true], // same as gt, but no count supported
|
||||||
["<C-p>", "vimperator.tabs.select('-1', true)", true, true],
|
["<C-p>", "vimperator.tabs.select('-1', true)", true, true],
|
||||||
/* navigation */
|
/* navigation */
|
||||||
["<C-o>", "stepInHistory(vimperator.input.count > 0 ? -1 * vimperator.input.count : -1);", false, true],
|
["<C-o>", "vimperator.history.stepTo(g_count > 0 ? -1 * g_count : -1);", false, true],
|
||||||
["<C-i>", "stepInHistory(vimperator.input.count > 0 ? vimperator.input.count : 1);", false, true],
|
["<C-i>", "vimperator.history.stepTo(g_count > 0 ? g_count : 1);", false, true],
|
||||||
["<C-h>", "stepInHistory(vimperator.input.count > 0 ? -1 * vimperator.input.count : -1);", false, true],
|
["<C-h>", "vimperator.history.stepTo(g_count > 0 ? -1 * g_count : -1);", false, true],
|
||||||
["<C-l>", "stepInHistory(vimperator.input.count > 0 ? vimperator.input.count : 1);", false, true],
|
["<C-l>", "vimperator.history.stepTo(g_count > 0 ? g_count : 1);", false, true],
|
||||||
["<C-d>", "vimperator.tabs.remove(getBrowser().mCurrentTab, vimperator.input.count, false, 0);", true, true],
|
["<C-d>", "vimperator.tabs.remove(getBrowser().mCurrentTab, g_count, false, 0);", true, true],
|
||||||
/* cancel hint mode keys */
|
/* cancel hint mode keys */
|
||||||
["<C-c>", "", true, true],
|
["<C-c>", "", true, true],
|
||||||
["<C-g>", "", true, true],
|
["<C-g>", "", true, true],
|
||||||
["<C-[>", "", true, true],
|
["<C-[>", "", true, true],
|
||||||
["<Esc>", "", true, true]
|
["<Esc>", "", true, true]
|
||||||
]; //}}}
|
]; //}}}
|
||||||
} //}}}
|
|
||||||
|
|
||||||
// vim: set fdm=marker sw=4 ts=4 et:
|
// vim: set fdm=marker sw=4 ts=4 et:
|
||||||
|
|||||||
Reference in New Issue
Block a user