diff --git a/content/buffer.js b/content/buffer.js index a6c5fc14..1585640f 100644 --- a/content/buffer.js +++ b/content/buffer.js @@ -194,6 +194,7 @@ vimperator.Buffer = function (browserModes) //{{{ vimperator.options.setPref("accessibility.browsewithcaret", true); }); + // scrolling vimperator.mappings.add(modes, ["j", "", ""], "Scroll document down", function (count) { vimperator.buffer.scrollLines(count > 1 ? count : 1); }, @@ -204,6 +205,197 @@ vimperator.Buffer = function (browserModes) //{{{ function (count) { vimperator.buffer.scrollLines(-(count > 1 ? count : 1)); }, { flags: vimperator.Mappings.flags.COUNT }); + vimperator.mappings.add(modes, ["h", ""], + "Scroll document to the left", + function (count) { vimperator.buffer.scrollColumns(-(count > 1 ? count : 1)); }, + { flags: vimperator.Mappings.flags.COUNT }); + + vimperator.mappings.add(modes, ["l", ""], + "Scroll document to the right", + function (count) { vimperator.buffer.scrollColumns(count > 1 ? count : 1); }, + { flags: vimperator.Mappings.flags.COUNT }); + + vimperator.mappings.add(modes, ["0", "^"], + "Scroll to the absolute left of the document", + function () { vimperator.buffer.scrollStart(); }); + + vimperator.mappings.add(modes, ["$"], + "Scroll to the absolute right of the document", + function () { vimperator.buffer.scrollEnd(); }); + + vimperator.mappings.add(modes, ["gg", ""], + "Goto the top of the document", + function (count) { vimperator.buffer.scrollToPercentile(count > 0 ? count : 0); }, + { flags: vimperator.Mappings.flags.COUNT }); + + vimperator.mappings.add(modes, ["G", ""], + "Goto the end of the document", + function (count) { vimperator.buffer.scrollToPercentile(count >= 0 ? count : 100); }, + { flags: vimperator.Mappings.flags.COUNT }); + + vimperator.mappings.add(modes, [""], + "Scroll window downwards in the buffer", + function (count) { vimperator.buffer.scrollByScrollSize(count, 1); }, + { flags: vimperator.Mappings.flags.COUNT }); + + vimperator.mappings.add(modes, [""], + "Scroll window upwards in the buffer", + function (count) { vimperator.buffer.scrollByScrollSize(count, -1); }, + { flags: vimperator.Mappings.flags.COUNT }); + + vimperator.mappings.add(modes, ["", "", ""], + "Scroll up a full page", + function (count) { vimperator.buffer.scrollPages(-(count > 1 ? count : 1)); }, + { flags: vimperator.Mappings.flags.COUNT }); + + vimperator.mappings.add(modes, ["", "", ""], + "Scroll down a full page", + function (count) { vimperator.buffer.scrollPages(count > 1 ? count : 1); }, + { flags: vimperator.Mappings.flags.COUNT }); + + vimperator.mappings.add(modes, ["]f"], + "Focus next frame", + function (count) { vimperator.buffer.shiftFrameFocus(count > 1 ? count : 1, true); }, + { flags: vimperator.Mappings.flags.COUNT }); + + vimperator.mappings.add(modes, ["[f"], + "Focus previous frame", + function (count) { vimperator.buffer.shiftFrameFocus(count > 1 ? count : 1, false); }, + { flags: vimperator.Mappings.flags.COUNT }); + + vimperator.mappings.add(modes, ["]]"], + "Follow a link labeled to 'next' or '>' if it exists", + function (count) { vimperator.buffer.followDocumentRelationship("next"); }, + { flags: vimperator.Mappings.flags.COUNT }); + + vimperator.mappings.add(modes, ["[["], + "Follow a link labeled to 'prev', 'previous' or '<' if it exists", + function (count) { vimperator.buffer.followDocumentRelationship("previous"); }, + { flags: vimperator.Mappings.flags.COUNT }); + + vimperator.mappings.add(modes, ["gf"], + "View source", + function () { vimperator.commands.viewsource(); }); + + vimperator.mappings.add(modes, ["gF"], + "View source with an external editor", + function () { vimperator.commands.viewsource(null, true); }); + + vimperator.mappings.add(modes, ["gi"], + "Focus last used input field", + function () + { + if (vimperator.buffer.lastInputField) + vimperator.buffer.lastInputField.focus(); + else + { + var first = vimperator.buffer.evaluateXPath( + "//*[@type='text'] | //textarea | //xhtml:textarea").snapshotItem(0); + + if (first) + first.focus(); + else + vimperator.beep(); + } + }); + + vimperator.mappings.add(modes, ["gP"], + "Open (put) a URL based on the current clipboard contents in a new buffer", + function () + { + vimperator.open(readFromClipboard(), + /\bpaste\b/.test(vimperator.options["activate"]) ? + vimperator.NEW_BACKGROUND_TAB : vimperator.NEW_TAB); + }); + + vimperator.mappings.add(modes, ["'", "`"], + "Jump to the mark in the current buffer", + function (arg) { vimperator.marks.jumpTo(arg); }, + { flags: vimperator.Mappings.flags.ARGUMENT }); + + vimperator.mappings.add(modes, ["p", ""], + "Open (put) a URL based on the current clipboard contents in the current buffer", + function () { vimperator.open(readFromClipboard()); }); + + vimperator.mappings.add(modes, ["P"], + "Open (put) a URL based on the current clipboard contents in a new buffer", + function () + { + vimperator.open(readFromClipboard(), + /\bpaste\b/.test(vimperator.options["activate"]) ? + vimperator.NEW_TAB : vimperator.NEW_BACKGROUND_TAB); + }); + + // reload + vimperator.mappings.add(modes, ["r"], + "Reload current page", + function () { vimperator.tabs.reload(getBrowser().mCurrentTab, false); }); + + vimperator.mappings.add(modes, ["R"], + "Reload while skipping the cache", + function () { vimperator.tabs.reload(getBrowser().mCurrentTab, true); }); + + // zoom + vimperator.mappings.add(modes, ["zi", "+"], + "Enlarge text zoom of current web page", + function (count) { vimperator.buffer.zoomIn(count > 1 ? count : 1, false); }, + { flags: vimperator.Mappings.flags.COUNT }); + + vimperator.mappings.add(modes, ["zm"], + "Enlarge text zoom of current web page by a larger amount", + function (count) { vimperator.buffer.zoomIn((count > 1 ? count : 1) * 3, false); }, + { flags: vimperator.Mappings.flags.COUNT }); + + vimperator.mappings.add(modes, ["zo", "-"], + "Reduce text zoom of current web page", + function (count) { vimperator.buffer.zoomOut(count > 1 ? count : 1, false); }, + { flags: vimperator.Mappings.flags.COUNT }); + + vimperator.mappings.add(modes, ["zr"], + "Reduce text zoom of current web page by a larger amount", + function (count) { vimperator.buffer.zoomOut((count > 1 ? count : 1) * 3, false); }, + { flags: vimperator.Mappings.flags.COUNT }); + + vimperator.mappings.add(modes, ["zz"], + "Set text zoom value of current web page", + function (count) { vimperator.buffer.textZoom = count > 1 ? count : 100; }, + { flags: vimperator.Mappings.flags.COUNT }); + + vimperator.mappings.add(modes, ["zI"], + "Enlarge full zoom of current web page", + function (count) { vimperator.buffer.zoomIn(count > 1 ? count : 1, true); }, + { flags: vimperator.Mappings.flags.COUNT }); + + vimperator.mappings.add(modes, ["zM"], + "Enlarge full zoom of current web page by a larger amount", + function (count) { vimperator.buffer.zoomIn((count > 1 ? count : 1) * 3, true); }, + { flags: vimperator.Mappings.flags.COUNT }); + + vimperator.mappings.add(modes, ["zO"], + "Reduce full zoom of current web page", + function (count) { vimperator.buffer.zoomOut(count > 1 ? count : 1, true); }, + { flags: vimperator.Mappings.flags.COUNT }); + + vimperator.mappings.add(modes, ["zR"], + "Reduce full zoom of current web page by a larger amount", + function (count) { vimperator.buffer.zoomOut((count > 1 ? count : 1) * 3, true); }, + { flags: vimperator.Mappings.flags.COUNT }); + + vimperator.mappings.add(modes, ["zZ"], + "Set full zoom value of current web page", + function (count) { vimperator.buffer.fullZoom = count > 1 ? count : 100; }, + { flags: vimperator.Mappings.flags.COUNT }); + + // page info + vimperator.mappings.add(modes, [""], + "Print the current file name", + function (count) { vimperator.buffer.showPageInfo(false); }, + { flags: vimperator.Mappings.flags.COUNT }); + + vimperator.mappings.add(modes, ["g"], + "Print file information", + function (count) { vimperator.buffer.showPageInfo(true); }); + /////////////////////////////////////////////////////////////////////////////}}} ////////////////////// COMMANDS //////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////{{{ diff --git a/content/hints.js b/content/hints.js index 177ae600..7d7c9a4b 100644 --- a/content/hints.js +++ b/content/hints.js @@ -31,6 +31,7 @@ vimperator.Hints = function () //{{{ //////////////////////////////////////////////////////////////////////////////// ////////////////////// PRIVATE SECTION ///////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////{{{ + var modes = vimperator.config.browserModes || [vimperator.modes.NORMAL]; var submode = ""; // used for extended mode, can be "o", "t", "y", etc. var hintString = ""; // the typed string part of the hint is in this string @@ -419,6 +420,31 @@ vimperator.Hints = function () //{{{ validator: function (value) { return value >= 0; } }); + /////////////////////////////////////////////////////////////////////////////}}} + ////////////////////// MAPPINGS //////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////{{{ + + vimperator.mappings.add(modes, ["f"], + "Start QuickHint mode", + function () { vimperator.hints.show(vimperator.modes.QUICK_HINT); }); + + vimperator.mappings.add(modes, ["F"], + "Start QuickHint mode, but open link in a new tab", + function () { vimperator.hints.show(vimperator.modes.QUICK_HINT, "t"); }); + + vimperator.mappings.add(modes, [";"], + "Start an extended hint mode", + function (arg) + { + if (arg == "f") + vimperator.hints.show(vimperator.modes.ALWAYS_HINT, "o"); + else if (arg == "F") + vimperator.hints.show(vimperator.modes.ALWAYS_HINT, "t"); + else + vimperator.hints.show(vimperator.modes.EXTENDED_HINT, arg); + }, + { flags: vimperator.Mappings.flags.ARGUMENT }); + /////////////////////////////////////////////////////////////////////////////}}} ////////////////////// PUBLIC SECTION ////////////////////////////////////////// diff --git a/content/mappings.js b/content/mappings.js index 492a7155..8e29c13d 100644 --- a/content/mappings.js +++ b/content/mappings.js @@ -396,34 +396,6 @@ vimperator.Mappings = function () //{{{ { shortHelp: "Do nothing" } )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["]f"], - function (count) { vimperator.buffer.shiftFrameFocus(count > 1 ? count : 1, true); }, - { - shortHelp: "Focus next frame", - flags: vimperator.Mappings.flags.COUNT - } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["[f"], - function (count) { vimperator.buffer.shiftFrameFocus(count > 1 ? count : 1, false); }, - { - shortHelp: "Focus previous frame", - flags: vimperator.Mappings.flags.COUNT - } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["]]"], - function (count) { vimperator.buffer.followDocumentRelationship("next"); }, - { - shortHelp: "Follow a link labeled to 'next' or '>' if it exists", - flags: vimperator.Mappings.flags.COUNT - } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["[["], - function (count) { vimperator.buffer.followDocumentRelationship("previous"); }, - { - shortHelp: "Follow a link labeled to 'prev', 'previous' or '<' if it exists", - flags: vimperator.Mappings.flags.COUNT - } - )); addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["a"], function () { @@ -442,14 +414,6 @@ vimperator.Mappings = function () //{{{ function () { vimperator.open("~"); }, { shortHelp: "Open home directory" } )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gf"], - function () { vimperator.commands.viewsource(); }, - { shortHelp: "View source" } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gF"], - function () { vimperator.commands.viewsource(null, true); }, - { shortHelp: "View source with an external editor" } - )); addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gh"], function() { BrowserHome(); }, { shortHelp: "Go home" } @@ -463,24 +427,6 @@ vimperator.Mappings = function () //{{{ }, { shortHelp: "Go home in a new tab" } )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gi"], - function () - { - if (vimperator.buffer.lastInputField) - vimperator.buffer.lastInputField.focus(); - else - { - var first = vimperator.buffer.evaluateXPath( - "//*[@type='text'] | //textarea | //xhtml:textarea").snapshotItem(0); - - if (first) - first.focus(); - else - vimperator.beep(); - } - }, - { shortHelp: "Focus last used input field" } - )); addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["go"], function (arg) { vimperator.quickmarks.jumpTo(arg, vimperator.CURRENT_TAB); }, { @@ -500,15 +446,6 @@ vimperator.Mappings = function () //{{{ flags: vimperator.Mappings.flags.ARGUMENT } )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gP"], - function () - { - vimperator.open(readFromClipboard(), - /\bpaste\b/.test(vimperator.options["activate"]) ? - vimperator.NEW_BACKGROUND_TAB : vimperator.NEW_TAB); - }, - { shortHelp: "Open (put) a URL based on the current clipboard contents in a new buffer" } - )); addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["m"], function (arg) { @@ -525,13 +462,6 @@ vimperator.Mappings = function () //{{{ flags: vimperator.Mappings.flags.ARGUMENT } )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["'", "`"], - function (arg) { vimperator.marks.jumpTo(arg); }, - { - shortHelp: "Jump to the mark in the current buffer", - flags: vimperator.Mappings.flags.ARGUMENT - } - )); addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["M"], function (arg) { @@ -556,33 +486,12 @@ vimperator.Mappings = function () //{{{ function () { vimperator.commandline.open(":", "open " + vimperator.buffer.URL, vimperator.modes.EX); }, { shortHelp: "Open one or more URLs in the current tab, based on current location" } )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["p", ""], - function () { vimperator.open(readFromClipboard()); }, - { shortHelp: "Open (put) a URL based on the current clipboard contents in the current buffer" } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["P"], - function () - { - vimperator.open(readFromClipboard(), - /\bpaste\b/.test(vimperator.options["activate"]) ? - vimperator.NEW_TAB : vimperator.NEW_BACKGROUND_TAB); - }, - { shortHelp: "Open (put) a URL based on the current clipboard contents in a new buffer" } - )); addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], [""], function () { vimperator.commands.redraw(); }, { shortHelp: "Redraw the screen" } )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["r"], - function () { vimperator.tabs.reload(getBrowser().mCurrentTab, false); }, - { shortHelp: "Reload current page" } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["R"], - function () { vimperator.tabs.reload(getBrowser().mCurrentTab, true); }, - { shortHelp: "Reload while skipping the cache" } - )); addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["t"], function () { vimperator.commandline.open(":", "tabopen ", vimperator.modes.EX); }, { shortHelp: "Open one or more URLs in a new tab" } @@ -607,76 +516,6 @@ vimperator.Mappings = function () //{{{ { shortHelp: "Copy selected text" } )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["zi", "+"], - function (count) { vimperator.buffer.zoomIn(count > 1 ? count : 1, false); }, - { - shortHelp: "Enlarge text zoom of current web page", - flags: vimperator.Mappings.flags.COUNT - } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["zm"], - function (count) { vimperator.buffer.zoomIn((count > 1 ? count : 1) * 3, false); }, - { - shortHelp: "Enlarge text zoom of current web page by a larger amount", - flags: vimperator.Mappings.flags.COUNT - } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["zo", "-"], - function (count) { vimperator.buffer.zoomOut(count > 1 ? count : 1, false); }, - { - shortHelp: "Reduce text zoom of current web page", - flags: vimperator.Mappings.flags.COUNT - } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["zr"], - function (count) { vimperator.buffer.zoomOut((count > 1 ? count : 1) * 3, false); }, - { - shortHelp: "Reduce text zoom of current web page by a larger amount", - flags: vimperator.Mappings.flags.COUNT - } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["zz"], - function (count) { vimperator.buffer.textZoom = count > 1 ? count : 100; }, - { - shortHelp: "Set text zoom value of current web page", - flags: vimperator.Mappings.flags.COUNT - } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["zI"], - function (count) { vimperator.buffer.zoomIn(count > 1 ? count : 1, true); }, - { - shortHelp: "Enlarge full zoom of current web page", - flags: vimperator.Mappings.flags.COUNT - } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["zM"], - function (count) { vimperator.buffer.zoomIn((count > 1 ? count : 1) * 3, true); }, - { - shortHelp: "Enlarge full zoom of current web page by a larger amount", - flags: vimperator.Mappings.flags.COUNT - } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["zO"], - function (count) { vimperator.buffer.zoomOut(count > 1 ? count : 1, true); }, - { - shortHelp: "Reduce full zoom of current web page", - flags: vimperator.Mappings.flags.COUNT - } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["zR"], - function (count) { vimperator.buffer.zoomOut((count > 1 ? count : 1) * 3, true); }, - { - shortHelp: "Reduce full zoom of current web page by a larger amount", - flags: vimperator.Mappings.flags.COUNT - } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["zZ"], - function (count) { vimperator.buffer.fullZoom = count > 1 ? count : 100; }, - { - shortHelp: "Set full zoom value of current web page", - flags: vimperator.Mappings.flags.COUNT - } - )); addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["ZQ"], function () { vimperator.quit(false); }, @@ -723,87 +562,7 @@ vimperator.Mappings = function () //{{{ } )); - // scrolling commands - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["0", "^"], - function () { vimperator.buffer.scrollStart(); }, - { shortHelp: "Scroll to the absolute left of the document" } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["$"], - function () { vimperator.buffer.scrollEnd(); }, - { shortHelp: "Scroll to the absolute right of the document" } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gg", ""], - function (count) { vimperator.buffer.scrollToPercentile(count > 0 ? count : 0); }, - { - shortHelp: "Goto the top of the document", - flags: vimperator.Mappings.flags.COUNT - } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["G", ""], - function (count) { vimperator.buffer.scrollToPercentile(count >= 0 ? count : 100); }, - { - shortHelp: "Goto the end of the document", - flags: vimperator.Mappings.flags.COUNT - } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["h", ""], - function (count) { vimperator.buffer.scrollColumns(-(count > 1 ? count : 1)); }, - { - shortHelp: "Scroll document to the left", - flags: vimperator.Mappings.flags.COUNT - } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], [""], - function (count) { vimperator.buffer.scrollByScrollSize(count, 1); }, - { - shortHelp: "Scroll window downwards in the buffer", - flags: vimperator.Mappings.flags.COUNT - } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], [""], - function (count) { vimperator.buffer.scrollByScrollSize(count, -1); }, - { - shortHelp: "Scroll window upwards in the buffer", - flags: vimperator.Mappings.flags.COUNT - } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["l", ""], - function (count) { vimperator.buffer.scrollColumns(count > 1 ? count : 1); }, - { - shortHelp: "Scroll document to the right", - flags: vimperator.Mappings.flags.COUNT - } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["", "", ""], - function (count) { vimperator.buffer.scrollPages(-(count > 1 ? count : 1)); }, - { - shortHelp: "Scroll up a full page", - flags: vimperator.Mappings.flags.COUNT - } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["", "", ""], - function (count) { vimperator.buffer.scrollPages(count > 1 ? count : 1); }, - { - shortHelp: "Scroll down a full page", - flags: vimperator.Mappings.flags.COUNT - } - )); - - // page info - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], [""], - function (count) { vimperator.buffer.showPageInfo(false); }, - { - shortHelp: "Print the current file name", - flags: vimperator.Mappings.flags.COUNT - } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["g"], - function (count) { vimperator.buffer.showPageInfo(true); }, - { shortHelp: "Print file information" } - )); - - - // history manipulation and jumplist + // history manipulation and jumplist, move to bookmarks.js? addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], [""], function (count) { vimperator.history.stepTo(-(count > 1 ? count : 1)); }, { @@ -832,6 +591,7 @@ vimperator.Mappings = function () //{{{ flags: vimperator.Mappings.flags.COUNT } )); + // move to vimperator.js? addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gu"], function (count) { @@ -890,32 +650,8 @@ vimperator.Mappings = function () //{{{ { shortHelp: "Go to the root of the website" } )); - // hint managment - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["f"], - function () { vimperator.hints.show(vimperator.modes.QUICK_HINT); }, - { shortHelp: "Start QuickHint mode" } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["F"], - function () { vimperator.hints.show(vimperator.modes.QUICK_HINT, "t"); }, - { shortHelp: "Start QuickHint mode, but open link in a new tab" } - )); - addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], [";"], - function (arg) - { - if (arg == "f") - vimperator.hints.show(vimperator.modes.ALWAYS_HINT, "o"); - else if (arg == "F") - vimperator.hints.show(vimperator.modes.ALWAYS_HINT, "t"); - else - vimperator.hints.show(vimperator.modes.EXTENDED_HINT, arg); - }, - { - shortHelp: "Start an extended hint mode", - flags: vimperator.Mappings.flags.ARGUMENT - } - )); - // macros + // macros, move to events.js addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["q"], function (arg) { vimperator.events.startRecording(arg); }, { @@ -937,7 +673,7 @@ vimperator.Mappings = function () //{{{ )); // }}} - // CARET mode + // CARET mode, most commands should be moved to buffer.js i guess // {{{ function getSelectionController() @@ -1046,7 +782,7 @@ vimperator.Mappings = function () //{{{ // }}} - // VISUAL mode + // VISUAL mode, move to buffer.js // {{{ addDefaultMap(new vimperator.Map([vimperator.modes.VISUAL], ["j", ""], @@ -1272,7 +1008,7 @@ vimperator.Mappings = function () //{{{ )); // }}} - // TEXTAREA mode + // TEXTAREA mode, move to editor.js // {{{ addDefaultMap(new vimperator.Map([vimperator.modes.TEXTAREA], ["i", ""], @@ -1479,7 +1215,7 @@ vimperator.Mappings = function () //{{{ )); // }}} - // INSERT mode + // INSERT mode, move to editor.js // {{{ addDefaultMap(new vimperator.Map([vimperator.modes.INSERT, vimperator.modes.COMMAND_LINE], [""], @@ -1545,7 +1281,7 @@ vimperator.Mappings = function () //{{{ )); //}}} - // COMMAND_LINE mode + // COMMAND_LINE mode, move to ui.js //{{{ addDefaultMap(new vimperator.Map([vimperator.modes.COMMAND_LINE], [""], @@ -1556,6 +1292,8 @@ vimperator.Mappings = function () //{{{ function () { vimperator.editor.expandAbbreviation("c"); }, { } )); + + //}}} }}} return mappingManager;