Sublime Forum

Questions on ST2 versus ST3 / transpose command

#1

Been a user of ST2 for years, and have a load of my own pseudo-emacs key bindings. Trying to update to ST3 (Build 3143/64bit) and using the Emacs Pro Essentials package. I have two main questions to start with.

  1. Did the “transpose” command change between ST2 and ST3? It now gives the Emacs-like behavior which moves the cursor forward after transposing. In ST2 it didn’t move the cursor forward, just transposed characters on either side of the point. I like the ST2 behavior, and would like to know if there’s a way to get that behavior in ST3.

  2. What is the accepted/best method of unbinding a command? E.g., I would rather not have sequences like ^X^C to cause a quit.

Thanks.

0 Likes

#2

I don’t use ST2 very often or the transpose command at all, but the unofficial command list does indeed mention that the transpose command moves forward.

As such I think your best bet would be a macro that runs transpose and then moves to the left one space, and bind the key to run_macro_file instead.

For the second question, the best way to remove a key binding would be to make a binding to a command that doesn’t exist, generally noop. That will stop the key from having any effect. The only way to truly remove the binding would be to modify the source package to not include it, but that’s fraught with peril on it’s own and generally not a good idea.

0 Likes

#3

yep

1 Like

#4

Thanks for the replies. This is all helpful info! :slight_smile:

0 Likes