vuejs / vuejs/devtools

Open in cursor opens two editor tabs corresponding to line and column

Open
#849 4 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.9k
Forks
279
PR merge metrics
No merged PRs in 30d

Description

Hello,

I am using the vite plugin for the devtools and have properly setup launchEditor: "cursor" and added cursor to my path on macos.

When I click a component from the devtools to open it into cursor, it always opens two editors for the line and column of the corresponding html tag:

Image

Apparently cursor requires the --goto option with :line:column appended to the file name to properly go to a line/column:
cursor --goto /.../SomeVueFile.vue:22:1

If anyone else has an issue with this, here is a workaround:

  1. Create a cursorgoto.sh file in your project root with this content:
#!/bin/bash
cursor --goto "$1:$2:$3"
  1. Make it executable chmod +x cursorgoto.sh

  2. Replace it in your vite config:

export default defineConfig({
    plugins: [
        vueDevtools({ launchEditor: './cursorgoto.sh' }),
    ]
});

Thank you!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the vite plugin's launchEditor handling, using the reported Cursor command and the cursorgoto.sh workaround to reproduce the two-tab behavior. Done means selecting a component opens one Cursor editor at the correct file, line, and column.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vite
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.