3

I want to use 4 spaces per tab in my Python code (.py files) and 2 spaces per tab in my JavaScript (.js files), and it is cumbersome to keep going to the preferences menu every time I switch between files.

Josh Gibson
  • 21,808
  • 28
  • 67
  • 63

1 Answers1

5

If you enable "Emacs local variables" in the Preferences>>Text Files section, you can add per file settings:

# -*- tab-width: 2 -*-

Textwrangler has recently (August 2009) been updated to Version 3.0 which adds 'per-filetype' tab settings.