diff --git a/content/events.js b/content/events.js
index fa162951..fe633aa2 100644
--- a/content/events.js
+++ b/content/events.js
@@ -710,7 +710,7 @@ vimperator.Events = function() //{{{
vimperator.input.count = parseInt(count_str, 10);
if (isNaN(vimperator.input.count))
vimperator.input.count = -1;
- if (map.flags & Mappings.flags.ARGUMENT)
+ if (map.flags & vimperator.Mappings.flags.ARGUMENT)
{
vimperator.input.pendingArgMap = map;
vimperator.input.buffer += key;
@@ -725,7 +725,7 @@ vimperator.Events = function() //{{{
vimperator.input.buffer = "";
}
// no count support for these commands yet
- else if (map.flags & Mappings.flags.MOTION)
+ else if (map.flags & vimperator.Mappings.flags.MOTION)
{
vimperator.input.pendingMotionMap = map;
vimperator.input.buffer = "";
diff --git a/content/mappings.js b/content/mappings.js
index 4d7675f0..4b6ff8db 100644
--- a/content/mappings.js
+++ b/content/mappings.js
@@ -46,9 +46,9 @@ vimperator.Map = function(modes, cmds, action, extra_info) //{{{
else
{
this.usage = this.names[0]; // only the first command name
- if (this.flags & Mappings.flags.COUNT)
+ if (this.flags & vimperator.Mappings.flags.COUNT)
this.usage = "[count]" + this.usage;
- if (this.flags & Mappings.flags.ARGUMENT)
+ if (this.flags & vimperator.Mappings.flags.ARGUMENT)
this.usage += " {arg}";
this.usage = [this.usage]; // FIXME: usage an array - needed for the help
}
@@ -81,17 +81,17 @@ vimperator.Map.prototype.hasName = function(name)
vimperator.Map.prototype.execute = function(motion, count, argument)
{
var args = [];
- if (this.flags & Mappings.flags.MOTION)
+ if (this.flags & vimperator.Mappings.flags.MOTION)
args.push(motion);
- if (this.flags & Mappings.flags.COUNT)
+ if (this.flags & vimperator.Mappings.flags.COUNT)
args.push(count);
- if (this.flags & Mappings.flags.ARGUMENT)
+ if (this.flags & vimperator.Mappings.flags.ARGUMENT)
args.push(argument);
this.action.apply(this, args);
}
//}}}
-function Mappings() //{{{
+vimperator.Mappings = function() //{{{
{
////////////////////////////////////////////////////////////////////////////////
////////////////////// PRIVATE SECTION /////////////////////////////////////////
@@ -177,7 +177,7 @@ function Mappings() //{{{
////////////////////// PUBLIC SECTION //////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
- Mappings.flags = {
+ vimperator.Mappings.flags = {
MOTION: 1 << 0,
COUNT: 1 << 1,
ARGUMENT: 1 << 2
@@ -400,7 +400,7 @@ function Mappings() //{{{
{
short_help: "Focus next frame",
help: "Transfers keyboard focus to the [count]th next frame in order. The newly focused frame is briefly colored red. Does not wrap.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["[f"],
@@ -408,7 +408,7 @@ function Mappings() //{{{
{
short_help: "Focus previous frame",
help: "Transfers keyboard focus to the [count]th previous frame in order. The newly focused frame is briefly colored red. Does not wrap.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["b"],
@@ -431,7 +431,7 @@ function Mappings() //{{{
{
short_help: "Repeat last :buffer[!] command",
help: "This is useful to quickly jump between buffers which have a similar URL or title.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gB"],
@@ -439,7 +439,7 @@ function Mappings() //{{{
{
short_help: "Repeat last :buffer[!] command in reverse direction",
help: "Just like gb but in the other direction.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["d"],
@@ -448,7 +448,7 @@ function Mappings() //{{{
short_help: "Delete current buffer (=tab)",
help: "Count is supported, 2d removes the current and next tab and the one to the right is selected. " +
"Does not wrap if [count] is larger than available tabs to the right.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["D"],
@@ -457,7 +457,7 @@ function Mappings() //{{{
short_help: "Delete current buffer (=tab)",
help: "Count is supported, 2D removes the current and previous tab and the one to the left is selected. " +
"Does not wrap if [count] is larger than available tabs to the left.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gh"],
@@ -499,7 +499,7 @@ function Mappings() //{{{
usage: ["go{a-zA-Z0-9}"],
help: "Open any QuickMark in the current tab. You can mark any URLs with M{a-zA-Z0-9}. " +
"These QuickMarks are persistent across browser sessions.",
- flags: Mappings.flags.ARGUMENT
+ flags: vimperator.Mappings.flags.ARGUMENT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gn"],
@@ -515,7 +515,7 @@ function Mappings() //{{{
help: "Works like go{a-zA-Z0-9} but opens the QuickMark in a new tab. " +
"Whether the new tab is activated or not depends on the 'activate' option.
" +
"Mnemonic: Go in a new tab. gt would make more sense but is already taken.",
- flags: Mappings.flags.ARGUMENT
+ flags: vimperator.Mappings.flags.ARGUMENT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gP"],
@@ -535,7 +535,7 @@ function Mappings() //{{{
{
short_help: "Go to the next tab",
help: "Cycles to the first tab, when the last is selected.
Count is supported: 3gt goes to the third tab.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gT", "", ""],
@@ -543,7 +543,7 @@ function Mappings() //{{{
{
short_help: "Go to the previous tab",
help: "Cycles to the last tab, when the first is selected.
Count is supported: 3gT goes to the third tab.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ['', ''],
@@ -588,7 +588,7 @@ function Mappings() //{{{
short_help: "Set mark at the cursor position",
usage: ["m{a-zA-Z}"],
help: "Marks a-z are local to the buffer, whereas A-Z are valid between buffers.",
- flags: Mappings.flags.ARGUMENT
+ flags: vimperator.Mappings.flags.ARGUMENT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["'", "`"],
@@ -597,7 +597,7 @@ function Mappings() //{{{
short_help: "Jump to the mark in the current buffer",
usage: ["'{a-zA-Z}"],
help: "Marks a-z are local to the buffer, whereas A-Z are valid between buffers.",
- flags: Mappings.flags.ARGUMENT
+ flags: vimperator.Mappings.flags.ARGUMENT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["M"],
@@ -616,7 +616,7 @@ function Mappings() //{{{
usage: ["M{a-zA-Z0-9}"],
help: "You can go to a marked URL in the current tab with go{a-zA-Z0-9} or in a new tab with gn{a-zA-Z0-9}. " +
"These QuickMarks are persistent across browser sessions.",
- flags: Mappings.flags.ARGUMENT
+ flags: vimperator.Mappings.flags.ARGUMENT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["o"],
@@ -658,7 +658,7 @@ function Mappings() //{{{
{
short_help: "Redraw the screen",
help: "Works like :redraw.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["r"],
@@ -695,7 +695,7 @@ function Mappings() //{{{
{
short_help: "Undo closing of a tab",
help: "If a count is given, don't close the last but the [count]th last tab.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["y"],
@@ -727,7 +727,7 @@ function Mappings() //{{{
{
short_help: "Enlarge text zoom of current web page",
help: "Mnemonic: zoom in",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["zm"],
@@ -735,7 +735,7 @@ function Mappings() //{{{
{
short_help: "Enlarge text zoom of current web page by a larger amount",
help: "Mnemonic: zoom more",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["zo", "-"],
@@ -743,7 +743,7 @@ function Mappings() //{{{
{
short_help: "Reduce text zoom of current web page",
help: "Mnemonic: zoom out",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["zr"],
@@ -751,7 +751,7 @@ function Mappings() //{{{
{
short_help: "Reduce text zoom of current web page by a larger amount",
help: "Mnemonic: zoom reduce",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["zz"],
@@ -759,7 +759,7 @@ function Mappings() //{{{
{
short_help: "Set text zoom value of current web page",
help: "Zoom value can be between 1 and 2000%. If it is omitted, text zoom is reset to 100%.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["zI"],
@@ -767,7 +767,7 @@ function Mappings() //{{{
{
short_help: "Enlarge full zoom of current web page",
help: "Mnemonic: zoom in",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["zM"],
@@ -775,7 +775,7 @@ function Mappings() //{{{
{
short_help: "Enlarge full zoom of current web page by a larger amount",
help: "Mnemonic: zoom more",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["zO"],
@@ -783,7 +783,7 @@ function Mappings() //{{{
{
short_help: "Reduce full zoom of current web page",
help: "Mnemonic: zoom out",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["zR"],
@@ -791,7 +791,7 @@ function Mappings() //{{{
{
short_help: "Reduce full zoom of current web page by a larger amount",
help: "Mnemonic: zoom reduce",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["zZ"],
@@ -799,7 +799,7 @@ function Mappings() //{{{
{
short_help: "Set full zoom value of current web page",
help: "Zoom value can be between 1 and 2000%. If it is omitted, full zoom is reset to 100%.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
@@ -838,7 +838,7 @@ function Mappings() //{{{
{
short_help: "Goto the top of the document",
help: "When used with [count] like in 35gg, it scrolls to 35% of the document.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["G", ""],
@@ -846,7 +846,7 @@ function Mappings() //{{{
{
short_help: "Goto the end of the document",
help: "When used with [count] like in 35G, it scrolls to 35% of the document.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["h", ""],
@@ -855,7 +855,7 @@ function Mappings() //{{{
short_help: "Scroll document to the left",
help: "Count is supported: 10h will move 10 times as much to the left.
" +
"If the document cannot scroll more, a beep is emitted (unless 'beep' is turned off).",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["j", "", ""],
@@ -864,7 +864,7 @@ function Mappings() //{{{
short_help: "Scroll document down",
help: "Count is supported: 10j will move 10 times as much down.
" +
"If the document cannot scroll more, a beep is emitted (unless 'beep' is turned off).",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["k", "", ""],
@@ -873,7 +873,7 @@ function Mappings() //{{{
short_help: "Scroll document up",
help: "Count is supported: 10k will move 10 times as much up.
" +
"If the document cannot scroll more, a beep is emitted (unless 'beep' is turned off).",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
function scrollByScrollSize(count, direction)
@@ -898,7 +898,7 @@ function Mappings() //{{{
short_help: "Scroll window downwards in the buffer",
help: "The number of lines is set by the 'scroll' option which defaults to half a page. " +
"If [count] is given 'scroll' is first set to this value.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], [""],
@@ -907,7 +907,7 @@ function Mappings() //{{{
short_help: "Scroll window upwards in the buffer",
help: "The number of lines is set by the 'scroll' option which defaults to half a page. " +
"If [count] is given 'scroll' is first set to this value.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["l", ""],
@@ -916,7 +916,7 @@ function Mappings() //{{{
short_help: "Scroll document to the right",
help: "Count is supported: 10l will move 10 times as much to the right.
" +
"If the document cannot scroll more, a beep is emitted (unless 'beep' is turned off).",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["", "", ""],
@@ -924,7 +924,7 @@ function Mappings() //{{{
{
short_help: "Scroll up a full page",
help: "Scroll window [count] pages Backwards (upwards) in the buffer.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["", "", ""],
@@ -932,7 +932,7 @@ function Mappings() //{{{
{
short_help: "Scroll down a full page",
help: "Scroll window [count] pages Forwards (downwards) in the buffer.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
@@ -942,7 +942,7 @@ function Mappings() //{{{
{
short_help: "Go to an older position in the jump list",
help: "The jump list is just the browser history for now.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], [""],
@@ -950,7 +950,7 @@ function Mappings() //{{{
{
short_help: "Go to a newer position in the jump list",
help: "The jump list is just the browser history for now.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["H", "", ""],
@@ -958,7 +958,7 @@ function Mappings() //{{{
{
short_help: "Go back in the browser history",
help: "Count is supported: 3H goes back 3 steps.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["L", "", ""],
@@ -966,7 +966,7 @@ function Mappings() //{{{
{
short_help: "Go forward in the browser history",
help: "Count is supported: 3L goes forward 3 steps.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
function isDirectory(url)
@@ -1006,7 +1006,7 @@ function Mappings() //{{{
{
short_help: "Go to parent directory",
help: "Count is supported: 2gu on http://www.example.com/dir1/dir2/file.htm would open http://www.example.com/dir1/.",
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gU", ""],
@@ -1179,7 +1179,7 @@ function Mappings() //{{{
{
cancel_mode: false,
always_active: true,
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.HINTS], [""],
@@ -1187,7 +1187,7 @@ function Mappings() //{{{
{
cancel_mode: false,
always_active: true,
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.HINTS], [""],
@@ -1209,7 +1209,7 @@ function Mappings() //{{{
{
cancel_mode: false,
always_active: true,
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.HINTS], ["", ""],
@@ -1217,7 +1217,7 @@ function Mappings() //{{{
{
cancel_mode: false,
always_active: true,
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.HINTS], [""],
@@ -1225,7 +1225,7 @@ function Mappings() //{{{
{
cancel_mode: false,
always_active: true,
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.HINTS], [""],
@@ -1233,7 +1233,7 @@ function Mappings() //{{{
{
cancel_mode: false,
always_active: true,
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.HINTS], [""],
@@ -1241,7 +1241,7 @@ function Mappings() //{{{
{
cancel_mode: false,
always_active: true,
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.HINTS], [""],
@@ -1249,7 +1249,7 @@ function Mappings() //{{{
{
cancel_mode: false,
always_active: true,
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
@@ -1275,7 +1275,7 @@ function Mappings() //{{{
{
cancel_mode: false,
always_active: true,
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.HINTS], [""],
@@ -1283,7 +1283,7 @@ function Mappings() //{{{
{
cancel_mode: false,
always_active: true,
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.HINTS], [""],
@@ -1291,7 +1291,7 @@ function Mappings() //{{{
{
cancel_mode: false,
always_active: true,
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.HINTS], [""],
@@ -1299,7 +1299,7 @@ function Mappings() //{{{
{
cancel_mode: false,
always_active: true,
- flags: Mappings.flags.COUNT
+ flags: vimperator.Mappings.flags.COUNT
}
));
addDefaultMap(new vimperator.Map([vimperator.modes.HINTS], [""],
@@ -1359,7 +1359,7 @@ function Mappings() //{{{
while(count--)
getSelectionController().lineMove(true, false);
},
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.CARET], ["k", ""],
function(count)
@@ -1369,7 +1369,7 @@ function Mappings() //{{{
getSelectionController().lineMove(false, false);
},
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.CARET], ["h", ""],
function(count)
@@ -1378,7 +1378,7 @@ function Mappings() //{{{
while(count--)
getSelectionController().characterMove(false, false);
},
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.CARET], ["l", ""],
function(count)
@@ -1388,7 +1388,7 @@ function Mappings() //{{{
getSelectionController().characterMove(true, false);
},
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.CARET], ["b", "B", ""],
function(count)
@@ -1397,7 +1397,7 @@ function Mappings() //{{{
while(count--)
getSelectionController().wordMove(false, false);
},
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.CARET], ["w", "W", "e", ""],
function(count)
@@ -1407,7 +1407,7 @@ function Mappings() //{{{
getSelectionController().wordMove(true, false);
},
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.CARET], ["", ""],
function(count)
@@ -1416,7 +1416,7 @@ function Mappings() //{{{
while(count--)
getSelectionController().pageMove(true, false);
},
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.CARET], ["", ""],
function(count)
@@ -1425,7 +1425,7 @@ function Mappings() //{{{
while(count--)
getSelectionController().pageMove(false, false);
},
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.CARET], ["gg", ""],
function(count) { getSelectionController().completeMove(false, false); },
@@ -1482,7 +1482,7 @@ function Mappings() //{{{
getSelectionController().lineMove(true, true);
}
},
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.VISUAL], ["k", ""],
function(count)
@@ -1500,7 +1500,7 @@ function Mappings() //{{{
getSelectionController().lineMove(false, true);
}
},
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.VISUAL], ["h", ""],
function(count)
@@ -1514,7 +1514,7 @@ function Mappings() //{{{
getSelectionController().characterMove(false, true);
}
},
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.VISUAL], ["l", ""],
function(count)
@@ -1528,7 +1528,7 @@ function Mappings() //{{{
getSelectionController().characterMove(true, true);
}
},
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.VISUAL], ["b", "B"],
function(count)
@@ -1542,7 +1542,7 @@ function Mappings() //{{{
getSelectionController().wordMove(false, true);
}
},
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.VISUAL], ["w", "W", "e"],
function(count)
@@ -1556,7 +1556,7 @@ function Mappings() //{{{
getSelectionController().wordMove(true, true);
}
},
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.VISUAL], ["", ""],
function(count)
@@ -1570,7 +1570,7 @@ function Mappings() //{{{
getSelectionController().pageMove(true, true);
}
},
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.VISUAL], ["", ""],
function(count)
@@ -1584,7 +1584,7 @@ function Mappings() //{{{
getSelectionController().pageMove(false, true);
}
},
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.VISUAL], ["gg", ""],
function(count)
@@ -1755,35 +1755,35 @@ function Mappings() //{{{
));
addDefaultMap(new vimperator.Map([vimperator.modes.TEXTAREA], ["u"],
function(count) { vimperator.editor.executeCommand("cmd_undo", count); vimperator.mode = vimperator.modes.TEXTAREA; },
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.TEXTAREA], [""],
function(count) { vimperator.editor.executeCommand("cmd_redo", count); vimperator.mode = vimperator.modes.TEXTAREA; },
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.TEXTAREA], ["j", "", ""],
function(count) { vimperator.editor.executeCommand("cmd_lineNext", count); },
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.TEXTAREA], ["k", ""],
function(count) { vimperator.editor.executeCommand("cmd_linePrevious", count); },
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.TEXTAREA], ["h", "", ""],
function(count) { vimperator.editor.executeCommand("cmd_charPrevious", count); },
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.TEXTAREA], ["l", "", ""],
function(count) { vimperator.editor.executeCommand("cmd_charNext", count); },
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.TEXTAREA], ["w", "W", "e", ""],
function(count) { vimperator.editor.executeCommand("cmd_wordNext", count); },
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.TEXTAREA], ["b", "B", ""],
function(count) { vimperator.editor.executeCommand("cmd_wordPrevious", 1); },
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.TEXTAREA], ["gg", ""],
function(count) { vimperator.editor.executeCommand("cmd_moveTop", 1); },
@@ -1803,11 +1803,11 @@ function Mappings() //{{{
));
addDefaultMap(new vimperator.Map([vimperator.modes.TEXTAREA], ["", ""],
function(count) { vimperator.editor.executeCommand("cmd_movePageDown", count); },
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.TEXTAREA], ["", ""],
function(count) { vimperator.editor.executeCommand("cmd_movePageUp", count); },
- { flags: Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.TEXTAREA], ["o"],
function(count)
@@ -1837,7 +1837,7 @@ function Mappings() //{{{
if (pos >= 0)
vimperator.editor.moveToPosition(pos, true, vimperator.mode == vimperator.modes.VISUAL);
},
- { flags: Mappings.flags.ARGUMENT | Mappings.flags.COUNT}
+ { flags: vimperator.Mappings.flags.ARGUMENT | vimperator.Mappings.flags.COUNT}
));
addDefaultMap(new vimperator.Map([vimperator.modes.TEXTAREA, vimperator.modes.VISUAL], ["F"],
function(count, arg)
@@ -1846,7 +1846,7 @@ function Mappings() //{{{
if (pos >= 0)
vimperator.editor.moveToPosition(pos, false, vimperator.mode == vimperator.modes.VISUAL);
},
- { flags: Mappings.flags.ARGUMENT | Mappings.flags.COUNT}
+ { flags: vimperator.Mappings.flags.ARGUMENT | vimperator.Mappings.flags.COUNT}
));
addDefaultMap(new vimperator.Map([vimperator.modes.TEXTAREA, vimperator.modes.VISUAL], ["t"],
function(count, arg)
@@ -1855,7 +1855,7 @@ function Mappings() //{{{
if (pos >= 0)
vimperator.editor.moveToPosition(pos - 1, true, vimperator.mode = vimperator.modes.VISUAL);
},
- { flags: Mappings.flags.ARGUMENT | Mappings.flags.COUNT}
+ { flags: vimperator.Mappings.flags.ARGUMENT | vimperator.Mappings.flags.COUNT}
));
addDefaultMap(new vimperator.Map([vimperator.modes.TEXTAREA, vimperator.modes.VISUAL], ["T"],
function(count, arg)
@@ -1864,7 +1864,7 @@ function Mappings() //{{{
if (pos >= 0)
vimperator.editor.moveToPosition(pos + 1, false, vimperator.mode = vimperator.modes.VISUAL);
},
- { flags: Mappings.flags.ARGUMENT | Mappings.flags.COUNT}
+ { flags: vimperator.Mappings.flags.ARGUMENT | vimperator.Mappings.flags.COUNT}
));
// addDefaultMap(new vimperator.Map([vimperator.modes.TEXTAREA, vimperator.modes.VISUAL], [";"],
// function(count, arg)
@@ -1873,21 +1873,21 @@ function Mappings() //{{{
// if (pos >= 0)
// vimperator.editor.moveToPosition(pos + 1, false, vimperator.mode = vimperator.modes.VISUAL);
// },
- // { flags: Mappings.flags.ARGUMENT | Mappings.flags.COUNT}
+ // { flags: vimperator.Mappings.flags.ARGUMENT | vimperator.Mappings.flags.COUNT}
// ));
// commands which require a motion
addDefaultMap(new vimperator.Map([vimperator.modes.TEXTAREA], ["d"],
function(motion, count) { vimperator.editor.executeCommandWithMotion("d", motion, count); },
- { flags: Mappings.flags.MOTION | Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.MOTION | vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.TEXTAREA], ["c"],
function(motion, count) { vimperator.editor.executeCommandWithMotion("c", motion, count); },
- { flags: Mappings.flags.MOTION | Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.MOTION | vimperator.Mappings.flags.COUNT }
));
addDefaultMap(new vimperator.Map([vimperator.modes.TEXTAREA], ["y"],
function(motion, count) { vimperator.editor.executeCommandWithMotion("y", motion, count); },
- { flags: Mappings.flags.MOTION | Mappings.flags.COUNT }
+ { flags: vimperator.Mappings.flags.MOTION | vimperator.Mappings.flags.COUNT }
));
// }}}
diff --git a/content/vimperator.js b/content/vimperator.js
index f904848e..139fa0c8 100644
--- a/content/vimperator.js
+++ b/content/vimperator.js
@@ -587,7 +587,7 @@ const vimperator = (function() //{{{
vimperator.log("Loading module buffer window...", 3);
vimperator.bufferwindow = new vimperator.InformationList("vimperator-bufferwindow", { incremental_fill: false, max_items: 10 });
vimperator.log("Loading module mappings...", 3);
- vimperator.mappings = new Mappings();
+ vimperator.mappings = new vimperator.Mappings();
vimperator.log("Loading module statusline...", 3);
vimperator.statusline = new vimperator.StatusLine();
vimperator.log("Loading module buffer...", 3);