diff options
author | janus_wel | 2011-03-23 22:41:32 +0900 |
---|---|---|
committer | janus_wel | 2011-03-23 22:41:32 +0900 |
commit | a8e23402b1fcf0dc623acea63f6a8a84736388e4 (patch) | |
tree | fdc2a63d53157d40be5136dac46aaba2fa3553f1 | |
parent | 3e33cdb759bca93e9750cfb20d290bdcbc1eda52 (diff) | |
parent | 163b04336aed764216d4a8231b1cb11af04a1e49 (diff) | |
download | vimperator-plugins-a8e23402b1fcf0dc623acea63f6a8a84736388e4.tar.bz2 |
Merge branch 'master' of github.com:vimpr/vimperator-plugins
-rw-r--r-- | ime_controller.js | 73 | ||||
-rw-r--r-- | migemo_hint.js | 7 |
2 files changed, 3 insertions, 77 deletions
diff --git a/ime_controller.js b/ime_controller.js deleted file mode 100644 index 96a1f86..0000000 --- a/ime_controller.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * ==VimperatorPlugin== - * @name IME Controller Lite - * @description control imput method at into commandline-mode - * @description-ja コマンドラインモード移行時にIMEの制御を行う - * @author teramako teramako@gmail.com - * @namespace http://d.hatena.ne.jp/teramako/ - * @maxVersion 0.6pre - * @minVersion 0.6pre - * ==/VimperatorPlugin== - * - * Please set g:ex_ime_mode and g:textarea_ime_mode value. - * - * g:ex_ime_mode: - * used at into EX mode - * - * g:textarea_ime_mode: - * used at into TEXTAREA mode from INSERT mode and "noinsertmode" is set. - * - * ex). - * :let g:ex_ime_mode = "inactive" - * :let g:textarea_ime_mode = "inactive" - * - * following values are available: - * "auto" : No change - * "active" : Initially IME on - * "inactive" : Initially IME off - * "disabled" : Disable IME - * - * more details: see http://developer.mozilla.org/en/docs/CSS:ime-mode - * - * if these values are null, "inactive" is used - * - */ - -liberator.plugins.imeController = (function(){ - var inputElement = document.getAnonymousElementByAttribute( - document.getElementById('liberator-commandline-command'),'anonid','input' - ); - function getMode(name){ - return liberator.globalVariables[name] ? liberator.globalVariables[name] : 'inactive'; - } - function preExec(target,name,func){ - var original = target[name]; - target[name] = function(){ - func.apply(this,arguments); - return original.apply(target,arguments); - } - } - preExec(commandline,'open',function(){ - liberator.plugins.imeController.set(inputElement, getMode('ex_ime_mode')); - }); - preExec(events,'onEscape',function(){ - if (liberator.mode == modes.INSERT && (modes.extended & modes.TEXTAREA) && !options.insertmode){ - var inputField = buffer.lastInputField; - if (liberator.plugins.imeController.set(inputField, getMode('textarea_ime_mode'))){ - inputField.blur(); - setTimeout(function(){inputField.focus();},0); - } - } - }); - return { - set: function(elem, mode){ - if (elem && mode) return elem.style.imeMode = mode; - return false; - }, - reset: function(){ - delete liberator.globalVariables.ex_ime_mode; - delete liberator.globalVariables.textarea_ime_mode; - } - }; -})(); -// vim: sw=4 ts=4 et: diff --git a/migemo_hint.js b/migemo_hint.js index 1fbe291..a3278a8 100644 --- a/migemo_hint.js +++ b/migemo_hint.js @@ -1,13 +1,12 @@ // Vimperator plugin: 'Hint Matching with XUL/Migemo'
-// Last Change: 05-Feb-2009.
+// Last Change: 23-Mar-2011.
// License: Creative Commons
// Maintainer: Trapezoid <trapezoid.g@gmail.com> - http://unsigned.g.hatena.ne.jp/Trapezoid
// Require: XUL/Migemo add-on - https://addons.mozilla.org/firefox/addon/5239
//
// extended hint matching with migemo for Vimperator
-//
-// Usage:
-// :set hintmatching = custom
+
+options.get('hintmatching').set('custom');
liberator.plugins.customHintMatcher = function(inputString){
var XMigemoCore, XMigemoTextUtils;
try{
|