Auto-convert tab to 4 spaces in TextWrangler?

允我心安 提交于 2019-11-28 20:00:23

Go to "Preferences" -> "Editor Defaults" -> "Auto-expand tabs," and then set tabs to 4 spaces. Then restart TextWrangler for changes to take place.

For docs that already exist you have to hit the "Text options" button in the top of the editor window of the open document. It's the button that looks like a "T" with a light switch next to it. In that drop down there is the "auto-expand tabs" there as well.

in version 4.5.5, there is 'Text -> Detab...', which pops up a requester for how many space per tab, preset for 4.

Go to Edit -> Text Options and tick Auto-expand tabs. This will make all the new tabs to change to spaces.

To change all current tabs to spaces as well, go to Text -> Detab and hit Detab.

Hope that helps!

For Mac, another easy way to check and enable "Auto-expand tabs" is to hit the gear button on top left.

You can also use "Normalize Options..." to set the text options of an already-open document to whatever you have set in your Preferences. This is useful for dealing with pre-existing code.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!