Sublime Text 2 Stack Overflow Plugin

Since I was finding myself doing quite a lot of searches on Stack Overflow recently, I decided to write a real simple plugin for Sublime Text 2 that would allow me to do queries using the current word/selection or user input. It is available on GitHub and will be shortly available through Package Control.

The available commands are stackoverflow_search_selection and stackoverflow_search_from_input which are self-explanatory.

You can trigger them from the Command Palette:

Or through the Tools menu

This is definitely not the most complex plugin ever, but it does save me some time!

Hope this helps someone.

10 thoughts on “Sublime Text 2 Stack Overflow Plugin

  1. tavel says:

    Hi, i’ve installed Stack Overflow plugin and i see Tools->Stack Overflow menu. But menu items “Search Selection” and “Search from input” are disabled. Also when i select a text there is a disabled item “Stack overflow search” in context menu. Why are all of that options disabled?

  2. Eric says:

    Hi Tavel,
    Usually the disabled options will happen if the plugin doesn’t compile. Can you open the console (Ctrl+`) and tell me if there’s any error? Which version of Sublime Text 2 are you using? Did you install the plugin using the Package Control?

    Thanks

    Eric

  3. tavel says:

    Sublime Text 2 build 2181. Plugin was installed manually (copied to Installed Packages\ folder), cause i can’t understand how to install packages automatically – package manager just writes: “plugin installed successfully”, but nothing happens after that, no new files in “Installed Packages”, no packages in list. Maybe it needs git installed or what – i don’t have it on my box. This is console log after sublime startup: http://pastebin.com/EM4FFMpe
    Appreciate your help.

  4. Eric says:

    Hi Tavel,
    I’m unable to repro the issue and your log doesn’t say much… could it be possible that you’ve installed the plugin twice and that ST2 doesn’t like that? Usually Package Control installs in “Packages” so if you have the plugin there and in “Installed Packages”, that might be the reason…
    Hope this helps!

  5. vincent says:

    oh yes. heaven. love. it.

  6. Zeneke says:

    mmmm shortcut keys???

  7. Eric says:

    None of the plugins I make have default shortcut keys, to prevent clashes with other plugins you might be using. You will have to choose what you prefer and set it yourself 🙂

  8. […] Tortoise: 이거슨 진리!!! http://wbond.net/sublime_packages/tortoise 3. Bracket Highlighter: http://www.ericmartel.com/2012/01/12/sublime-text-2-stack-overflow-plugin/ 4. Stackoverflow […]

  9. MattDMo says:

    Hi Eric,
    I was wondering if you had any plans to update the plugin to use the StackExchange API, or if you’re just going to leave it the way it is. I’m teaching myself Python and the Sublime API, and I’ve forked your GitHub repo just as a learning tool, but if you don’t have any future plans for it I’d love to expand it a bit, maybe to search other StackExchange sites, and hopefully eventually to send notifications/Inbox items, do more complex searching, whatever can be done with the tools available. Send me an email – it’s on my GitHub page.

    Thanks!
    Matt

Leave a Reply

Your email address will not be published. Required fields are marked *