For the best coding experience consider using a plugin insert code snippets directly from our site into your own code in your editor.
If you are eager to use snippets from the site directly in your workspace consider rolling your own plugin.
The sublime text plugin is available on github. With it, you can search and insert snippets from the website directly in sublime with just a few key strides.
Chances are a plugin for your favorite editor is not yet available. Please consider creating one yourself. Have a look at the API to see what data is available for you to use. And take a peek at the Sublime text plugin for inspiration.
No matter the language or editor, all plugins will likely follow the same execution path. The general way to search for a snippet and insert it is as follows:
- Prompt user for search query
- Request resource '/concept/search/?q="[query]"'
- * User picks concept
- Request resource '/concept/[id]' to find methods available for concept.
- Request multiple resources in single query '/method/set/[id1];[id2];[id3]/'
- * User picks method
- Request resource '/method/[id]'.
- * User picks snippet.
- Insert snippet at cursor. Optionally allow changing the parameters to fit the users specific needs.