From df30098287b97320b83adc64785b42753df2ab07 Mon Sep 17 00:00:00 2001 From: anekos Date: Wed, 5 May 2010 12:56:54 +0000 Subject: 未使用ヒントモードを表示するコマンド(ymode)を追加 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@37381 d0d07461-0603-4401-acd4-de1884942a52 --- yetmappings.js | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'yetmappings.js') diff --git a/yetmappings.js b/yetmappings.js index 4d68252..97c23a6 100644 --- a/yetmappings.js +++ b/yetmappings.js @@ -38,17 +38,19 @@ let PLUGIN_INFO = Yet Mappings Display the keys that are not mapped yet. まだマップされていないキーを表示する - 1.0.1 + 1.1.0 anekos new BSD License (Please read the source code comments of this plugin) 修正BSDライセンス (ソースコードのコメントを参照してください) http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/yetmappings.js - 2.0 - 2.1pre + 2.3 + 2.4 ] :ymap [] + :yethintmodes + :ymode == Links == http://d.hatena.ne.jp/nokturnalmortum/20081109/1226223461 ]]> @@ -59,6 +61,7 @@ let PLUGIN_INFO = const other = '! @ # $ % ^ & * ( ) _ + | ~ { } : " < > ? - = \\ ` [ ] ; \' , . /'.split(/\s/); const special = 'Esc Return Tab Del BS Home Insert End Left Right Up Down PageUp PageDown F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12'.split(/\s/).map(function (it) ("<" + it + ">")); const alpha = 'a b c d e f g h i j k l m n o p q r s t u v w x y z'.split(/\s/); + const number = '0 1 2 3 4 5 6 7 8 9'.split(/\s/); const keys = alpha.concat(alpha.map(String.toUpperCase)).concat(other).concat(special); function exists (modes, key) @@ -79,6 +82,19 @@ let PLUGIN_INFO = true ); + commands.addUserCommand( + ['yethintmodes', 'ymode'], + 'display the hint-modes that are not mapped yet.', + function (arg) { + const keys = alpha.concat(alpha.map(String.toUpperCase)).concat(other).concat(number); + liberator.echo(keys.filter(function (m) !hints._hintModes[m]).join(' ')); + }, + { + argCount: '0' + }, + true + ); + liberator.plugins.yet_mappgins = { get: getYetMappings }; -- cgit v1.2.3