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

began moving some mappings from mappings.js -> buffer.js; Also the constructors of Mail() and Buffer() accept an argument in which mode they should add the mapping

This commit is contained in:
Martin Stubenschrott
2008-02-14 15:00:05 +00:00
parent e652d53e5d
commit 3b461b18c2
5 changed files with 68 additions and 53 deletions

View File

@@ -379,15 +379,6 @@ vimperator.Mappings = function () //{{{
{ shortHelp: "Rewind keyboard focus" }
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["i", "<Insert>"],
function ()
{
// setting this option triggers an observer
// which takes care of the mode setting
vimperator.options.setPref("accessibility.browsewithcaret", true);
},
{ shortHelp: "Start caret mode" }
));
addDefaultMap(new vimperator.Map(vimperator.modes.all, ["<C-q>"],
function () { vimperator.modes.passAllKeys = true; },
{ shortHelp: "Temporarily quit Vimperator mode" }
@@ -762,20 +753,6 @@ vimperator.Mappings = function () //{{{
flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["j", "<Down>", "<C-e>"],
function (count) { vimperator.buffer.scrollLines(count > 1 ? count : 1); },
{
shortHelp: "Scroll document down",
flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["k", "<Up>", "<C-y>"],
function (count) { vimperator.buffer.scrollLines(-(count > 1 ? count : 1)); },
{
shortHelp: "Scroll document up",
flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["<C-d>"],
function (count) { vimperator.buffer.scrollByScrollSize(count, 1); },
{