TextWranglerでbegin-end短縮入力
Delphiでやってたあれ。酷い説明です。でも無いと死ぬ。
"Open Scripts Folder"で開かれるフォルダにAppleScriptを入れると、TextWranglerのメニューにも出現しますので、後はOS標準機能でもってメニューにキーを割り当てるだけ。
insert begin.scpt
tell application "TextWrangler" set firstLineIndex to startLine of selection set lineLength to length of line firstLineIndex of front text document set InsertionText to "begin" & return repeat lineLength + 1 times set InsertionText to InsertionText & tab end repeat set the selection to InsertionText set insertionPosition to (characterOffset of selection) + (length of InsertionText) select insertion point before character insertionPosition of front text document end tell
insert end.scpt
tell application "TextWrangler" set insertionPosition to (characterOffset of selection) - 1 select (characters insertionPosition through insertionPosition) of front text document set the selection to "end" set insertionPosition to (characterOffset of selection) + 3 select insertion point before character insertionPosition of front text document end tell