On 9/12/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:
Yongwei Wu wrote: > I am now a frequent user of the `gq' commands, even with Chinese text > (I have `set formatoptions+=mM'). However, though Chinese does not use > space between characters, it is still bad layout to have characters > like `'"《' appear at the end of a line, or `'"》,,。、?!' at the > beginning of a line. I wonder whether there is an option for this > purpose, or is it possible to add one if it is not there already?
Now even if the linebreaking rules could be defined by a Vim script (I suppose they can but I haven't checked it in detail), how best to implement it? Would it be acceptable to define a new filetype, let's say "cjk", for CJK text, and to define those line-breaking rules in something like an "indent/cjk.vim" or "ftplugin/cjk.vim" script? This
This does not look good to me, for reasons you stated below, and more :-).
would, however, still not address the problem of where to break lines in comments within other syntaxes (such as HTML, c, vimscript, etc.) when they contain CJK ideographic text. Or else, the set of options and option flags (and the set of what they do) might be expanded to allow proper handling of CJK punctuation, but of course this would require patching the C source.
I am thinking about some options like charnotbol and charnoteol, though they are not quite accurate, since the characters are not put to BOL or EOL only when automatic formatting is happening.
Best regards, Tony.
Best regards, Yongwei -- Wu Yongwei URL: http://wyw.dcweb.cn/
