Coder Social home page Coder Social logo

sourcegraph-sublime's Introduction

Sourcegraph for Sublime Text 3 Package Control

The Sourcegraph plugin for Sublime Text 3 enables you to quickly open and search code on Sourcegraph.com easily and efficiently.

Installation

  1. Install Package Control, if you haven't already.
  2. Open the command palette Cmd+Shift+P (Ctrl+Shift+P on Windows/Linux).
  3. Search for Package Control: Install Package and press enter.
  4. Search for Sourcegraph and press enter to install the plugin.

Usage

In the command palette (Cmd+Shift+P or Ctrl+Shift+P), search for Sourcegraph: to see available actions.

Keyboard Shortcuts:

Description Mac Linux / Windows
Open file in Sourcegraph Option+A Alt+A
Search selection in Sourcegraph Option+S Alt+S

Settings

Open the user package settings (Sublime Text -> Package Settings -> Sourcegraph -> Settings - User), then modify this example configuration:

{
	// The Sourcegraph instance to use. Specify your on-premises Sourcegraph
	// instance here, if applicable.
	"SOURCEGRAPH_URL": "https://sourcegraph.com",
}

Questions & Feedback

Please file an issue: https://github.com/sourcegraph/sourcegraph-sublime/issues/new

Logs

Logs show up in the Sublime console, which is accessible via Ctrl+`

Uninstallation

  1. Open the command palette Cmd+Shift+P (Ctrl+Shift+P on Windows/Linux).
  2. Search for Package Control: Remove Package and press enter.
  3. Search for sourcegraph and press enter to uninstall the plugin.

Development

To develop the plugin:

  • git clone the repository into ~/Library/Application Support/Sublime Text 3/Packages/sourcegraph-sublime
  • Open the console with Ctrl+`
  • Make changes to the Python code and watch as Sublime reloads.
  • To release a new version, you MUST update the following files:
    1. messages.json (add a new version entry)
    2. README.md (describe ALL changes)
    3. messages/welcome.txt (copy from README.md change above)
    4. sourcegraph.py (VERSION constant)

Version History

  • v1.0.7 - Correctly open the default browser on Mac OS.

  • v1.0.6 - Fixed search shortcut.

    • Updated the search URL to reflect a recent Sourcegraph.com change.
  • v1.0.5 - Minor fixes to configuration.

    • Fix opening README, LICENSE, etc through "Package Settings" menu.
    • Update README to describe how to use with on-premises Sourcegraph instances.
  • v1.0.4 - Improved support for on-premises Sourcegraph instances

    • Now using the sourcegraph.com/-/editor endpoint.
  • v1.0.3 - Added usage metrics

    • Added minimal and non-obtrusive usage metrics, which lets us at Sourcegraph better improve our editor extensions.
  • v1.0.2 - Usability improvements

    • Adjusted the global search URL to the correct one, so that the search shortcut will work.
    • Added support for non-default git branches (brings you to the checked out branch on Sourcegraph.com)
    • Changed the keyboard shortcuts to Option+S (search selection) and Option+A (open selection) (Alt instead of Option for Windows and Linux).
  • v1.0.1 - Minor bug fixes

    • Fixed a bug where https etc. GitHub repo remote URLs would incorrectly build the Sourcegraph.com URL.
    • Windows: Fixed a bug where git commands would create Command Prompt pop-up windows.
  • v1.0.0 - Initial Release; basic Open File & Search functionality.

sourcegraph-sublime's People

Contributors

slimsag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sourcegraph-sublime's Issues

Incorrect private URL

Hi!

I modified the config to use a custom SOURCEGRAPH_URL URL, however when I try to Sourcegraph: Open it adds an extra path part (the git domain name) to the URL that shouldn't be there.

ie:

https://MY_SOURCEGRAPH_URL/git.domain.tld/company/repo@branch/path/to/file

instead of:

https://MY_SOURCEGRAPH_URL/company/repo@branch/path/to/file

iow, the git.domain.tld portion should not be there

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.