On Sun, 10 Oct 2010, Tony Mechelynck wrote:

On 08/10/10 21:22, Benjamin R. Haskell wrote:
On Sat, 9 Oct 2010, Zac Lee wrote:

please see the pic
yes, I know that the characters cannot display in one line, but I want
the line 127 is full thanks

Are you looking for the 'wrap' option?

:help 'wrap'

Specifically:

:set nowrap


Or do you mean that the characters aren't stretching to the edge of the screen? In that case, I'm not sure. Maybe your OS has a defective wcwidth() (so Vim isn't calculating the widths of the hanzi correctly)? More information would be necessary to diagnose. Is that Vim or Gvim?


Vim will never display a left-half hanzi in the last screen cell of a line. If a hanzi would start in the last cell of a line, Vim moves the whole hanzi to the next line (in 'wrap' mode) or omits it (in 'nowrap' mode). The apparent "space" in the last cell of the line has no reality, it is not part of the text of the file as recorded on disk, or indeed even as represented in memory.

Vim always uses two screen cells for "wide" CJK characters, it has its own width table compiled-in (borrowed from the Unicode character properties database) and, for "ambiguous" characters which are "wide" in some fonts and "narrow" in others, the 'ambiwidth' option.

It wasn't clear to me from the screenshot what the problem was. OP, is that the problem -- that there's space for half a CJK character?

Where 'Y' is a Latin character, and __ and -- are hanzi:
┌──────────────────┐
│127 __--__--__--Y │
│    --__--        │
│128 __--__--      │
└──────────────────┘

It looked to me like the line itself was only occupying about half of the available screen width:
┌───────────────────────────────────┐
│127 __--__--__--Y                  │
│    --__--                         │
│128 __--__--                       │
└───────────────────────────────────┘

(My off-the-cuff response about wcwidth() doesn't make sense for either case, but it's nice to know Vim rolls its own.)

--
Best,
Ben

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to