vim-sleuth icon indicating copy to clipboard operation
vim-sleuth copied to clipboard

Indent detection doesn't handle lists well

Open jmdevin opened this issue 7 months ago • 0 comments

The body of a list item frequently extends for multiple lines. With n in 'formatoptions', the continuation lines of the body are not indented according to 'tabstop' or 'shiftwidth'; they are normally indented far enough to line up with the first character of the first line of the item not including the list header. For example:

List

    1 Notes

    2 Some notes that span multiple lines some notes that span multiple lines
      some notes that span multiple lines some notes that span multiple lines
      some notes that span multiple lines some notes that span multiple lines

This leads to lines that are indented with a value other than a multiple of 'tabstop' . Sleuth then sets 'tabstop' to an incorrect value (it sets the example above to 2, when it should be 4).

It would be good if sleuth ignored list item bodies when they extended onto additional lines.

jmdevin avatar Jun 13 '25 16:06 jmdevin