{lhs} to {rhs}.{lhs} given, list that particual abbreviation.:ab[reviate], but for Command-line mode only."
+ }
+ ));
+ addDefaultCommand(new vimperator.Command(["ia[bbrev]"],
+ function(args)
+ {
+ if (!args)
+ {
+ vimperator.editor.listAbbreviations("i", "");
+ return;
+ }
+
+ var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/)
+ var [lhs, rhs] = [matches[1], matches[2]];
+ if (rhs)
+ vimperator.editor.addAbbreviation("i", lhs, rhs);
+ else
+ vimperator.editor.listAbbreviations("i", lhs);
+ },
+ {
+ usage: ["ia[bbrev] {lhs} {rhs}", "ia[bbrev] {lhs}", "ia[bbrev]"],
+ short_help: "Abbreviate a key sequence for Insert mode",
+ help: "Same as :ab[breviate], but for Insert mode only."
+ }
+ ));
+ addDefaultCommand(new vimperator.Command(["una[bbreviate]"],
+ function(args) { vimperator.editor.removeAbbreviation("!", args); },
+ {
+ usage: ["una[bbreviate] {lhs}"],
+ short_help: "Remove an abbreviation"
+ }
+ ));
+ addDefaultCommand(new vimperator.Command(["cuna[bbrev]"],
+ function(args) { vimperator.editor.removeAbbreviation("c", args); },
+ {
+ usage: ["cuna[bbrev] {lhs}"],
+ short_help: "Remove an abbreviation for Command-line mode",
+ help: "Same as :una[bbreviate], but for Command-line mode only."
+ }
+ ));
+ addDefaultCommand(new vimperator.Command(["iuna[bbrev]"],
+ function(args) { vimperator.editor.removeAbbreviation("i", args); },
+ {
+ usage: ["iuna[bbrev] {lhs}"],
+ short_help: "Remove an abbreviation for Insert mode",
+ help: "Same as :una[bbreviate], but for Insert mode only."
+ }
+ ));
+ addDefaultCommand(new vimperator.Command(["ab[clear]"],
+ function(args) { vimperator.editor.removeAllAbbreviations("!"); },
+ { short_help: "Remove all abbreviations" }
+ ));
+ addDefaultCommand(new vimperator.Command(["cab[clear]"],
+ function(args) { vimperator.editor.removeAllAbbreviations("c"); },
+ { short_help: "Remove all abbreviations for Command-line mode" }
+ ));
+ addDefaultCommand(new vimperator.Command(["iab[clear]"],
+ function(args) { vimperator.editor.removeAllAbbreviations("i"); },
+ { short_help: "Remove all abbreviations for Insert mode" }
+ ));
addDefaultCommand(new vimperator.Command(["map"],
// 0 args -> list all maps
// 1 arg -> list the maps starting with args
diff --git a/content/editor.js b/content/editor.js
index 555c56c7..175973e7 100644
--- a/content/editor.js
+++ b/content/editor.js
@@ -1,17 +1,29 @@
/***** BEGIN LICENSE BLOCK ***** {{{
- *
- * Mozilla Public License Notice
- *
- * The contents of this file are subject to the Mozilla Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License
- * at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- * the License for the specific language governing rights and
- * limitations under the License.
- *
+Version: MPL 1.1/GPL 2.0/LGPL 2.1
+
+The contents of this file are subject to the Mozilla Public License Version
+1.1 (the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+http://www.mozilla.org/MPL/
+
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the
+License.
+
+(c) 2006-2007: Martin Stubenschrott | " + abbrev[item][1] + " | "; + list += "" + vimperator.util.escapeHTML(item) + " | "; + list += "" + vimperator.util.escapeHTML(abbrev[item][0]) + " | "; + list += "