关于~/.vim下无syntax文件夹以及colors文件夹
发表于 : 2013-12-30 15:06
我网上找了些教程关于修改高亮,美化c的语法的。但是家目录下的.vim没有这两个文件夹
我自己创了这两个文件夹可以吗。
还有
那份资料我直接复制到我创建的c.vim中
资料是:"========================================================
" Highlight All Function
"========================================================
syn match cFunction "/<[a-zA-Z_][a-zA-Z_0-9]*/>[^()]*)("me=e-2
syn match cFunction "/<[a-zA-Z_][a-zA-Z_0-9]*/>/s*("me=e-1
hi cFunction gui=NONE guifg=#B5A1FF
"========================================================
" Highlight All Math Operator
"========================================================
" C math operators
syn match cMathOperator display "[-+/*/%=]"
" C pointer operators
syn match cPointerOperator display "->/|/."
" C logical operators - boolean results
syn match cLogicalOperator display "[!<>]=/="
syn match cLogicalOperator display "=="
" C bit operators
syn match cBinaryOperator display "/(&/||/|/^/|<</|>>/)=/="
syn match cBinaryOperator display "/~"
syn match cBinaryOperatorError display "/~="
" More C logical operators - highlight in preference to binary
syn match cLogicalOperator display "&&/|||"
syn match cLogicalOperatorError display "/(&&/|||/)="
" Math Operator
hi cMathOperator guifg=#3EFFE2
hi cPointerOperator guifg=#3EFFE2
hi cLogicalOperator guifg=#3EFFE2
hi cBinaryOperator guifg=#3EFFE2
hi cBinaryOperatorError guifg=#3EFFE2
hi cLogicalOperator guifg=#3EFFE2
hi cLogicalOperatorError guifg=#3EFFE2
我进入vim时的问题是
"a.c" [新文件]
处理 /home/leo/.vim/syntax/c.vim 时发生错误:
第 1 行:
E488: 多余的尾部字符: ll Function
第 19 行:
E33: 没有前一个替换正则表达式
E475: 无效的参数: cBinaryOperator display "/~"
第 20 行:
E33: 没有前一个替换正则表达式
E475: 无效的参数: cBinaryOperatorError display "/~="
处理 /usr/share/vim/vim73/syntax/synload.vim 时发生错误:
第 58 行:
E127: Cannot redefine function <SNR>4_SynSet: It is in use
处理 /home/leo/.vim/syntax/c.vim 时发生错误:
第 1 行:
E488: 多余的尾部字符: ll Function
第 19 行:
-- 更多 --
兄弟们看看如何解决
我自己创了这两个文件夹可以吗。
还有
那份资料我直接复制到我创建的c.vim中
资料是:"========================================================
" Highlight All Function
"========================================================
syn match cFunction "/<[a-zA-Z_][a-zA-Z_0-9]*/>[^()]*)("me=e-2
syn match cFunction "/<[a-zA-Z_][a-zA-Z_0-9]*/>/s*("me=e-1
hi cFunction gui=NONE guifg=#B5A1FF
"========================================================
" Highlight All Math Operator
"========================================================
" C math operators
syn match cMathOperator display "[-+/*/%=]"
" C pointer operators
syn match cPointerOperator display "->/|/."
" C logical operators - boolean results
syn match cLogicalOperator display "[!<>]=/="
syn match cLogicalOperator display "=="
" C bit operators
syn match cBinaryOperator display "/(&/||/|/^/|<</|>>/)=/="
syn match cBinaryOperator display "/~"
syn match cBinaryOperatorError display "/~="
" More C logical operators - highlight in preference to binary
syn match cLogicalOperator display "&&/|||"
syn match cLogicalOperatorError display "/(&&/|||/)="
" Math Operator
hi cMathOperator guifg=#3EFFE2
hi cPointerOperator guifg=#3EFFE2
hi cLogicalOperator guifg=#3EFFE2
hi cBinaryOperator guifg=#3EFFE2
hi cBinaryOperatorError guifg=#3EFFE2
hi cLogicalOperator guifg=#3EFFE2
hi cLogicalOperatorError guifg=#3EFFE2
我进入vim时的问题是
"a.c" [新文件]
处理 /home/leo/.vim/syntax/c.vim 时发生错误:
第 1 行:
E488: 多余的尾部字符: ll Function
第 19 行:
E33: 没有前一个替换正则表达式
E475: 无效的参数: cBinaryOperator display "/~"
第 20 行:
E33: 没有前一个替换正则表达式
E475: 无效的参数: cBinaryOperatorError display "/~="
处理 /usr/share/vim/vim73/syntax/synload.vim 时发生错误:
第 58 行:
E127: Cannot redefine function <SNR>4_SynSet: It is in use
处理 /home/leo/.vim/syntax/c.vim 时发生错误:
第 1 行:
E488: 多余的尾部字符: ll Function
第 19 行:
-- 更多 --
兄弟们看看如何解决