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

Gist

by condemil ST2/ST3

Sublime Text plugin for creating new Gists from selected text

Details

  • 2015.11.15.20.01.15
  • github.​com
  • github.​com
  • 2 years ago
  • 28 minutes ago
  • 5 years ago

Installs

  • Total 99K
  • Win 47K
  • OS X 37K
  • Linux 15K
May 29 May 28 May 27 May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14
Windows 42 70 54 60 64 58 71 72 56 52 55 65 67 70 64 49 53 59 53 61 51 64 49 48 51 65 71 53 66 63 52 61 70 72 77 71 60 76 59 74 69 64 67 52 62 60
OS X 6 6 6 10 11 12 14 16 13 9 10 9 10 13 8 7 7 10 7 10 6 6 7 9 10 8 9 10 11 9 12 2 10 4 15 16 9 5 9 10 8 6 9 10 10 8
Linux 2 1 15 5 12 7 12 11 6 8 7 12 11 11 10 2 3 4 5 12 10 16 4 9 13 14 6 9 12 7 3 8 8 9 11 12 11 11 8 10 12 13 13 14 11 8

Readme

Source
raw.​githubusercontent.​com

Gist Build Status

A Sublime Text 2/3 plugin for creating and editing Gists.

Installation

Package Control

Install Package Control. Gist will show up in the package list. This is the recommended installation method.

Manual installation

Go to the “Packages” directory (Preferences / Browse Packages…). Then clone this repository:

git clone git://github.com/condemil/Gist

Generating Access Token

As of 2013-05-16, you can generate API Access Tokens via the Web UI or via the GitHub API. All other authorization methods is deprecated.

Web

  • Account Settings -> Applications
  • “Generate new token” under “Personal access tokens”
  • For “Token description” you should give it a meaningful name, Example: sublime gist
  • Under “Select scopes” you can just select gist

Paste the token in the settings section under the token option.

API

Here's a command you can run from your terminal to generate a token via curl:

curl -v -u USERNAME -X POST https://api.github.com/authorizations --data "{\"scopes\":[\"gist\"], \"note\": \"SublimeText 2/3 Gist plugin\"}"

Where USERNAME is your Github username. Save the token generated and paste it in the settings section under the token option.

Options

Edit the settings file (it should open automatically the first time you use a Gist command) to specify either token.

  • "token": ""

    You must enter your GitHub token here

  • "https_proxy": http://user:pass@proxy:port

    You can enter https proxy here Format: “http://user:pass@proxy:port”

  • "enterprise": false

    Set this to true if you want to use a enterprise version of github instead of github.com

  • "url": ""

    Set the url of the enterprise version of github you want to use. Leave this blank if the enterprise option is set to false.

  • "max_gists": 100

    Set the maximum number of Gists that can will fetched by the plugin. It can't be higher than 100, because of GitHub API limitations.

  • "gist_prefix": ""

    Limit the Gists displayed in the Open Gist list by prefix. Leave blank to display all Gists. Example: "gist_prefix": "Snippet:" will only list Gists with names starting with the text Snippet:.

  • "save-update-hook": true

    Set the on-save behaviour of a loaded Gist. True implies that when the Gist is saved, it'll update the online Gist. False implies that it'll bring up a save dialog for the Gist to be saved to disk.

Usage

All functionality of the plugin is available in the Tools / Gist menu and in the command pallette.

Creating Gists

Use the Gist / Create Public Gist or Gist / Create Private Gist commands. If you don't have anything selected, a Gist will be created with contents of current file, URL of that Gist will be copied to the clipboard and then the file will switch to Gist editing mode. If you have selected some text, a Gist will be created using only that text and then immediately opened for editing. In case of multiple selections, you'll get one Gist with multiple files.

Editing existing Gists

Use the Gist / Open Gist command to see a list of your Gists. Selecting one will open the files from that Gist in new tabs. You can then edit the files normally and save to update the Gist, or use other commands to change Gist description, remove or rename files, or delete the Gist.

Adding new files to existing Gists

Use the Gist / Add File To Gist command to see a list of your Gists. Selecting one will add contents of current file as a new file to that Gist and switch the file to Gist editing mode.

Default key bindings:

Create Public Gist

  • Windows and Linux: Ctrl+K Ctrl+I
  • OS X: Super+K Super+I

Create Private Gist

  • Windows and Linux: Ctrl+K Ctrl+P
  • OS X: Super+K Super+P

Update File

  • Windows and Linux: Ctrl+K Ctrl+S
  • OS X: Super+K Super+S

Open Gist

  • Windows and Linux: Ctrl+K Ctrl+O
  • OS X: Super+K Super+O

Insert Gist

  • Windows and Linux: Ctrl+K Ctrl+[
  • OS X: Super+K Super+[

Add File

  • Windows and Linux: Ctrl+K Ctrl+]
  • OS X: Super+K Super+]

Information

Source: https://github.com/condemil/Gist

Authors: Dmitry Budaev, Alexey Ermakov