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

  • 2017.07.24.19.55.28
  • github.​com
  • github.​com
  • 2 days ago
  • 35 minutes ago
  • 6 years ago

Installs

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

Readme

Source
raw.​githubusercontent.​com

Gist

Build Status Coverage Status Package Control

A Sublime Text 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 -> Personal access tokens
  • “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.

If OTP is enabled on your account, this will return 401 error code, use:

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

Where OTPCODE is the code your authenticator app shows you.

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”

  • "api_url": ""

    Set the url of the enterprise version of github you want to use. Defaults to github.com

  • "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