开发者

changing vim's vertsplit character to │

This is, I assume, codepage related, but doesn't hurt asking.

How would one, on windows xp's cmd, gvim 7.2 change vertsplit character, so that instead of default | it is │ (so that it makes a full, and not an splitted line) ?

That character is usually changed with

set fillchars=vert:\|

and I can copy paste the ascii graphics line there, but it comes out as garbage. I suppose I would have to change vim's internal codep开发者_Python百科age for it to show correctly ?

Anyone knows how to do this ?


Ok, I'm really late to the party but this is what I do.

The way the characters are rendered depends on the font so you can get a continuous line using some fonts and not with others. I've found that using one of the following gives me an unbroken line.

  • Menlo
  • Monaco
  • Inconsolata
  • DejaVu Sans Mono
  • Consolas
  • Bitstream Vera Sans Mono

As far as settings go, the following is sufficient. Note that this is different from the | character commonly present on keyboards.

set fillchars=vert:\│


I've tried the following :

set enc=utf-8
set fillchars=vert:\│

And it worked, but the result weren't has good as you can hope, it's still not a full line (using the Consolas font, if you get a straight line with another font, I'd be interested to know which one).


This isn't exactly what you want, but I've set fillchars=\ and just use highlighting to color the blank space a different color. It's less elegant, but it looks fine to me.


Digging through the digraph table, I found that the "Box drawings light vertical" is perfect for this purpose. Vim's digraph table entry: │ vv 2502 9474 BOX DRAWINGS LIGHT VERTICAL To use it, press <c-k>vv in insert or command mode to get the character (see :h i_CTRL-K).
As pointed out by others, the setting is applied with set fillchars=vert:|

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜