2

In Vim, I find each of ü and ß takes up fullwidth, i.e. twice as fat as ASCII characters. I am writing some German-learning notes, and find this to be very confusing, since I have been mistaken that there were a whitespace following that character. How can I make them shown as halfwidth?

Afterwards, out of curiosity, I tried some extended Latin characters (umlauts, accented vowels, currency symbols, etc.), and find some other characters looking like halfwidth but be shown as fullwidth. They include (but I suppose are not restricted to)

ßüŒœø€§¶

This is true for Vim inside iTerm2, MacVim inside iTerm2, Vim inside Terminal.app, MacVim inside Terminal.app, and even for standalone GUI of MacVim. I have tried several monospace fonts, including Monaco and Menlo. I use Mac Sierra.

2

Sorry, it's because I set :set ambiwidth=double. It makes some characters twice as wide as usual. I set :set ambiwidth=single, and all is fine. This line, I must have copied from some stranger's vimrc and did not examine closely. It's my fault, not Vim's fault.

I have no idea what ambiwidth is for. Maybe there is some font that need it to display right (see :help 'ambiwidth'). But as I cancelled it and set to single, everything still seems fine, Chinese or English. This question is kept for future reader's convenience.

  • 1
    There are a lot of options in Vim and identifying which one is wrongly configured can take some time. In case it helps, you can use the :option command to narrow down your search. The window displayed by this command is divided into sections. Each section regroups some options around a common theme. For example, it seems the 'ambiwidth' option is inside the multi-byte characters section. In this window, you can play with the settings of the options, with a few keys which are described at the top. – user9433424 Jan 25 '17 at 6:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.