tags:

views:

98

answers:

4

Guys, I am learning vim and it is great. But the problem with vim/gvim is that it doesn't support any complex scripts like Devanāgarī. It is not rendered properly. See the screenshots below:

Rendering in Vim

Correct Rendering which is displayed gEdit/emacs/KWrite

Is there any way to make vim/gvim support complex scripts? This affects to all Indic scripts. Yes! I tried changing font just in case, but it didn't work.

A: 

Check:

set fileencoding
set encoding

Also check again the font. Not all font support everything.

Wernight
Ya! I did set fileencoding=utf-8 and set encoding=utf-8 but still no difference.
Ujjwol
Yes! Did checked the font. That font works fine in gedit or any other text editors.
Ujjwol
I had to download some font to make it work for Chinese :S
Wernight
Yes! that might work for other font's but Indic Script have complex rendering rules, so they are called Complex Scripts.
Ujjwol
A: 

Change the font in vim to the default font in gEdit (or whatever editor you were using in screenshot #2). Is the rendering incorrect with the same fonts?

skazhy
Yes! the rending is incorrect with same font.
Ujjwol
A: 

Vim in gnome-terminal seems to be correct as it uses the same routines for rendering as gedit does (default Ubuntu 10.04).

maat
I am using GNOME Terminal 2.28.1. It is not working. Is this the version you have ? Will this make any difference ? The rendering of complex characters is wrong in gnome-terminal itself.
Ujjwol
http://noob.hu/2010/09/23/vim.png
maat
Even that rendering is wrong. It somewhat-seems right only due to the use of simple characters. Anyway it is not correct.
Ujjwol
A: 

Pay attention to value of iminsert option. Especially try setting:

set iminsert=2
ib
Hmm... No change same rendering problem.
Ujjwol
It's hard to understand what settings exactly are responsible for that, but it works in my system: the rendering is the same in GVim and GEdit...
ib
Can you post of the screenshot of correct rendering ?
Ujjwol
@ib can you post full output of `set` called without arguments?
ZyX
http://i.imgur.com/Wk9AD.png
Ujjwol
Here is how it looks after pasting into an empty buffer: http://imgur.com/xk9EM.png
ib
And this is my `:set` output: http://pastebin.com/vG2GCHka
ib
May be this issue is somehow related to X settings? For example, I'm using X Input Method system-wide. But, again, GVim and any Gtk application reders it correctly. And, by the way, Vim in XTerm also works as expected, I believe.
ib
Still the rendered is improved than in mine but not correct.
Ujjwol
At least, it renders exactly the same way as in any Gtk application on my system like Gedit.
ib