Skip to content
| Marketplace
Sign in
Visual Studio Code>Machine Learning>Ghost Writer: Tab WritingNew to Visual Studio Code? Get it now.
Ghost Writer: Tab Writing

Ghost Writer: Tab Writing

tetsuji16

|
2 installs
| (0) | Free
| Sponsor
AI-powered inline writing completions for VS Code using local Ollama or OpenRouter. Continue notes, docs, fiction, and more with native ghost text and Tab.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Ghost Writer: Tab Writing

Japanese documentation · English

Ghost Writer banner

Write with the flow of code completion. Ghost Writer predicts the next words in your document and presents them as VS Code inline suggestions. Press Tab to accept a suggestion or Esc to dismiss it.

It is built for prose: notes, articles, specifications, technical documentation, fiction, and more.

Ghost Writer is free and open source. If it helps your writing, you can support the project on GitHub Sponsors.

Why Ghost Writer

  • Stay in the editor — Suggestions use VS Code's native ghost-text UI.
  • Use local completions first — Words and repeated phrases found in your reference documents are completed locally without contacting an LLM.
  • Bring your writing voice — Index a folder of TXT, Markdown, reStructuredText, AsciiDoc, or LaTex documents for local reference retrieval.
  • Choose your inference provider — Use local Ollama by default, or optionally connect to OpenRouter.
  • Keep secrets out of settings — OpenRouter keys are stored in VS Code Secret Storage.

Reference documents are indexed locally. This is retrieval, not model fine-tuning.

Quick start

  1. Install and start Ollama.

  2. Download a model, for example:

    ollama pull qwen2.5:7b
    
  3. Install Ghost Writer from the VS Code Marketplace.

  4. Open the Command Palette with Ctrl+Shift+P (Cmd+Shift+P on macOS), run Ghost Writer: Open Settings, and choose your provider and model.

  5. Open a text or Markdown document and start writing. Pause briefly to receive a suggestion.

Set Ghost Writer: Model if you use a model with a different name.

Finding settings in VS Code

  • Run Ghost Writer: Open Settings from the Command Palette. This is the quickest route.
  • Or open the Extensions view, select Ghost Writer: Tab Writing, click the gear icon, then choose Extension Settings.
  • The Ghost Writer status-bar item also opens its settings. The reference-folder commands remain available from the Command Palette.

For an Ollama server on another PC, set Ghost Writer: Ollama URL to a full LAN URL such as http://192.168.1.50:11434. For OpenRouter, select openrouter, run Ghost Writer: Set OpenRouter API Key, then set Ghost Writer: Model to an OpenRouter model ID.

To set up a provider in one flow, run Ghost Writer: Select AI Provider. Choosing OpenRouter immediately opens a password field for its API key; the key is saved only in VS Code Secret Storage.

How completion works

  1. Ghost Writer checks the local dictionary created from your reference folder.
  2. If it finds a matching word or repeated phrase, it returns that completion immediately without an LLM request.
  3. Otherwise, it sends nearby document context to the configured LLM and proposes a continuation.
  4. You decide whether to accept it with Tab.

The reference folder is read only when Ghost Writer starts or when you run Ghost Writer: Refresh Reference Documents. It is then searched through an in-memory index.

Commands

  • Ghost Writer: Generate Continuation — Generate and insert a continuation at the cursor.
  • Ghost Writer: Select Reference Folder — Choose documents to use as local writing references.
  • Ghost Writer: Refresh Reference Documents — Rebuild the local index after editing reference files.
  • Ghost Writer: Set OpenRouter API Key — Store a key in VS Code Secret Storage.
  • Ghost Writer: Select AI Provider — Choose Ollama or OpenRouter and open the next setup step.
  • Ghost Writer: Open Control Center — Open the native menu for provider, model, diagnostics, references, and settings.
  • Ghost Writer: Toggle Predictions for This Session — Pause or resume inline predictions without changing saved settings.
  • Ghost Writer: Configure Prediction File Types — Enable predictions for selected file extensions.
  • Ghost Writer: Select Model — Load the provider's available models and choose one from a list.
  • Ghost Writer: Run Connection Diagnostics — Verify provider access without sending document text.
  • Ghost Writer: Show Output — Open diagnostic logs.

Configuration

Example workspace settings:

{
  "ghostWriter.provider": "ollama",
  "ghostWriter.model": "qwen2.5:7b",
  "ghostWriter.styleDirectory": "writing-samples",
  "ghostWriter.maxSuggestionCharacters": 350,
  "ghostWriter.debounceMs": 650
}
Setting Default Purpose
ghostWriter.provider ollama Select ollama or openrouter.
ghostWriter.model qwen2.5:7b Model name or OpenRouter model ID.
ghostWriter.styleDirectory empty Folder of local reference documents.
ghostWriter.fileExtensions TXT, MD, and more Reference file types to index.
ghostWriter.predictionFileExtensions empty File extensions where predictions are enabled; empty enables every supported text document.
ghostWriter.maxIndexSizeMB 100 Maximum total size of documents held in the local index.
ghostWriter.contextCharacters 4000 Nearby document context for LLM requests.
ghostWriter.maxSuggestionCharacters 500 Maximum suggestion length.
ghostWriter.inlineSuggestionCharacters 80 Characters shown per LLM Tab-completion step.
ghostWriter.temperature 0.65 Generation diversity.
ghostWriter.debounceMs 650 Delay after typing stops.
ghostWriter.activePersonaId default Writing persona to use.

Privacy

With the default Ollama provider, document context and reference excerpts are sent only to the configured local Ollama server. If you select OpenRouter, that content is sent to OpenRouter and the selected model provider. OpenRouter requests use the official HTTPS endpoint only; the API key is never sent to a workspace-configured URL.

Use local Ollama, or leave the reference folder empty, when working with sensitive content. Ghost Writer packages are built from an allowlist: only the extension runtime, public documentation, license, and public artwork are included.

Development

npm install
npm test
npm run package

Press F5 in VS Code to launch an Extension Development Host.

Support

For questions and bug reports, please open an issue. If Ghost Writer is useful to you, you can support continued development on GitHub Sponsors.

License

MIT

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