tpope / vim-markdown

Vim Markdown runtime files
1.22k stars 191 forks source link

add support to Persian ordered list #203

Open ekm507 opened 1 year ago

ekm507 commented 1 year ago

Hi!

in markdown documents there can be ordered lists with numbers from other languages. such as Persian, Arabic, etc. is it possible to add a support for them?

it does not support them right now: image

below is a vim regex that matches all English, Arabic and Persian ordered list beginings which is a modified version of this

^\%(\t\| \{0,4}\)\<[0-9۰-۹٠-٩]\+\.\%(\s\+\S\)\@=

although I know it does not support all languages. like chinese, indian and others.

also something like \p{N} exists in regex to match any digit from any language but I don't know how to write it in vim style.

can this feature be added to vim? (and thus to other editors like neovim)

tpope commented 1 year ago

۱. list ۲. test

Based on the above, GitHub flavored Markdown at least does not appear to support this. Can you name an implementation that does?

also something like \p{N} exists in regex to match any digit from any language but I don't know how to write it in vim style.

Vim regexps don't have anything like this, unfortunately.