summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorr2dev2 <ronak.badhe@gmail.com>2021-08-27 22:18:21 -0700
committerr2dev2 <ronak.badhe@gmail.com>2021-08-27 22:18:21 -0700
commit85b4f01916fe40ad62828ba454fac713c54af6b6 (patch)
tree66d676fdc119e02669cfdddcec0783b7c0dcff4e
parentd97e99d92aac82a2373fec7ea71979f868711dc3 (diff)
move multiMaps to vim object
-rw-r--r--docs-vim.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/docs-vim.js b/docs-vim.js
index 0d9338d..39077c0 100644
--- a/docs-vim.js
+++ b/docs-vim.js
@@ -5,15 +5,15 @@ vim = {
"keys": {
"move": "dhtn", // QWERTY: hjkl
"escapeSequence": "hn", // QWERTY: jk or jl
+ },
+ "multiMaps" : {
+ "b": [["ArrowLeft", true]], // ctrl + <-
+ "e": [["ArrowRight", true]], // ctrl + ->
+ // w is same behavior as eeb
+ "w": [["ArrowRight", true], ["ArrowRight", true], ["ArrowLeft", true]]
}
};
-var multiMaps = {
- "b": [["ArrowLeft", true]],
- "e": [["ArrowRight", true]],
- "w": [["ArrowRight", true], ["ArrowRight", true], ["ArrowLeft", true]]
-};
-
vim.addKeyMappings = function (baseMap) {
baseMap[vim.keys.move[0]] = "ArrowLeft";
baseMap[vim.keys.move[1]] = "ArrowDown";
@@ -78,7 +78,7 @@ vim.normal_keydown = function (e) {
e.key = keyMap[e.key];
}
- multiMaps[e.key]?.forEach(([key, ...args]) => {
+ vim.multiMaps[e.key]?.forEach(([key, ...args]) => {
docs.pressKey(docs.codeFromKey(key), ...args)
});
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback