On Thu, Jan 25, 2018 at 1:34 AM, CoinCheung <[email protected]> wrote:
> Hello, I believe this I met is a real issue about wrap:
> When I write a combination of English and Chinese, I cannot guarantee that
> the line wraps at the correct position.
> Since Chinese characters do not separate with spaces, the Chinese lines will
> be regard as a single English word, and the line will wrap between English
> words instead of Chinese characters, like this:
>
> line 1:  These are English words, followed by a many
>             Chinese这些是中文这些是中文这些是中文这些是中文
>
> The correct break point should be among the Chinese characters but here it
> is before the English word "Chinese", since there is a space before it and
> the following Chinese characters are regarded as some letters appended to
> the word "Chinese". Even though I add a space after the English words, the
> line still suffers from getting wrapped too early when the English sentence
> is too short to meet the end of this line.
>
> Hope I made myself clear. Do you have features to fix this or is this some
> feature that should be added?

I suppose there ought to be a space between the last Latin-script word
(here, "Chinese") and the first hanzi (这); but of course this wouldn't
take care of the fundamental problem, which is that wrapping rules are
not the same for Latin and hanzi scripts.

I think that this falls under the heading "Vim is a plain text editor,
not a WYSIWYG text processor"; in particular, AFAIK, there is no
provision in Vim for breaking lines differently between Latin letters
and hanzi, any more than there is for displaying Latin text LTR and
Hebrew or Arabic text RTL in the same window (unless, in the latter
case, Vim runs in an "intelligent terminal" such as mlterm, where the
bidirectionality is handled by the terminal and not by Vim). If we
knew about a terminal which could break lines "at whitespace
characters within Latin text and anywhere between hanzi", a new entry
might be made for this problem in the todo.txt helpfile; but until or
unless such a terminal exists, I doubt that there is a solution, other
than adding ZWNJ (zero-width non-joiner) characters at "likely" places
between the hanzi.

Best regards,
Tony.

-- 
-- 
You received this message from the "vim_dev" 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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui