getcursor / cursor

The AI Code Editor
https://cursor.com
23.93k stars 1.5k forks source link

Allow remapping up and down arrows in prompt bar history #1387

Open g-simmons opened 5 months ago

g-simmons commented 5 months ago

Is your feature request related to a problem? Please describe. I would like to be able to use common shortcuts like Ctrl-P, Ctrl-N to navigate through my previous editing instructions history. I expect other users might want to use their own shortcuts.

Describe the solution you'd like Expose a keyboard shortcuts option for the behaviors currently bound to the up and down arrows when the prompt bar is open.

Additional context The up/down behaviors here are what I would like to bind to Ctrl-P, Ctrl-N

image

Some, but not all of the prompt bar actions can already be bound to custom shortcuts here. I would like two additional entries like promptbar.previousEdit and promptbar.nextEdit (probably not good names, just to illustrate the idea)

image

On my system, when I use the up and down arrows and encounter a multi-line editing prompt in the history, the up arrow takes me through the lines in that prompt before continuing to the previous edit history. Most of the time, I don't want to revisit every line of every editing prompt. I modified several other shortcuts trying to achieve this, so not sure if this is stock behavior.

Allowing custom keybindings would decouple two logically distinct actions