ocaml / tuareg

Emacs OCaml mode
GNU General Public License v3.0
362 stars 79 forks source link

Add an ocamldebug command for back stepping #227

Open aatxe opened 4 years ago

aatxe commented 4 years ago

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.

leungbk commented 4 years ago

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

aatxe commented 4 years ago

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.

bbatsov commented 2 years ago

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. :-)

monnier commented 1 year ago

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)?