2010-05-17-textwrangler-tidy.md 3.0 KB

title: TextWrangler + tidy author: Marcus Rohrmoser type: post date: 2010-05-17T09:30:14+00:00 url: /2010/05/textwrangler-tidy/ yourls_shorturl:


  • en
    • sysadmin tags:
    • bash
    • html
    • OS X
    • TextWrangler
    • tidy
    • utf8
    • xhtml

as I didn't get TidyService to work correctly with UTF8 umlauts, I created a UNIX Shell Script wrapper for html tidy as it comes with OS X that does the job at least for TextWrangler:

  1. open TextWranglers „Unix Filters Folder“
  2. create a file named e.g. „Tidy Html.sh“,
  3. paste the following lines into the file and save it:


    run "tidy" on the file given as 1st (and only) parameter.

    # /usr/bin/tidy -utf8 -asxhtml -indent -wrap 100 -quiet "$1" 2> /dev/null

  4. now you can run tidy on files opened in TextWrangler, even remote files.

  5. assign a keyboard shortcut (I used CTRL-T in the shot above) via the „Unix Filters“ Palette: