Search code examples
vimutf-8charneovim

Why does different char-width occur in Vim and Nvim?


Why does different char-width occur in Vim and Nvim ? And how to make it same?

Like the following graph. In Vim, the char is double-width, but in Nvim it is single-width.

enter image description here

12345
│││
│││
│x

You can copy the words and test.


Solution

  • I found the reason is 'ambiwidth' option.

    set ambiwidth=double make it difference behavior.

    set ambiwidth=single display one-width normally.