In TextWrangler, can I set the number of spaces for each tab based on the extension for each file?

I want to use 4 spaces for each tab in my Python code (.py files) and 2 spaces for a tab in JavaScript files (.js), and it is very difficult to keep going to the settings menu every time I switch between files.

+3
source share
1 answer

If you enable Emacs local variables in the "Settings" → "Text Files" section, you can add settings for each file:

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

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

+5
source

Source: https://habr.com/ru/post/1715030/


All Articles