aboutsummaryrefslogtreecommitdiffstats
path: root/win-mouse.js
diff options
context:
space:
mode:
authoranekos2011-03-28 16:44:39 +0900
committeranekos2011-03-28 17:17:48 +0900
commitd5fb1bde5d8a3835b0d8c16d2d533e67451426ef (patch)
treea5f4e0d626b35897ee1e8bf64d426150cede58cc /win-mouse.js
parente218b1c97b02b7d09ac7625ab079ea13ccc084aa (diff)
downloadvimperator-plugins-d5fb1bde5d8a3835b0d8c16d2d533e67451426ef.tar.bz2
全モードにマッピングするように
Diffstat (limited to 'win-mouse.js')
-rw-r--r--win-mouse.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/win-mouse.js b/win-mouse.js
index 096359e..b6b19cd 100644
--- a/win-mouse.js
+++ b/win-mouse.js
@@ -183,6 +183,10 @@ let INFO =
// }}}
// Define mappings {{{
+ ALL_MODE = [];
+ for (let i = 1; i <= modes.PROMPT; i *= 2)
+ ALL_MODE.push(i);
+
const D = function (v, p) (v * (p > 0 ? p : 10));
[
[['<A-h>'], 'left', -1, 0],
@@ -191,7 +195,7 @@ let INFO =
[['<A-j>'], 'down', 0, 1],
].forEach(function ([keys, name, dx, dy]) {
mappings.addUserMap(
- [modes.NORMAL],
+ ALL_MODE,
keys,
'Move cursor to' + name,
function (count) API.move(D(dx, count), D(dy, count), true),