diff options
Diffstat (limited to 'yetmappings.js')
-rw-r--r-- | yetmappings.js | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/yetmappings.js b/yetmappings.js index 41722bc..71ad7dd 100644 --- a/yetmappings.js +++ b/yetmappings.js @@ -25,20 +25,14 @@ function exists (modes, key) (mappings.getCandidates(modes, key).length || mappings.get(modes, key)); - function getYetMappings (pre) { - let result = []; - keys.forEach(function (key) { - if (!exists([modes.NORMAL], pre + key)) - result.push(key); - }); - return result; - } + function getYetMappings (pre) + keys.filter(function (key) (!exists([modes.NORMAL], pre + key))); commands.addUserCommand( ['yetmap[pings]', 'ymap'], 'display the keys that are not mapped yet.', function (arg) { - liberator.echo(getYetMappings(arg.string || '').join(' '), commandline.FORCE_MULTILINE); + liberator.echo(getYetMappings(arg.string || '').join(' ')); }, { argCount: '*' |