Sar*_*use 8 vim spell-checking
我发现自己越来越多地使用讽刺点 (?)。但是,vim 拼写不会将其识别为有效的标点符号。
如何将它添加到 vim 以便拼写有效?
解决这个问题的一种方法是将字符作为定义的标点符号直接添加到 vim 中。这样做的方法是修改vim 源文件,mbyte.c
然后重新编译vim。此文件位于主 /src 主干中(请参阅https://code.google.com/p/vim/source/browse/src/mbyte.c)。你要修改的函数是这样开始的:
/*
* Get class of a Unicode character.
* 0: white space
* 1: punctuation
* 2 or bigger: some class of word character.
*/
int
utf_class(c)
int c;
{
/* sorted list of non-overlapping intervals */
static struct clinterval
{
unsigned int first;
unsigned int last;
unsigned int class;
} classes[] =
{
{0x037e, 0x037e, 1}, /* Greek question mark */
{0x0387, 0x0387, 1}, /* Greek ano teleia */
{0x055a, 0x055f, 1}, /* Armenian punctuation */
{0x0589, 0x0589, 1}, /* Armenian full stop */
... etc and so on
Run Code Online (Sandbox Code Playgroud)
您将您的字符添加到此列表中,重新编译后它将被视为标点符号。
归档时间: |
|
查看次数: |
237 次 |
最近记录: |