How can I configure BBEdit to insert 4 spaces (or at least spaces up to the next column which is a multiple of 4)? I've checked "Auto-expand tabs" in the preferences, but it doesn't seem to be doing that.

  • @Alexander I can think of one reason like when you push code to github.
    – ʀ2ᴅ2
    Nov 4, 2018 at 23:29

2 Answers 2


The Auto-expand tabs preference must also be set for the Language mapping setting. Also, the setting won't be applied until you create or open a new document.

See Languages in BBEdit.

  • 1
    Ah, I needed to create/open a document, that was it. Thanks!
    – Colen
    May 17, 2011 at 22:50
  • Thank you! This was driving me insane because tabs mess up anything I paste from BBEdit into a Rails console
    – Allison
    May 7, 2020 at 21:44

This has stymied me for quite some time, and today I found the way to enable this for open documents. At the very top of the Document in BBEdit in the left hand corner, you will find the path of the file you are currently editing immediately preceded by a small gear icon. Click the gear icon and place a check in the box next to "Auto-expand Tabs".

  • Though useful to note, perhaps, that it appears that you still have to hit settings to make this permanent.
    – ruffin
    Feb 16, 2021 at 20:25
  • I love this answer! And FWIW, there's a bonus feature included with this setting: when the cursor is positioned at the end of the "tab" (now 4 spaces), a single <kbd>delete</kbd> removes all 4 spaces. So, you can actually have your cake, and eat it too!
    – Seamus
    Feb 18, 2023 at 23:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .