# "Use tabs: off" only replaces tabs with spaces in lists

**URL:** <https://forum.obsidian.md/t/use-tabs-off-only-replaces-tabs-with-spaces-in-lists/3583>\
**Category:** Bug graveyard\
**Tags:** repro\
**Created:** [July 23, 2020, 7:59pm UTC](https://forum.obsidian.md/t/use-tabs-off-only-replaces-tabs-with-spaces-in-lists/3583 "2020-07-23T19:59:06Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevineato](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/k/bbe5ce/32.png) [@kevineato](https://forum.obsidian.md/u/kevineato)\
**Post date:** [July 23, 2020, 7:59pm UTC](https://forum.obsidian.md/t/use-tabs-off-only-replaces-tabs-with-spaces-in-lists/3583/1 "2020-07-23T19:59:06Z")

</div>

### Info

When `Use tabs` is toggled off under `Settings` --\> `Editor`, a certain number of spaces (I’m assuming 2, but it does not say) should be inserted when `Tab` is pressed instead of a tab character as stated; however, that is not the case. Tab characters are still inserted when `Tab` is pressed.

### Steps to reproduce

1. Set `Settings` --\> `Editor` --\> `Use tabs` to off
2. Go to any note and press the `Tab` key on your keyboard

### Expected result

2 spaces should be inserted into the note.

### Actual result

1 tab character is inserted into the note.

### Environment

- Operating system: Windows 10 Pro for Workstations
- Obsidian version: v0.8.1 (Although I believe this has been a bug in previous versions)

* * *

### Additional information

I also noticed that if I opened up a new line via `Enter` or `o` in Vim mode, it would insert spaces no matter if the previous line was indented with spaces or tabs. If I set `Use tabs` to on though, and the previous line was a list item indented with spaces, then it inserts spaces still, but if the previous line was indented with spaces and **not** a list item, it inserts a tab character. So, this settings’ behavior seems to be fairly unpredictable when it comes to indentation as well as pressing the `Tab` key.

I didn’t see a setting for it, but it would also be useful to configure the number of spaces that the `Use tabs` setting would insert when set to off.

---

<div class="post-metadata">

**Author:** ![joakin](https://forum.obsidian.md/user_avatar/forum.obsidian.md/joakin/32/84_2.png) [@joakin](https://forum.obsidian.md/u/joakin)\
**Post date:** [August 24, 2020, 1:42pm UTC](https://forum.obsidian.md/t/use-tabs-off-only-replaces-tabs-with-spaces-in-lists/3583/2 "2020-08-24T13:42:17Z")

</div>

I’ve been surprised by this today.

With use tabs on `off`:

If you are on a list, like this (`|` is the cursor)

```markdown
- Hello|

```

And press `Enter` + `Tab`, you get spaces.

But, if you are just on plain text:

```markdown
Hello|

```

And press `Enter` + `Tab`, you get a tab.

---

<div class="post-metadata">

**Author:** ![joakin](https://forum.obsidian.md/user_avatar/forum.obsidian.md/joakin/32/84_2.png) [@joakin](https://forum.obsidian.md/u/joakin)\
**Post date:** [September 1, 2020, 4:53pm UTC](https://forum.obsidian.md/t/use-tabs-off-only-replaces-tabs-with-spaces-in-lists/3583/3 "2020-09-01T16:53:37Z")

</div>

Just wanted to mention that I was fighting formatting the markdown for a list of checkboxes to align appropriately and I was having problems because a tab snuck in a previous list item. It was frustrating.

I searched, and in the last week I have 3 files with tabs in some of the list items.

This is usually invisible but when it bites you it is quite frustrating to figure out 😭

---

<div class="post-metadata">

**Author:** ![WhiteNoise](https://forum.obsidian.md/user_avatar/forum.obsidian.md/whitenoise/32/11_2.png) [@WhiteNoise](https://forum.obsidian.md/u/WhiteNoise)\
**Post date:** [September 7, 2020, 3:52pm UTC](https://forum.obsidian.md/t/use-tabs-off-only-replaces-tabs-with-spaces-in-lists/3583/4 "2020-09-07T15:52:36Z")

</div>

I have double checked this issue. I agree with @joakin that the setting work only in list and not elsewhere.  
So we either fix this or clarify what the toggle does.

EDIT: renamed topic

---

<div class="post-metadata">

**Author:** ![kevineato](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/k/bbe5ce/32.png) [@kevineato](https://forum.obsidian.md/u/kevineato)\
**Post date:** [September 18, 2020, 3:49pm UTC](https://forum.obsidian.md/t/use-tabs-off-only-replaces-tabs-with-spaces-in-lists/3583/5 "2020-09-18T15:49:37Z")

</div>

Personally, I believe this setting should definitely apply to all whitespace indentation. It would be a little silly and inconsistent to mix tabs and spaces in the same file in my opinion. I am a software engineer and always use spaces in everything I write (except Makefiles of course). It also makes it easier to use other unix tools with plain text files such as these.

---

<div class="post-metadata">

**Author:** ![Nebucatnetzer](https://forum.obsidian.md/user_avatar/forum.obsidian.md/nebucatnetzer/32/3918_2.png) [@Nebucatnetzer](https://forum.obsidian.md/u/Nebucatnetzer)\
**Post date:** [November 17, 2020, 9:53am UTC](https://forum.obsidian.md/t/use-tabs-off-only-replaces-tabs-with-spaces-in-lists/3583/6 "2020-11-17T09:53:18Z")

</div>

The setting should definitely change all tabs to spaces.  
Everything else makes no sense whatsoever.

I realized today the this behavior is what caused this bug report from me:

> [@Items in checked list render the wrong way](https://forum.obsidian.md/t/items-in-checked-list-render-the-wrong-way/8551):
>
> Steps to reproduce Paste the following code - [] Drucker - https://www.oki.com/printing/online-manuals-14/467854/id/contents/contents/me\_000014.html - [x] Drucker bei den Name stört - Drum Unit ist end of life - [x] Bei den Name beginnt auch vorallem diesen - [] Drucker in Ort - [] Auf Antwort von Brother Support warten. Expected result Three checkboxes on the same level and two of them crossed out. Actual result Some checkboxes become childs of the first checkbox […

Because sometimes I write the lists by hand it apparently entered a tab when the rest of the list was using spaces.

---

<div class="post-metadata">

**Author:** ![WhiteNoise](https://forum.obsidian.md/user_avatar/forum.obsidian.md/whitenoise/32/11_2.png) [@WhiteNoise](https://forum.obsidian.md/u/WhiteNoise)\
**Post date:** [December 12, 2020, 5:48am UTC](https://forum.obsidian.md/t/use-tabs-off-only-replaces-tabs-with-spaces-in-lists/3583/7 "2020-12-12T05:48:42Z")

</div>

will be fixed in 0.9.23

---

<div class="post-metadata">

**Author:** ![Nebucatnetzer](https://forum.obsidian.md/user_avatar/forum.obsidian.md/nebucatnetzer/32/3918_2.png) [@Nebucatnetzer](https://forum.obsidian.md/u/Nebucatnetzer)\
**Post date:** [December 12, 2020, 9:02am UTC](https://forum.obsidian.md/t/use-tabs-off-only-replaces-tabs-with-spaces-in-lists/3583/8 "2020-12-12T09:02:51Z")

</div>

Great news, looking forward to it.

---

<div class="post-metadata">

**Author:** ![WhiteNoise](https://forum.obsidian.md/user_avatar/forum.obsidian.md/whitenoise/32/11_2.png) [@WhiteNoise](https://forum.obsidian.md/u/WhiteNoise)\
**Post date:** [October 13, 2022, 4:12pm UTC](https://forum.obsidian.md/t/use-tabs-off-only-replaces-tabs-with-spaces-in-lists/3583/9 "2022-10-13T16:12:51Z")

</div>

Archived on October 13, 2022, 4:12pm UTC


