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: ob1cannoli on Mar 13, '08 11:51:24AM
or one better, add an input for a file name/path: on run display dialog "Enter file name:" default answer "filename" copy the result as list to {theFilename, theButton} ignoring application responses tell application "Terminal" activate tell application "System Events" to tell process "Terminal" to keystroke "t" using command down do script "vi " & quoted form of fileName in selected tab of the front window end tell end ignoring end run on open inputfile ignoring application responses tell application "Terminal" activate tell application "System Events" to tell process "Terminal" to keystroke "t" using command down do script "vi " & quoted form of POSIX path of inputfile in selected tab of the front window end tell end ignoring end open

[ Reply to This | # ]