Skip to content

Instantly share code, notes, and snippets.

@avin
Last active January 26, 2026 15:21
Show Gist options
  • Select an option

  • Save avin/37521c407e56cef54e2065a2f151ee6d to your computer and use it in GitHub Desktop.

Select an option

Save avin/37521c407e56cef54e2065a2f151ee6d to your computer and use it in GitHub Desktop.
Jump to Cursor from JetBrains IDEs and back

File -> Settings -> Tools -> External Tools -> (Add)

Name: Cursor
Program: C:\Users\avin\AppData\Local\Programs\cursor\Cursor.exe
Arguments: $ProjectFileDir$ --goto $FilePath$:$LineNumber$:$ColumnNumber$
Working directory: $ProjectFileDir$

Advanced options:
Open console for tool output: Disabled

And you can assign a hotkey to this action in File -> Settings -> Keymaps -> External Tools.

Open the Command Palette (Ctrl+Shift+P) and run "Tasks: Open User Tasks" — this will create a tasks.json file in the user directory (on Windows: %APPDATA%\Cursor\User\tasks.json)

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Open in WebStorm",
      "type": "shell",
      "command": "C:\\Program Files\\JetBrains\\WebStorm 2025.3.1.1\\bin\\webstorm64.exe",
      "args": [
        "${workspaceFolder}",
        "--line",
        "${lineNumber}",
        "--column",
        "${columnNumber}",
        "${file}"
      ],
      "group": "build",
      "presentation": {
        "echo": false,
        "reveal": "silent",
        "focus": false,
        "panel": "shared"
      },
      "runOptions": {
        "runOn": "folderOpen"
      }
    }
  ]
}

Assign a key in keybindings.json (Command Palette → Preferences: Open Keyboard Shortcuts (JSON)):

[
  {
    "key": "alt+shift+o",
    "command": "workbench.action.tasks.runTask",
    "args": "Open in WebStorm",
    "when": "editorTextFocus"
  }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment