Skip to content

Virtual Gists is a Visual Studio Code extension that allows to open and edit a remote gist (e.g. on GitHub) without cloning, committing or pushing your changes. It all happens automatically. Not a clone :-)

License

Notifications You must be signed in to change notification settings

carlocardella/vscode-VirtualGists

Repository files navigation

Virtual Gists

preview

Visual Studio Marketplace Version Visual Studio Marketplace Installs Visual Studio Marketplace Downloads Visual Studio Marketplace Rating GitHub issues GitHub license Twitter

Download for VS Code

Virtual Gists is a Visual Studio Code extension that allows to open and edit a remote gist (e.g. on GitHub) without cloning, committing or pushing your changes. It all happens automatically.

The extension is still missing lots of features I want to add (as time permits) and you can expect bugs (but hopefully nothing destructive), anyway this is a preview extension and you can expect bugs here and there. Please report bugs or issues and ask for features you would like to see. Check Changelog for the latest status, what's planned and what has already been released.

Getting started

Install the extension from the VSCode Marketplace.

Gist management

Read, create and delete GitHub Gists from the familiar VSCode environment. You can also follow users, star gists, and use a "Notepad" (a special, private gist) to job down ideas and ephemeral notes that do not fit into their own gist.

show starred gists

Notepad

This is a special, private gist you can use as a temporary notepad, a place to store ephemeral notes you can quickly jot down and easily access from all your devices even if they do not quite fit into a regular gist.

My Gists

All your private and public gists, except Notepad, which has its own category. You can create, update, delete gists and files from the convenience of your familiar VSCode environment. Changes are automatically committed and sync'ed with GitHub.

Starred Gists

Your starred gists, grouped in one convenient TreeView node

Followed Users

Gists from the user you follow on GitHub, to stay up to date with their latest work

follow user

Opened Gists

Interesting gists you have opened but not starred yet.

openedgists

Create a new gist

You can create a private or public gist, just enter the gist name and the file name you want to use:

new private gist

Sync across devices

You can sync your open gists across multiple devices by enabling Settings Sync in Visual Studio Code.

Node: you may need to Refresh the Virtual Gists view to see the latest repos added or removed from another machine.

Changes are committed automatically after the file is saved. The commit message is VirtualGists: update file <filePath>.

Star/Unstar gists

There are lots of useful gists on GitHub and an easy way to keep track is to star them. With Virtual Gists you can add a gist under the Opened gists group, or you can star a gist directly using its gistId:

star gist from gistid

If the gist you want to star is already listed anywhere else in Virtual Gists (under Opened gists, or it belongs to one of your followed users) you can use the Star gist command from the context menu:

star gist from followed users

Copy Url/Open in browser

You may want to share a gist with someone or view the gist in GitHub; easy enough, just use the appropriate command from the context menu.

For a gist:

gist context menu

For a file:

file context menu

Download Gists and files

You can download one or more Gists or files to your local drive.

Note: Once downloaded, the files are no longer linked to GitHub so you must manually save/sync any changes you make offline.

save gist and file

Optionally use the gist owner's avatar as icon

It can be helpful to identify to which user an opened or starred gist belongs to as a glance. Oh the other hand, you may prefer a cleaner list where icons only show the item type without being too distracting. Use VirtualGists.UseGistOwnerAvatar to toggle the behavior to your liking:

virtualGits_use_owner_avatar

Show decorations for Gist groups

You can show the number of Gists and Followed Users enabling VirtualGists.ShowDecorations (default: false).

Note: Depending on the number of Gists or Followed Users, this may have a significant performance impact (increase the load time) due to the additional calls to GitHub needed to get the number of Gists in each group and for each user

Tracing

The extension uses the built-in Output Channel to enable local tracing to a channel called "Virtual Gists". This data is local only, it does not leave your machine.

image

You can control the tracing level or disable, for all Output Channels or for specific extensions, using the built-in command Developer: Set Log Level...:

image

Log Levels

  • Off = 0
    • No messages are logged with this level.
  • Trace = 1
    • All messages are logged with this level.
  • Debug = 2
    • Messages with debug and higher log level are logged with this level.
  • Info = 3
    • Messages with info and higher log level are logged with this level.
  • Warning = 4
    • Messages with warning and higher log level are logged with this level.
  • Error = 5
    • Only error messages are logged with this level.

GitHub authentication scopes

The extension uses the following GitHub authentication scopes

  • user: needed to authenticate to GitHub and to read user's properties
  • gist: needed to create and update gists

My other extensions

  • Virtual Repos: Virtual Repos is a Visual Studio Code extension that allows to open and edit a remote repository (e.g. on GitHub) without cloning, committing or pushing your changes. It all happens automatically
  • Virtual Git: VSCode extension path with my extensions to work with virtual repositories and gists based on a virtual file system
  • Text Toolbox: Collection of tools for text manipulation, filtering, sorting etc...
  • File System Toolbox: VSCode extension to work with the file system, path auto-complete on any file type
  • Changelog Manager: VSCode extension, helps to build a changelog for your project, either in markdown or plain text files. The changelog format follows Keep a changelog
  • Hogwarts colors for Visual Studio Code: Visual Studio theme colors inspired by Harry Potter, Hogwarts and Hogwarts Houses colors and banners

Acknowledgements

Virtual Gists is freely inspired by these fine extensions:

About

Virtual Gists is a Visual Studio Code extension that allows to open and edit a remote gist (e.g. on GitHub) without cloning, committing or pushing your changes. It all happens automatically. Not a clone :-)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published