var PLUGIN_INFO =
{NAME}
History search backward like UNIX shell.
UNIX シェルのような、C-rで履歴検索を行うプラグイン
2.0
2.0
http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/history-search-backward.js
Yuichi Tateno
MIT
0.1
||
liberator.globalVariables.history_search_backward_map = [''];
||<
]]>
;
(function() {
let p = function(msg) {
Application.console.log(''+msg);
}
const FAKE_TAB_EVENT = {
type: 'keypress',
liberatorString: '',
preventDefault: function() true,
stopPropagation: function() true,
};
mappings.addUserMap([modes.COMMAND_LINE], liberator.globalVariables.history_search_backward_map || [''], 'History search backward.',
function()
{
let command = commandline.command || '';
commandline.input(options.get('wildoptions').has('auto') ? 'bck-i-search: ' : 'bck-search: ', function(str) {
try {
liberator.echo(liberator.execute(str));
} catch(e) {};
this.close();
return;
}, {
completer: function(context) {
context.title = ['CommandLine History', 'INDEX'];
context.completions = [[key, i] for ([i, key] in storage['history-command'])].filter(function([key, i]) key).reverse();
},
onChange: function() {
// this.onEvent(FAKE_TAB_EVENT);
},
default: command,
});
});
})();