Indenting with 2 spaces in 1.8.x

Steps to reproduce

  • Open Sandbox Vault in version 1.8.x
  • In settings, change:
    • turn off “Indent using tabs”
    • set “Indent visual width” to 2

image

  • Create a list with an indented item

image

  • Check the number of spaces in the markdown file

image

Did you follow the troubleshooting guide? [Y/N]

yes

Expected result

I’d expect to be able to indent lists using 2 spaces, as it is currently possible in Obsidian 1.7 (using the setting “Tab indent size”).

Actual result

The lists are indented with 4 spaces, independently of the “Indent visual width” setting.

Environment

SYSTEM INFO:
Obsidian version: v1.8.2
Installer version: v1.7.7
Operating system: Windows 11 Pro 10.0.26100
Login status: logged in
Language: en
Catalyst license: supporter
Insider build toggle: on
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

I understand that the new setting “Indent visual width” is meant to be visual only.
But it would be great to keep the ability to indent with 2 spaces, maybe by preserving the old “Tab indent size” setting in case “Indent using tabs” is turned off?

Thank you for opening the feature requests and pointing to the current limitation related to delimiter based indentation.

Indeed I have the “Show indentation guides” disabled in 1.7 due to issues with 2 spaces indentation.

I’m considering migrating to 4 spaces indentation. In case this can help someone, here’s a way to convert indentation using markdownlint-cli2 tool:

Create a .markdownlint-cli2.jsonc configuration in your vault with something like:

{
  "config": {
    "default": false,  // Disable all rules
    "MD007": {
      // Spaces for indent
      "indent": 4,
    }
  }
}

Run the markdown conversion with:

markdownlint-cli2 '**/*.md' --fix

Make sure to backup first. The conversion might not be perfect, and you may have to adjust the result.