Transpose two characters
Keith whips up a cool script to swap the order of two characters.
I was editing a large file yesterday, and repeatedly needed to move periods from outside closing quotes to the inside. I like to use drag and drop text editing for moving text around, but trying to select and then drag and drop a single character is infuriating.
InCopy has a cool “Transpose” command that will change the order of the characters on either side of the cursor. But alas, InDesign has no such command.
So I whipped up a quick script called TransposeTwoCharacters that does just that: It will swap the order of the characters to the right and left of the insertion point. Just put your cursor between two characters that need to be swapped, and double-click on the script in the Scripts panel. Even better, use the Keyboard Shortcut Editor to assign a keyboard shortcut to the script so that you can transpose characters with a simple keystroke.
This article was last modified on December 20, 2021
This article was first published on June 8, 2010
Commenting is easier and faster when you're logged in!
Recommended for you
Create Mazes in InDesign With a Script
An attendee I met at the recent CreativePro Conference contacted me to ask if I...
How to Install a Script in InDesign That You Found in a Forum or Blog Post
If you find a script that is just text (not a downloadable file), how do you ins...
Improving Scripts
Scripts can give you nearly magical powers in InDesign, but that doesn’t mean yo...
