Open DoctorGoose opened 1 year ago
Create the cursor.reg
file with the content below:
IMPORTANT: replace the <username>
with your actual username!
Windows Registry Editor Version 5.00
; Open files
[HKEY_CURRENT_USER\Software\Classes\*\shell\Open with Cursor]
@="Edit with Cursor"
"Icon"="C:\\Users\\<username>\\AppData\\Local\\Programs\\cursor\\cursor.exe,0"
[HKEY_CURRENT_USER\Software\Classes\*\shell\Open with Cursor\command]
@="\"C:\\Users\\<username>\\AppData\\Local\\Programs\\cursor\\cursor.exe\" \"%1\""
; This will make it appear when you right click ON a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CURRENT_USER\Software\Classes\Directory\shell\cursor]
@="Open Folder as Cursor Project"
"Icon"="C:\\Users\\<username>\\AppData\\Local\\Programs\\cursor\\cursor.exe,0"
[HKEY_CURRENT_USER\Software\Classes\Directory\shell\cursor\command]
@="\"C:\\Users\\<username>\\AppData\\Local\\Programs\\cursor\\cursor.exe\" \"%1\""
; This will make it appear when you right click INSIDE a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\cursor]
@="Open Folder as Cursor Project"
"Icon"="C:\\Users\\<username>\\AppData\\Local\\Programs\\cursor\\cursor.exe,0"
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\cursor\command
@="\"C:\\Users\\<username>\\AppData\\Local\\Programs\\cursor\\cursor.exe\" \"%V\""
Double-click it to create the registry entries.
If the options don't appear in the Explorer's context menu then you should restart your system.
Taken from https://stackoverflow.com/questions/37306672/visual-studio-code-open-with-code-does-not-appear-after-right-clicking-a-folde - I just changed the paths and the names to the Cursor ones.
I built a powershell script for that:
Installation: Run install-open-with-cursor.exe with administrator privileges. https://github.com/yuzhounh/Open-with-Cursor
Similar to Visual Studio Code, could Cursor include an option to add "Open in Cursor" for the Windows Context Menu during installation?