Add scripts to TextWrangler

Mac trick

Add a script to allow copying the entire row of texts

Open AppleScript Editor (search in Spotlight)

In AppleScript Editor type in:

tell application "TextWrangler"
tell window 1
select line the (startLine of the selection)
copy (contents of the selection) as text to myText
set the contents of the selection to myText & myText
end tell
end tell

Save to (might need to create the folder):

~/Library/Application Support/TextWrangler/Scripts/

Save as “Duplicate Line

Restart TextWrangler application

In TextWrangler application, open from the top menu bar:




Set Shortcut; any combination of your liking.


2 thoughts on “Add scripts to TextWrangler

  1. Hi,

    Could you show me how to write an apple script that I can run in Text Wrangler to replace special characters such as the em dash with a character entity for all the files (multi-find) in the folder. I knew how to do it in Dreamweaver.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s