• Vim颜色配置


    最近迷上了Vim

    主要原因是可以装逼

    不过话说它自带的配色里面也就只有一个evening能勉强满足我的审美

    于是我花了大概几天的时间翻了些百度贴吧,或者自己手动改属性后面的配色来实验这个属性到底对应哪里的颜色

    百度能给的帮助真的有限,自己又不太懂英文,机翻根本没法看

    好辛苦……

    所以决定自己写一下这段时间的收获

    至少能让后来者少费些力

    首先是修改配色的一点小东西

    set t_Co=256 "告知配色,终端支持256色。
    
    
    hi    Normal    guifg        guibg        ctermfg        ctermbg
    "颜色    属性    gui前景色    gui背景色    终端前景色    终端背景色
    
    hi clear
    "使用默认的高亮(移除用户定义的高亮,即根据'ft'重新载入语法文件)
    
    hi link name1 name2
    "进行颜色关联,让name1使用与name2一样的颜色设置
    hi link name1 NONE
    "清除name1的颜色关联
    
    "guifg/guibg支持三个特殊的值:none、fg、bg,分别表示无颜色、编辑区一般文本的前景色、一般文本的背景色。
    
    
    "一部分属性代表的含义
    Number
    "数字
    Cursor
    "光标选中部分
    ErrorMsg
    "命令行中的错误提示
    Folded
    "折叠行
    LineNr
    "左侧行号
    NonText
    "非文本区(控制字符和一些特殊字符和编辑器空白区等)
    Normal
    "编辑区一般文本的前景和背景色
    Search
    "搜索
    StatusLine
    "状态行
    Visual
    "圈选
    statement
    preproc
    "语法关键字

    Type
    "类型关键字
    Constant
    "常量
    "自己摸索的配色代表的含义
    "描述带有一定c++风格
    MatchParen "匹配括号 PreProc "include、define高亮 Statement "return、for、while、switch、break、continue、if语句高亮 Type "int、void、bool、char等声明语法高亮 Label "case语法高亮 StorageClass "class类 Structure "struct结构体

    个人感觉还不错的三个配色

    " Vim color file
    "   This file was generated by Palette
    "   http://rubygems.org/gems/palette
    "
    " Author: Compiled from a handful of different themes
    " Notes:  Github color scheme (light)
    
    hi clear
    if version > 580
        if exists("syntax_on")
            syntax reset
        endif
    endif
    
    let colors_name="github"
    
    if has("gui_running")
        set background=light
    endif
    
    
    hi Normal       guifg=#666666 ctermfg=16   guibg=#F8F8FF ctermbg=231  gui=NONE cterm=NONE
    "显然是非特殊语句的高亮
    hi DiffAdd      guifg=#003300 ctermfg=22   guibg=#DDFFDD ctermbg=194  gui=NONE cterm=NONE
    hi DiffChange   guibg=#ECECEC ctermbg=255  gui=NONE cterm=NONE
    hi DiffText     guifg=#000033 ctermfg=17   guibg=#DDDDFF ctermbg=189  gui=NONE cterm=NONE
    hi DiffDelete   guifg=#DDCCCC ctermfg=252  guibg=#FFDDDD ctermbg=224  gui=NONE cterm=NONE
    hi Folded       guifg=#dc143c ctermfg=244  guibg=#ECECEC ctermbg=255  gui=NONE cterm=NONE
    hi LineNr       guifg=#0099cc ctermfg=250  guibg=#ECECEC ctermbg=255  gui=NONE cterm=NONE
    "左侧行号颜色
    hi NonText      guifg=#808080 ctermfg=244  guibg=#ECECEC ctermbg=255  gui=NONE cterm=NONE
    hi VertSplit    guifg=#BBBBBB ctermfg=250  guibg=#BBBBBB ctermbg=250  gui=NONE cterm=NONE
    hi StatusLine   guifg=#404040 ctermfg=238  guibg=#BBBBBB ctermbg=250  gui=BOLD cterm=BOLD
    hi StatusLineNC guifg=#BBBBBB ctermfg=250  guibg=#ECECEC ctermbg=255  gui=ITALIC cterm=NONE
    hi ModeMsg      guifg=#990000 ctermfg=88   gui=NONE cterm=NONE
    hi MoreMsg      guifg=#990000 ctermfg=88   gui=NONE cterm=NONE
    hi Title        guifg=#EF5939 ctermfg=203  gui=NONE cterm=NONE
    hi WarningMsg   guifg=#EF5939 ctermfg=203  gui=NONE cterm=NONE
    hi SpecialKey   guifg=#FFFFFF ctermfg=231  guibg=#FF1100 ctermbg=196  gui=ITALIC cterm=NONE
    hi MatchParen   guifg=#000000 ctermfg=16   guibg=#CDCDFD ctermbg=189  gui=NONE cterm=NONE
    "匹配括号底色
    hi Underlined   guifg=#DC143C ctermfg=16   gui=UNDERLINE cterm=UNDERLINE
    hi Directory    guifg=#990000 ctermfg=88   gui=NONE cterm=NONE
    hi Visual       guifg=#FFFFFF ctermfg=231  guibg=#3465A4 ctermbg=61   gui=NONE cterm=NONE
    hi VisualNOS    guifg=#FFFFFF ctermfg=231  guibg=#204A87 ctermbg=24   gui=NONE cterm=NONE
    hi IncSearch    guifg=#000000 ctermfg=16   guibg=#CDCDFD ctermbg=189  gui=ITALIC cterm=NONE
    hi Search       guifg=#000000 ctermfg=16   guibg=#CDCDFD ctermbg=189  gui=ITALIC cterm=NONE
    hi Ignore       guifg=#808080 ctermfg=244  gui=NONE cterm=NONE
    hi Identifier   guifg=#0086B3 ctermfg=31   gui=NONE cterm=NONE
    hi PreProc    guifg=#0066cc guibg=bg     gui=bold ctermbg=4  ctermfg=14
    "include、define的高亮
    hi Comment      guifg=#AAAAAA ctermfg=248  gui=ITALIC cterm=NONE
    hi Constant     guifg=#177F80 ctermfg=30   gui=NONE cterm=NONE
    hi String       guifg=#D81745 ctermfg=161  gui=NONE cterm=NONE
    hi Function     guifg=#990000 ctermfg=88   gui=BOLD cterm=BOLD
    hi Statement    guifg=#1E90FF guibg=bg     gui=bold ctermbg=bg  ctermfg=14
    "return、for、while、switch、break、continue、if语法高亮
    hi Type         guifg=#ff5566 ctermfg=60   gui=BOLD cterm=BOLD
    "int、void、bool、char等声明的语法高亮
    hi Number       guifg=#1C9898 ctermfg=30   gui=NONE cterm=NONE
    "数字
    hi Todo         guifg=#FFFFFF ctermfg=231  guibg=#990000 ctermbg=88   gui=BOLD cterm=BOLD
    hi Special      guifg=#159828 ctermfg=28   gui=BOLD cterm=BOLD
    hi rubySymbol   guifg=#960B73 ctermfg=89   gui=NONE cterm=NONE
    hi Error        guifg=#F8F8FF ctermfg=231  guibg=#FF1100 ctermbg=196  gui=NONE cterm=NONE
    hi Todo         guifg=#F8F8FF ctermfg=231  guibg=#FF1100 ctermbg=196  gui=UNDERLINE cterm=UNDERLINE
    hi Label        guifg=#DC143C ctermfg=16   gui=BOLD cterm=BOLD
    "case的语法高亮
    hi StorageClass guifg=#000000 ctermfg=16   gui=BOLD cterm=BOLD
    hi Structure    guifg=#ff5566 ctermfg=16   gui=BOLD cterm=BOLD
    "struct结构体(那上面那个应该是class类喽?)
    hi TypeDef      guifg=#000000 ctermfg=16   gui=BOLD cterm=BOLD
    hi WildMenu     guifg=#7FBDFF ctermfg=111  guibg=#425C78 ctermbg=60   gui=NONE cterm=NONE
    hi Pmenu        guifg=#FFFFFF ctermfg=231  guibg=#808080 ctermbg=244  gui=BOLD cterm=BOLD
    hi PmenuSel     guifg=#000000 ctermfg=16   guibg=#CDCDFD ctermbg=189  gui=ITALIC cterm=NONE
    hi PmenuSbar    guifg=#444444 ctermfg=238  guibg=#000000 ctermbg=16   gui=NONE cterm=NONE
    hi PmenuThumb   guifg=#AAAAAA ctermfg=248  guibg=#AAAAAA ctermbg=248  gui=NONE cterm=NONE
    hi TabLine      guifg=#404040 ctermfg=238  guibg=#DDDDDD ctermbg=253  gui=NONE cterm=NONE
    hi TabLineFill  guifg=#404040 ctermfg=238  guibg=#DDDDDD ctermbg=253  gui=NONE cterm=NONE
    hi TabLineSel   guifg=#404040 ctermfg=238  gui=BOLD cterm=BOLD
    hi cucumberTags guifg=#333333 ctermfg=236  guibg=#FFFF66 ctermbg=227  gui=BOLD cterm=BOLD
    hi htmlTagN     gui=BOLD cterm=BOLD
    hi Cursor       guifg=#F8F8FF ctermfg=231  guibg=#444454 ctermbg=238  gui=NONE cterm=NONE
    "光标选中部分的底色
    hi CursorLine   guibg=#D8D8DD ctermbg=253  gui=NONE cterm=NONE
    hi CursorColumn guibg=#D8D8DD ctermbg=253  gui=NONE cterm=NONE
    
    hi link rubyStringDelimiter String
    github
    " Vim color file
    " Maintainer: Miikka-Markus Leskinen <miikka@leskinen.net>
    " First Created: Apr 2005 (Guardian 1)
    " Last Update: 31 Jan 2017
    
    " Guardian color scheme, version 2.0
    
    " Rich-syntax colors for coding and other vimming.
    " 2017: Guardian 2. Updated for modern Ultra HD monitors. Deeper colors.
    
    set background=dark
    hi clear
    syntax reset
    
    " Colors for the User Interface.
    
    hi Cursor      guibg=#ff4455  guifg=white    gui=bold ctermbg=4 ctermfg=15
    hi link CursorIM Cursor
    hi Normal      guibg=#101830  guifg=white    gui=none ctermbg=0 ctermfg=15
    hi NonText     guibg=#445566  guifg=#ffeecc  gui=bold ctermbg=8 ctermfg=14
    hi Visual      guibg=#99cc99  guifg=#334433    gui=none ctermbg=9 ctermfg=15
    
    hi Linenr      guibg=bg          guifg=#aaaaaa  gui=none ctermbg=bg ctermfg=7
    
    hi Directory   guibg=bg          guifg=#337700  gui=none ctermbg=bg ctermfg=10
    
    hi IncSearch   guibg=#0066cc  guifg=white    gui=none ctermbg=1 ctermfg=15
    hi link Seach IncSearch
    
    hi SpecialKey  guibg=bg    guifg=fg       gui=none ctermbg=bg ctermfg=fg
    hi Titled      guibg=bg    guifg=fg       gui=none ctermbg=bg ctermfg=fg
    
    hi ErrorMsg    guibg=bg    guifg=#ff0000  gui=bold ctermbg=bg ctermfg=12
    hi ModeMsg     guibg=bg    guifg=#ffeecc  gui=none ctermbg=bg ctermfg=14
    hi link     MoreMsg     ModeMsg
    hi Question    guibg=bg    guifg=#ccffcc  gui=bold ctermbg=bg ctermfg=10
    hi link     WarningMsg  ErrorMsg
    
    hi StatusLine      guibg=#ffeecc     guifg=black    gui=bold ctermbg=14 ctermfg=0
    hi StatusLineNC      guibg=#ff4455     guifg=white    gui=none ctermbg=4  ctermfg=11
    hi VertSplit      guibg=#ff4455     guifg=white    gui=none ctermbg=4  ctermfg=11
    
    hi DiffAdd     guibg=#446688  guifg=fg      gui=none ctermbg=1 ctermfg=fg
    hi DiffChange  guibg=#558855  guifg=fg      gui=none ctermbg=2 ctermfg=fg
    hi DiffDelete  guibg=#884444  guifg=fg      gui=none ctermbg=4 ctermfg=fg
    hi DiffText    guibg=#884444  guifg=fg      gui=bold ctermbg=4 ctermfg=fg
    
    " Colors for Syntax Highlighting.
    
    hi Comment  guibg=#334455  guifg=#dddddd  gui=none    ctermbg=8      ctermfg=7
    
    hi Constant    guibg=bg       guifg=white      gui=bold    ctermbg=8      ctermfg=15
    hi String      guibg=bg       guifg=#ffffcc  gui=italic  ctermbg=bg  ctermfg=14
    hi Character   guibg=bg       guifg=#ffffcc  gui=bold    ctermbg=bg  ctermfg=14
    hi Number      guibg=bg       guifg=#bbddff  gui=bold    ctermbg=1   ctermfg=15
    hi Boolean     guibg=bg       guifg=#bbddff  gui=none    ctermbg=1   ctermfg=15
    hi Float       guibg=bg       guifg=#bbddff  gui=bold    ctermbg=1   ctermfg=15
    
    hi Identifier  guibg=bg    guifg=#55cc55  gui=bold    ctermbg=bg  ctermfg=12
    hi Function    guibg=bg    guifg=#ff66aa  gui=bold    ctermbg=bg  ctermfg=12
    hi Statement   guibg=bg    guifg=#ffff99  gui=bold    ctermbg=bg  ctermfg=14
    "return的语法高亮
    hi Conditional guibg=bg    guifg=#ff6666  gui=bold    ctermbg=bg  ctermfg=12
    hi Repeat      guibg=bg    guifg=#ff9900  gui=bold    ctermbg=4   ctermfg=14
    hi Label       guibg=bg    guifg=#cc99ff  gui=bold    ctermbg=bg   ctermfg=13
    hi Operator    guibg=bg    guifg=#ffbb66  gui=bold    ctermbg=6   ctermfg=15
    hi Keyword     guibg=bg       guifg=#44ffdd  gui=bold    ctermbg=bg  ctermfg=10
    hi Exception   guibg=bg       guifg=#44ffdd  gui=bold    ctermbg=bg  ctermfg=10
    
    hi PreProc      guibg=bg     guifg=#ffbb66    gui=bold ctermbg=4  ctermfg=14
    hi Include      guibg=bg     guifg=#99cc99    gui=bold ctermbg=bg ctermfg=10
    hi link Define      Include
    hi link Macro      Include
    hi link PreCondit Include
    
    hi Type          guibg=bg     guifg=#ff5566  gui=bold    ctermbg=bg    ctermfg=12
    hi StorageClass      guibg=bg     guifg=#99cc99  gui=bold    ctermbg=bg    ctermfg=10
    hi Structure      guibg=bg     guifg=#99ff99  gui=bold    ctermbg=bg    ctermfg=10
    hi Typedef      guibg=bg     guifg=#99cc99  gui=italic  ctermbg=bg    ctermfg=10
    
    hi Special      guibg=bg     guifg=#bbddff    gui=bold    ctermbg=1    ctermfg=15
    hi SpecialChar      guibg=bg     guifg=#bbddff    gui=bold    ctermbg=1    ctermfg=15
    hi Tag          guibg=bg     guifg=#bbddff    gui=bold    ctermbg=1    ctermfg=15
    hi Delimiter      guibg=bg     guifg=fg    gui=bold    ctermbg=1    ctermfg=fg
    hi SpecialComment guibg=#334455     guifg=#dddddd    gui=italic  ctermbg=1    ctermfg=15
    hi Debug      guibg=bg     guifg=#ff9999    gui=none    ctermbg=8    ctermfg=12
    
    hi Underlined guibg=bg guifg=#99ccff gui=underline ctermbg=bg ctermfg=9 cterm=underline
    
    hi Title    guibg=#445566  guifg=white      gui=bold    ctermbg=1      ctermfg=15
    hi Ignore   guibg=bg       guifg=#cccccc  gui=italic  ctermbg=bg  ctermfg=8
    hi Error    guibg=#ff0000  guifg=white      gui=bold    ctermbg=12  ctermfg=15
    hi Todo        guibg=#556677  guifg=#ff0000  gui=bold    ctermbg=1      ctermfg=12
    
    hi htmlH2 guibg=bg guifg=fg gui=bold ctermbg=8 ctermfg=fg
    hi link htmlH3 htmlH2
    hi link htmlH4 htmlH3
    hi link htmlH5 htmlH4
    hi link htmlH6 htmlH5
    
    " And finally.
    
    let g:colors_name = "Guardian2"
    let colors_name   = "Guardian2"
    guardian2
    " Vim color file
    "
    " Author: Tomas Restrepo <tomas@winterdom.com>
    " https://github.com/tomasr/molokai
    "
    " Note: Based on the Monokai theme for TextMate
    " by Wimer Hazenberg and its darker variant
    " by Hamish Stuart Macpherson
    "
    
    hi clear
    
    if version > 580
        " no guarantees for version 5.8 and below, but this makes it stop
        " complaining
        hi clear
        if exists("syntax_on")
            syntax reset
        endif
    endif
    let g:colors_name="molokai"
    
    if exists("g:molokai_original")
        let s:molokai_original = g:molokai_original
    else
        let s:molokai_original = 0
    endif
    
    
    hi Boolean         guifg=#AE81FF
    hi Character       guifg=#E6DB74
    hi Number          guifg=#AE81FF
    hi String          guifg=#E6DB74
    hi Conditional     guifg=#F92672               gui=bold
    hi Constant        guifg=#AE81FF               gui=bold
    hi Cursor          guifg=#000000 guibg=#F8F8F0
    hi iCursor         guifg=#000000 guibg=#F8F8F0
    hi Debug           guifg=#BCA3A3               gui=bold
    hi Define          guifg=#66D9EF
    hi Delimiter       guifg=#8F8F8F
    hi DiffAdd                       guibg=#13354A
    hi DiffChange      guifg=#89807D guibg=#4C4745
    hi DiffDelete      guifg=#960050 guibg=#1E0010
    hi DiffText                      guibg=#4C4745 gui=italic,bold
    
    hi Directory       guifg=#A6E22E               gui=bold
    hi Error           guifg=#E6DB74 guibg=#1E0010
    hi ErrorMsg        guifg=#F92672 guibg=#232526 gui=bold
    hi Exception       guifg=#A6E22E               gui=bold
    hi Float           guifg=#AE81FF
    hi FoldColumn      guifg=#465457 guibg=#000000
    hi Folded          guifg=#465457 guibg=#000000
    hi Function        guifg=#A6E22E
    hi Identifier      guifg=#FD971F
    hi Ignore          guifg=#808080 guibg=bg
    hi IncSearch       guifg=#C4BE89 guibg=#000000
    
    hi Keyword         guifg=#F92672               gui=bold
    hi Label           guifg=#E6DB74               gui=none
    hi Macro           guifg=#C4BE89               gui=italic
    hi SpecialKey      guifg=#66D9EF               gui=italic
    
    hi MatchParen      guifg=#000000 guibg=#808080 gui=bold
    hi ModeMsg         guifg=#E6DB74
    hi MoreMsg         guifg=#E6DB74
    hi Operator        guifg=#F92672
    
    " complete menu
    hi Pmenu           guifg=#66D9EF guibg=#000000
    hi PmenuSel                      guibg=#808080
    hi PmenuSbar                     guibg=#080808
    hi PmenuThumb      guifg=#66D9EF
    
    hi PreCondit       guifg=#A6E22E               gui=bold
    hi PreProc         guifg=#A6E22E
    hi Question        guifg=#66D9EF
    hi Repeat          guifg=#F92672               gui=bold
    hi Search          guifg=#000000 guibg=#FFE792
    " marks
    hi SignColumn      guifg=#A6E22E guibg=#232526
    hi SpecialChar     guifg=#F92672               gui=bold
    hi SpecialComment  guifg=#7E8E91               gui=bold
    hi Special         guifg=#66D9EF guibg=bg      gui=italic
    if has("spell")
        hi SpellBad    guisp=#FF0000 gui=undercurl
        hi SpellCap    guisp=#7070F0 gui=undercurl
        hi SpellLocal  guisp=#70F0F0 gui=undercurl
        hi SpellRare   guisp=#FFFFFF gui=undercurl
    endif
    hi Statement       guifg=#F92672               gui=bold
    hi StatusLine      guifg=#455354 guibg=fg
    hi StatusLineNC    guifg=#808080 guibg=#080808
    hi StorageClass    guifg=#FD971F               gui=italic
    hi Structure       guifg=#66D9EF
    hi Tag             guifg=#F92672               gui=italic
    hi Title           guifg=#ef5939
    hi Todo            guifg=#FFFFFF guibg=bg      gui=bold
    
    hi Typedef         guifg=#66D9EF
    hi Type            guifg=#66D9EF               gui=none
    hi Underlined      guifg=#808080               gui=underline
    
    hi VertSplit       guifg=#808080 guibg=#080808 gui=bold
    hi VisualNOS                     guibg=#403D3D
    hi Visual                        guibg=#403D3D
    hi WarningMsg      guifg=#FFFFFF guibg=#333333 gui=bold
    hi WildMenu        guifg=#66D9EF guibg=#000000
    
    hi TabLineFill     guifg=#1B1D1E guibg=#1B1D1E
    hi TabLine         guibg=#1B1D1E guifg=#808080 gui=none
    
    if s:molokai_original == 1
       hi Normal          guifg=#F8F8F2 guibg=#272822
       hi Comment         guifg=#75715E
       hi CursorLine                    guibg=#3E3D32
       hi CursorLineNr    guifg=#FD971F               gui=none
       hi CursorColumn                  guibg=#3E3D32
       hi ColorColumn                   guibg=#3B3A32
       hi LineNr          guifg=#BCBCBC guibg=#3B3A32
       hi NonText         guifg=#75715E
       hi SpecialKey      guifg=#75715E
    else
       hi Normal          guifg=#F8F8F2 guibg=#333333
       "这一行的guibg调整后会影响.cpp文件及.vim文件的背景颜色
       "但是为什么是这里?????
       hi Comment         guifg=#7E8E91
       hi CursorLine                    guibg=#293739
       hi CursorLineNr    guifg=#FD971F               gui=none
       hi CursorColumn                  guibg=#293739
       hi ColorColumn                   guibg=#232526
       hi LineNr          guifg=#465457 guibg=#232526
       hi NonText         guifg=#465457
       hi SpecialKey      guifg=#465457
    end
    
    "
    " Support for 256-color terminal
    "
    if &t_Co > 255
       if s:molokai_original == 1
          hi Normal                   ctermbg=234
          hi CursorLine               ctermbg=235   cterm=none
          hi CursorLineNr ctermfg=208               cterm=none
       else
          hi Normal       ctermfg=252 ctermbg=233
          hi CursorLine               ctermbg=234   cterm=none
          hi CursorLineNr ctermfg=208               cterm=none
       endif
       hi Boolean         ctermfg=135
       hi Character       ctermfg=144
       hi Number          ctermfg=135
       hi String          ctermfg=144
       hi Conditional     ctermfg=161               cterm=bold
       hi Constant        ctermfg=135               cterm=bold
       hi Cursor          ctermfg=16  ctermbg=253
       hi Debug           ctermfg=225               cterm=bold
       hi Define          ctermfg=81
       hi Delimiter       ctermfg=241
    
       hi DiffAdd                     ctermbg=24
       hi DiffChange      ctermfg=181 ctermbg=239
       hi DiffDelete      ctermfg=162 ctermbg=53
       hi DiffText                    ctermbg=102 cterm=bold
    
       hi Directory       ctermfg=118               cterm=bold
       hi Error           ctermfg=219 ctermbg=89
       hi ErrorMsg        ctermfg=199 ctermbg=16    cterm=bold
       hi Exception       ctermfg=118               cterm=bold
       hi Float           ctermfg=135
       hi FoldColumn      ctermfg=67  ctermbg=16
       hi Folded          ctermfg=67  ctermbg=16
       hi Function        ctermfg=118
       hi Identifier      ctermfg=208               cterm=none
       hi Ignore          ctermfg=244 ctermbg=232
       hi IncSearch       ctermfg=193 ctermbg=16
    
       hi keyword         ctermfg=161               cterm=bold
       hi Label           ctermfg=229               cterm=none
       hi Macro           ctermfg=193
       hi SpecialKey      ctermfg=81
    
       hi MatchParen      ctermfg=233  ctermbg=208 cterm=bold
       hi ModeMsg         ctermfg=229
       hi MoreMsg         ctermfg=229
       hi Operator        ctermfg=161
    
       " complete menu
       hi Pmenu           ctermfg=81  ctermbg=16
       hi PmenuSel        ctermfg=255 ctermbg=242
       hi PmenuSbar                   ctermbg=232
       hi PmenuThumb      ctermfg=81
    
       hi PreCondit       ctermfg=118               cterm=bold
       hi PreProc         ctermfg=118
       hi Question        ctermfg=81
       hi Repeat          ctermfg=161               cterm=bold
       hi Search          ctermfg=0   ctermbg=222   cterm=NONE
    
       " marks column
       hi SignColumn      ctermfg=118 ctermbg=235
       hi SpecialChar     ctermfg=161               cterm=bold
       hi SpecialComment  ctermfg=245               cterm=bold
       hi Special         ctermfg=81
       if has("spell")
           hi SpellBad                ctermbg=52
           hi SpellCap                ctermbg=17
           hi SpellLocal              ctermbg=17
           hi SpellRare  ctermfg=none ctermbg=none  cterm=reverse
       endif
       hi Statement       ctermfg=161               cterm=bold
       hi StatusLine      ctermfg=238 ctermbg=253
       hi StatusLineNC    ctermfg=244 ctermbg=232
       hi StorageClass    ctermfg=208
       hi Structure       ctermfg=81
       hi Tag             ctermfg=161
       hi Title           ctermfg=166
       hi Todo            ctermfg=231 ctermbg=232   cterm=bold
    
       hi Typedef         ctermfg=81
       hi Type            ctermfg=81                cterm=none
       hi Underlined      ctermfg=244               cterm=underline
    
       hi VertSplit       ctermfg=244 ctermbg=232   cterm=bold
       hi VisualNOS                   ctermbg=238
       hi Visual                      ctermbg=235
       hi WarningMsg      ctermfg=231 ctermbg=238   cterm=bold
       hi WildMenu        ctermfg=81  ctermbg=16
    
       hi Comment         ctermfg=59
       hi CursorColumn                ctermbg=236
       hi ColorColumn                 ctermbg=236
       hi LineNr          ctermfg=250 ctermbg=236
       hi NonText         ctermfg=59
    
       hi SpecialKey      ctermfg=59
    
       if exists("g:rehash256") && g:rehash256 == 1
           hi Normal       ctermfg=252 ctermbg=234
           hi CursorLine               ctermbg=236   cterm=none
           hi CursorLineNr ctermfg=208               cterm=none
    
           hi Boolean         ctermfg=141
           hi Character       ctermfg=222
           hi Number          ctermfg=141
           hi String          ctermfg=222
           hi Conditional     ctermfg=197               cterm=bold
           hi Constant        ctermfg=141               cterm=bold
    
           hi DiffDelete      ctermfg=125 ctermbg=233
    
           hi Directory       ctermfg=154               cterm=bold
           hi Error           ctermfg=222 ctermbg=233
           hi Exception       ctermfg=154               cterm=bold
           hi Float           ctermfg=141
           hi Function        ctermfg=154
           hi Identifier      ctermfg=208
    
           hi Keyword         ctermfg=197               cterm=bold
           hi Operator        ctermfg=197
           hi PreCondit       ctermfg=154               cterm=bold
           hi PreProc         ctermfg=154
           hi Repeat          ctermfg=197               cterm=bold
    
           hi Statement       ctermfg=197               cterm=bold
           hi Tag             ctermfg=197
           hi Title           ctermfg=203
           hi Visual                      ctermbg=238
    
           hi Comment         ctermfg=244
           hi LineNr          ctermfg=239 ctermbg=235
           hi NonText         ctermfg=239
           hi SpecialKey      ctermfg=239
       endif
    end
    
    " Must be at the end, because of ctermbg=234 bug.
    " https://groups.google.com/forum/#!msg/vim_dev/afPqwAFNdrU/nqh6tOM87QUJ
    set background=dark
    molokai

    其中github是类似github网页上面开源代码的高亮

    molokai是类似SublimeText3的高亮

    不过这三个代码我都改过(注释行的上一行是改动过的)

    喜欢这两个配色的可以考虑用下

    具体应用的话:

      新建一个.txt文件

      把配色代码复制到里面,保存

      把文件名改成.vim

      拷到vim根目录下的vim80colors里面(这里的vim80……现在好像变成vim81了吧qwq)

    有哪里不合心意的话就自己上手改

    在使用Vim的时候如果有什么疑惑的话

    可以在下面留言的撒

    如果我恰好可以会的话一定会帮的撒

    即使我不会也可以一起讨论怎么解决的撒

    更新:

    网上闲逛的时候偶然间发现中文版的help文件

    如果想要Vim的中文版help文件

    请qq联系我→_→1290127201

    记得注明是为什么欧

    有关命令

    https://linux.cn/article-4669-1.html

    给Vim究极小白的文章

    https://zhuanlan.zhihu.com/p/22530297

  • 相关阅读:
    安装win7 ubuntu双系统
    idea maven打jar包
    mongodb入门
    mongodb备份与恢复
    使用cmd时cd命令失效
    vue 项目中使用阿里巴巴矢量图标库iconfont
    vue img标签用法
    vue 点击当前元素改变样式
    vue 路由跳转传参
    iview table绑定双击事件
  • 原文地址:https://www.cnblogs.com/kuaileyongheng/p/8617549.html
Copyright © 2020-2023  润新知