Vim mode 'o' in list always inserts spaces on newline instead of tabs

image

o when in a list inserts single spaces instead of expected behavior of either:

  • Tab whitespace inserted on newline corresponding to indent level
  • with or without a continuation of the list item (i.e. -, >, +), which would be behavior equivalent to Enter/ at the end of the line.
  • Or, empty new line.

Steps to reproduce

This is replicable in sandbox with vim mode enabled on v1.1.9. Default settings has Editor>Behavior>Indent using tabs on, but when using spaces, the indentation is expected behavior equivalent to the first case above, with the number of spaces corresponding to Tab Indent Size in Editor>Behavior:
image

Ideas

This is fixed in actual vim with commands like set listchars=tab, though this and none of the following seem to be valid commands with or without the Vimrc Support plugin.
(Or perhaps commands like set copyindent/autoindent/smartindent/expandtab which idk - may or may not overlap with Editor>Behavior>Smart indent lists)

4 Likes

thanks

This fixes your problem and more https://forum.obsidian.md/t/vim-o-and-o-should-respect-understand-current-context/48386/5?u=whitenoise

But I still would like to know why it adds spaces instead of tabs and if that can be fixed (upstream problem)

1 Like

What is the reason this is tagged as wontfix?

It is also tagged as upstream-bug. What is the upstream library that has this bug?

I consistently run into this issue, using the vimrc plugin is not an option for me.

Update: Disabling “indent using tabs” is a workaround for the bug.

I can’t reproduce this anymore. It’s inserting a number of tags corresponding to the appropriate level.