Skip to content

Manage GitHub Gists directly from VS Code. Create, edit, view, and organize your gists without leaving the editor.

License

Notifications You must be signed in to change notification settings

lywedo/GIST-Editor

Repository files navigation

πŸš€ Gist Editor for VS Code

Visual Studio Marketplace Version License PRs Welcome

The most intuitive and lightweight GitHub Gist manager for VS Code
Organize, edit, and manage your code snippets with a revolutionary folder hierarchy system

Install Now β€’ Report Bug β€’ Request Feature


✨ Why Gist Editor?

Finally, a Gist manager that thinks like a developer. No more flat lists of hundreds of gists. No more lost snippets. Just pure, organized productivity.

🎯 Key Highlights

  • πŸ“ Revolutionary Folder Organization - First VS Code extension to offer true hierarchical folder structure for gists
  • 🎯 Intuitive Drag & Drop - Effortlessly reorganize gists and move files between gists
  • ⚑ Lightning Fast - Intelligent caching system ensures instant access to your code snippets
  • 🎨 Beautiful & Intuitive UI - Clean, native VS Code interface that feels right at home
  • πŸ” Seamless GitHub OAuth - One-click authentication, no token hassles
  • πŸ’Ύ Auto-Save Magic - Edit and save gists as naturally as local files

🎬 See It

Gist Editor Demo


🌟 Revolutionary Features

πŸ“‚ Hierarchical Folder Organization

The game-changer you've been waiting for

Transform your chaotic gist collection into a beautifully organized knowledge base:

πŸ“ React
  β”œβ”€β”€ πŸ“ Components
  β”‚   β”œβ”€β”€ πŸ“„ Button Component
  β”‚   └── πŸ“„ Modal Hook
  β”œβ”€β”€ πŸ“ Utils
  β”‚   └── πŸ“„ Custom Hooks
  └── πŸ“„ Context Patterns

πŸ“ Python
  β”œβ”€β”€ πŸ“ Scripts
  β”‚   └── πŸ“„ Data Processing
  └── πŸ“ ML
      └── πŸ“„ TensorFlow Models

Simply name your gists with paths like React/Components - Button Component and watch the magic happen!

⚑ Lightning-Fast Performance

  • Smart Caching: In-memory cache minimizes API calls
  • Lazy Loading: Gists load on-demand for instant startup
  • Optimized Rendering: Smooth scrolling even with hundreds of gists
  • Background Sync: Updates happen seamlessly without blocking your workflow

🎨 Beautiful, Native UI

  • Seamless Integration: Looks and feels like native VS Code
  • Theme Support: Automatically adapts to your VS Code theme
  • Intuitive Icons: Visual cues for public/private, file types, and actions
  • Clean Sidebar: Organized views for personal, starred gists, and comments

πŸ”’ Modern Authentication

  • GitHub OAuth: One-click sign-in through your browser
  • Secure Token Storage: VS Code handles your credentials safely
  • Session Persistence: Stay logged in across sessions
  • Fallback Support: Manual token option for advanced users

πŸš€ Quick Start

1️⃣ Install in 10 Seconds

ext install lywedo.gist-editor

Or search "Gist Editor" in VS Code Extensions (Ctrl+Shift+X)

2️⃣ Sign In with One Click

Sign In Demo

  1. Click the GitHub icon in the Activity Bar
  2. Click "Sign in with GitHub"
  3. Authorize in your browser
  4. Done! Start managing your gists instantly

3️⃣ Create Your First Organized Gist

Create Gist Demo

From Selection (Ctrl+Alt+Shift+S):

  • Select code β†’ Right-click β†’ "Create Gist from Selection"

From File (Ctrl+Alt+Shift+G):

  • Open file β†’ Create gist with automatic syntax highlighting

With Folder Organization:

  • Name it React/Hooks - useCustomHook to auto-organize!

πŸ› οΈ Powerful Features

πŸ” Intelligent Fuzzy Search

Find your gists instantly with powerful search capabilities:

Search Everywhere:

  • πŸ“„ Gist Names - Search by gist titles
  • πŸ“ Descriptions - Find gists by their descriptions
  • πŸ“‹ File Names - Locate specific files within gists
  • πŸ”Ž Content - Search through actual file contents

Smart Fuzzy Matching:

  • Exact Match - Perfect word matches ranked highest
  • Substring Match - Find text anywhere in your gists
  • Fuzzy Match - Characters don't need to be consecutive (e.g., "rct" finds "React")
  • Position Bonus - Matches near the beginning score higher

Intelligent Filtering:

  • 🌐 Filter by public/private visibility
  • πŸ“ Filter by folder path
  • 🎨 Filter by programming language
  • 🎯 Combine multiple filters for precision search

Ranking & Results:

  • Results ranked by relevance and match type
  • Line numbers for content matches
  • Context preview for better visibility
  • Top 50 results for quick browsing

Lightning-Fast Performance:

  • ⚑ Instant Second Opens - Search results cached after first use for zero-delay access
  • πŸ”„ Parallel Tag Fetching - Tags loaded simultaneously (10x faster for large collections)
  • ⏱️ Smart Debouncing - 300ms debounce prevents laggy typing experience
  • 🧠 Intelligent Cache - Automatically refreshes when gists or tags change
  • πŸ“Š Visual Feedback - Busy indicator shows when search is building/updating

πŸ“ Smart Folder Management

Organize your gists with powerful folder operations:

Create Gists Directly in Folders:

  • Right-click on any folder β†’ "Create Gist in Folder"
  • Automatically places the new gist inside the selected folder
  • Maintains your folder hierarchy without manual renaming

Rename Folders:

  • Right-click on any folder β†’ "Rename Folder"
  • Bulk rename all gists within the folder
  • Reorganize your gist structure instantly
  • Update folder paths in batch operations

πŸ“ Multi-Method Gist Creation

Method Shortcut Description
From Selection Ctrl+Alt+Shift+S Create gist from selected code
From Current File Ctrl+Alt+Shift+G Turn entire file into a gist
Empty Gist Ctrl+Alt+G Start with a blank gist
Multi-file Via UI Create gists with multiple files

πŸ—‚οΈ Smart Organization

Automatic Grouping:

  • 🌐 Public Gists - Shareable with the world
  • πŸ”’ Private Gists - Your secret code vault
  • ⭐ Starred Gists - Quick access to favorites

Folder Magic:

Naming Convention: "Folder/Subfolder - Gist Name"
Examples:
  "React/Hooks - Custom Authentication Hook"
  "Python/Utils - Data Processing Scripts"
  "DevOps/Docker - Nginx Configuration"

πŸ“Š GitHub API Usage Tracking

Monitor your GitHub API consumption with built-in statistics:

Track API Activity:

  • πŸ“ˆ Real-time API call monitoring
  • πŸ“ Breakdown by operation type (gists, comments, history, stars, user info)
  • ⚑ Session duration and total calls made
  • πŸ”„ Rate limit status and reset time

Access Statistics:

  • Click the Graph Icon (πŸ“Š) in the "My Gists" view header
  • Command: View API Usage Statistics
  • Shows detailed report in output channel

Stay Within Limits:

  • βœ“ Green status if plenty of calls remaining
  • ⚠️ Warning indicator when approaching rate limit
  • ❌ Critical alert if rate-limited
  • View exactly how many calls remain (e.g., "450 / 5000")

πŸ’¬ Comment System

  • View all comments on your gists
  • Add comments directly from VS Code
  • Delete your own comments
  • Real-time comment count updates

🏷️ Tags & Labels

Organize gists with powerful tagging system synced to GitHub:

Tag Management:

  • βž• Add Tags - Right-click any gist β†’ "Add Tag"
  • βž– Remove Tags - Right-click any gist β†’ "Remove Tag"
  • πŸ—‘οΈ Clear All - Remove all tags at once
  • πŸ“Š View Tags - See tag count badges next to gist names with full list on hover

Storage & Sync:

  • πŸ’Ύ GitHub-Synced - Tags stored in gist comments, synced across all your devices
  • πŸ”’ Automatic Sync - Changes instantly appear on GitHub (visible in web interface)
  • 🧹 Clean Display - System tags comment hidden from user comments view
  • ✨ Human-Readable - Tags stored as [tag:name] format for clarity

Tag Search:

  • πŸ” Tag-Based Search - Search gists by tag names
  • πŸ’‘ Smart Discovery - Tags weighted high in search rankings
  • πŸ”„ Parallel Fetching - All tags loaded simultaneously for speed

πŸ”„ Version Control

  • View complete revision history
  • Compare different versions
  • See who made changes and when
  • Restore previous versions if needed

⌨️ Productivity Shortcuts

Action Windows/Linux macOS Description
Save Gist Ctrl+Alt+S Cmd+Alt+S Save current gist instantly
Create Gist Ctrl+Alt+G Cmd+Alt+G Create new empty gist
From File Ctrl+Alt+Shift+G Cmd+Alt+Shift+G Create from current file
From Selection Ctrl+Alt+Shift+S Cmd+Alt+Shift+S Create from selected text

πŸ“Š File & Folder Management

Right-click any gist for powerful actions:

  • βž• Add File - Expand gists with multiple files
  • πŸ–ΌοΈ Add Image - Upload images directly to your gists (PNG, JPG, GIF, SVG, WebP, BMP)
  • ✏️ Rename - Update descriptions and filenames
  • 🌐 Open in GitHub - Jump to web interface
  • πŸ“œ View History - See all revisions
  • ⭐ Star/Unstar - Mark favorites
  • πŸ—‘οΈ Delete - Remove with confirmation

Right-click any folder for organization:

  • βž• Create Gist in Folder - Add new gists directly to the folder
  • ✏️ Rename Folder - Reorganize your folder structure
  • πŸ—‘οΈ Delete Folder - Remove the entire folder hierarchy

πŸ–ΌοΈ Image Upload Support

Upload images directly to your gists using Git operations:

Supported Formats:

  • PNG, JPEG, GIF, WebP, BMP, SVG, ICO
  • Configurable max file size (default: 10MB)
  • GitHub limit: 100MB per file

Two Ways to Upload:

Method 1: Drag & Drop ⭐ Recommended

  1. Drag an image file from your file explorer
  2. Drop it onto a gist in the sidebar (not the editor!)
    • Look for the Gist Editor icon in the Activity Bar (left sidebar)
    • Drag and drop onto a gist item in the "My Gists" tree view
  3. Image is automatically uploaded
  4. Handles filename conflicts with auto-rename options

Important: Drop the image onto a gist in the sidebar, not into the editor window. Dropping in the editor will just open the image for viewing.

Method 2: Right-Click Menu

  1. Right-click on any gist β†’ "Add Image to Gist"
  2. Select an image from your file system
  3. Customize filename (optional)
  4. Image is automatically uploaded via Git

Features:

  • πŸ“Ž Multi-file upload: Drop multiple images at once
  • πŸ”„ Duplicate handling: Auto-rename or overwrite existing files
  • πŸ“Š Progress feedback: Real-time upload notifications
  • ⚑ Fast & secure: Uses Git operations for reliable uploads
  • πŸ–ΌοΈ Image preview: Hover over image files to see thumbnail previews in tooltips
  • πŸ“‹ Easy referencing: Copy image URLs, Markdown, or HTML tags with one click

Why Git-Based?:

  • GitHub's REST API doesn't support binary files
  • Uses secure Git clone/commit/push workflow
  • Supports all image formats without size restrictions (up to 100MB)
  • Images become part of gist history

Copying Image References πŸ“‹:

Need to reference an image in a markdown file or HTML document? Right-click any image file and choose:

  1. Copy Image URL - Raw GitHub URL

    https://gist.githubusercontent.com/username/gist-id/raw/hash/image.png
    
  2. Copy as Markdown Image - Perfect for README.md files

    ![Description](https://gist.githubusercontent.com/.../image.png)
    • Prompts for alt text (image description)
    • Generates proper markdown syntax
    • Ready to paste into any markdown file
  3. Copy as HTML Image - For web pages and HTML docs

    <img src="https://gist.githubusercontent.com/.../image.png" alt="Description" width="300" />
    • Prompts for alt text and optional width
    • Generates semantic HTML
    • Supports pixel (300) or percentage (50%) widths

Example Workflow:

1. Upload screenshot.png to a gist
2. Right-click β†’ "Copy as Markdown Image"
3. Enter alt text: "App dashboard screenshot"
4. Paste into README.md: ![App dashboard screenshot](https://...)

Configuration:

{
  "gistEditor.maxImageSizeMB": 10,
  "gistEditor.supportedImageFormats": [".png", ".jpg", ".jpeg", ".gif", ".svg", ".webp", ".bmp"]
}

🎯 Drag & Drop Organization

Effortlessly reorganize your gists with intuitive drag-and-drop:

Upload Images from File Explorer ⭐ New:

  • Drag image files from your file explorer
  • Drop them onto any gist in the tree view
  • Multiple images can be dropped at once
  • Automatic duplicate detection with rename options

Move Gists Between Folders:

  • Drag a gist and drop it on any folder to move it
  • Automatically updates gist organization structure
  • Works with subfolders and hierarchies

Move Files Between Gists:

  • Drag files from one gist and drop them on another
  • Files are automatically copied to target gist
  • Source file is removed after successful transfer
  • Preserves file content and language detection

Example Workflows:

Image Upload (via Drag & Drop):
1. Open file explorer β†’ Find an image (e.g., screenshot.png)
2. Drag the image file from explorer
3. Drop it onto a gist in the SIDEBAR tree view (not the editor!)
   └─ Look for "My Gists" panel on the left
4. Image uploads automatically via Git
5. Image appears in the gist files list

File Organization:
1. Expand "React/Hooks" gist β†’ See its files
2. Drag "useAuth.js" file
3. Drop on "React/Utilities" gist
4. File instantly moved with all content preserved

🎨 Language & File Type Support

100+ Languages with Automatic Detection:

Web Development

  • JavaScript/TypeScript
  • HTML/CSS/SCSS
  • React/Vue/Svelte
  • JSON/XML/YAML

Programming

  • Python/Java/Go
  • Rust/C++/C#
  • Ruby/PHP/Swift
  • Kotlin/Scala

DevOps & Data

  • Dockerfile
  • Terraform/HCL
  • SQL/GraphQL
  • Markdown/LaTeX

Binary Files

  • PNG/JPEG/GIF
  • WebP/BMP/SVG
  • ICO/TIFF
  • Image support via Git

πŸ”§ Advanced Configuration

For Power Users

Manual Token Setup (Optional):

{
  "gistEditor.githubToken": "ghp_your_token_here"
}

Image Upload Configuration:

{
  "gistEditor.maxImageSizeMB": 10,
  "gistEditor.supportedImageFormats": [".png", ".jpg", ".jpeg", ".gif", ".svg", ".webp", ".bmp"]
}

Token Scopes Required:

  • βœ… gist - Full gist access (includes image upload via Git)

πŸ“ˆ Why Developers Love Gist Editor

"Finally, a gist manager that understands organization! The folder hierarchy is a game-changer. I can now find my snippets in seconds instead of minutes."
β€” Senior Full Stack Developer

"Lightweight yet powerful. Doesn't slow down VS Code startup like other extensions. The caching is brilliant!"
β€” DevOps Engineer

"The OAuth integration is seamless. No more managing tokens manually. It just works!"
β€” Frontend Developer


🚦 System Requirements

  • VS Code: Version 1.104.0 or higher
  • GitHub Account: Free account works perfectly
  • Internet: Required for syncing with GitHub
  • WSL Support: βœ… Fully compatible with WSL (Windows Subsystem for Linux)
    • Automatically converts Windows paths to WSL paths for drag-and-drop
    • Drag images from Windows Explorer when running VS Code in WSL

πŸ› Troubleshooting

Can't see my private gists?

Make sure your token has the gist scope:

  1. Click the gear icon (βš™οΈ) in the sidebar
  2. Select "Sign in with GitHub" again
  3. Ensure you authorize the gist scope
Gists not loading?
  1. Check your internet connection
  2. Click the refresh button in the sidebar
  3. Try signing out and back in
Changes not saving?
  • Ensure you're using Ctrl+Alt+S (or Cmd+Alt+S on Mac)
  • Check that you're still authenticated
  • Verify your internet connection

🀝 Contributing

We welcome contributions! See our Contributing Guide for details.

# Clone the repo
git clone https://github.com/lywedo/gist-editor

# Install dependencies
npm install

# Start development
npm run watch

πŸ“œ License

MIT License - see LICENSE file for details


πŸ™ Acknowledgments

  • Built with ❀️ for the VS Code community
  • Powered by GitHub's Gist API
  • Icons from VS Code's Codicon library

πŸ“ž Support


Made with ❀️ by developers, for developers

⬆ Back to Top

About

Manage GitHub Gists directly from VS Code. Create, edit, view, and organize your gists without leaving the editor.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 2

  •  
  •