Giter Site home page Giter Site logo

vscode-gist's Introduction

vscode-gist

Extension for Visual Studio Code to create, open and modify gists. They can be anonymous, private or public and can be created from a selection or full file.

screencast

Installation

Press F1 and narrow down the list commands by typing extension. Pick Extensions: Install Extension. Select the Gist Extension extension from the list

Manual Install

Mac & Linux

cd $HOME/.vscode/extensions

Windows

cd %USERPROFILE%\.vscode\extensions

All Platforms

git clone https://github.com/dbankier/vscode-gist.git
cd vscode-gist
npm install

Github Authentication

The plugin supports both username/password and token based authentication.

To generate a token use the following command:

Curl

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

Powershell

$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("USERNAME:PASSWORD")))
Invoke-RestMethod -Uri "https://api.github.com/authorizations" -method post -ContentType "application/json" -Body "{""scopes"" : ""gist"",""note"":""VSCode-Gist-Extension""}" -Headers @{"Authorization"="Basic $base64AuthInfo"}

Take the token value and set the following in your User Settings:

"gist.oauth_token": "YOUR_TOKEN"

If value is not set, you will prompted for your password.

Usage

Create Gists

Press F1 and enter one fo the following:

Gist: create new PRIVATE gist
Gist: create new ANONYMOUS gist
Gist: create new PUBLIC gist

You will be prompted a gist description.

Open/Edit Gists

Press F1 and enter one fo the following:

Gist: open a PERSONAL gist
Gist: open a STARRED gist

All files associated with the gist will be opened in splits.

Once you have opened a personal gist saving it will commit a new revision. You can also use the following commands:

Gist: delete current gist
Gist: remove file from current gist
Gist: add file to current gist
Gist: change the current gist's description
Gist: open the current gist in a browser

Keybord Shortcut

None at this stage - but you can define your own.

The following are the commands that you can assign shortcuts to:

extension.privateGist
extension.publicGist
extension.anonymousGist
extension.openGist
extension.openStarredGist
extension.deleteCurrentGist
extension.removeFileFromGist
extension.addNewFileToGist
extension.changeGistDescription
extension.openGistInBrowser

Future

To Do (maybe):

  • View commits?
  • Open gist revision?

License

MIT © David Bankier @dbankier @davidbankier

vscode-gist's People

Contributors

dbankier avatar hoetz avatar

Watchers

 avatar  avatar

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.