ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Stack Overflow Snippets

by rinas7 ST2/ST3

Search Stack Overflow and get code snippets from answers directly to your Sublime Text

Details

Installs

  • Total 2K
  • Win 1K
  • OS X 466
  • Linux 435
Dec 6 Dec 5 Dec 4 Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22
Windows 0 1 0 2 1 0 0 1 0 1 1 0 1 0 0 1 0 1 0 1 2 1 1 0 0 1 2 1 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 1 2
OS X 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Stack Overflow Snippets

One day I came across this reddit post: How to Program (in four easy steps).

That four steps didn't look easy enough, so I created this:

Demo

How to Use It?

Shift + Ctrl + H

or Tools > Stack Overflow Snippets

or Command Palette > Stack Overflow Snippets.

Tips & Tricks

  • Programming language is automatically determined by the file syntax, so you don't need to add it to each query.

Can't Find a Snippet?

In some cases Google can find better results (you know, artificial intelligence and everything), so you may want to try the old school approach in case the plugin didn't return any results.

What's That Quota Thing?

The plugin uses Stack Exchange API which is limited to 300 queries per day per IP.

Typically one snippet search makes two API queries: one to get questions that match the search query and another to get answers for the selected question.

The plugin caches API responses, so if you search for the same query or select the same question multiple times no additional requests are made.

The remaining quota is displayed in the status bar after each request is sent to the API.