Vimperator 2.1 を使っています。
C-a, C-x 等をデフォルトでないコマンドに割り当てています。
デフォルトのコマンド
increment the last number in the URL
は別のキーに割り当てたいのですが、コマンド名はどう指定すれば良いのでしょうか?
コマンドとしては存在しません。
mapのみの存在です。
バージョン2.1を使っていないので:command コマンドがあったか覚えがないですが、
:command incr -description "incremental" :js mappings.getDefault(1,"<C-a>").execute(null,1,null) :command decr -description "decremental" :js mappings.getDefault(1,"<C-x>").execute(null,1,null)
でincr, decrコマンドが作成されるかと思います。
無理な場合
commands.addUserCommand(["incr"], "incremental last number in URL", function(){ mappings.getDefault(1,"<C-a>").execute(null,1,null); },{}); commands.addUserCommand(["decr"], "decremental last number in URL", function(){ mappings.getDefault(1,"<C-x>").execute(null,1,null); },{});
ここまで書いて思ったのですが、もしかして、コマンドを作りたいのではなく単に別のキーバインドにしたい、ということでしょうか。
それであれば
:noremap ,a <C-a> :noremap ,x <C-x>
",a", ",x"は割り当てたいキーバインド文字列にしてください。