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

respect &expandtab when indenting the TOC links #17

Closed scrooloose closed 8 years ago

scrooloose commented 8 years ago

Previously, the TOC was always indented with hard tabs. Now we check &expandtab and use spaces if needed.

Note: GetIndentText() seems like a pretty crap function name, but I couldn't think of anything better. Sorry :-D

mzlogin commented 8 years ago

Yeah, it's much better to respect &expandtab. I used to think Vim will do this automatic, but it doesn't.

GetIndentText() not a bad name, at least its meaning is clear. Haha~

Thanks a lot. @scrooloose 👍