Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>GistrNew to Visual Studio Code? Get it now.
Gistr

Gistr

Jeet Chauhan

|
1 install
| (0) | Free
Lightning-fast code sharing via GitHub Gists with automatic URL shortening
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

🚀 Gistr

Lightning-fast code sharing via GitHub Gists with automatic URL shortening. Share your code in seconds!

VS Code Version License

✨ Features

  • ⚡ Lightning Fast: One-click sharing with Ctrl+Shift+G
  • 🔗 Auto URL Shortening: Automatically shortens Gist URLs for easy sharing
  • 📋 Clipboard Ready: Shortened URLs copied to clipboard instantly
  • 📊 Visual Progress: Real-time progress notifications and status updates
  • 🎯 Multiple Access Points: Command palette, keyboard shortcut, context menu, status bar
  • 🛠️ Configurable: Choose your URL shortener, visibility, and more
  • 🔍 Detailed Logging: Comprehensive logging for troubleshooting
  • ❌ Smart Error Handling: Graceful fallbacks and helpful error messages

🚀 Quick Start

1. Install & Setup

  1. Install Gistr from the VS Code Marketplace
  2. Get a GitHub Personal Access Token:
    • Go to GitHub Settings → Tokens
    • Select the gist scope
    • Copy the generated token
  3. Configure Gistr:
    • Open VS Code Settings (Ctrl+,)
    • Search for "Gistr"
    • Paste your token in "GitHub Token"

2. Share Your Code

  1. Open any file in VS Code
  2. Press Ctrl+Shift+G (or Cmd+Shift+G on Mac)
  3. Watch the magic happen! ✨

Your code will be:

  1. 📤 Uploaded to GitHub Gist
  2. 🔗 URL automatically shortened
  3. 📋 Copied to clipboard
  4. 🎉 Ready to share!

🎮 How to Use

Multiple Ways to Share:

  1. Keyboard Shortcut: Ctrl+Shift+G (Windows/Linux) or Cmd+Shift+G (Mac)
  2. Command Palette: Gistr: Share as Gist
  3. Right-click Menu: "Share as Gist" in editor context menu
  4. Status Bar: Click the cloud upload icon
  5. Editor Title: Cloud upload button when file is focused

What Happens:

📁 Your File → 🌐 GitHub Gist → 🔗 Short URL → 📋 Clipboard

⚙️ Configuration

Access settings: VS Code Settings → Extensions → Gistr

Setting Description Default
gistr.githubToken GitHub Personal Access Token required
gistr.urlShortener URL shortening service tinyurl
gistr.defaultVisibility Gist visibility public
gistr.includeFilename Use original filename true
gistr.showProgressNotification Show progress popups true

URL Shortener Options:

  • TinyURL (tinyurl) - Reliable and fast
  • is.gd (is.gd) - Simple and clean
  • v.gd (v.gd) - Alternative to is.gd

🔍 Visual Feedback

Gistr provides multiple levels of feedback:

📱 Progress Notifications

Real-time progress with steps:

  1. 📖 Reading file content...
  2. 🌐 Creating GitHub Gist...
  3. 🔗 Shortening URL...
  4. 📋 Copying to clipboard...
  5. ✅ Complete!

📊 Status Bar

  • Shows Gistr status
  • Click to share current file
  • Visual feedback during operations

📝 Output Channel

Detailed logging available in "Gistr" output channel:

  • Timestamps for all operations
  • Success/error details
  • Network request information
  • Token validation results

🎉 Success Actions

After successful sharing, choose to:

  • Copy URL Again - Re-copy to clipboard
  • Open Gist - View on GitHub
  • View Log - See detailed operation log

🛡️ Error Handling

Gistr handles common issues gracefully:

🔑 Token Issues

  • Missing token → Setup guidance
  • Invalid token → Clear error message
  • Expired token → Renewal instructions

🌐 Network Issues

  • Connection problems → Retry option
  • API rate limits → Clear wait instructions
  • Timeout errors → Automatic fallbacks

🔗 URL Shortening

  • Service failures → Falls back to original Gist URL
  • Invalid responses → Uses long URL as backup

🔧 Troubleshooting

Common Issues:

"No active file to share"

  • Make sure you have a file open and focused
  • The file should contain some content

"GitHub token is required"

  • Generate token: GitHub Settings
  • Add token to Gistr settings

"Invalid GitHub token"

  • Verify token is correct
  • Ensure gist scope is enabled
  • Check token hasn't expired

Nothing happens when I press the shortcut

  • Check the "Gistr" output channel for error details
  • Verify the extension is activated
  • Try using Command Palette: "Gistr: Share as Gist"

📋 Debug Steps:

  1. Open Command Palette (Ctrl+Shift+P)
  2. Run "Gistr: Share as Gist"
  3. Check "Gistr" output channel (View → Output → Gistr)
  4. Look for error messages or network issues

🔒 Privacy & Security

  • ✅ GitHub tokens stored locally in VS Code settings
  • ✅ Code sent only to GitHub (according to your visibility settings)
  • ✅ URLs processed by chosen shortening service
  • ✅ No data collected by Gistr extension
  • ✅ Open source - inspect the code yourself

🚀 Development

Building from Source:

git clone <repository-url>
cd gistr
npm install
npm run compile
vsce package

Project Structure:

gistr/
├── src/extension.ts    # Main extension code
├── package.json        # Extension manifest
├── tsconfig.json       # TypeScript config
└── README.md          # This file

📈 Changelog

1.0.0

  • 🎉 Initial release as "Gistr"
  • ⚡ Lightning-fast code sharing
  • 🔗 Automatic URL shortening
  • 📊 Visual progress indicators
  • 🎯 Multiple access points
  • 📋 Instant clipboard copying
  • 🛡️ Comprehensive error handling
  • 📝 Detailed logging system

🤝 Contributing

Contributions welcome! Feel free to:

  • 🐛 Report bugs
  • 💡 Suggest features
  • 🔧 Submit pull requests
  • ⭐ Star the repository

📄 License

MIT License - feel free to use and modify!


Made with ❤️ for developers who love to share code quickly!

Share your code in seconds, not minutes. That's the Gistr way! 🚀

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft