editor-context
Editor Context

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, andeditor.versionto the editor's name, URI scheme, and version. - Sets a flag for the detected editor, such as
editor.cursororeditor.windsurf, andeditor.unsupportedwhen the editor is not recognized. - Makes these values usable in keybinding
whenclauses, settings, extension conditions, and custom commands.
Usage
A keybinding that only applies in Cursor:
{
"key": "ctrl+shift+p",
"command": "cursor.command",
"when": "editor.cursor"
}