Swap the Last Two Characters Typed with a Keyboard Shortcut

Jun 22, 2012 - 11 Comments

Swap the last two characters to fix a typo

How many times have you typed something to discover the last two characters are in the wrong order? You know, when “the” turns into “teh” and “something into “somethign”, a fairly common general mistype. Apparently it happens often enough for there to be an individual keyboard shortcut to instantly swap the last two typed characters, and that keyboard shortcut is Control+T.

Open just about any app in Mac OS X and try it yourself, get the hang of it and it’s certainly faster than hitting delete twice and retyping the two characters again.

This is an old keyboard shortcut from the unix world of text editors that has carried over into OS X. The keyboard shortcut is most useful if you have autocorrect disabled, otherwise those minor typos tend to fix themselves.

Great tip from @maguay

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: William Pearson in Mac OS X, Tips & Tricks

11 Comments

» Comments RSS Feed

  1. Bob says:

    This is just a standard Emacs command. Most Emacs commands work when entering text in most programs. This goes for OS X, Linux and Windows. And, since I am a Vim user this makes me sad :(

    • Theo Vosse says:

      Would you have preferred ESC x left-arrow p?

      Anyway, you can set vi-style editing in bash (i.e., the Terminal): $ set -o vi

      Just put it in your .bash_profile.

      • Bob says:

        Yes I have it set in bash. I have heard of this thing called AltaVista that let’s you search the interweb for information.

        I want it for every program in OS X. I guess I don’t care anymore as OS X is clearly targeting moronic iOS users, and I will be jumping ship soon.

        • Theo Vosse says:

          I’m glad you’ve heard of AltaVista. You might also be interested to check out some of those newcomers, like geocities.

          Anyway, you can’t have vi keybindings in every program in OSX the way you can have (some!) emacs keybindings. And if you’re so clever, you surely know why: it would mean a modal interface, the one we all hate. I certainly don’t want to hit ESC every time I want to go to the start of the line.

          So you’re … o wait, you’re trolling. Sorry, now I see.

          • Bob says:

            Damn! Was it the AltaVista ref that gave be away? LOL

            However, I am jumping ship, as OS X is not going in a good direction.

  2. hishamaus says:

    Another great example of over shortcutting even the simplest of things.
    Why don’t we yet have (Cmd + control + S) to add a space after a word?

    • Robert says:

      Because that would be stupid!

      Ctrl+T cuts keystrokes for a common mistake in half. If you don’t use this the solution you must type: del, del, key, key. Very useful in Terminal.app where autocorrect is not supported.

    • Theo Vosse says:

      It’s optional. You don’t have to use it, and ctrl-t isn’t being used for anything else. Over-short-cutting would be assigning cmd-ctrl-shift-H to Help.

  3. John says:

    I thought this was a very useful tip. Why get so bent Bob & Hish? Just gotta let those rocks keep falling out of your head, huh.

    • Bob says:

      Everyone should know this already! Are we going to post an article for every single Emacs key binding? Post them all in one article and be done with it.

      I think the problem is that Mac user are for the most part like Kelly Bundy—every time a new fact goes in their brain and old one falls out. Hell iOS is based on the fact that Mac user are to stupid to remember where they put a stylus.

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates