Bill Sun wrote:
Hi,
I often deal with text which contains both Chinese and English
characters, and:
(1)I want to apply spell check only for English characters.
I searched web, and found a workable solution: syntax match English
/[!-~]/ contains=@Spell
Unfortunately, this command breaks all syntax hilights. After apply this
command, all command (eg: "\maketitle" in LaTeX) are marked as bad
words.
So, How to achieve (1) without damaging normal syntax hilights?
Can you have a region which matches the English? Such as
syn region start="%BEGIN ENGLISH" end="%END ENGLISH"
containedin=texDocZone contains=@Spell
(and repeat as needed for texPartZone, texChapterZone, etc (see
syntax/tex.vim, about lines 277-286).
caveat: I haven't tested this.
Regards,
Chip Campbell
--
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