editor-context

Editor Context

/_next/static/media/S-1771615380456.0_1a8cmqhoriu.png

A VS Code extension that automatically detects your IDE and exposes its details as context variables. This makes it easier to write extensions and configurations that work across different VS Code-based editors.

What it does

  • Detects which VS Code-based editor is running, including VS Code, VS Code Insiders, VSCodium, Cursor, Windsurf, Antigravity, Trae, and Kiro.
  • Sets editor.app, editor.uri, and editor.version to the editor's name, URI scheme, and version.
  • Sets a flag for the detected editor, such as editor.cursor or editor.windsurf, and editor.unsupported when the editor is not recognized.
  • Makes these values usable in keybinding when clauses, settings, extension conditions, and custom commands.

Usage

A keybinding that only applies in Cursor:

{
  "key": "ctrl+shift+p",
  "command": "cursor.command",
  "when": "editor.cursor"
}