How to Add Custom Command Shortcuts in Cursor
dev.to·2h·
Discuss: DEV
Flag this post

You can create custom keyboard shortcuts in Cursor that run terminal commands with the current file path by adding a simple tasks.json file to your project. This takes 2 minutes to set up and lets you trigger any CLI tool (like [bundle exec tng -m foo](https://tng.sh/)) with a keyboard shortcut, automatically passing the active file as an argument. But first try our plugin:

Is one click away from generating tests for you

What Is a Cursor Task Shortcut?

A Cursor task shortcut is a keyboard-triggered command that runs terminal commands with access to your current file context. Instead of manually typing bundle exec tng -m foo path/to/file.rb every time, you press a keyboard shortcut…

Similar Posts

Loading similar posts...