summaryrefslogtreecommitdiff
path: root/common/content/mappings.js
diff options
context:
space:
mode:
Diffstat (limited to 'common/content/mappings.js')
-rw-r--r--common/content/mappings.js16
1 files changed, 6 insertions, 10 deletions
diff --git a/common/content/mappings.js b/common/content/mappings.js
index 040d552b..84d3be1e 100644
--- a/common/content/mappings.js
+++ b/common/content/mappings.js
@@ -174,7 +174,7 @@ const Mappings = Module("mappings", {
}
},
- _expandLeader: function (keyString) keyString.replace(/<Leader>/i, mappings.mapLeader),
+ _expandLeader: function (keyString) keyString.replace(/<Leader>/i, options["mapleader"]),
// Return all mappings present in all @modes
_mappingsIterator: function (modes, stack) {
@@ -289,15 +289,6 @@ const Mappings = Module("mappings", {
return matches;
},
- /*
- * @property {string} The map leader string used to replace the special
- * token "<Leader>" when user mappings are defined.
- */
- get mapLeader() dactyl.globalVariables["mapleader"] || "\\",
- /** @deprecated */
- getMapLeader: function () this.mapLeader,
-
-
/**
* Returns whether there is a user-defined mapping <b>cmd</b> for the
* specified <b>mode</b>.
@@ -589,6 +580,11 @@ const Mappings = Module("mappings", {
this._main[mode] = [];
this._user[mode] = [];
}
+ },
+ options: function () {
+ options.add(["mapleader", "ml"],
+ "Defines the replacement keys for the <Leader> pseudo-key",
+ "string", "\\");
}
});