gabrielelana / vim-markdown

Markdown for Vim: a complete environment to create Markdown files with a syntax highlight that doesn't suck!
MIT License
741 stars 58 forks source link

Nested ordered list items are not highlighted correctly #51

Closed tamlok closed 8 years ago

tamlok commented 8 years ago

Level 1 ordered list items can be highlighted correctly. However, the number of nested ordered list items are just plain text. For example,

1. I am first;
2. I am second;
    1. Fisrt in Second;
    2. Second in Second;
gabrielelana commented 8 years ago

Unfortunately this is due to the fact that markdown does not clearly defines the indentation rules for list items. Here I've chosen to use 2 spaces, so if you reduce the indentation from 4 to 2 your example should work

Right now that number is fixed in the code but it can be extracted as a configuration parameter, if you wanna try PR are warmly accepted 😉

Otherwise you could put in your vimrc something like au FileType markdown setl sw=2 sts=2 et

Let me know if this solves your issue

tamlok commented 8 years ago

@gabrielelana It works! Thanks! Because I am customed to use 4 spaces for indentation, so I autocmd to change the indentation of vim-markdown, which causes this issue. Thanks very much! By the way, if the code block can have syntax highlight, it will be much better!

gabrielelana commented 8 years ago

@tamlok You welcome 😄

By the way, if the code block can have syntax highlight, it will be much better!

Did you try the narrow function? <Leader>e inside a code block?