Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Use Terminal's vi as default text editor' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use Terminal's vi as default text editor
Authored by: tub78 on May 14, '08 01:46:39PM

I found that it was necessary to add a delay of 1 second before the command: do script "vi" ... . Otherwise, the "vi" command would sometimes run in the existing tab, and not the newly created tab. For example,

	...
	tell application "System Events" to tell process ¬
		"Terminal" to keystroke "t" using command down
	delay 1
	do script "vi " & quoted form of POSIX path of inputfile ¬
		in selected tab of the front window
	...

- S.

[ Reply to This | # ]