oinume journal

Scratchpad of what I learned

Cursorで開いているファイルをIntelliJ IDEAで開く

最近Cursorを使い始めているのだけど、ガッツリコードを書きたい時はIntelliJに頼ることもまだ多い。なので、Cursorでユーザータスクを定義して、Cmd + Shift + p でコマンドパレットを開いて Tasks: Runt Task でIntelliJでそのファイルを開けるようにした。

Tasks: Open User Tasks で以下のタスクの定義を記述する。(macOSの場合、このファイルは ~/Library/Application Support/Cursor/User/tasks.json に保存される)

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Open Current File with IntelliJ IDEA",
            "type": "shell",
            "command": "idea",
            "args": [
                "${file}"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
             "problemMatcher": []
        }
    ]
}

参考: https://code.visualstudio.com/docs/editor/tasks


ここからアフィリエイト広告