diff options
author | anekos | 2010-03-01 12:22:44 +0000 |
---|---|---|
committer | anekos | 2010-03-01 12:22:44 +0000 |
commit | 17cda9c2706908926fd97e3b46b4f9f09d120d83 (patch) | |
tree | f288da155fa0f0ff9772a691083010a40f1160ff /feedSomeKeys_3.js | |
parent | 6b811091a30311171ec9d117730347be4c862ab3 (diff) | |
download | vimperator-plugins-17cda9c2706908926fd97e3b46b4f9f09d120d83.tar.bz2 |
ほんのり見やすくした気分になるようにしてみた感じを受けないでもないよう趣を醸し出している感じの変更なんだろうか
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@36884 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'feedSomeKeys_3.js')
-rwxr-xr-x | feedSomeKeys_3.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/feedSomeKeys_3.js b/feedSomeKeys_3.js index 7281ac8..bb08a7b 100755 --- a/feedSomeKeys_3.js +++ b/feedSomeKeys_3.js @@ -196,10 +196,8 @@ let INFO = 'fmap fmaps'.split(/\s+/).forEach(function (cmd) { let multi = cmd === 'fmaps'; - commands.addUserCommand( - [cmd], - 'Feed map a key sequence', - function (args) { + function action (multi) { + return function (args) { function add ([lhs, rhs]) { rhs = rhs || lhs; mappings.addUserMap( @@ -240,7 +238,13 @@ let INFO = let [, lhs, rhs] = args.literalArg.match(/^(\S+)\s+(.*)$/); add([lhs, rhs]); } - }, + }; + } + + commands.addUserCommand( + [cmd], + 'Feed map a key sequence', + action(multi), { literal: 0, options: [ |