Skip to content

Instantly share code, notes, and snippets.

@wilmoore
Last active January 13, 2024 07:52
Show Gist options
  • Save wilmoore/d974598d683eb0c133755cdf3084461e to your computer and use it in GitHub Desktop.
Save wilmoore/d974598d683eb0c133755cdf3084461e to your computer and use it in GitHub Desktop.
Gist Editor

Gist Editor

⪼ Made with 💜 by Polyglot.

related

Gist Editor is a suite of tools that allow you to take advantage of Gists as not only an editor but as a way to store files and other stuff. While it's great to be able to store plain text, it provides a lot.

Resources

Features

  • Raw git access to repository which means you get versioning for free.
  • Each repo is essentially a filesystem directory containing files.
  • Each repo can be retrieved via git clone URL.
  • A new repo can be created via curl HTTP POST
  • text or email yourself a note

Challenges

  • A user's authenticated Gists are paginated; thus, it can take several **https** calls in order to retrieve them all.
  • The listing all of a user's gists are ordered only by (creation or updated date)
  • Lacks full-text search ability - can only search by text of title text must match (no fuzzy search)
  • The "delete" button is way too accessible -- it's too easy to accidentally hit delete
  • It isn't super easy to open a gist up in your local editor (an open in vscode button would be nice)

Improvements I would make to gist.github.com

Templates (Chrome Extension)
  • Select a template from the dropdown
  • Title, filename, content supported
  • Variables in template trigger popups to allow data entry to hydrate the template on load
document.querySelector("[name=templates]").addEventListener("change", (event) => {
  console.log(event.target.value)
});
image image
commands
  • esc: shortcut mode
shortcuts
  • e: Edit
  • n: New Gist
  • a: Add file
  • /: Search (already exists)
editor keybindings
  • vim
new gist
  • If first file, default file name is readme.md (configurable), editor is populated with default text of # and cursor is positioned to the right of default text.
new files
  • If first line of file starts with # , then everything after that should be the default title
related documents
  • document can have lists of related documents:
    • add documents manually by specific name/id
    • add documents automatically via related tags
filter/search
  • search by name
  • search by previous name (can find by old names after renaming: can also turn off searching for each name via configuration setting per document)
  • search by id
  • search by tag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment