kenhowardpdx/vscode-gist

Repository files navigation

Marketplace VersionBuild Status

InstallsCoverage Status

Access your Gists within Visual Studio Code. You can add, edit, and delete public and private gists.

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

NOTE: You must provide a personal access token to be authenticated with or a Enterprise instance.

Press F1 and type select profile to initialize the profile selector. You can add as many profiles as you would like.

vscode-gist-profiles

If you are using a Enterprise account, be sure to add the appropriate API url. This extension uses the REST v3 API by . Your GHE API url should look similar to this: http(s)://[hostname]/api/v3 (documentation)

You must have a file open and active to create a gist.

Press F1 and enter the following:

GIST: Create New Gist

You will be prompted a gist description.

Press F1 and enter one fo the following:

GIST: Open Gist
GIST: Open Favorite Gist

All files associated with the gist will be opened in group layout.

Once you have opened an owned* gist, saving it will commit a new revision.

* an owned gist is one created by you, not a favorited (starred) gist.

You can also use the following commands:

GIST: Delete Gist
GIST: Delete File
GIST: Add File
GIST: Open Gist In Browser
GIST: Insert Text From Gist File
GIST: Insert Text From Favorite Gist File

Mostly you will not need to change these settings.

SettingTypeDefault ValuePurpose
maxFilesNumber10The maximum number of files to open without a prompt.
defaultPrivateBooleanfalseDefaults all newly created Gists to PRIVATE.
profileOptionsObject{}Override profile configuration options.

profileOptions gives you some debugging capabilities. You can provide a profile name along with key, url, and rejectUnauthorized values. Before you can use profileOptions you *MUST* have the profile created.

interface ProfileOptions {
    key?: string; // the personal access token to use
    url?: string; // the REST endpoint to use
    rejectUnauthorized?: boolean; // set this to false if you are having ssl issues with your enterprise REST endpoint
}

An example value for profileOptions would be something like this:

{
    "GHE": { // "GHE" MUST correspond with the name used when originally configuring the profile
        "rejectUnauthorized": false
    }
}

Here is a list of commands and their mapped keyboard shortcuts

CommandCommand Pallet LabelKeyboard MappingNotes
extension.gist.openOpen Gistctrl+alt+o
extension.gist.openFavoriteOpen Favorite Gistnot mapped
extension.gist.createCreate New Gistnot mapped
extension.gist.openInBrowserOpen Gist In Browserctrl+alt+b
extension.gist.deleteDelete Gistnot mapped
extension.gist.deleteFileDelete Filenot mapped
extension.gist.addAdd Filectrl+alt+a ctrl+alt+a
extension.gist.insertInsert Text From Gist Filenot mapped
extension.gist.insertFavoriteInsert Text From Favorite Gist Filenot mapped
extension.profile.selectSelect Profilectrl+alt+=
extension.resetStaten/actrl+shift+0Delete All Extension Memory (removes auth tokens)

If you'd like to support Gist, please consider the following β€” feel free to choose more than one. πŸ˜‰

vscode-gist is maintained by Ken Howard.

About

vscode extension for quick gists

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 7