Open in cursor opens two editor tabs corresponding to line and column
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:
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:
- Create a
cursorgoto.shfile in your project root with this content:
#!/bin/bash
cursor --goto "$1:$2:$3"
-
Make it executable
chmod +x cursorgoto.sh -
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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