Hello,
is it possible in Textmate to use autoindet to format programming code? E.g the code ______________________________________________ with timeout of 86400 seconds set theList to {"Mac OS:Users:malte:Movies"} repeat with nItem in theList set Ordner to nItem tell application "System Events" set these_files to (every file of folder Ordner whose name extension is "avi") end tell repeat with i from 1 to the count of these_files set this_file to (item i of these_files as alias) set this_file1 to (item 1 of these_files as alias) tell application "Finder" to set fileName to name of this_file set this_info to info for this_file set quelldatei to Ordner & ":" & fileName tell application "QuickTime Player" open file quelldatei end tell end repeat repeat with i from 1 to the count of these_files set this_file to (item i of these_files as alias) tell application "Finder" to set fileName to name of this_file set this_info to info for this_file set zieldatei to "Mac OS:Users:malte:Movies:mov_version:" & fileName & ".mov" set quelldatei to Ordner & ":" & fileName tell application "QuickTime Player" save window fileName in file zieldatei close window fileName end tell tell application "Finder" delete file quelldatei end tell end repeat end repeat say "fertig" end timeout
is changed by my program to
with timeout of 86400 seconds set theList to {"Mac OS:Users:malte:Movies"} repeat with nItem in theList set Ordner to nItem tell application "System Events" set these_files to (every file of folder Ordner whose name extension is "avi") end tell repeat with i from 1 to the count of these_files set this_file to (item i of these_files as alias) set this_file1 to (item 1 of these_files as alias) tell application "Finder" to set fileName to name of this_file set this_info to info for this_file set quelldatei to Ordner & ":" & fileName tell application "QuickTime Player" open file quelldatei end tell end repeat repeat with i from 1 to the count of these_files set this_file to (item i of these_files as alias) tell application "Finder" to set fileName to name of this_file set this_info to info for this_file set zieldatei to "Mac OS:Users:malte:Movies:mov_version:" & fileName & ".mov" set quelldatei to Ordner & ":" & fileName tell application "QuickTime Player" save window fileName in file zieldatei close window fileName end tell tell application "Finder" delete file quelldatei end tell end repeat end repeat say "fertig" end timeout
Is there any way, that Textmate could do this for other languages?
best regards
Malte Christian
On Oct 13, 2010, at 3:27 AM, Malte Christian wrote:
Is there any way, that Textmate could do this for other languages?
Text → Indent Selection or ⌥⌘[ should do that based on the grammar rules for that language and your tab preferences, but it doesn't always work as expected. There are also some language-specific “tidy” commands in some bundles that will reformat a document.