Changeset 37381

Show
Ignore:
Timestamp:
05/05/10 21:56:54 (3 years ago)
Author:
anekos
Message:

未使用ヒントモードを表示するコマンド(ymode)を追加

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/vimperator-plugins/trunk/yetmappings.js

    r33038 r37381  
    3939  <description>Display the keys that are not mapped yet.</description> 
    4040  <description lang="ja">まだマップされていないキーを表示する</description> 
    41   <version>1.0.1</version> 
     41  <version>1.1.0</version> 
    4242  <author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author> 
    4343  <license>new BSD License (Please read the source code comments of this plugin)</license> 
    4444  <license lang="ja">修正BSDライセンス (ソースコードのコメントを参照してください)</license> 
    4545  <updateURL>http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/yetmappings.js</updateURL> 
    46   <minVersion>2.0</minVersion> 
    47   <maxVersion>2.1pre</maxVersion> 
     46  <minVersion>2.3</minVersion> 
     47  <maxVersion>2.4</maxVersion> 
    4848  <detail><![CDATA[ 
    4949    == Usage == 
    5050       :yetmap[pings] [<KEYS>] 
    5151       :ymap [<KEYS>] 
     52       :yethintmodes 
     53       :ymode 
    5254    == Links == 
    5355      http://d.hatena.ne.jp/nokturnalmortum/20081109/1226223461 
     
    6062  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 + ">")); 
    6163  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/); 
     64  const number = '0 1 2 3 4 5 6 7 8 9'.split(/\s/); 
    6265  const keys = alpha.concat(alpha.map(String.toUpperCase)).concat(other).concat(special); 
    6366 
     
    8083  ); 
    8184 
     85  commands.addUserCommand( 
     86    ['yethintmodes', 'ymode'], 
     87    'display the hint-modes that are not mapped yet.', 
     88    function (arg) { 
     89      const keys = alpha.concat(alpha.map(String.toUpperCase)).concat(other).concat(number); 
     90      liberator.echo(keys.filter(function (m) !hints._hintModes[m]).join(' ')); 
     91    }, 
     92    { 
     93      argCount: '0' 
     94    }, 
     95    true 
     96  ); 
     97 
    8298  liberator.plugins.yet_mappgins = { 
    8399    get: getYetMappings