Git Product home page Git Product logo

lostintangent / gistpad Goto Github PK

View Code? Open in Web Editor NEW
916.0 11.0 57.0 9.04 MB

VS Code extension for managing and sharing code snippets, notes and interactive samples using GitHub Gists

Home Page: https://aka.ms/gistpad

License: MIT License

TypeScript 98.26% JavaScript 0.91% Shell 0.22% AppleScript 0.34% PowerShell 0.28%
collaboration vscode vscode-extension gist github notebook github-gists markdown

gistpad's Introduction

GistPad 📘

GistPad is a Visual Studio Code extension that allows you to edit GitHub Gists and repositories from the comfort of your favorite editor. You can open, create, delete, fork and star gists and repositories, and then seamlessly begin editing files as if they were local, without ever cloning, pushing or pulling anything. It's like your very own developer library for building and referencing code snippets, commonly used config/scripts, programming-related notes, knowledge bases and interactive samples.

Table of Contents

Getting Started

  1. Install this extension from the marketplace, then run Developer: Reload Window.

  2. Open the GistPad tab (look for the notebook icon in the activity bar). From there, you can open a gist or GitHub repo by ID/URL, or sign in with a GitHub account in order to manage your gists and repositories. To sign-in, simply click the Sign In button and follow the provided flow in order to authenticate with your GitHub account.

You can create and edit gists, repositories, wikis and runnable code samples. Have fun, and let us know how we can make your knowledge-management experience even more awesome! 🙌

Gist Management

In order to create a new gist, simply open the Gists tree in the GistPad tab, and click the + icon in the toolbar. Specify the description and files to seed it with (including support for directories!). Additionally, you can create gists from local files or snippets by right-clicking them in the Explorer tree, or by right-clicking an editor window/tab and selecting Copy File to Gist, Add Selection to Gist, or Paste Gist File Contents (details).

Alternatively, you can run the GistPad: New Gist and GistPad: New Secret Gist commands.

From here, you can edit gists by expanding the gist and clicking on the desired file. You can open, rename, delete, etc. gists by right-clicking them in the tree and selecting the desired command.

Sorting and Grouping

By default, the Gists tree sorts gist by their update time, which allows you to focus on your most recently used gists. If you'd like to sort your gists alphabetically, click the Sort toggle button on the Gists tree's toolbar.

By default, your gists are displayed as a flat list. If you'd like to group them by type, you can click the group toggle button on the Gists tree's toolbar.

Gist Types

When grouping is enabled, gists are grouped into the following built-in types:

  • note - Gists that are composed of nothing but .txt, .md/.markdown or .adoc files
  • notebook - Gists that are compose of nothing by Jupyter Notebook files (.ipynb)
  • code-swing - Gists that include either a codeswing.json file and/or an index.html file. Read more about swings here.
  • code-swing-template - Swings whose codeswing.json file sets the template property to true. Read more about swing templates here.
  • code-swing-tutorial - Swings whose codeswing.json file specifies a tutorial property. Read more about tutorials here.
  • code-tour - Gists that include a main.tour file, and were created by exporting a CodeTour.
  • diagram - Gists that include a .drawio file.
  • flash-code - Gists that include a .deck file.
  • code-snippet - Gists that don't match any of the above more-specific types.

If you want to group gists by your own custom types, add a tag to the end of the gist's description in the format #tag or #tag-name. Then, when you enable grouping, your gists will be grouped by both the aforementioned types, as well as by your custom tags. You can identify tag groups by the # icon.

Files and Directories

When you create a gist with the New Gist or New Secret Gist commands, you can specify a comma-separated list of file names to seed the gist with. Furthermore, you can add / to your filenames to add them to a sub-directory within the gist.

For example, if you create a new gist, and specify reminders.txt,todos/personal.txt,todos/work.txt, the gist will include a reminders.txt file at the root of the gist, and files called personal.txt and reminders.txt in a directory called todos.

You can add new files to a gist or directory from the Explorer at any time by right-clicking them and selecting Add New File(s) or Upload File(s). You can also rename/delete directories as well, by right-clicking them in the tree and selecting the appropriate command. If you'd like to move a file from one directory to another, simply right-click the file, select Rename File and edit the directory name that it's in. It's that simple!

Gist Commenting

Gist comments are exposed within the editor at the bottom of open gist files. If a gist includes multiple files, then the comment thread will be displayed at the bottom of them all (duplicated and synchronized).

If you're not authenticated, you can view existing comments, but you can't reply to them. If you are authenticated, you can add/reply, as well as edit/delete your own comments. In order to control the behavior of how gist comment threads are displayed, refer to the GistPad > Comments: Show Thread config setting.

Pasting Images

In order to make it easy to author Markdown and HTML/Pug files that include image assets, you can copy images into your clipboard (e.g. taking a screenshot, clicking Copy Image in your browser, etc.) and then paste it directly into a gist file by right-clicking the editor and selecting Paste Image, or with ctrl + shift + v (Windows/Linux), or cmd + shift + v (macOS).

paste-image

By default, when you paste an image into a gist file, it's uploaded as a .png to the gist, and the appropriate reference is added to it from the document (e.g. inserting an <img />). However, this behavior can be changed by using the GistPad > Images: Paste Format and/or GistPad > Images: Paste Type settings. Refer to the config settings section below for more details.

By default, when you paste an image, it is uploaded to a directory called images within the gist. However, if you'd like to change this (e.g. to assets instead), you can set the GistPad > Images: Directory Name setting.

Following Users

GitHub Gists already allows you to star other user's gists, and when you do that, those will appear in the Gists tree, underneath a Starred Gists node. However, if you want to follow a GitHub user, and easily browse all of their current and future gists (without having to star each one!), you can run the GistPad: Follow User command and specify their GitHub user name. Once you've done that, you'll see a new node in the Gists tree which displays all of their public gists, and allows you to open/fork/clone/star them just like any other gist.

Exporting to Repositories

At some point, your code/notes might outgrow the feature set offered by Gists (e.g. when you want to start collaborating on the content with other developers). In that event, you can simply right-click the gist, and select the Export to Repository command in order to create a new GitHub repository, that contains the content of your gist. The created repo will be public or private, depending on the public/private state of the exported gist.

Scratch Notes

To make it easy to capture ephemeral/fleeting notes as you learn new things throughout the day, GistPad allows you to create "scratch notes" by clicking the New scratch note... command under the Scratch Notes node in the Gists tree (or running the GistPad: New Scratch Note command). A scratch note is simply a text document named be default for the time it was created.

By default, scratch notes are Markdown documents, but you can customize that behavior (e.g. to create text/AsciiDoc/etc. files) by customizing the GistPad > Scratch Notes: File Extension setting. Furthermore, scratch notes are created per day, but you can customize this by setting the GistPad > Scratch Notes: Directory Format and GistPad > Scratch Notes: File Format settings.

In order to help differentiate scratch notes from Notes in the Your Gists node, scratch notes appear as children of a top-level Scratch Notes node in the Gists tree. This makes it easy to view your outstanding scratch notes, so you can periodically audit them and migrate meaningful content to a more appropriate location (e.g. a new or existing gist).

You can create as many scratch notes as you need, and when you're done with them, you can delete individual notes and/or clear all of your notes by right-clicking the Scratch Notes node in the tree and selecting Clear Scratch Notes.

Behind the scenes, scratch notes are simply files that are managed within a "special" secret gist on your behalf. This way, you can focus entirely on the ephemeral nature of the notes, and not worry about creating/deleting gists.

Showcase

To see what can be done with gists and code swings, and to keep up with the cool stuff that folks in the community are building, check out the Showcase view in the GistPad tab. This is a list of categories intended to highlight different use-cases for gists, along with examples. Simply click the Open button for any gist in order to explore it, or expand the gist to see its file contents. If you have a gist that you think is worth showcasing, please open an issue and let us know about it. We'll keep the showcase updated periodically to highlight new and interesting things, so stay tuned!

Repositories

GistPad also allows you to create and edit GitHub repos without needing to clone anything locally. To get started, run the GistPad: Open Repository command, and specify/select the name of the repo you'd like to start managing. If you want to create a new repo, then select the Create new repo or Create new private repo options, then specify the name of the repo.

After running this command, you'll see a new Repositories tree in the GistPad tab, which displays the selected repo(s). From here, you can add/upload/edit/delete/rename files, and behind the scenes, your edits will be translated into commits on the respective repo. GistPad will automatically keep your data in sync with GitHub, so you never have to think about pushing or pulling. You can just focus on editing 🚀

Note: Once you're managing at least one repository, you can create/manage new repositories by clicking the + icon in the toolbar of the Repositories tree.

Directories

In order to create new directories, simply add a new file and include the directory names in the specified file's path (e.g. foo/bar/baz.md). GistPad will then create any necessary directories as part of the file-creation process. Furthermore, if you want to move a file from one directory to another, simply right-click the file in the Repositories tree, select Rename File, and then specify the new directory name in the filepath.

Repo Templates

In addition to creating a new repo "from scratch", you can also create a repository from a a template. To do this, simply run the GistPad: Open Repository command and select the Create new repo from template or Create new private repo from template options. You'll be presented with some "well-known" repo templates to select from, but you can also specify the name of an arbitrary repo template as well.

Branches

By default, when you create/manage a repository, GistPad will assume you're interested in editing the master branch. However, when managing a repo, you can specify a different branch by appending #<branch> to the specified repo name (e.g. vsls-contrib/gistpad#featureA). When you're managing a non-master branch, the repo node in the Repositories tree will display the branch name.

If at any time, you want to switch branches, simply right-click the repo node in the Repositories tree and select Switch Branch. This will let you pick one of the repo's remote branches, as well as create a new branch. When you're done with a branch, simply right-click the repo and select either Delete Branch or Merge Branch. The later will perform a "squash merge" against master. Using branches allows you to "batch" change sets together, and then apply them in a single/semantic commit.

Pasting Images

Just like gists, you can copy images into your clipboard (e.g. taking a screenshot, clicking Copy Image in your browser, etc.) and then paste them directly into a markdown file by right-clicking the editor and selecting Paste Image, or using one of the following keyboard shortcuts: ctrl+shift+v (Windows/Linux),cmd+shift+v (macOS).

By default, when you paste an image into a repo file, it's uploaded as a .png to the repo, and the appropriate reference is added to it from the document (e.g. a [title](url) link). However, this behavior can be changed by using the GistPad > Images: Paste Format and/or GistPad > Images: Paste Type settings. Refer to the config settings section below for more details. Furthermore, when you paste an image, it is uploaded to a directory called images within the gist. However, if you'd like to change this (e.g. to assets instead), you can set the GistPad > Images: Directory Name setting.

Wikis

By default, when you create/manage a GitHub repository, GistPad will let you edit it like a remotely accessible "file system". However, if you'd like to use the repo as a Roam/Obsidian-like wiki, that's composed of bi-directionally linked markdown pages, then you can indicate that the repo is a wiki in one of the following ways:

  1. Including wiki in the repo's name (e.g. lostintangent/gistpad-wiki)
  2. Adding a gistpad.json or .vscode/gistpad.json file to the repo itself

Note: For interoperability with Foam, GistPad will also identify a repo as a wiki if it includes a .vscode/foam.json file.

Pages

Wikis are composed of "pages", which are markdown files that are identified using their # Heading, not their underlying file name. As a result, when you add a new page to a wiki, you simply give it a title/heading (e.g. Todo List), as opposed to a file path. Behind the scenes, GistPad will create a new markdown file and pre-populate file name and # Heading using the specified title.

Additionally, to make it really simple to add a new wiki page, you can either run the GistPad: Add Wiki Page command, or click the notebook icon in your status bar.

Note: While wikis add a "pages" abstraction layer on top of repos, they are still repos behind the scenes. As a result, if you like to add an arbitrary file or directory to your wiki, you can right-click it's node in the tree and select Add New File.

Daily Pages

In addition to being able to create topic-oriented pages, GistPad allows you to open your "today page" at any time, which makes it easy to keep track of your daily progress and/or journal. To open your current daily page (that represents today), simply click on the calendar icon to the right of the repo node in the Repositories tree. This will open a new page, that is titled based on the current date (e.g. June 24, 2020), and placed in a directory named Daily. If this page doesn't exist, GistPad will create it, otherwise, it will open the existing one.

Additionally, to make it really simple to open your "today page", you can either run the GistPad: Open Today Page command, or click the calendar icon in your status bar.

If you'd like to change the name of the directory that daily pages are stored in, you can set the GistPad > Wikis > Daily: Directory Name setting. Furthermore, if you want to change the format that is used to title daily pages, you can set the GistPad > Wikis > Daily: Title Format setting.

Links

In order to create connections between pages, you can add [[links]] to a page. When you type [[, GistPad will display a completion list of the name of all existing pages. Furthermore, you can type a new topic/page title, and GistPad will automatically create that page for you.

When a page includes [[links]], they will be syntax highlighted, and you can hover over them to quickly see the context of the referenced page. Furthermore, you can cmd+click the link in order to directly jump to that page. If the page doesn't already exit, then cmd+clicking it will automatically create the page before opening it. This workflow makes it easy to author and navigate the set of pages within your wiki.

Backlinks

When you add [[links]] to a page, the referenced page automatically detects the "back link", and displays it as a child node of the page in the Repositories tree. This allows you to navigate [[links]] bi-directionallly, and allows your wiki to form a "network" of information. Each back link displays a line preview of the reference, and when clicked will automatically navigate you to the page location that references the selected page.

Furthermore, when you open a page that contains backlinks, the set of backlinks will be displayed at the bottom of the page, including a line preview of the backlink. This makes it possible to have pages that don't actually include content themselves, but rather, are simply "topic aggregators" to view the connections between pages in the same wiki.

Embedding Files

In addition to adding links to pages, it's sometimes valuable to embed the contents of another page directly into a note, so that you can easily read them together. To do this, you can use the ![[link]] syntax, where you'll recieve auto-completion support just like regular links. When you use an embed link, the target page's contents will be displayed within the note whenever you view it's markdown preview.

CodeSwing

If you're building web applications, and want to create a quick playground environment in order to experiment with HTML, CSS or JavaScript (or Sass/SCSS, Less, Pug and TypeScript), you can install the CodeSwing extension, in order to have a CodePen-like web experience, integrated into VS Code. GistPad provides an integration with CodeSwing, and so once it's installed, you can right-click the Your Gists node in the GistPad tree and select New CodeSwing or New Secret CodeSwing. This will create a new gist, seeded with the selected template fiels, and then provide you with a live preview Webview, so that you can iterate on the code and visually see how it behaves.

When you create a new swing, you'll be asked to select a template, which is simply a way to get started quickly, using the libraries and languages you intend to use (e.g. React.js, Vue.js). Since the swing is backed by a Gist, your changes are saved and shareable with your friends. Additionally, as you find other swings that you'd like to use, simply fork them and create your own swings. That way, you can use Gists as "templates" for swing environments, and collaborate on them with others just like you would any other gist. When you're done with a swing, simply close the preview window and all other documents will be automatically closed. If you no longer need the swing, then delete it just like any other gist 👍

Contributed Commands (File Explorer)

In addition to the Gists view, GistPad also contributes an Copy File to Gist command to the context menu of the Explorer file tree, which allows you to easily add local files to a new or existing Gist.

Contributed Commands (Editor)

In addition to the Explorer file tree commands, GistPad also contributes the following commands to the editor's context menu:

  • Add Selection to Gist - Allows you to add a snippet/selection of code to a Gist, instead of the entire document

  • Paste Gist File - Allows you to paste the contents of a Gist file into the active editor

  • Paste Image - Allows you to paste an image from your clipboard into a markdown, HTML or Pug file. The command will automatically upload the image and then add a reference to it.

The Copy File to Gist command is also available on the editor tab's context menu.

Contributed Commands (Editor Title Bar)

In addition to the commands added to the editor context menu, GistPad also contributes the following commands to the editor's title bar menu (click the ... in the upper right section of an editor window):

  • Rename File - Allows you to rename the current file.

Contributed Commands (Command Palette)

In addition to the Gists view, this extension also provides the following commands:

  • GistPad: Delete Gist - Allows you to delete one of your Gists. If you have a gist workspace open, it will delete that and then close the folder

  • GistPad: Follow User - Follow another GitHub user, which allows you to browser/access/fork their Gists from within the Gists view.

  • GistPad: Fork Gist - Forks the currently opened Gist, and then opens it as a virtual workspace.

  • GistPad: Open Gist - Displays your list of Gists (if you're signed in), and then opens the files for the selected one. You can also specify a gist by URL, username/id, or ID, which doesn't require being signed in.

  • GistPad: Open Gist as Workspace - Same behavior as the GistPad: Open Gist command, but will open the selected gist as a workspace, instead of "loose files".

  • GistPad: New Gist - Creates a new public Gist, and then opens its associated files. If you'd like to seed the gist with multiple files, you can specify a comma-separated list of names (e.g. foo.txt,bar.js).

  • GistPad: New Scratch Note - Creates a new "scratch note", which is a file whose name is derived from the GistPad > Scratch Notes: Extension and Gist > Scratch Notes: Format settings.

  • GistPad: New Secret Gist - Same behavior as the GistPad: New Gist (Public) command, except that it creates a secret Gist.

  • GistPad: New CodeSwing - Creates a new CodeSwing.

  • GistPad: Refresh Gists - Refreshes the gist data and reloads the Gists tree.

  • GistPad: Sign In - Sign-in with a GitHub account, in order to view/edit/delete your Gists.

  • GistPad: Starred Gists - Lists your starred Gists, and then opens the files for the selected one.

  • GistPad: Paste Gist File - Allows you to paste the contents of a gist file into the active editor

Configuration Settings

  • Gistpad: Tree Icons - Specifies whether to show the gist type icons in the gists tree.

  • GistPad > Comments: Show Thread - Specifies when to show the comment thread UI whenever you open a gist file. Can be set to one of the following values:

    • always: Always display the comment thread whenever you open a gist file. You can manually collapse it as needed.
    • never: Never automatically open the comment thread when you open a gist file. You can manually expand it as needed.
    • whenNotEmpty (default): Automatically display the comment thread whenever there are actually comments in a gist file. Otherwise, leave it collapsed.
  • Gistpad > Images: Paste Format: Specifies the markup format to use when pasting an image into a gist file. Can be set to one of the following values:

    • markdown (default): Pastes the image reference using Markdown format (e.g. ![image](link)).
    • html: Pastes the image reference using HTML format (e.g. <img src="link" />). Note, when you paste an image into an HTML file, it will always use this format type, regardless what the setting is.
  • Gistpad > Images: Paste Type: Specifies the method to use when pasting an image into a gist file. Can be set to one of the following values:

    • file (default): The pasted image is uploaded as a .png to the gist, and a reference is added to file it's pasted into.
    • base64: The pasted image is base64-encoded and then embedded into the gist file.
  • Gistpad > Images: Upload Directory Name: Specifies the name of the directory to upload images to. Defaults to images.

  • GistPad > Scratch Notes: Directory Format - Specifies the moment.js format string to use when generating directories for new scratch notes. Defaults to LL (e.g. March 6, 2020).

  • GistPad > Scratch Notes: File Extension - Specifies the file extension to use when generating new scratch notes. Defaults to .md.

  • GistPad > Scratch Notes: File Format - Specifies the moment.js format string to use when generating new scratch notes. Defaults to LT (e.g. 2:52 PM).

  • GistPad > Scratch Notes: Show - Specifies whether or not to display the scratch notes node in the gists tree view. Defaults to true.

  • GistPad > Showcase URL - Specifies the URL to use when displaying the showcase entry. This allows teams/classrooms/etc. to create their own showcase and share it amongst themselves.

  • GistPad > Tracing > Enable Output Channel - When enabled, creates an Output trace channel at VSCode startup.

gistpad's People

Contributors

aaronsteers avatar arjunattam avatar barik avatar berkays avatar birros avatar carlocardella avatar cmelaro avatar ctf0 avatar daephx avatar gracegtaylor avatar gsmile avatar guykh avatar hughlilly avatar hungdoansy avatar kidbrax avatar legomushroom avatar lostintangent avatar lumaxis avatar mburleigh avatar pomdtr avatar randomfractals avatar sandy081 avatar shfarazi avatar srivatsn avatar thiagobraga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gistpad's Issues

Wish: Improve README on the installation part

Couldn't find the gistfs (nor gist-fs) extension on the marketplace on the following version, please elaborate how this extension can be installed. When searching for just "gist" a few options come up, but judging by the extension authors, neither of them is this extension.

Version: 1.40.1
Commit: 8795a9889db74563ddd43eb0a897a2384129a619
Date: 2019-11-13T16:49:30.162Z
Electron: 6.1.2
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Linux x64 4.19.69-06666-g6c4f8cbba24e

Add a “Open in environment” command

Behind the scenes, a Gist is simply a GitHub repo, and therefore, we could enable “upgrading” from an editable Gist, to a fully compute-backed environment in VSO. This would allow running, debugging, etc. the code in the Gist, which might be valuable for quickly experimenting with some prototype/shared code.

This extension installs other extensions without the knowledge and consent of the user.

This extension is very good and useful, but without my knowledge and consent it installs Markdown extensions for me. As far as I understand, Markdown extensions are not needed for this extension to work. Markdown extensions may be useful, but I don't need them at the moment. So why do this? I do not like this. That is why I deleted this extension, although otherwise it is a very useful and good extension and I like it. I will install it after it stops installing other extensions I do not need.
Thanks.

Prompt the user to fork, when they try to edit a Gist they don’t own

When you attempt to edit a Gist, we currently prompt you to authenticate if you haven’t already. However, if the currently opened Gist isn’t yours, then you won’t be able to edit it, regardless if you’re signed in or not. In order to make this flow more user-friendly, we should automatically detect it, and ask the user if they’d like to fork the currently opened Gist.

show gist as file if its a single file

atm all the gists are displayed as a group ex.> some gist even when its a single file.

so is it possible for those gists to show the file directly instead of having to first expand the group then open the gist ?

Allow specifying multiple files when creating a Gist

When you create a Gist, we currently allow you to specify the name of the file to seed it with. However, in order to simplify the process of creating multi-file Gists, we should allow users to specify a comma-separated list of file names to seed the new Gist with.

Always ask for github token

Issue Type: Bug

I'm trying to use gistpad but I cannot create my gist and always I have to insert the github token, I create a new one and still the same.

Extension version: 0.0.25
VS Code version: Code 1.41.1 (26076a4de974ead31f97692a0d32f90d735645c0, 2019-12-18T15:04:31.999Z)
OS version: Linux x64 4.19.86

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz (8 x 3821)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: unavailable_off
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 1, 1, 1
Memory (System) 15.53GB (12.93GB free)
Process Argv --no-sandbox
Screen Reader no
VM 0%

Bad Credentials in Git Enterprise integration - can't login

Hey.
As suggested, I updated the settings for GitAPI:
"gistpad.apiUrl": "https://git.myOrg.com/api/v3"

I got the relevant AccessToken and set it in VS Code - when I do that. I get "Bad Credentials" error.
image

But when I use the same API URL and the same token - I do get the results right:

Screen Shot 2019-12-08 at 10 43 15

Is there a way to debug what's wrong?

Sidebar improvements

Some suggestion that came up while using the new sidebar.

  • I would invert the order of the name – or even remove the file name – so that the Gist description appears first. The filename would appear anyway when you click the chevron.

  • I would change the padlock to a gray-scale one, so it does not take too much attention to the eye. Maybe moving it to the start of the name?

References

Add a “Send to CodePen” command for exporting playgrounds

We currently allow opening pens that have been exported to Gists, and to complete the CodePen interop, we should add a way to “export” a GistPad playground to a CodePen pen. They’ve already got the API for this, and it would enable devs to work on a playground locally, and then “migrate” it to CodePen for sharing.

Allow for local access with "reveal with explorer" and "copy file path"

Gists should be available on the local file system, for instance if you want to dot source them into a demo or something. Currently you have to copy the file to a temporary location before you can use it. The module extension temp folder would be a good location, and tie this URI into the "Copy Path" and "Open in Explorer" functions.

Allow opening/creating a Gist within the current workspace

Currently, when you create/open a Gist, we open it as a new virtual workspace. This reloads VS Code, and prevents you from being able to easily work on a Gist alongside of another project. To address this, we should add an option to open/create a Gist as a series of “loose files”’within the current VS Code instance (without needing to reload).

Add support for other playground languages

Currently, you can create playgrounds using the following languages: HTML/Pug, CSS/SCSS/Less, and JavaScript/TypeScript. In all cases, the code is compiled as needed, as you type, without the user needing to do anything. This makes it really easy to visually iterate on code, using whichever languages you’re most productive with.

In order to continue supporting other developer preferences, I’d love to hear feedback about which additional languages would be useful to have. For example: Stylus, Haml, Elm, PureScript, Vue single file components, Svelte, etc. I’ll also continue to survey the CodePen ecosystem to see what folks are using in practice, to make sure that GistPad playgrounds provide strong interop with the community.

Unable to use ESC or ENTER when searching in active file

Scenario 1

Steps to reproduce:

  1. Open a gist file using gistpad.
  2. Show search bar using COMMAND+F.
  3. Press ESC button.

Result:

  • Nothing happens.
  • Search bar is not dismissed.

Expected:

  • Search bar should be dismissed.

Scenario 2

Steps to reproduce:

  1. Open a gist file using gistpad.
  2. Show search bar using COMMAND+F.
  3. Type something to search.
  4. Press ENTER button.

Result:

  • Nothing happens.

Expected:

  • Find next match action should be triggered.

gistpad version:

0.0.21

VSCode info:

Version: 1.41.0
Commit: 9579eda04fdb3a9bba2750f15193e5fafe16b959
Date: 2019-12-11T17:58:38.338Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 19.0.0

Search/Filter Gists

It would be super helpful to be able to search gists by filename, description, and contents.

Add Gist management view

In addition to allowing you to list your gists via #2, we should also add a tree view to easily manage your Gists visually (add/delete/open/star).

Allow specifying external stylesheet references in playground.json

Currently, you can add playground references to external JavaScript libraries, by adding them to the “libraries” property of the playground’s playground.json manifest file. However, we should also allow specifying external stylesheet references as well, via a new “styles” (or “stylesheets”?) property. Just like the existing libraries support, we should also enable a rich integration with CDNJS so that it’s easy to add commonly used stylsheets (e.g. font awesome).

This extension conflicts with the GitHub Gist Explorer extension.

According to my observations, if this extension is installed together with the extension GitHub Gist Explorer (k9982874.github-gist-explorer, https://github.com/k9982874/github-gist-explorer), then this causes the removal of the GitHub Gist Explorer. If you perform operations with gist using the GistPad extension and then restart VS Code, then GitHub Gist Explorer will be deleted. Apparently at the moment, these expansions are incompatible and cannot be installed together. Link to this problem: https://github.com/k9982874/github-gist-explorer/issues/21 .

Ability to Group Github Gists

Github Gist does not support folders. However, we can consider setting tags in the description of a Gist, which could be used to create a grouping in vscode.

An application like lepton appends #thistag to the description of the gist.

Suggestions:
Option 1: use [#tag1, #tag2] at the beginning of the description
Option 1: use #thistag1 appended at the end of the description of a gist

Allow listing your Gists

Instead of just creating a new gist, or opening one by ID, we should add a command to allow users to view all of their current Gists and then open one. That way, you don’t need to retrieve the Gist ID from the browser before you can begin editing it in VS Code.

"org.freedesktop.secrets was not provided by any .service files" when doing GistFS: New Gist for the first time

After successfully installed GistFS from the market place, when the "GistFS: New Gist" command was run for the first time, VSCode prompted me with the following error message:
org.freedesktop.secrets was not provided by any .service files

After some googling, install the following package on my system solved it:
gnome-keyring

Perhaps it would help to include some pointer in the Getting Started section of the document / webpage that gnome-keyring is a dependency?

Allow creating secret Gists

Gists can be either public or secret. Many times, I want to create a secret Gist. It would be great if there was a command to create a secret Gist.

Allow easily moving files amongst Gists

Hi, if user've got a lot of gist and he wants to organize them, he needs to repeat actions like copy content from old gists, then delete them.

Suggestion:

  • drag & drop can resolve this and simplify gist management, organization

Opening markdown file open preview window instead of editor

This problem does not occur with 0.0.16 and prior. It happens with 0.0.17 and later.

Reproduce by trying to open a markdown file in a gist from the explorer window. A preview pane appears instead of an editor.

I suspect this may be caused by this new code in commit f9d9c08:

export async function openGistFile(uri: Uri) {
  const extension = path
    .extname(uri.toString())
    .toLocaleLowerCase()
    .substr(1);
  let commandName;
  switch (extension) {
    case "md":
      commandName = "markdown.showPreview";
      break;
    //case "ipynb":
    //  commandName = "python.datascience.opennotebook";
    //  break;
    default:
      commandName = "vscode.open";
  }

It looks like it is intentionally doing a preview for a markdown file. This makes it impossible to locally edit markdown files in a gist. I admit to not reading all the code to fully understand this, but it looks suspicious.

I've tried disabling all markdown extensions with no improvement. And I'm not certain if I am doing anything wrong, so please let me know if that's the case.

Sort Gists by last updated

Hi, It would be awesome if we could toggle the sorting between alphabetical and Last Updated to make it easier to find the most recent Gists

Awesome AddIn!

Re-open playground preview after restarting VS Code

Currently, if you have a playground open and then restart VS Code, the playground files (e.g. index.html) and WebView remain open, but the preview window isn’t properly hooked up. As a result, the user has to re-open the playground in order to start working on it again.

To make this experience smoother, we should detect the restart and then re-initialize the playground automatically.

Allow pasting images into HTML files

We currently contribute the “Paste Screenshot” command, to make it easy to upload/insert images from your clipboard and into markdown files. However, to improve the playground experience, we should also allow this command to be run in HTML files, so that local images can be easily used in playgrounds, without the user needing to manually upload it to the Gist or an image hosting service.

GISTS tree on Explorer view disappears when switching to GistPad view (Activity bar) and back

Steps to reproduce:

  1. Open VS Code (no files or folders are opened)
  2. Go to Explorer view
  3. Expand Gists area (a Gist tree appears)
  4. Switch to GistPad in Activity bar (a Gist tree re-appears)
  5. Switch back to Explorer view / Gists area

Actual: Gists area is empty (no Gist tree)
Expected: Gist tree re-appears

VS Code information:
Version: 1.41.0 (user setup)
Commit: 9579eda04fdb3a9bba2750f15193e5fafe16b959
Date: 2019-12-11T18:37:42.077Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.18363

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.