# List items indented inconsistently in live editor when indentation is 2 spaces

**URL:** <https://forum.obsidian.md/t/list-items-indented-inconsistently-in-live-editor-when-indentation-is-2-spaces/74415>\
**Category:** Bug reports\
**Tags:** repro\
**Created:** [January 6, 2024, 7:12pm UTC](https://forum.obsidian.md/t/list-items-indented-inconsistently-in-live-editor-when-indentation-is-2-spaces/74415 "2024-01-06T19:12:38Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![mAAdhaTTah](https://forum.obsidian.md/user_avatar/forum.obsidian.md/maadhattah/32/54203_2.png) [@mAAdhaTTah](https://forum.obsidian.md/u/mAAdhaTTah)\
**Post date:** [January 6, 2024, 7:12pm UTC](https://forum.obsidian.md/t/list-items-indented-inconsistently-in-live-editor-when-indentation-is-2-spaces/74415/1 "2024-01-06T19:12:38Z")

</div>

### Steps to reproduce

- Create a new sandbox vault
- Update the settings to disable indenting with tabs (so it indents with spaces)
- Update the indentation size to be 2 spaces
- Observe the following behavior:

![2024-01-06 14.09.35](https://forum.obsidian.md/uploads/default/original/3X/5/a/5a9e59d8bece0273f13f6e679ab987320c71fe4c.gif)

In case it isn’t clear, I hit enter then tab after each line.

### Did you follow the [troubleshooting guide](https://forum.obsidian.md/t/about-the-bug-reports-category/24/10)? [Y/N]

Yes

### Expected result

Consistent indentation.

### Actual result

Indentation that’s is mixed between what appears to be a combo of 2 & 4 spaces, although not entirely clear what’s happening.

### Environment

* * *

### Additional information

```auto
SYSTEM INFO:
	Obsidian version: v1.5.3
	Installer version: v1.4.13
	Operating system: Darwin Kernel Version 23.1.0: Mon Oct 9 21:28:45 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6020 23.1.0
	Login status: not logged in
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: on

RECOMMENDATIONS:
	none

```

---

<div class="post-metadata">

**Author:** ![haszari](https://forum.obsidian.md/user_avatar/forum.obsidian.md/haszari/32/59767_2.png) [@haszari](https://forum.obsidian.md/u/haszari)\
**Post date:** [January 17, 2024, 9:14pm UTC](https://forum.obsidian.md/t/list-items-indented-inconsistently-in-live-editor-when-indentation-is-2-spaces/74415/2 "2024-01-17T21:14:40Z")

</div>

I get this too. I use these indentation settings:

- Set `indent size` to 2 spaces (the minimum)
- Set `indent using tabs` to false/off

I also tried with `smart indent lists` off/on but it’s still not working right.

I notice the fold lines are showing for ~4 space divisions. There should be fold/nesting lines for every level (i.e. every 2 spaces).

This bug was introduced in a recent update (approx December 2023), previously this worked correctly.

When testing this just now I noticed that the indentation behaviour was different (more inconsistent) when typing the list vs pasting all items in one go. So there may be some smart code misfiring when typing line by line.

I suspect there’s an assumed indent level of 4 somewhere in the code that needs to be updated to use the values from preferences.

 ![Screenshot 2024-01-18 at 10.04.54 AM](https://forum.obsidian.md/uploads/default/original/3X/0/9/09fd293f43caabe516c494a4c7eb96cb0c80358d.png)

---

<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:** [January 31, 2024, 12:04am UTC](https://forum.obsidian.md/t/list-items-indented-inconsistently-in-live-editor-when-indentation-is-2-spaces/74415/3 "2024-01-31T00:04:00Z")

</div>

thanks

---

<div class="post-metadata">

**Author:** ![onkeltem](https://forum.obsidian.md/user_avatar/forum.obsidian.md/onkeltem/32/5540_2.png) [@onkeltem](https://forum.obsidian.md/u/onkeltem)\
**Post date:** [February 15, 2024, 4:58pm UTC](https://forum.obsidian.md/t/list-items-indented-inconsistently-in-live-editor-when-indentation-is-2-spaces/74415/5 "2024-02-15T16:58:28Z")

</div>

As I mentioned [in another thread](https://forum.obsidian.md/t/indentation-is-broken-in-1-5-3/76619) (now - a duplicate of this one) I believe I read in the Markdown specification, that one should use either tab or 4 spaces for indentation of lists.  
I can try to find where I read it exactly.

So why 2? or 3? I think it’s not very useful to use these values at all. I’d just remove the corresponding configuration.

P.S. Of course I understand that you can have lots of notes with say 2 spaces. I myself have thousands of them 🙂

---

<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:** [February 15, 2024, 5:10pm UTC](https://forum.obsidian.md/t/list-items-indented-inconsistently-in-live-editor-when-indentation-is-2-spaces/74415/6 "2024-02-15T17:10:08Z")

</div>

Unfortunately, when you use spaces the situation is much more complicated than that. The number of spaces that need to be used depends on the length of the identifier. Two spaces are enough to indent a bullet list but not enough to indent a number list. There is also a maximum number of spaces after which it should be interpreted as codeblock.

1 tab or 4 spaces is a safe setting within the spec but the spec itself is more flexible than that.

---

<div class="post-metadata">

**Author:** ![mAAdhaTTah](https://forum.obsidian.md/user_avatar/forum.obsidian.md/maadhattah/32/54203_2.png) [@mAAdhaTTah](https://forum.obsidian.md/u/mAAdhaTTah)\
**Post date:** [February 16, 2024, 3:44am UTC](https://forum.obsidian.md/t/list-items-indented-inconsistently-in-live-editor-when-indentation-is-2-spaces/74415/8 "2024-02-16T03:44:10Z")

</div>

The original spec says you have to indent 4 spaces to maintain multiple paragraphs within a single list item but does not specify indentation for sublists. [CommonMark does not specify indent width but defines it relative to the marker.](https://spec.commonmark.org/0.31.2/#example-294) I use 2 spaces because 1. that’s how I write my JavaScript because 2. that’s prettier’s default indent width.

---

<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:** [February 18, 2024, 5:33pm UTC](https://forum.obsidian.md/t/list-items-indented-inconsistently-in-live-editor-when-indentation-is-2-spaces/74415/9 "2024-02-18T17:33:23Z")

</div>

Disabling indentation guides (which we do not currently supports when not using 4 spaces or 1 tab) , also fixes this issue.

---

<div class="post-metadata">

**Author:** ![grimzecho](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/g/b9e5f3/32.png) [@grimzecho](https://forum.obsidian.md/u/grimzecho)\
**Post date:** [February 22, 2024, 3:28am UTC](https://forum.obsidian.md/t/list-items-indented-inconsistently-in-live-editor-when-indentation-is-2-spaces/74415/10 "2024-02-22T03:28:00Z")

</div>

This affects both lists and normal indented text, but in different ways.

I tested a bunch of different configurations. Here are some screenshots and findings

- Turning off indentation guides does seem to fix many of the issues
- The `Tab Indent Size` seems to have no effect on lists when `Indent Using Tabs` is on, even though it states _Number of spaces a tab character will render as_. Lists with tabs always render 4 spaces.
- Specifying a tab size of 2 and 3 produce different types/levels of jankiness
- Specifying a tab size of 4 displays correctly
  - Specifying a tab size of more than 4 seems to have the same effect as 4

- the setting of “smart tabs” seems to affect things as well

![image](https://forum.obsidian.md/uploads/default/original/3X/f/c/fc0f2f515d0a4bd8a68404f7cfb0928862158f97.png)

 ![image](https://forum.obsidian.md/uploads/default/original/3X/6/c/6c062771ce45eadb68c6aa4787fb1f267dd110a2.png)

 ![image](https://forum.obsidian.md/uploads/default/original/3X/a/6/a67c738b03b565061c928b39ac489cfb7df5326e.png)

![image](https://forum.obsidian.md/uploads/default/original/3X/3/7/37b05f82512dcbf8954f15bd51796a592f3d2b37.png)

![image](https://forum.obsidian.md/uploads/default/original/3X/6/e/6ef0f01a5819b0a098b622ad185fa0e315888e47.png)

---

<div class="post-metadata">

**Author:** ![grimzecho](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/g/b9e5f3/32.png) [@grimzecho](https://forum.obsidian.md/u/grimzecho)\
**Post date:** [February 22, 2024, 3:31am UTC](https://forum.obsidian.md/t/list-items-indented-inconsistently-in-live-editor-when-indentation-is-2-spaces/74415/11 "2024-02-22T03:31:58Z")

</div>

> [@onkeltem](#):
>
> So why 2? or 3? I think it’s not very useful to use these values at all. I’d just remove the corresponding configuration.

Being able to decrease the visual indent (either by using actual spaces of 2 or 3, or by using a tab that takes up less space) is one of the more important features of a text editor or note app for me. I often organize notes, ideas, reference information, etc, using multiple levels of indentation (typically no more than 4), but having 4 spaces for each level means that there is very little horizontal space left for the content at deeper levels.

---

<div class="post-metadata">

**Author:** ![fruitjuice](https://forum.obsidian.md/user_avatar/forum.obsidian.md/fruitjuice/32/58771_2.png) [@fruitjuice](https://forum.obsidian.md/u/fruitjuice)\
**Post date:** [February 23, 2024, 11:19am UTC](https://forum.obsidian.md/t/list-items-indented-inconsistently-in-live-editor-when-indentation-is-2-spaces/74415/12 "2024-02-23T11:19:40Z")

</div>

Sandbox, new note, no settings changed: smart indent: on, indent using tabs: on, tab indent size: 4, show indentation guides: on  
 ![tabs_4_guides](https://forum.obsidian.md/uploads/default/original/3X/0/5/0536dc5e2466a12aab51f4823f0302af2d19f6b3.gif)

smart indent: on, indent using tabs: on, tab indent size: 4, show indentation guides: **off**  
 ![tabs_4_noguides](https://forum.obsidian.md/uploads/default/original/3X/d/3/d34af5d3cbe2d3b242a17f909df4c67a52dc69a8.gif)

smart indent: on, indent using tabs: on, tab indent size: **2** , show indentation guides: on  
 ![tabs_2_guides](https://forum.obsidian.md/uploads/default/original/3X/6/2/6241548012cb898da05c713014dbe6a99011f980.gif)

---

<div class="post-metadata">

**Author:** ![McApple](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/m/bbce88/32.png) [@McApple](https://forum.obsidian.md/u/McApple)\
**Post date:** [February 25, 2024, 10:39am UTC](https://forum.obsidian.md/t/list-items-indented-inconsistently-in-live-editor-when-indentation-is-2-spaces/74415/13 "2024-02-25T10:39:49Z")

</div>

Is this bug to be fixed?!

---

<div class="post-metadata">

**Author:** ![mAAdhaTTah](https://forum.obsidian.md/user_avatar/forum.obsidian.md/maadhattah/32/54203_2.png) [@mAAdhaTTah](https://forum.obsidian.md/u/mAAdhaTTah)\
**Post date:** [February 25, 2024, 7:08pm UTC](https://forum.obsidian.md/t/list-items-indented-inconsistently-in-live-editor-when-indentation-is-2-spaces/74415/14 "2024-02-25T19:08:44Z")

</div>

This seems to resolve the issue for me for now, altho it would be nice for indentation guides to support different spacing sizes.

---

<div class="post-metadata">

**Author:** ![dsent](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/d/8dc957/32.png) [@dsent](https://forum.obsidian.md/u/dsent)\
**Post date:** [March 30, 2024, 3:17pm UTC](https://forum.obsidian.md/t/list-items-indented-inconsistently-in-live-editor-when-indentation-is-2-spaces/74415/15 "2024-03-30T15:17:18Z")

</div>

Enabling indentation guides breaks everything for me now, even with **Tab indent size** of 4, and **Indent using tabs** disabled.

Without guides:  
 ![image](https://forum.obsidian.md/uploads/default/original/3X/9/e/9e60b4ffb49edeb1ce65567d27545bf2ebccaf92.png)

With guides:  
 ![image](https://forum.obsidian.md/uploads/default/original/3X/0/d/0d4be6d0b873a285b67b2243a2dabd225609f472.png)

The cursor jumps between the points marked with red by one press of the left or right arrow key (like if the first non-space character of the line got a huge padding to the left of it).

Basically, the guides are unusable at this point with any setting.

1.5.11, Windows

---

<div class="post-metadata">

**Author:** ![dewi](https://forum.obsidian.md/user_avatar/forum.obsidian.md/dewi/32/72190_2.png) [@dewi](https://forum.obsidian.md/u/dewi)\
**Post date:** [October 20, 2024, 11:29am UTC](https://forum.obsidian.md/t/list-items-indented-inconsistently-in-live-editor-when-indentation-is-2-spaces/74415/16 "2024-10-20T11:29:39Z")

</div>

This bug has been driving me crazy for months, because it can be fairly intermittent, and sometimes I’ll make it look perfect in Obsidian only for it to be wrong on disk.

Indenting unordered lists by 2 spaces is _extremely_ common since it’s what looks aligned in ASCII, and it’s in GitHub’s version of the spec.

Disabling Indentation Guides does seem to help, but it’s definitely a bug

---

<div class="post-metadata">

**Author:** ![kurko](https://forum.obsidian.md/user_avatar/forum.obsidian.md/kurko/32/4805_2.png) [@kurko](https://forum.obsidian.md/u/kurko)\
**Post date:** [January 20, 2025, 6:35pm UTC](https://forum.obsidian.md/t/list-items-indented-inconsistently-in-live-editor-when-indentation-is-2-spaces/74415/17 "2025-01-20T18:35:24Z")

</div>

Bumping this one. Is there anything we could do to help fixing this issue? Maybe make the markdown engine opensource or something, so we can open a PR against it?

 ![0561ea2309c1bebdbdc69da00793e54327e794fb_2_1380x892](https://forum.obsidian.md/uploads/default/original/3X/a/2/a295ead4b4655906661c9c38a0c4b7e48b1d2c01.jpeg)

---

<div class="post-metadata">

**Author:** ![Some\_Guy](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/s/439d5e/32.png) [@Some\_Guy](https://forum.obsidian.md/u/Some_Guy)\
**Post date:** [July 12, 2025, 4:36am UTC](https://forum.obsidian.md/t/list-items-indented-inconsistently-in-live-editor-when-indentation-is-2-spaces/74415/19 "2025-07-12T04:36:21Z")

</div>

new user here, this is core functionality, it seems insane to me that this hasn’t been fixed after over a year! This isn’t just about setting odd tab widths or using little-supported features, even with the app defaults my cursor is jumping all over the place just using a simple feature like indentation/lists!

- this
  - shouldn’t
    - completely
      - bork
        - your note-taking app on stock settings 😅

For coming up to 2 years!

---

<div class="post-metadata">

**Author:** ![Laospho4u](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/l/48db29/32.png) [@Laospho4u](https://forum.obsidian.md/u/Laospho4u)\
**Post date:** [December 20, 2025, 11:53pm UTC](https://forum.obsidian.md/t/list-items-indented-inconsistently-in-live-editor-when-indentation-is-2-spaces/74415/20 "2025-12-20T23:53:11Z")

</div>

Is there a fix for this yet? I’ve still been using the workaround from @haszari by disabling ‘Indent using tabs’.

Its bizarre a heavily used feature like this would be bugged for so long.
