[TxMt] Re: Block Caret for writers (not only for LaTeX)

Matt Neuburg matt at tidbits.com
Mon Jul 20 16:44:15 UTC 2015


This thread has inspired me to experiment with manually going like this:

Shift-Left Arrow
Right Arrow
Shift-Left Arrow
Right Arrow

... Repeat as necessary. The effect is exactly the same as a blinking block cursor.

Now, how to automate that? Unfortunately, I don't think a TextMate macro can include a "delay" or "sleep" command. But AppleScript can!

tell application "TextMate" to activate
tell application "System Events"
	tell application process "TextMate"
		delay 1
		repeat 3 times
			key code 123 using shift down
			do shell script "sleep 0.5"
			key code 124
			do shell script "sleep 0.5"
		end repeat
	end tell
end tell

It's easy to trigger that with, say, a keyboard shortcut, and so the problem is effectively solved. m.


> On Jul 18, 2015, at 10:28 AM, Novitzky Peter <pnovitzky at gmail.com> wrote:
> 
> Any possibility of introducing this in the next version of TM2 
> 
> a) either as a switch in the TM2 Preferences, 
> b) or as setting in terminal through "defaults write ..." command?

--
matt neuburg, phd = http://www.apeth.net/matt/
pantes anthropoi tou eidenai oregontai phusei
Programming iOS 8! http://shop.oreilly.com/product/0636920034261.do
iOS 8 Fundamentals! http://shop.oreilly.com/product/0636920034278.do
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html




More information about the textmate mailing list