分页: 1 / 2
【推荐】Vim 字体和配色方案
发表于 : 2008-08-18 21:34
由 nickleeh
Vim是我喜欢的编辑器:强大,灵活。经常使用,自然需要一个美观舒服的界面,即字体、配色方案。(Windows下默认的可以说是中规中矩)在此,我想和大家一起分享我喜欢和一直使用的字体、配色。
Consolas 等宽字体
Eclipse 配色方案
代码: 全选
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"GUI font settings
""""""""""""""""""
if has("gui_running")
if has("gui_gtk2")
:set guifont=Luxi\ Mono\ 12
elseif has("x11")
" Also for GTK 1
:set guifont=*-lucidatypewriter-medium-r-normal-*-*-180-*-*-m-*-*
elseif has("gui_win32")
:set guifont=Consolas:h12:cANSI
endif
endif
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
colorscheme eclipse "set color scheme _ eclipse _
注:
1. 由于工作的原因,我是在Windows下使用Vim。在Linux下的朋友,请根据你的GUI更改相应字体。
2. Windows 下请开启TryeType,效果会更好。
[/code]
编程用字体选择标准:
1. 所有字符等宽
2. 简洁、清晰、规范的字符形体
3. 支持ASCII码为128以上的扩展字符集
4. 空白字符(ASCII: 0x20)与其他字符等宽
5. '1'、'l'和'i'等三个字符易于区分
6. '0'、'o'和'O'等三个字符易于区分
7. 双引号、单引号的前后部分易于区分,最好是镜像对称的
8. 清晰的标点符号外形,尤其是大括符、圆括符和方括符
发表于 : 2008-08-18 21:43
由 qiang_liu8183
图呢
发表于 : 2008-08-18 21:48
由 adagio
什么啊?好水……
发表于 : 2008-08-19 14:58
由 QuITh
不好看 我觉得默认的英文字体 monospace 已经很好了 然后 colorscheme morning 足够了
发表于 : 2008-08-19 15:00
由 BigSnake.NET
7. 双引号、单引号的前后部分易于区分,最好是镜像对称的
这个不可能, 英文的前后引号是同一个字符
发表于 : 2008-08-19 16:44
由 nickleeh
每个人的审美观点不一样。
我觉得这中字体和适合程序员,配色又很经典。所以想和大家一起分享。如果你觉得你现在用的已经够好的了,没问题,请继续使用。
我只是给大家提供一些参考,多一个选择。还望大家不要拍砖。
发表于 : 2008-08-19 16:46
由 nickleeh
qiang_liu8183 写了:图呢
昨天没来得及发图,请见谅!
发表于 : 2008-08-19 17:03
由 nickleeh
BigSnake.NET 写了:7. 双引号、单引号的前后部分易于区分,最好是镜像对称的
这个不可能, 英文的前后引号是同一个字符
对,程序员的字体中
应该是一样的。
但是有些英文字体,前后引号不一样,即不镜像对称。比如我们常见的Times New Roman字体,英文的前后引号就不一样。
发表于 : 2008-09-04 20:20
由 poet
对于程序员来说 ,楼主的方案太亮了,长期看这么亮底色的代码会疼的。
我很少见到程序员长期使用这么亮的编辑器配色方案。
Re: 【推荐】Vim 字体和配色方案
发表于 : 2008-11-25 16:35
由 scut_tang
刺眼,不适合长时间代码。
Re: 【推荐】Vim 字体和配色方案
发表于 : 2008-11-26 18:48
由 xyywll
附上我的语法文件:
适合 c 用户,效果如何,打开一个 c 文件即知
还有很多改进余地,大家改改
cat ~/.vim/syntax/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
Re: 【推荐】Vim 字体和配色方案
发表于 : 2010-07-31 3:06
由 underline_1
mark
Re: 【推荐】Vim 字体和配色方案
发表于 : 2010-09-03 15:16
由 guiwen1158
Re: 【推荐】Vim 字体和配色方案
发表于 : 2010-10-12 15:24
由 tanshuang
xyywll 写了:附上我的语法文件:
适合 c 用户,效果如何,打开一个 c 文件即知
还有很多改进余地,大家改改
cat ~/.vim/syntax/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
你这个真的不好使阿,我是ubuntu 下vim ,按你得设置了,但这么着都不好使,气死了,怎么办,高手指导一下
我的步骤:
将你得copy到~/.vim/syntax/c.vim下.重启vim,但没效果,郁闷
Re: 【推荐】Vim 字体和配色方案
发表于 : 2010-10-14 10:13
由 lilydjwg
tanshuang 写了:
你这个真的不好使阿,我是ubuntu 下vim ,按你得设置了,但这么着都不好使,气死了,怎么办,高手指导一下
我的步骤:
将你得copy到~/.vim/syntax/c.vim下.重启vim,但没效果,郁闷
你用的是终端下的vim?还是没有打开语法高亮功能?