[TxMt] Re: Moving caret outside parentheses without using cursor keys

Mikael Høilund mikael at hoilund.org
Wed Oct 22 06:07:35 UTC 2008


On Oct 16, 2008, at 19:55, Alex Rudyk wrote:

> Often I am typing for example instanse.method_a(:param => "value"_)
> with _ I marked where the caret is placed.
>
> So the question is: is there any way to move caret from the position  
> on the example
> to the position right after right parentheses without moving my  
> fingers to cursor keys.


Put this in a new file named "~/Library/Speech/Speakable Items/ 
Application Speakable Items/TextMate/Escape bracket":

--8<----
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd 
">
<plist version="1.0">
<dict>
	<key>DefaultCommandName</key>
	<string>Escape bracket</string>
	<key>KeyPressArray</key>
	<array>
		<dict>
			<key>CommandKeyDown</key>
			<false/>
			<key>ControlKeyDown</key>
			<false/>
			<key>OptionKeyDown</key>
			<false/>
			<key>ShiftKeyDown</key>
			<false/>
			<key>VirtualKeyCode</key>
			<integer>124</integer>
		</dict>
	</array>
</dict>
</plist>
--8<----

Then go to System Preferences -> Speech, and turn on Speakable Items.  
Then allow it to continuously listen for commands, and make sure  
Application Specific Items is checked in the Commands tab. You can  
then escape a single bracket (or even, as a hidden feature, quotation  
mark) simply by telling your computer to do so.

-- 
Name = "Mikael Høilund"; Email = Name.gsub %r/\s/,%#=?,#
*a=e=?=,!????,:??,?,,Email.downcase![eval(%["\\%o\\%o"]%
[?**2+?o,?\\*2])]="o";Email.gsub! %%\%c%*3%a, %?%c? % ?@
def The(s)%%\%s.%%s+%.org\n.end; :Go and print The Email




More information about the textmate mailing list