Created
January 14, 2015 12:03
-
-
Save pomeh/1bd051af0dea5e8af93b to your computer and use it in GitHub Desktop.
Sublime Text 3 config example for sublime_findDoc package
This file contains 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
Show hidden characters
// see Sublime Text package findDoc at https://github.com/zckrs/sublime_findDoc | |
[ | |
// multiple shortcuts => multiple website | |
// aka: search on Google | |
{ | |
"keys": ["ctrl+k", "ctrl+g"], | |
"command": "find_doc_selection", | |
"args" : {"url" : "https://google.fr/#q=%s" } | |
}, | |
// aka: search on Mozilla Developer Network | |
{ | |
"keys": ["ctrl+k", "ctrl+m"], | |
"command": "find_doc_selection", | |
"args" : {"url" : "https://developer.mozilla.org/fr/search?q=%s" } | |
}, | |
// aka: search on devdocs.io | |
{ | |
"keys": ["ctrl+k", "ctrl+k"], | |
"command": "find_doc_selection", | |
"args" : {"url" : "http://devdocs.io/#q=%s" } | |
}, | |
// reuse the same keys shortcut, but got to a different URL based on curret context | |
// aka: search on usejsdoc.io only if: | |
// - we are in a JavaScript block comment | |
// - the current line is like the following: | |
// * ' * @param xxx' | |
// * ' * @returns xxx' | |
// * ' * @typedef xxx' | |
// * ... | |
{ | |
"keys": ["ctrl+k", "ctrl+k"], | |
"command": "find_doc_selection", | |
"args" : {"url" : "http://usejsdoc.org/tags-%s.html" }, | |
"context": [ | |
{ | |
"key": "selector", | |
"operator": "equal", | |
"operand": "comment.block.documentation.js", | |
"match_all": true | |
}, | |
{ | |
"key": "preceding_text", | |
"operator": "regex_contains", | |
"operand": "\\s+\\*\\s@\\w*$", | |
"match_all": true | |
} | |
] | |
} | |
// be creative ! | |
// why not open http://nodejs.org/api/ when editing a node.js file ? | |
// or going to http://www.css3.info/ when editing a CSS3 property ?! | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment