Windows – Using Romanian keyboard with gVim

gvimwindows

I'm using gVim to type in a journal paper that contains a lot of occurences of the unicode characters U+0219 "s with comma below" (ș) and U+021b "t with comma below" (ț).

Both encoding and fileencoding are set to utf-8, and the GUI font I'm using, Consolas, clearly supports these characters, yet Vim shows them on screen as question marks. That wouldn't bother me too much, except it saves the file to disk with the question marks as well!

Update: Looks I can paste the character into Vim from clipboard, I just can't type it. I'm using the "Romanian (Programmers)" keyboard, and ș is bound to AltGr+s, or Ctrl+Alt+s. Could there be some keybinding conflict with gVim on Windows?

Best Answer

I think :he mbyte-keymap may be the answer to your problem - this has an advantage that normal mode is not using the alternative layout.

Surprisingly there is no Romanian keyboard shipped with vim, so you can use one from here

Then just set:

set keymap=romanian
Related Question