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
Add Custom Text at the Beginning of Each Line
When you need to add text to the beginning of each line automatically, this tric...
How to Customize Style Packs in InDesign
See how easy it is to switch up InDesign layouts at the touch of a button, using...
How to Create Cascading Object Styles in InDesign
Learn how to use paragraph shading and styles built into object styles to create...
