get userHives() this.allHives.filter(function (h) h !== this.builtin, this),
- expandLeader: function expandLeader(keyString) keyString.replace(/<Leader>/i, function () options["mapleader"]),
+ expandLeader: deprecated("your brain", function expandLeader(keyString) keyString),
prefixes: Class.Memoize(function () {
let list = Array.map("CASM", function (s) s + "-");
}),
expand: function expand(keys) {
- keys = keys.replace(/<leader>/i, options["mapleader"]);
-
if (!/<\*-/.test(keys))
var res = keys;
else
args["-builtin"] = true;
if (!rhs) // list the mapping
- mappings.list(mapmodes, mappings.expandLeader(lhs), hives);
+ mappings.list(mapmodes, lhs, hives);
else {
util.assert(args["-group"].modifiable,
_("map.builtinImmutable"));
commands.add([ch + "no[remap]"],
"Map a key sequence without remapping keys" + modeDescription,
function (args) { map(args, true); },
- update({}, opts));
+ update({ deprecated: ":" + ch + "map -builtin" }, opts));
commands.add([ch + "unm[ap]"],
"Remove a mapping" + modeDescription,
function (context, obj, args) [[m.names, m.description] for (m in this.iterate(args[0]))]
]);
},
- options: function initOptions(dactyl, modules, window) {
- options.add(["mapleader", "ml"],
- "Define the replacement keys for the <Leader> pseudo-key",
- "string", "\\", {
- setter: function (value) {
- if (this.hasChanged)
- for (let hive in values(mappings.allHives))
- for (let stack in values(hive.stacks))
- delete stack.states;
- return value;
- }
- });
+ mappings: function initMappings(dactyl, modules, window) {
+ mappings.add([modes.COMMAND],
+ ["\\"], "Emits <Leader> pseudo-key",
+ function () { events.feedkeys("<Leader>") });
}
});