Closed gunta closed 5 months ago
2nd that. I've created a PR for this #70.
The function signature of both code
and cursor
are the same - code -g <file:line[:character]>
. I'm not sure why even after installing the code
shell command from within Cursor it still fails to map correctly, so this still requires an export LAUNCH_EDITOR=cursor
in your bash profile in order to work. But... since cursor
is not a known editor to launch-editor, it currently calls cursor
with the default argument signature cursor <file> <line> <character>
instead. The symptom is, it'll open the file in Cursor, but will open new additional files that are numbered with the
In case anyone needs a workaround for this, I ended up following the instructions on running a custom launch script for it and it works great:
.bash_profile
LAUNCH_EDITOR=/path/to/your/cursor-launcher.sh
And then, cursor-launcher.sh:
#!/bin/bash
# Gets called with 3 args: filename, line, column
filename=$1
line=$2
column=$3
# Call Cursor with the expected arguments
cursor -g "${filename}:${line}:${column}"
Added in 2.7.0
Does it work for you guys? I have "launch-editor": "^2.7.0", Its just creating a .+page.svelte.swp as example.
Svelte config i have it also set,
vitePlugin: {
inspector: {
toggleKeyCombo: 'meta-shift',
showToggleButton: 'always',
toggleButtonPos: 'bottom-right',
openKey: 'enter',
escKey: 'Escape'
}
}
https://cursor.sh/