重装了系统,vim的配置文件忘记备份了.纠结死我了.要了一份大致的框架.搞起来.
可能大家都有类似的经历,对于一个每天都用的IDE,必须是习惯的颜色和风格什么的.应该是强迫症.
下面分享一些配置过程中总结的内容:
1. VIM支持的配色.
vim貌似支持的颜色很有限.white black yellow cyan magenta blue grey green red
大多数颜色前面都可以加light 或者 dark 来进行修饰.
以上的这些颜色是一种类型的,其实VIM支持的颜色不仅这些.
我是有多无聊.不过相信这个可以帮助到大家把.
2. 关于colorscheme的选择.
我选择了evening这个主题.但是其实这个主题有很多配色都没有.所以我把evening给改造了.这里面的大多数的宏我都没有见过.所以就又下载了一个主题mustang.然后把两个主题结合在一起.
设置以后的效果如图:
整个的风格上传了以后有点失真.不过还好.另外就是这个主题需要256位的色彩支持.
下面是我的evening.vim主题.
" Vim color file " Maintainer: Bram Moolenaar <[email protected]> " Last Change: 2006 Apr 14 " This color scheme uses a dark grey background. " First remove all existing highlighting. set background=dark hi clear if exists("syntax_on") syntax reset endif let colors_name = "evening" hi Normal guifg=#e2e2e5 guibg=#202020 gui=none ctermfg=253 ctermbg=234 "hi Normal ctermbg=DarkGrey ctermfg=White guifg=White guibg=grey20 " Groups used in the 'highlight' and 'guicursor' options default value. hi ErrorMsg term=standout ctermbg=DarkRed ctermfg=White guibg=Red guifg=White hi IncSearch term=reverse cterm=reverse gui=reverse hi ModeMsg term=bold cterm=bold gui=bold hi StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold hi StatusLineNC term=reverse cterm=reverse gui=reverse hi VertSplit term=reverse cterm=reverse gui=reverse hi Visual term=reverse cterm=reverse ctermbg=black guibg=grey60 hi VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold hi DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red hi Cursor guibg=Green guifg=Black hi lCursor guibg=Cyan guifg=Black "hi Directory term=bold ctermfg=LightCyan guifg=Cyan hi Directory term=bold ctermfg=lightblue guifg=Cyan hi LineNr term=underline ctermfg=black ctermfg=darkgrey guifg=Yellow hi MoreMsg term=bold ctermfg=LightGreen gui=bold guifg=SeaGreen hi NonText term=bold ctermfg=LightBlue gui=bold guifg=LightBlue guibg=grey30 hi Question term=standout ctermfg=LightGreen gui=bold guifg=Green hi Search term=reverse ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black hi SpecialKey term=bold ctermfg=LightBlue guifg=Cyan hi Title term=bold ctermfg=LightMagenta gui=bold guifg=Magenta hi WarningMsg term=standout ctermfg=LightRed guifg=Red hi WildMenu term=standout ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black hi Folded term=standout ctermbg=LightGrey ctermfg=DarkBlue guibg=LightGrey guifg=DarkBlue hi FoldColumn term=standout ctermbg=LightGrey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue hi DiffAdd term=bold ctermbg=DarkBlue guibg=DarkBlue hi DiffChange term=bold ctermbg=DarkMagenta guibg=DarkMagenta hi DiffDelete term=bold ctermfg=Blue ctermbg=DarkCyan gui=bold guifg=Blue guibg=DarkCyan "hi CursorColumn term=reverse ctermbg=white guibg=grey40 hi CursorColumn ctermbg=238 guibg=grey40 hi CursorLine term=underline cterm=underline guibg=grey40 "类型颜色 hi Type term=underline ctermfg=blue guifg=#ffa0a0 guibg=grey5 hi Statement term=underline ctermfg=darkgrey guifg=#ffa0a0 guibg=grey5 "预处理关键字颜色 hi PreProc guifg=#faf4c6 gui=none ctermfg=blue "数字颜色 hi Number guifg=#ff9800 gui=none ctermfg=208 "注释颜色 hi Comment guifg=#808080 gui=italic ctermfg=lightgreen "匹配的内容的颜色 hi MatchParen guifg=#d0ffc0 guibg=#2f2f2f gui=bold ctermfg=157 ctermbg=237 cterm=reverse " Groups for syntax highlighting " 宏颜色 hi Constant term=underline ctermfg=130 guifg=#ffa0a0 guibg=grey5 " 字符串颜色 hi String term=underline ctermfg=white guifg=#ffa0a0 guibg=grey5 hi Special term=bold ctermfg=LightRed guifg=Orange guibg=grey5 hi Define guifg=gold gui=bold ctermfg=yellow " include 颜色 "hi Include guifg=red ctermfg=red " 运算符颜色 "hi Operator guifg=gold gui=bold ctermfg=yellow " 不知道这是配置什么颜色的 "hi Identifier guifg=#b1d631 gui=none ctermfg=red "hi Keyword guifg=#ff9800 gui=none ctermfg=red if &t_Co > 8 hi Statement term=bold ctermfg=darkblue guifg=#ffff60 gui=bold endif hi Ignore ctermfg=DarkGrey guifg=grey20 " vim: sw=2
希望以上的这些可以帮助到大家.