Has anyone ever developed a macro that reverses characters?
For example:
theer > there
whele > wheel
ohlding > holding
As I've gotten older I'm finding I'm making this kind of mistake more often.
Thansk
Reversing Character
Re: Reversing Character
Same here ;-( Or worse: it is getting harder and harder for me to detect typos.bjast wrote:As I've gotten older I'm finding I'm making this kind of mistake more often.
In the past, a similar problem was discussed at:
http://www.nisus.com/forum/viewtopic.php?f=17&t=2659
To sum up, if you want to swap a character before the insertion point with a character after it, just hit control-t which is a built-in Cocoa keybinding, working in all Cocoa applications. However, if you want to reverse two characters before the insertion point, you need something else.
Here is yet another macro attempt for the latter case, the laziest one ;-)
Code: Select all
Send Selector 'moveBackward:'
Send Selector 'transpose:'
Code: Select all
{
"^'" = (
"moveBackward:",
"transpose:"
);
}
Code: Select all
^: control key
$: shift key
@: command key
~: option key