2

Editing files containing Devanagari script (or other Indian scripts) in vim doesn't work out of the box. I have not found a satisfactory solution for it yet and would like to hear if anybody else has.

muk.li
  • 449
  • 3
  • 8
  • What problems are you facing? Does the text look wrong? Or are you having problems inputting characters? Or something else? – Martin Tournoij Aug 03 '15 at 08:21
  • 1
    Check this one http://serverfault.com/questions/158473/languages-in-vim-editor – Alex Kroll Aug 03 '15 at 14:46
  • 1
    @Carpetsmoker Yes, the text looks wrong, in different ways depending on which terminal emulator I try to run vim in. Somebody has made a nice overview of the different output he gets, http://benizi.com/vim/devanagari/ , which is not exactly the same for me, but you can get a rough idea about the varieties of output, none of which is correct. In fact, in contrast to the author of mentioned website, I get the best results in konsole. – muk.li Aug 03 '15 at 15:48
  • 1
    @AlexKroll Yes, I know there are other ways to input devanagari in linux, that is not the problem. I can use gedit if I must, it does work for devanagari input, however I'd just like to stick with vim. Emacs seems to handle Devanagari without problem, I might learn it because of that, as I now have to regularly edit files containing pieces of text in devanagari script. – muk.li Aug 03 '15 at 16:01
  • If you're using a terminal emulator (Konsole), then the problem is in the terminal emulator. All Vim does is ask the terminal emulator "Hey, I have these characters with such and such code points, please render them for me. kthxbye". gVim doesn't depend on a terminal emulator, but "under the hood" it's really a terminal emulator, I'm not surprised that a comparatively little used script doesn't work well (not all Latin fonts work well with gVim either)... – Martin Tournoij Aug 03 '15 at 17:16
  • ... Emacs, on the other hand, has it's own drawing code, and is much more advanced in this area. Emacs is miles ahead of Vim when it comes to font support and good looking typography. – Martin Tournoij Aug 03 '15 at 17:17
  • Did you checked whether your version of vim supports Unicode. Give vim --version and a check whether it has +multi byte in it. Also, set encoding to utf8 in vim. :set encoding=utf8 – SibiCoder Apr 15 '16 at 16:09
  • @SibiCoder Yes, vim is compiled with the multibyte option, and the encoding is set to utf-8. – muk.li Apr 15 '16 at 21:42
  • I am using windows. I downloaded cygwin and used vim inside it. It supports complex characters like indic characters. You can type them But the problem is diacritics arent shown. They either hide the main character or they themselves hidden. I couldn't find a solution for this yet. – SibiCoder May 24 '16 at 11:53

0 Answers0