GhostWriter is a high-performance productivity tool that turns your clipboard into a "Ghost Typist." Whether you are recording a coding demo, presenting a tutorial, or just want to see your code come to life, GhostWriter types out your snippets with a realistic, human-like feel.
🚀 Features
Clipboard Polling: Automatically tracks your last 10 copied snippets.
Ghost Typing: Types out code character-by-character directly into your active editor.
Intelligent Indentation: Automatically handles newlines and special characters ($, \) to prevent VS Code's "Smart Indent" from doubling your spacing.
Playback Controls: * Pause/Resume: Take a break mid-type to explain a concept.
Stop: Kill the typing process instantly.
Progress Tracking: Real-time percentage bar so you know exactly how much code is left to "type."
Celebration Mode: A confetti "popper" burst and green success state upon completion.
🛠️ Installation
Open VS Code.
Press Ctrl+Shift+X to open the Extensions tab.
Search for GhostWriter (if published) or side-load your VSIX.
Open the GhostWriter Sidebar (look for the 👻 icon in the activity bar).
📖 How to Use
Copy any block of code from the web, a PDF, or another file.
Select the snippet from the History list in the GhostWriter sidebar.
Watch the magic happen! GhostWriter will begin typing the code into your current active text editor.
Celebrate: When the progress bar hits 100%, enjoy the confetti!
⚙️ Extension Settings
This extension contributes the following settings:
ghostwriter.typingSpeed: Adjust the base speed of the ghost typist (coming soon).
ghostwriter.historyLimit: Change how many items are stored in your history (default is 10).
📝 Technical Details
The extension uses a combination of vscode.SnippetString for character insertion and editor.edit for newline handling. This ensures that the code looks exactly as you copied it, without extra tabs or broken formatting.
Note: GhostWriter escapes special snippet characters automatically, so your regex and template literals will type out perfectly.
🤝 Contributing
Feel free to fork this repository and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.