tuareg icon indicating copy to clipboard operation
tuareg copied to clipboard

Add an ocamldebug command for back stepping

Open aatxe opened this issue 5 years ago • 4 comments

I noticed when attempting to customize bindings for ocamldebug that Tuareg is actually missing a definition for backstep. This small change resolves that by creating an ocamldebug-back command (like the ocamldebug-next) command.

aatxe avatar Jan 10 '20 22:01 aatxe

It looks like C-b is already taken by break?

leungbk avatar Sep 24 '20 04:09 leungbk

Ah, that is true. It seems to take the first one defined, so I didn’t notice. I can change it, but I don’t know what would be the most suitable/mnemonic.

aatxe avatar Sep 24 '20 06:09 aatxe

I'd just C-j, C-k or C-m as they are close to the keybinding C-n (for next line). Perhaps we can also add C-j and C-k as aliases for C-m and C-n, even if they are inspired by vim. :-)

bbatsov avatar Jul 13 '22 13:07 bbatsov

This is old, but I think it's still relevant. The "natural" binding for the opposite of C-n is C-p (C-b is the opposite of C-f), so the conflict with C-b == break is a non-issue (Yay!). Instead we have a conflict with C-p == print (bummer!).

But do we need a new binding or could we use a numeric prefix (like C-u - 2 C-n to backstep 2 lines)?

monnier avatar Oct 02 '23 01:10 monnier