Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Sublime Text 2, I'm able to transpose two words by placing the cursor on the space between them and pressing Ctrl+T. However, in Sublime Text 3 (build 3059 on OS X Mavericks), I get the default OS X behavior of just transposing two characters. This is the case even if I choose Edit > Text > Transpose through the status bar.

Is this a bug, or by design? Is there a way to bring back the old behavior?

share|improve this question
    
I'm quite sure this is by design. How would Sublime know that you want to transpose words? ⌃T has always transposed adjacent characters in Emacs-style keybindings. –  slhck Jan 24 at 22:03
    
@slhck If I open Sublime Text 2 on the same machine, enter the text "foo bar", put my cursor on either side of that space character and press ⌃T, I get "bar foo". It's a useful feature for everyday coding tasks like swapping function arguments around. –  Trevor Burnham Jan 24 at 22:59
    
@TrevorBurnham - I'm trying to figure out how to reinstate the ST2 behavior in ST3, but I'm running into snags. Basically, there were changes to Packages/Default/transpose.py between 2 and 3, but even when I revert the script back to the ST2 version it's still not working (at least on XP). I'm guessing there must have been some change in the ST3 API that's causing problems, but I'm having trouble tracking it down. It might be easier in the long run to just write a separate plugin that only transposes words. –  MattDMo Jan 25 at 2:27
1  
As a temporary workaround, if you select the two words by multi-selecting them, Ctrl-T will transpose them in ST3. –  MattDMo Jan 25 at 2:28

1 Answer 1

The TransposeCharacter plugin offers more intelligent transposing, see readme for details, and maybe even this screencast. It goes really well with the MarkAndMove plugin.

While this doesn't answer your question, I hope it can render it obsolete :)

share|improve this answer
    
I gave it a try, but that plugin doesn't appear to solve my problem: transposing two words without selecting them first. –  Trevor Burnham Jul 1 at 20:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.