Hey everyone, this is my first post on this forum.
So, I downloaded Cursor today and absolutely loved it. It’s got some amazing features and definitely deserves a spot in my daily toolkit. But then I noticed something that bugged me – I couldn’t open directories with Cursor directly from the context menu like I can with VSCode. I could not live without this feature from my main IDE, so I had to do something about it. This also seemed like a great contribution for this community, and I wanted to make it as easy as possible to download for anyone who wants this feature.
I created a little utility that adds a shiny new “Open with Cursor” option to your right-click context menu in Windows Explorer when you right click on empty space within directories:
Ignore the icon, which is either due to me not restarting my PC (apparently some regedit context menu updates only display after you do that) or some other issue I cba’d to finish. You can also set a custom ico
as your image, but you’ll have to adjust the source a bit. Note that this only works for selections on empty space within directories, and would need to be expanded upon to also support context menus that appear when you right click a directory. As you see, you can just click that context menu item to open the directory with Cursor as you would with VSCode.
How You Can Get It
Just head over to my GitHub repo here and grab the latest release. Run install.exe
to add the context menu item. If you ever want to remove it, just run uninstall.exe
– easy peasy. All of the code is public and you can compile it on your own if you don’t want to download my provided executables.
How it Works
This program provides a way to add and remove a context menu item in Windows Explorer for opening directories with the Cursor application. The install.cpp file checks for elevated privileges and, if necessary, re-runs itself as an administrator before creating registry keys to add the context menu item. The uninstall.cpp file deletes the registry keys to remove the context menu item. The installation process uses a default path for the Cursor executable but allows for a custom path via command-line arguments. Compilation instructions are provided in the README.md file, which also includes usage instructions for downloading and running the executables. The program uses Windows API functions to interact with the registry and manage process elevation.
Future Improvements
I’ll leave this to the community or future me to tackle:
- Ensuring the icon is 100% right - it might be, but it might not be.
- Adding support for context menus that appear when a directory name is clicked.
- Figuring out other ways to make it better.
Final Note
I hope you guys enjoy this little tool. I am happy to contribute to this wonderful community for this amazing IDE. Thank you for reading and I hope this improves your life, even by just a tad!