Automatically convert tab to 4 spaces in TextWrangler?

Is there a preference in Textwrangler to override a tab as 4 spaces? In Vim, this is set expandtab in vimrc, but I don’t know how to install it in TW other than clicking “Detab” when I finished editing the document.

Thanks Kevin

+61
tabs spaces textwrangler
Apr 21 '11 at 10:16
source share
6 answers

Go to "Settings" → "Editor Default Settings" → "Automatically Expand Tabs", and then set the tabs to 4 spaces. Then restart TextWrangler for the changes to occur.

+88
Apr 21 2018-11-21T00:
source share

For existing documents, you must click the "Text Options" button at the top of the open document editor window. This is a button that looks like a “T” with a light switch next to it. There are also “auto-extension tabs” in this drop-down list.

+55
Jun 25 2018-11-11T00:
source share

in version 4.5.5 there is "Text → Detab ...", in which the interrogator appears for the number of spaces per tab predefined for 4.

+7
Jan 21 '14 at 13:34
source share

Go to EditText Options and check the Auto-expand tabs checkbox. This will change all new tabs to spaces.

To change all current tabs to spaces, go to Text Detab and press Detab .

Hope this helps!

+4
Oct. 27 '15 at 21:17
source share

For Macs, another easy way to check and enable the Auto Expand tab is to click the gear shift button in the upper left corner.

gear button

+2
Mar 29 '17 at 21:32
source share

You can also use "Normalize Options ..." to set the text options for an already open document according to what you set in your settings. This is useful for working with existing code.

+1
Jun 20 '13 at 17:29
source share



All Articles