mzlogin / vim-markdown-toc

A vim 7.4+ plugin to generate table of contents for Markdown files.
http://www.vim.org/scripts/script.php?script_id=5460
MIT License
613 stars 59 forks source link

fix custom shiftwidth #81

Closed lambillda closed 2 years ago

lambillda commented 2 years ago

When expendtab is on and shiftwidth isn't 2, the sub-content will show wrong.

mzlogin commented 2 years ago

Would you please provider some test data?

For a long time, I have used the configuration of expandtab is on and shiftwidth is 4, and everything is ok.

lambillda commented 2 years ago

I check my .vimrc and found that I deleted the set shiftwidth option, so when expendtab is on 1 tab = 8 spaces, and I also do some test in my vim's markdown preview pluggin markdown-preview.nvim(unknow style, maybe Redcarpet?) and github's markdown preview(GFM style).

results:

markdown-preview.nvim

2022-08-29_11-57

github

This is one space

  • T1
  • T2

    This is six spaces

  • T1
  • T2

    These are 2-5 spaces

  • T1
  • T2