I can set the text width and can manually line break imported paragraphs with the following as an example.

set textwidth=72

I can also navigate English text files with the standard 'w' 'b' 'e' '*' commands, etc.

This works well for English, however Thai and other Brahmic scripts of South and South-east Asia space at the phrasal level. Libreoffice, Word, Indesign, TeX, etc. "know" where line breaks should occur. And except for TeX, I can navigate by Thai word in these programs.

My question: How can vim be "taught" to recognize Thai words (or any Indic language for that matter) for the purpose of navigation, word wrapping, and line breaking.

  • Could you teach us in the mean time? Someone may be able to help you from there.
    – romainl
    Nov 12, 2015 at 9:12
  • 1
    Not sure what you mean. I typed English, Thai and Lao in the chrome address bar and then used alternate arrow on my mac and I was able to navigate at the word level in all three of these languages. The programs that I have mentioned are tapping into work that has already been done at some lower level. If vim could tap into the same work, then someone could edit a mutli-language document without having to do anything fancy. 'w' would just scroll happily from one word to the next regardless of the language. Nov 12, 2015 at 14:54
  • 1
    Line breaks are another issue. These languages space at the phrasal level and the spaces have meaning. So the trailing space or absence of a trailing space at the end of the line has meaning when breaking and joining lines. For purpose of example, the spaces are similar to an oxford comma and other punctuation and is the difference of whether or not we had Grandma for breakfast. (Let's eat Grandma. vs Let's eat, Grandma.) Nov 12, 2015 at 15:02
  • I meant "tell us what the rules are if you want us to help you find a way to follow them". But I suspect this question is more appropriated to the vim_dev mailing list.
    – romainl
    Nov 12, 2015 at 15:33
  • What ever the rules are, they have already been written and are incorporated into all the major OSes such that most programs are able to tap into them. Unfortunately, I do not know what these rules are called, so that I do not know how to refer to them. // I have taken your advice, @romainl and have written the vim_dev mailing list. Currently waiting for the email to post. Thank you for getting me started in vim. Nov 12, 2015 at 17:03


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.