If I just open a terminal and edit a file in vim, multibyte characters display fine:
However, if I ssh into my machine (even just using ssh localhost
), multibyte characters start looking a bit wonky. They take up more room on the line (note the extra whitespace at the end of the line with p1 = "αβγβγγ")
And editing the line tends to display ?
characters as placeholders:
I think this is some sort of environment, since :set encoding
reports utf-8
when not using ssh and latin1
when using ssh. I suppose I could hardcode it to utf-8
in my .vimrc file, but I'd rather figure out what's causing the issue, and fix it more properly.
set encoding=utf-8
set termencoding=utf-8
in your ~/.vimrc
should take care of your issue.
Make sure that Terminal.app is itself correctly setup for UTF-8 and that the locale of your machine is also set to some form of UTF-8.
set ambiwidth=double
in your .vimrc might solve this issue.
Did you tick the check-box labeled Unicode East Asian Ambiguous characters are wide
?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With