This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // vim:set fdm=marker et sw=4 ts=4: | |
| var INFO = //{{{ | |
| <plugin name="treeStyleTab" version="0.0.2" | |
| href="http://github.com/caisui/vimperator/blob/master/plugin/treeStyleTab.js" | |
| summary="Tree Stye Tab" | |
| xmlns="http://vimperator.org/namespaces/liberator"> | |
| <author href="http://d.hatena.ne.jp/caisui">caisui</author> | |
| <license href="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license> | |
| <project name="Vimperator" minVersion="2.0"/> | |
| <item> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| commands.addUserCommand ["hel[lo]"], "Coffee Script Command Sample", | |
| ([name])->liberator.echo "Hello #{name}", | |
| { | |
| argCount: "1", | |
| completer: (context, args)-> | |
| context.completions = [ | |
| ["CoffeeScript", "Description1"] | |
| ["Vimperator", "Description2"] | |
| ["ECMAScript", "Description3"] | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " plugin load 後実行 | |
| " Enter 後、:source 時は、遅延無しで実行 | |
| " here doc の ネスト 可能 | |
| :js <<END | |
| { | |
| let one= function (f1) liberator.registerObserver("enter", function f2() {f1(); liberator.unregisterObserver("enter", f2);}); | |
| let c = commands.addUserCommand(["lazy"], "lazy", function (args, extra) { | |
| function f() { | |
| io.source({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # mapping の 当て方 | |
| :js mappings.addUserMap([modes.COMMAND_LINE], ["<C-g>"], "toggle completions list", function () plugins.toggleFloatBox.toggleBox()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function a(...a) { | |
| return a; | |
| } | |
| console.log(a(1,2,3)); | |
| //[1, 2, 3] | |
| function b({a: [b,...c]}, ...d) { | |
| return [c, d]; | |
| } | |
| console.log(b({a:[1,2,3,4]},5,6,7,8,9)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var a = { | |
| __noSuchMethod__: function () {c++;} | |
| }; | |
| var e = []; | |
| var c = 0; | |
| for (var i = 0; i < 100; i++) { | |
| try { | |
| a.b(); | |
| } catch (ex) { | |
| e.push([i, ex.message]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from types import FunctionType | |
| def percol_specialkey_replace(fn): | |
| def decofn(self, key): | |
| if len(key) > 2 and key[0] == "<" and key[-1] == ">": | |
| key = key[1:-1] | |
| return fn(self, key) | |
| return decofn | |
| class ChainMap(object): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (!services.services.pref) { | |
| [ | |
| ["appStartup", "startup"], | |
| ["browserSearch", "search"], | |
| ["directory", "dirsvc"], | |
| ["observer", "obs"], | |
| ["pref", "prefs"], | |
| ["subscriptLoader", "scriptloader"], | |
| ["windowMediator", "wm"], | |
| ["windowWatcher", "ww"], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| content inspector-ext chrome/content/ | |
| override chrome://inspector/content/viewers/eventListeners/eventListeners.js chrome://inspector-ext/content/eventListeners.js | |
| override chrome://inspector/content/viewers/eventListeners/eventListeners.xul chrome://inspector-ext/content/eventListeners.xul | |
| override chrome://inspector/content/res/viewer-registry.rdf chrome://inspector-ext/content/viewer-registry.rdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| commands.addUserCommand(["realsize"], "may be real size", function (args) { | |
| var width, height; | |
| if (args.length === 1) | |
| width = height = args[0]; | |
| else { | |
| width = args[0]; | |
| height = args[1]; | |
| } | |
| if (args["-r"]) | |
| [width, height] = [height, width]; |