From 74dee0cb64979acfb087c074fc8f5f57ce3e450c Mon Sep 17 00:00:00 2001 From: anekos Date: Thu, 18 Dec 2008 10:30:25 +0000 Subject: whitespace fixes. document fixes. git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@27010 d0d07461-0603-4401-acd4-de1884942a52 --- localkeymode.js | 83 ++++++++++++++++++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 37 deletions(-) (limited to 'localkeymode.js') diff --git a/localkeymode.js b/localkeymode.js index 6bf20e3..1b664d2 100644 --- a/localkeymode.js +++ b/localkeymode.js @@ -8,39 +8,48 @@ var PLUGIN_INFO = 2.0pre 2.0pre || + let g:localkeymode_enable = "true" + javascript <?', {noremap:true}], + ['q', 'd', {noremap:true}], + ], + ]; + EOM + ||< -.vimperatorrrc 設定例: -let g:localkeymode_enable = "true" -javascript <?', {noremap:true}], - ['q', 'd', {noremap:true}], - ], -]; -EOM - -Url_RegExp : 設定を有効にしたいURL(正規表現での指定) -key : 割り当てたいキー名(Arrayで複数指定可能) -command/function : キーに割り当てたいコマンド/メソッド。 - コマンドは ':hoge' のように先頭に':'を付加してください。 -extra : noremap, count 等の指定。addUserMap にて使用されます。 + Url_RegExp: + 設定を有効にしたいURL(正規表現での指定) + key: + 割り当てたいキー名(Arrayで複数指定可能) + command/function: + キーに割り当てたいコマンド/メソッド。 + コマンドは ':hoge' のように先頭に':'を付加してください。 + extra: + noremap, count 等の指定。addUserMap にて使用されます。 ]]> ; @@ -67,7 +76,7 @@ liberator.plugins.LocalKeyMode = (function() { var _enableTabs = []; var _names; - + var feedKeys = liberator.modules ? liberator.modules.events.feedkeys : liberator.events.feedkeys; // utility function @@ -77,9 +86,9 @@ liberator.plugins.LocalKeyMode = (function() { {flags:org.flags, rhs:org.rhs, noremap:org.noremap } ); } - + var Class = function() function() {this.initialize.apply(this, arguments);}; - + var LocalKeyMode = new Class(); LocalKeyMode.prototype = { // 初期化メソッド @@ -91,7 +100,7 @@ liberator.plugins.LocalKeyMode = (function() { this.completeNames; // 補完用 this.tabinfo = []; // タブごとの状態保持用 this.helpstring = ''; - + var global = liberator.globalVariables; this.panel = this.setupStatusBar(); this.isEnable = global.localkeymode_enable != undefined ? @@ -152,7 +161,7 @@ liberator.plugins.LocalKeyMode = (function() { var keymaps = []; var delkeys = []; if (!(uri instanceof RegExp) ) uri = new RegExp(uri.replace(/(?=[^-0-9A-Za-z_@])/g, '\\')); - + items.forEach( function( [key, command, extra] ){ if (!key) return; else if (!command) delkeys = delkeys.concat( key.split(' ')); @@ -243,7 +252,7 @@ liberator.plugins.LocalKeyMode = (function() { return; } } - + for (let i=0, l=settings.length; i