Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'master' of github.com:bleything/dotvim

* 'master' of github.com:bleything/dotvim:
  ignore .netrwhist
  add custom spelling dictionaries
  update rails bundle
  update nredtree
  update nerdcommenter
  add solarized colour scheme
  fix location of vim-rdoc
  update bundles
  • Loading branch information...
commit 6917e3f6b68f86b8f74aeef4775d077693e96f65 2 parents 3dcd52a + a079154
Ben Bleything authored
1  .gitignore
... ...
@@ -1,5 +1,6 @@
1 1
 swapfiles/*
2 2
 undofiles/*
  3
+.netrwhist
3 4
 
4 5
 # plugins follow
5 6
 bundle/fugitive/.git
7  Rakefile
@@ -33,9 +33,12 @@ namespace :update do
33 33
     :syntax_git       => "git://github.com/tpope/vim-git.git",
34 34
     :syntax_haml_sass => "git://github.com/tpope/vim-haml.git",
35 35
     :syntax_markdown  => "git://github.com/ujihisa/vim-markdown.git",
36  
-    :syntax_rdoc      => "git://github.com/hallison/vim-rdoc.git",
  36
+    :syntax_rdoc      => "git://github.com/depuracao/vim-rdoc.git",
37 37
     :syntax_slidedown => "git://github.com/bleything/vim-slidedown.git",
38  
-    :syntax_textile   => "git://github.com/timcharper/textile.vim.git"
  38
+    :syntax_textile   => "git://github.com/timcharper/textile.vim.git",
  39
+
  40
+    # color schemes
  41
+    :colors_solarized => "git://github.com/altercation/vim-colors-solarized.git"
39 42
   }
40 43
 
41 44
   desc "update any bundles defined in the Rakefile"
267  bundle/colors_solarized/README.mkd
Source Rendered
... ...
@@ -0,0 +1,267 @@
  1
+---
  2
+Title: Solarized Colorscheme for Vim
  3
+Description: Precision colors for machines and people
  4
+Author: Ethan Schoonover
  5
+Colors: light yellow
  6
+Created:  2011 Mar 15
  7
+Modified: 2011 Apr 16
  8
+
  9
+---
  10
+
  11
+Solarized Colorscheme for Vim
  12
+=============================
  13
+
  14
+Developed by Ethan Schoonover <es@ethanschoonover.com>
  15
+
  16
+Visit the [Solarized homepage]
  17
+------------------------------
  18
+
  19
+See the [Solarized homepage] for screenshots, 
  20
+details and colorscheme versions for Vim, Mutt, popular terminal emulators and 
  21
+other applications.
  22
+
  23
+Screenshots
  24
+-----------
  25
+
  26
+![solarized dark](https://github.com/altercation/solarized/raw/master/img/solarized-vim.png)
  27
+
  28
+Downloads
  29
+---------
  30
+
  31
+If you have come across this colorscheme via the [Vim-only repository] on 
  32
+github, or the [vim.org script] page see the link above to the Solarized 
  33
+homepage or visit the main [Solarized repository].
  34
+
  35
+The [Vim-only repository] is kept in sync with the main [Solarized repository] 
  36
+and is for installation convenience only (with [Pathogen] or [Vundle], for 
  37
+instance).  Issues, bug reports, changelogs are centralized at the main 
  38
+[Solarized repository].
  39
+
  40
+[Solarized homepage]:   http://ethanschoonover.com/solarized
  41
+[Solarized repository]: https://github.com/altercation/solarized
  42
+[Vim-only repository]:  https://github.com/altercation/vim-colors-solarized
  43
+[vimorg-script]:        http://vim.org/script
  44
+[Pathogen]:             https://github.com/tpope/vim-pathogen
  45
+[Vundle]:               https://github.com/gmarik/vundle
  46
+
  47
+Installation
  48
+------------
  49
+
  50
+### Option 1: Manual installation
  51
+
  52
+1.  Move `solarized.vim` to your `.vim/colors` directory. After downloading the 
  53
+    vim script or package:
  54
+
  55
+        $ cd vim-colors-solarized/colors
  56
+        $ mv solarized.vim ~/.vim/colors/
  57
+
  58
+### Option 2: Pathogen installation ***(recommended)***
  59
+
  60
+1.  Download and install Tim Pope's [Pathogen].
  61
+
  62
+2.  Next, move or clone the `vim-colors-solarized` directory so that it is 
  63
+    a subdirectory of the `.vim/bundle` directory.
  64
+
  65
+    a. **Clone:** 
  66
+
  67
+            $ cd ~/.vim/bundle
  68
+            $ git clone git://github.com/altercation/vim-colors-solarized.git
  69
+
  70
+    b. **Move:**
  71
+
  72
+        In the parent directory of vim-colors-solarized:
  73
+        
  74
+            $ mv vim-colors-solarized ~/.vim/bundle/
  75
+
  76
+### Modify .vimrc
  77
+
  78
+After either Option 1 or Option 2 above, put the following two lines in your 
  79
+.vimrc:
  80
+
  81
+    syntax enable
  82
+    set background=dark
  83
+    colorscheme solarized
  84
+
  85
+or, for the light background mode of Solarized:
  86
+
  87
+    syntax enable
  88
+    set background=light
  89
+    colorscheme solarized
  90
+
  91
+I like to have a different background in GUI and terminal modes, so I can use 
  92
+the following if-then. However, I find vim's background autodetection to be 
  93
+pretty good and, at least with MacVim, I can leave this background value 
  94
+assignment out entirely and get the same results.
  95
+
  96
+    if has('gui_running')
  97
+        set background=light
  98
+    else
  99
+        set background=dark
  100
+    endif
  101
+
  102
+See the [Solarized homepage] for screenshots which will help you 
  103
+select either the light or dark background.
  104
+
  105
+### IMPORTANT NOTE FOR TERMINAL USERS:
  106
+
  107
+If you are going to use Solarized in Terminal mode (i.e. not in a GUI version 
  108
+like gvim or macvim), **please please please** consider setting your terminal 
  109
+emulator's colorscheme to used the Solarized palette. I've included palettes 
  110
+for some popular terminal emulator as well as Xdefaults in the official 
  111
+Solarized download available from [Solarized homepage]. If you use 
  112
+Solarized *without* these colors, Solarized will need to be told to degrade its
  113
+colorscheme to a set compatible with the limited 256 terminal palette (whereas 
  114
+by using the terminal's 16 ansi color values, you can set the correct, specific 
  115
+values for the Solarized palette).
  116
+
  117
+If you do use the custom terminal colors, solarized.vim should work out of the
  118
+box for you. If you are using a terminal emulator that supports 256 colors and 
  119
+don't want to use the custom Solarized terminal colors, you will need to use 
  120
+the degraded 256 colorscheme. To do so, simply add the following line *before* 
  121
+the `colorschem solarized` line:
  122
+
  123
+    let g:solarized_termcolors=256
  124
+
  125
+Again, I recommend just changing your terminal colors to Solarized values 
  126
+either manually or via one of the many terminal schemes available for import.
  127
+
  128
+Advanced Configuration
  129
+----------------------
  130
+
  131
+Solarized will work out of the box with just the two lines specified above but 
  132
+does include several other options that can be set in your .vimrc file.
  133
+
  134
+Set these in your vimrc file prior to calling the colorscheme.
  135
+"
  136
+    option name               default     optional
  137
+    ------------------------------------------------
  138
+    g:solarized_termcolors=   16      |   256
  139
+    g:solarized_termtrans =   0       |   1
  140
+    g:solarized_degrade   =   0       |   1
  141
+    g:solarized_bold      =   1       |   0
  142
+    g:solarized_underline =   1       |   0
  143
+    g:solarized_italic    =   1       |   0
  144
+    g:solarized_contrast  =   "normal"|   "high" or "low"
  145
+    g:solarized_visibility=   "normal"|   "high" or "low"
  146
+    ------------------------------------------------
  147
+
  148
+### Option Details
  149
+
  150
+*   g:solarized_termcolors
  151
+
  152
+    This is set to *16* by default, meaning that Solarized will attempt to use 
  153
+    the standard 16 colors of your terminal emulator. You will need to set 
  154
+    those colors to the correct Solarized values either manually or by 
  155
+    importing one of the many colorscheme available for popular terminal 
  156
+    emulators and Xdefaults.
  157
+
  158
+*   g:solarized_termtrans
  159
+
  160
+    If you use a terminal emulator with a transparent background and Solarized 
  161
+    isn't displaying the background color transparently, set this to 1 and 
  162
+    Solarized will use the default (transparent) background of the terminal 
  163
+    emulator. *urxvt* required this in my testing; iTerm2 did not.
  164
+
  165
+    Note that on Mac OS X Terminal.app, solarized_termtrans is set to 1 by 
  166
+    default as this is almost always the best option. The only exception to 
  167
+    this is if the working terminfo file supports 256 colors (xterm-256color).
  168
+
  169
+*   g:solarized_degrade
  170
+
  171
+    For test purposes only; forces Solarized to use the 256 degraded color mode 
  172
+    to test the approximate color values for accuracy.
  173
+
  174
+*   g:solarized_bold | g:solarized_underline | g:solarized_italic
  175
+
  176
+    If you wish to stop Solarized from displaying bold, underlined or 
  177
+    italicized typefaces, simply assign a zero value to the appropriate 
  178
+    variable, for example: `let g:solarized_italic=0`
  179
+
  180
+*   g:solarized_contrast
  181
+
  182
+    Stick with normal! It's been carefully tested. Setting this option to high 
  183
+    or low does use the same Solarized palette but simply shifts some values up 
  184
+    or down in order to expand or compress the tonal range displayed.
  185
+
  186
+*   g:solarized_visibility
  187
+
  188
+    Special characters such as trailing whitespace, tabs, newlines, when
  189
+    displayed using `:set list` can be set to one of three levels depending on 
  190
+    your needs. Default value is `normal` with `high` and `low` options.
  191
+
  192
+Toggle Background Function
  193
+--------------------------
  194
+
  195
+Solarized comes with a Toggle Background plugin that by default will map to 
  196
+<F5> if that mapping is available. If it is not available you will need to 
  197
+either map the function manually or change your current <F5> mapping to 
  198
+something else.
  199
+
  200
+To set your own mapping in your .vimrc file, simply add the following line to 
  201
+support normal, insert and visual mode usage, changing the "<F5>" value to the 
  202
+key or key combination you wish to use:
  203
+
  204
+    call togglebg#map("<F5>")
  205
+
  206
+Note that you'll want to use a single function key or equivalent if you want 
  207
+the plugin to work in all modes (normal, insert, visual).
  208
+
  209
+Code Notes
  210
+----------
  211
+
  212
+Use folding to view the `solarized.vim` script with `foldmethod=marker` turned 
  213
+on.
  214
+
  215
+I have attempted to modularize the creation of Vim colorschemes in this script 
  216
+and, while it could be refactored further, it should be a good foundation for 
  217
+the creation of any color scheme. By simply changing the sixteen values in the 
  218
+GUI section and testing in gvim (or mvim) you can rapidly prototype new 
  219
+colorschemes without diving into the weeds of line-item editing each syntax 
  220
+highlight declaration.
  221
+
  222
+The Values
  223
+----------
  224
+
  225
+L\*a\*b values are canonical (White D65, Reference D50), other values are 
  226
+matched in sRGB space.
  227
+
  228
+    SOLARIZED HEX     16/8 TERMCOL  XTERM/HEX   L*A*B      sRGB        HSB
  229
+    --------- ------- ---- -------  ----------- ---------- ----------- -----------
  230
+    base03    #002b36  8/4 brblack  234 #1c1c1c 15 -12 -12   0  43  54 193 100  21
  231
+    base02    #073642  0/4 black    235 #262626 20 -12 -12   7  54  66 192  90  26
  232
+    base01    #586e75 10/7 brgreen  240 #4e4e4e 45 -07 -07  88 110 117 194  25  46
  233
+    base00    #657b83 11/7 bryellow 241 #585858 50 -07 -07 101 123 131 195  23  51
  234
+    base0     #839496 12/6 brblue   244 #808080 60 -06 -03 131 148 150 186  13  59
  235
+    base1     #93a1a1 14/4 brcyan   245 #8a8a8a 65 -05 -02 147 161 161 180   9  63
  236
+    base2     #eee8d5  7/7 white    254 #d7d7af 92 -00  10 238 232 213  44  11  93
  237
+    base3     #fdf6e3 15/7 brwhite  230 #ffffd7 97  00  10 253 246 227  44  10  99
  238
+    yellow    #b58900  3/3 yellow   136 #af8700 60  10  65 181 137   0  45 100  71
  239
+    orange    #cb4b16  9/3 brred    166 #d75f00 50  50  55 203  75  22  18  89  80
  240
+    red       #dc322f  1/1 red      160 #d70000 50  65  45 220  50  47   1  79  86
  241
+    magenta   #d33682  5/5 magenta  125 #af005f 50  65 -05 211  54 130 331  74  83
  242
+    violet    #6c71c4 13/5 brmagenta 61 #5f5faf 50  15 -45 108 113 196 237  45  77
  243
+    blue      #268bd2  4/4 blue      33 #0087ff 55 -10 -45  38 139 210 205  82  82
  244
+    cyan      #2aa198  6/6 cyan      37 #00afaf 60 -35 -05  42 161 152 175  74  63
  245
+    green     #859900  2/2 green     64 #5f8700 60 -20  65 133 153   0  68 100  60
  246
+
  247
+License
  248
+-------
  249
+Copyright (c) 2011 Ethan Schoonover
  250
+
  251
+Permission is hereby granted, free of charge, to any person obtaining a copy
  252
+of this software and associated documentation files (the "Software"), to deal
  253
+in the Software without restriction, including without limitation the rights
  254
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  255
+copies of the Software, and to permit persons to whom the Software is
  256
+furnished to do so, subject to the following conditions:
  257
+
  258
+The above copyright notice and this permission notice shall be included in
  259
+all copies or substantial portions of the Software.
  260
+
  261
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  262
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  263
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  264
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  265
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  266
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  267
+THE SOFTWARE.
55  bundle/colors_solarized/autoload/togglebg.vim
... ...
@@ -0,0 +1,55 @@
  1
+" Toggle Background
  2
+" Modified:     2011 Apr 29
  3
+" Maintainer:   Ethan Schoonover
  4
+" License:      OSI approved MIT license
  5
+
  6
+if exists("g:loaded_togglebg")
  7
+    finish
  8
+endif
  9
+let g:loaded_togglebg = 1
  10
+
  11
+" noremap is a bit misleading here if you are unused to vim mapping.
  12
+" in fact, there is remapping, but only of script locally defined remaps, in 
  13
+" this case <SID>TogBG. The <script> argument modifies the noremap scope in 
  14
+" this regard (and the noremenu below).
  15
+nnoremap <unique> <script> <Plug>ToggleBackground <SID>TogBG
  16
+inoremap <unique> <script> <Plug>ToggleBackground <ESC><SID>TogBG<ESC>a
  17
+vnoremap <unique> <script> <Plug>ToggleBackground <ESC><SID>TogBG<ESC>gv
  18
+nnoremenu <script> Window.Toggle\ Background <SID>TogBG
  19
+inoremenu <script> Window.Toggle\ Background <ESC><SID>TogBG<ESC>a
  20
+vnoremenu <script> Window.Toggle\ Background <ESC><SID>TogBG<ESC>gv
  21
+tmenu Window.Toggle\ Background Toggle light and dark background modes
  22
+nnoremenu <script> ToolBar.togglebg <SID>TogBG
  23
+inoremenu <script> ToolBar.togglebg <ESC><SID>TogBG<ESC>a
  24
+vnoremenu <script> ToolBar.togglebg <ESC><SID>TogBG<ESC>gv
  25
+tmenu ToolBar.togglebg Toggle light and dark background modes
  26
+noremap <SID>TogBG  :call <SID>TogBG()<CR>
  27
+
  28
+function! s:TogBG()
  29
+    let &background = ( &background == "dark"? "light" : "dark" )
  30
+    if exists("g:colors_name")
  31
+        exe "colorscheme " . g:colors_name
  32
+    endif
  33
+endfunction
  34
+
  35
+if !exists(":ToggleBG")
  36
+    command ToggleBG :call s:TogBG()
  37
+endif
  38
+
  39
+function! ToggleBackground()
  40
+    echo "Please update your ToggleBackground mapping. ':help togglebg' for information."
  41
+endfunction
  42
+
  43
+function! togglebg#map(mapActivation)
  44
+    try
  45
+        exe "silent! nmap <unique> ".a:mapActivation." <Plug>ToggleBackground"
  46
+        exe "silent! imap <unique> ".a:mapActivation." <Plug>ToggleBackground"
  47
+        exe "silent! vmap <unique> ".a:mapActivation." <Plug>ToggleBackground"
  48
+    finally
  49
+        return 0
  50
+    endtry
  51
+endfunction
  52
+
  53
+if !exists("no_plugin_maps") && !hasmapto('<Plug>ToggleBackground')
  54
+    call togglebg#map("<F5>")
  55
+endif
BIN  bundle/colors_solarized/bitmaps/togglebg.png
1,117  bundle/colors_solarized/colors/solarized.vim
... ...
@@ -0,0 +1,1117 @@
  1
+" Name:     Solarized vim colorscheme
  2
+" Author:   Ethan Schoonover <es@ethanschoonover.com>
  3
+" URL:      http://ethanschoonover.com/solarized
  4
+"           (see this url for latest release & screenshots)
  5
+" License:  OSI approved MIT license (see end of this file)
  6
+" Created:  In the middle of the night
  7
+" Modified: 2011 May 05
  8
+"
  9
+" Usage "{{{
  10
+"
  11
+" ---------------------------------------------------------------------
  12
+" ABOUT:
  13
+" ---------------------------------------------------------------------
  14
+" Solarized is a carefully designed selective contrast colorscheme with dual
  15
+" light and dark modes that runs in both GUI, 256 and 16 color modes.
  16
+"
  17
+" See the homepage above for screenshots and details.
  18
+"
  19
+" ---------------------------------------------------------------------
  20
+" OPTIONS:
  21
+" ---------------------------------------------------------------------
  22
+" See the "solarized.txt" help file included with this colorscheme (in the 
  23
+" "doc" subdirectory) for information on options, usage, the Toggle Background 
  24
+" function and more. If you have already installed Solarized, this is available 
  25
+" from the Solarized menu and command line as ":help solarized"
  26
+"
  27
+" ---------------------------------------------------------------------
  28
+" INSTALLATION:
  29
+" ---------------------------------------------------------------------
  30
+" Two options for installation: manual or pathogen
  31
+"
  32
+" MANUAL INSTALLATION OPTION:
  33
+" ---------------------------------------------------------------------
  34
+"
  35
+" 1.  Download the solarized distribution (available on the homepage above)
  36
+"     and unarchive the file.
  37
+" 2.  Move `solarized.vim` to your `.vim/colors` directory.
  38
+" 3.  Move each of the files in each subdirectories to the corresponding .vim
  39
+"     subdirectory (e.g. autoload/togglebg.vim goes into your .vim/autoload 
  40
+"     directory as .vim/autoload/togglebg.vim).
  41
+"
  42
+" RECOMMENDED PATHOGEN INSTALLATION OPTION:
  43
+" ---------------------------------------------------------------------
  44
+"
  45
+" 1.  Download and install Tim Pope's Pathogen from:
  46
+"     https://github.com/tpope/vim-pathogen
  47
+"
  48
+" 2.  Next, move or clone the `vim-colors-solarized` directory so that it is
  49
+"     a subdirectory of the `.vim/bundle` directory.
  50
+"
  51
+"     a. **clone with git:**
  52
+"
  53
+"       $ cd ~/.vim/bundle
  54
+"       $ git clone git://github.com/altercation/vim-colors-solarized.git
  55
+"
  56
+"     b. **or move manually into the pathogen bundle directory:**
  57
+"         In the parent directory of vim-colors-solarized:
  58
+"
  59
+"         $ mv vim-colors-solarized ~/.vim/bundle/
  60
+"
  61
+" MODIFY VIMRC:
  62
+"
  63
+" After either Option 1 or Option 2 above, put the following two lines in your
  64
+" .vimrc:
  65
+"
  66
+"     syntax enable
  67
+"     set background=dark
  68
+"     colorscheme solarized
  69
+"
  70
+" or, for the light background mode of Solarized:
  71
+"
  72
+"     syntax enable
  73
+"     set background=light
  74
+"     colorscheme solarized
  75
+"
  76
+" I like to have a different background in GUI and terminal modes, so I can use
  77
+" the following if-then. However, I find vim's background autodetection to be
  78
+" pretty good and, at least with MacVim, I can leave this background value
  79
+" assignment out entirely and get the same results.
  80
+"
  81
+"     if has('gui_running')
  82
+"       set background=light
  83
+"     else
  84
+"       set background=dark
  85
+"     endif
  86
+"
  87
+" See the Solarized homepage at http://ethanschoonover.com/solarized for
  88
+" screenshots which will help you select either the light or dark background.
  89
+"
  90
+" ---------------------------------------------------------------------
  91
+" COLOR VALUES
  92
+" ---------------------------------------------------------------------
  93
+" Download palettes and files from: http://ethanschoonover.com/solarized
  94
+"
  95
+" L\*a\*b values are canonical (White D65, Reference D50), other values are
  96
+" matched in sRGB space.
  97
+"
  98
+" SOLARIZED HEX     16/8 TERMCOL  XTERM/HEX   L*A*B      sRGB        HSB
  99
+" --------- ------- ---- -------  ----------- ---------- ----------- -----------
  100
+" base03    #002b36  8/4 brblack  234 #1c1c1c 15 -12 -12   0  43  54 193 100  21
  101
+" base02    #073642  0/4 black    235 #262626 20 -12 -12   7  54  66 192  90  26
  102
+" base01    #586e75 10/7 brgreen  240 #4e4e4e 45 -07 -07  88 110 117 194  25  46
  103
+" base00    #657b83 11/7 bryellow 241 #585858 50 -07 -07 101 123 131 195  23  51
  104
+" base0     #839496 12/6 brblue   244 #808080 60 -06 -03 131 148 150 186  13  59
  105
+" base1     #93a1a1 14/4 brcyan   245 #8a8a8a 65 -05 -02 147 161 161 180   9  63
  106
+" base2     #eee8d5  7/7 white    254 #d7d7af 92 -00  10 238 232 213  44  11  93
  107
+" base3     #fdf6e3 15/7 brwhite  230 #ffffd7 97  00  10 253 246 227  44  10  99
  108
+" yellow    #b58900  3/3 yellow   136 #af8700 60  10  65 181 137   0  45 100  71
  109
+" orange    #cb4b16  9/3 brred    166 #d75f00 50  50  55 203  75  22  18  89  80
  110
+" red       #dc322f  1/1 red      160 #d70000 50  65  45 220  50  47   1  79  86
  111
+" magenta   #d33682  5/5 magenta  125 #af005f 50  65 -05 211  54 130 331  74  83
  112
+" violet    #6c71c4 13/5 brmagenta 61 #5f5faf 50  15 -45 108 113 196 237  45  77
  113
+" blue      #268bd2  4/4 blue      33 #0087ff 55 -10 -45  38 139 210 205  82  82
  114
+" cyan      #2aa198  6/6 cyan      37 #00afaf 60 -35 -05  42 161 152 175  74  63
  115
+" green     #859900  2/2 green     64 #5f8700 60 -20  65 133 153   0  68 100  60
  116
+"
  117
+" ---------------------------------------------------------------------
  118
+" COLORSCHEME HACKING
  119
+" ---------------------------------------------------------------------
  120
+"
  121
+" Useful commands for testing colorschemes:
  122
+" :source $VIMRUNTIME/syntax/hitest.vim
  123
+" :help highlight-groups
  124
+" :help cterm-colors
  125
+" :help group-name
  126
+"
  127
+" Useful links for developing colorschemes:
  128
+" http://www.vim.org/scripts/script.php?script_id=2937
  129
+" http://vimcasts.org/episodes/creating-colorschemes-for-vim/
  130
+" http://www.frexx.de/xterm-256-notes/"
  131
+"
  132
+" }}}
  133
+" Environment Specific Overrides "{{{
  134
+" Allow or disallow certain features based on current terminal emulator or 
  135
+" environment.
  136
+
  137
+" Terminals that support italics
  138
+let s:terms_italic=[
  139
+            \"rxvt",
  140
+            \"gnome-terminal"
  141
+            \]
  142
+" For reference only, terminals are known to be incomptible.
  143
+" Terminals that are in neither list need to be tested.
  144
+let s:terms_noitalic=[
  145
+            \"iTerm.app",
  146
+            \"Apple_Terminal"
  147
+            \]
  148
+if has("gui_running")
  149
+    let s:terminal_italic=1 " TODO: could refactor to not require this at all
  150
+else
  151
+    let s:terminal_italic=0 " terminals will be guilty until proven compatible
  152
+    for term in s:terms_italic
  153
+        if $TERM_PROGRAM =~ term
  154
+            let s:terminal_italic=1
  155
+        endif
  156
+    endfor
  157
+endif
  158
+
  159
+" }}}
  160
+" Default option values"{{{
  161
+" ---------------------------------------------------------------------
  162
+" s:options_list is used to autogenerate a list of all non-default options 
  163
+" using "call SolarizedOptions()" or with the "Generate .vimrc commands" 
  164
+" Solarized menu option. See the "Menus" section below for the function itself.
  165
+let s:options_list=[
  166
+            \'" this block of commands has been autogenerated by solarized.vim and',
  167
+            \'" includes the current, non-default Solarized option values.',
  168
+            \'" To use, place these commands in your .vimrc file (replacing any',
  169
+            \'" existing colorscheme commands). See also ":help solarized"',
  170
+            \'',
  171
+            \'" ------------------------------------------------------------------',
  172
+            \'" Solarized Colorscheme Config',
  173
+            \'" ------------------------------------------------------------------',
  174
+            \]
  175
+let s:colorscheme_list=[
  176
+            \'syntax enable',
  177
+            \'set background='.&background,
  178
+            \'colorscheme solarized',
  179
+            \]
  180
+let s:defaults_list=[
  181
+            \'" ------------------------------------------------------------------',
  182
+            \'',
  183
+            \'" The following items are available options, but do not need to be',
  184
+            \'" included in your .vimrc as they are currently set to their defaults.',
  185
+            \''
  186
+            \]
  187
+let s:lazycat_list=[
  188
+            \'" lazy method of appending this onto your .vimrc ":w! >> ~/.vimrc"',
  189
+            \'" ------------------------------------------------------------------',
  190
+            \]
  191
+
  192
+function! s:SetOption(name,default)
  193
+    if type(a:default) == type(0)
  194
+        let l:wrap=''
  195
+        let l:ewrap=''
  196
+    else
  197
+        let l:wrap='"'
  198
+        let l:ewrap='\"'
  199
+    endif
  200
+    if !exists("g:solarized_".a:name) || g:solarized_{a:name}==a:default
  201
+        exe 'let g:solarized_'.a:name.'='.l:wrap.a:default.l:wrap.'"'
  202
+        exe 'call add(s:defaults_list, "\" let g:solarized_'.a:name.'='.l:ewrap.g:solarized_{a:name}.l:ewrap.'")'
  203
+    else
  204
+        exe 'call add(s:options_list,  "let g:solarized_'.a:name.'='.l:ewrap.g:solarized_{a:name}.l:ewrap.'    \"default value is '.a:default.'")'
  205
+    endif
  206
+endfunction
  207
+
  208
+if ($TERM_PROGRAM ==? "apple_terminal" && &t_Co < 256)
  209
+    let s:solarized_termtrans_default = 1
  210
+else
  211
+    let s:solarized_termtrans_default = 0
  212
+endif
  213
+call s:SetOption("termtrans",s:solarized_termtrans_default)
  214
+call s:SetOption("degrade",0)
  215
+call s:SetOption("bold",1)
  216
+call s:SetOption("underline",1)
  217
+call s:SetOption("italic",1) " note that we need to override this later if the terminal doesn't support
  218
+call s:SetOption("termcolors",16)
  219
+call s:SetOption("contrast","normal")
  220
+call s:SetOption("visibility","normal")
  221
+call s:SetOption("diffmode","normal")
  222
+call s:SetOption("hitrail",0)
  223
+call s:SetOption("menu",1)
  224
+
  225
+"}}}
  226
+" Colorscheme initialization "{{{
  227
+" ---------------------------------------------------------------------
  228
+hi clear
  229
+if exists("syntax_on")
  230
+  syntax reset
  231
+endif
  232
+let colors_name = "solarized"
  233
+
  234
+"}}}
  235
+" GUI & CSApprox hexadecimal palettes"{{{
  236
+" ---------------------------------------------------------------------
  237
+"
  238
+" Set both gui and terminal color values in separate conditional statements
  239
+" Due to possibility that CSApprox is running (though I suppose we could just
  240
+" leave the hex values out entirely in that case and include only cterm colors)
  241
+" We also check to see if user has set solarized (force use of the
  242
+" neutral gray monotone palette component)
  243
+if (has("gui_running") && g:solarized_degrade == 0)
  244
+    let s:vmode       = "gui"
  245
+    let s:base03      = "#002b36"
  246
+    let s:base02      = "#073642"
  247
+    let s:base01      = "#586e75"
  248
+    let s:base00      = "#657b83"
  249
+    let s:base0       = "#839496"
  250
+    let s:base1       = "#93a1a1"
  251
+    let s:base2       = "#eee8d5"
  252
+    let s:base3       = "#fdf6e3"
  253
+    let s:yellow      = "#b58900"
  254
+    let s:orange      = "#cb4b16"
  255
+    let s:red         = "#dc322f"
  256
+    let s:magenta     = "#d33682"
  257
+    let s:violet      = "#6c71c4"
  258
+    let s:blue        = "#268bd2"
  259
+    let s:cyan        = "#2aa198"
  260
+    "let s:green       = "#859900" "original
  261
+    let s:green       = "#719e07" "experimental
  262
+elseif (has("gui_running") && g:solarized_degrade == 1)
  263
+    " These colors are identical to the 256 color mode. They may be viewed
  264
+    " while in gui mode via "let g:solarized_degrade=1", though this is not
  265
+    " recommened and is for testing only.
  266
+    let s:vmode       = "gui"
  267
+    let s:base03      = "#1c1c1c"
  268
+    let s:base02      = "#262626"
  269
+    let s:base01      = "#4e4e4e"
  270
+    let s:base00      = "#585858"
  271
+    let s:base0       = "#808080"
  272
+    let s:base1       = "#8a8a8a"
  273
+    let s:base2       = "#d7d7af"
  274
+    let s:base3       = "#ffffd7"
  275
+    let s:yellow      = "#af8700"
  276
+    let s:orange      = "#d75f00"
  277
+    let s:red         = "#af0000"
  278
+    let s:magenta     = "#af005f"
  279
+    let s:violet      = "#5f5faf"
  280
+    let s:blue        = "#0087ff"
  281
+    let s:cyan        = "#00afaf"
  282
+    let s:green       = "#5f8700"
  283
+elseif g:solarized_termcolors != 256 && &t_Co >= 16
  284
+    let s:vmode       = "cterm"
  285
+    let s:base03      = "8"
  286
+    let s:base02      = "0"
  287
+    let s:base01      = "10"
  288
+    let s:base00      = "11"
  289
+    let s:base0       = "12"
  290
+    let s:base1       = "14"
  291
+    let s:base2       = "7"
  292
+    let s:base3       = "15"
  293
+    let s:yellow      = "3"
  294
+    let s:orange      = "9"
  295
+    let s:red         = "1"
  296
+    let s:magenta     = "5"
  297
+    let s:violet      = "13"
  298
+    let s:blue        = "4"
  299
+    let s:cyan        = "6"
  300
+    let s:green       = "2"
  301
+elseif g:solarized_termcolors == 256
  302
+    let s:vmode       = "cterm"
  303
+    let s:base03      = "234"
  304
+    let s:base02      = "235"
  305
+    let s:base01      = "239"
  306
+    let s:base00      = "240"
  307
+    let s:base0       = "244"
  308
+    let s:base1       = "245"
  309
+    let s:base2       = "187"
  310
+    let s:base3       = "230"
  311
+    let s:yellow      = "136"
  312
+    let s:orange      = "166"
  313
+    let s:red         = "124"
  314
+    let s:magenta     = "125"
  315
+    let s:violet      = "61"
  316
+    let s:blue        = "33"
  317
+    let s:cyan        = "37"
  318
+    let s:green       = "64"
  319
+else
  320
+    let s:vmode       = "cterm"
  321
+    let s:bright      = "* term=bold cterm=bold"
  322
+"   let s:base03      = "0".s:bright
  323
+"   let s:base02      = "0"
  324
+"   let s:base01      = "2".s:bright
  325
+"   let s:base00      = "3".s:bright
  326
+"   let s:base0       = "4".s:bright
  327
+"   let s:base1       = "6".s:bright
  328
+"   let s:base2       = "7"
  329
+"   let s:base3       = "7".s:bright
  330
+"   let s:yellow      = "3"
  331
+"   let s:orange      = "1".s:bright
  332
+"   let s:red         = "1"
  333
+"   let s:magenta     = "5"
  334
+"   let s:violet      = "5".s:bright
  335
+"   let s:blue        = "4"
  336
+"   let s:cyan        = "6"
  337
+"   let s:green       = "2"
  338
+    let s:base03      = "DarkGray"      " 0*
  339
+    let s:base02      = "Black"         " 0
  340
+    let s:base01      = "LightGreen"    " 2*
  341
+    let s:base00      = "LightYellow"   " 3*
  342
+    let s:base0       = "LightBlue"     " 4*
  343
+    let s:base1       = "LightCyan"     " 6*
  344
+    let s:base2       = "LightGray"     " 7
  345
+    let s:base3       = "White"         " 7*
  346
+    let s:yellow      = "DarkYellow"    " 3
  347
+    let s:orange      = "LightRed"      " 1*
  348
+    let s:red         = "DarkRed"       " 1
  349
+    let s:magenta     = "DarkMagenta"   " 5
  350
+    let s:violet      = "LightMagenta"  " 5*
  351
+    let s:blue        = "DarkBlue"      " 4
  352
+    let s:cyan        = "DarkCyan"      " 6
  353
+    let s:green       = "DarkGreen"     " 2
  354
+
  355
+endif
  356
+"}}}
  357
+" Formatting options and null values for passthrough effect "{{{
  358
+" ---------------------------------------------------------------------
  359
+    let s:none            = "NONE"
  360
+    let s:none            = "NONE"
  361
+    let s:t_none          = "NONE"
  362
+    let s:n               = "NONE"
  363
+    let s:c               = ",undercurl"
  364
+    let s:r               = ",reverse"
  365
+    let s:s               = ",standout"
  366
+    let s:ou              = ""
  367
+    let s:ob              = ""
  368
+"}}}
  369
+" Background value based on termtrans setting "{{{
  370
+" ---------------------------------------------------------------------
  371
+if (has("gui_running") || g:solarized_termtrans == 0)
  372
+    let s:back        = s:base03
  373
+else
  374
+    let s:back        = "NONE"
  375
+endif
  376
+"}}}
  377
+" Alternate light scheme "{{{
  378
+" ---------------------------------------------------------------------
  379
+if &background == "light"
  380
+    let s:temp03      = s:base03
  381
+    let s:temp02      = s:base02
  382
+    let s:temp01      = s:base01
  383
+    let s:temp00      = s:base00
  384
+    let s:base03      = s:base3
  385
+    let s:base02      = s:base2
  386
+    let s:base01      = s:base1
  387
+    let s:base00      = s:base0
  388
+    let s:base0       = s:temp00
  389
+    let s:base1       = s:temp01
  390
+    let s:base2       = s:temp02
  391
+    let s:base3       = s:temp03
  392
+    if (s:back != "NONE")
  393
+        let s:back    = s:base03
  394
+    endif
  395
+endif
  396
+"}}}
  397
+" Optional contrast schemes "{{{
  398
+" ---------------------------------------------------------------------
  399
+if g:solarized_contrast == "high"
  400
+    let s:base01      = s:base00
  401
+    let s:base00      = s:base0
  402
+    let s:base0       = s:base1
  403
+    let s:base1       = s:base2
  404
+    let s:base2       = s:base3
  405
+    let s:back        = s:back
  406
+endif
  407
+if g:solarized_contrast == "low"
  408
+    let s:back        = s:base02
  409
+    let s:ou          = ",underline"
  410
+endif
  411
+"}}}
  412
+" Overrides dependent on user specified values and environment "{{{
  413
+" ---------------------------------------------------------------------
  414
+if (g:solarized_bold == 0 || &t_Co == 8 )
  415
+    let s:b           = ""
  416
+    let s:bb          = ",bold"
  417
+else
  418
+    let s:b           = ",bold"
  419
+    let s:bb          = ""
  420
+endif
  421
+
  422
+if g:solarized_underline == 0
  423
+    let s:u           = ""
  424
+else
  425
+    let s:u           = ",underline"
  426
+endif
  427
+
  428
+if g:solarized_italic == 0 || s:terminal_italic == 0
  429
+    let s:i           = ""
  430
+else
  431
+    let s:i           = ",italic"
  432
+endif
  433
+"}}}
  434
+" Highlighting primitives"{{{
  435
+" ---------------------------------------------------------------------
  436
+
  437
+exe "let s:bg_none      = ' ".s:vmode."bg=".s:none   ."'"
  438
+exe "let s:bg_back      = ' ".s:vmode."bg=".s:back   ."'"
  439
+exe "let s:bg_base03    = ' ".s:vmode."bg=".s:base03 ."'"
  440
+exe "let s:bg_base02    = ' ".s:vmode."bg=".s:base02 ."'"
  441
+exe "let s:bg_base01    = ' ".s:vmode."bg=".s:base01 ."'"
  442
+exe "let s:bg_base00    = ' ".s:vmode."bg=".s:base00 ."'"
  443
+exe "let s:bg_base0     = ' ".s:vmode."bg=".s:base0  ."'"
  444
+exe "let s:bg_base1     = ' ".s:vmode."bg=".s:base1  ."'"
  445
+exe "let s:bg_base2     = ' ".s:vmode."bg=".s:base2  ."'"
  446
+exe "let s:bg_base3     = ' ".s:vmode."bg=".s:base3  ."'"
  447
+exe "let s:bg_green     = ' ".s:vmode."bg=".s:green  ."'"
  448
+exe "let s:bg_yellow    = ' ".s:vmode."bg=".s:yellow ."'"
  449
+exe "let s:bg_orange    = ' ".s:vmode."bg=".s:orange ."'"
  450
+exe "let s:bg_red       = ' ".s:vmode."bg=".s:red    ."'"
  451
+exe "let s:bg_magenta   = ' ".s:vmode."bg=".s:magenta."'"
  452
+exe "let s:bg_violet    = ' ".s:vmode."bg=".s:violet ."'"
  453
+exe "let s:bg_blue      = ' ".s:vmode."bg=".s:blue   ."'"
  454
+exe "let s:bg_cyan      = ' ".s:vmode."bg=".s:cyan   ."'"
  455
+
  456
+exe "let s:fg_none      = ' ".s:vmode."fg=".s:none   ."'"
  457
+exe "let s:fg_back      = ' ".s:vmode."fg=".s:back   ."'"
  458
+exe "let s:fg_base03    = ' ".s:vmode."fg=".s:base03 ."'"
  459
+exe "let s:fg_base02    = ' ".s:vmode."fg=".s:base02 ."'"
  460
+exe "let s:fg_base01    = ' ".s:vmode."fg=".s:base01 ."'"
  461
+exe "let s:fg_base00    = ' ".s:vmode."fg=".s:base00 ."'"
  462
+exe "let s:fg_base0     = ' ".s:vmode."fg=".s:base0  ."'"
  463
+exe "let s:fg_base1     = ' ".s:vmode."fg=".s:base1  ."'"
  464
+exe "let s:fg_base2     = ' ".s:vmode."fg=".s:base2  ."'"
  465
+exe "let s:fg_base3     = ' ".s:vmode."fg=".s:base3  ."'"
  466
+exe "let s:fg_green     = ' ".s:vmode."fg=".s:green  ."'"
  467
+exe "let s:fg_yellow    = ' ".s:vmode."fg=".s:yellow ."'"
  468
+exe "let s:fg_orange    = ' ".s:vmode."fg=".s:orange ."'"
  469
+exe "let s:fg_red       = ' ".s:vmode."fg=".s:red    ."'"
  470
+exe "let s:fg_magenta   = ' ".s:vmode."fg=".s:magenta."'"
  471
+exe "let s:fg_violet    = ' ".s:vmode."fg=".s:violet ."'"
  472
+exe "let s:fg_blue      = ' ".s:vmode."fg=".s:blue   ."'"
  473
+exe "let s:fg_cyan      = ' ".s:vmode."fg=".s:cyan   ."'"
  474
+
  475
+exe "let s:fmt_none     = ' ".s:vmode."=NONE".          " term=NONE".    "'"
  476
+exe "let s:fmt_bold     = ' ".s:vmode."=NONE".s:b.      " term=NONE".s:b."'"
  477
+exe "let s:fmt_bldi     = ' ".s:vmode."=NONE".s:b.      " term=NONE".s:b."'"
  478
+exe "let s:fmt_undr     = ' ".s:vmode."=NONE".s:u.      " term=NONE".s:u."'"
  479
+exe "let s:fmt_undb     = ' ".s:vmode."=NONE".s:u.s:b.  " term=NONE".s:u.s:b."'"
  480
+exe "let s:fmt_undi     = ' ".s:vmode."=NONE".s:u.      " term=NONE".s:u."'"
  481
+exe "let s:fmt_uopt     = ' ".s:vmode."=NONE".s:ou.     " term=NONE".s:ou."'"
  482
+exe "let s:fmt_curl     = ' ".s:vmode."=NONE".s:c.      " term=NONE".s:c."'"
  483
+exe "let s:fmt_ital     = ' ".s:vmode."=NONE".s:i.      " term=NONE".s:i."'"
  484
+exe "let s:fmt_stnd     = ' ".s:vmode."=NONE".s:s.      " term=NONE".s:s."'"
  485
+exe "let s:fmt_revr     = ' ".s:vmode."=NONE".s:r.      " term=NONE".s:r."'"
  486
+exe "let s:fmt_revb     = ' ".s:vmode."=NONE".s:r.s:b.  " term=NONE".s:r.s:b."'"
  487
+" revbb (reverse bold for bright colors) is only set to actual bold in low 
  488
+" color terminals (t_co=8, such as OS X Terminal.app) and should only be used 
  489
+" with colors 8-15.
  490
+exe "let s:fmt_revbb    = ' ".s:vmode."=NONE".s:r.s:bb.   " term=NONE".s:r.s:bb."'"
  491
+exe "let s:fmt_revbbu   = ' ".s:vmode."=NONE".s:r.s:bb.s:u." term=NONE".s:r.s:bb.s:u."'"
  492
+
  493
+if has("gui_running")
  494
+    exe "let s:sp_none      = ' guisp=".s:none   ."'"
  495
+    exe "let s:sp_back      = ' guisp=".s:back   ."'"
  496
+    exe "let s:sp_base03    = ' guisp=".s:base03 ."'"
  497
+    exe "let s:sp_base02    = ' guisp=".s:base02 ."'"
  498
+    exe "let s:sp_base01    = ' guisp=".s:base01 ."'"
  499
+    exe "let s:sp_base00    = ' guisp=".s:base00 ."'"
  500
+    exe "let s:sp_base0     = ' guisp=".s:base0  ."'"
  501
+    exe "let s:sp_base1     = ' guisp=".s:base1  ."'"
  502
+    exe "let s:sp_base2     = ' guisp=".s:base2  ."'"
  503
+    exe "let s:sp_base3     = ' guisp=".s:base3  ."'"
  504
+    exe "let s:sp_green     = ' guisp=".s:green  ."'"
  505
+    exe "let s:sp_yellow    = ' guisp=".s:yellow ."'"
  506
+    exe "let s:sp_orange    = ' guisp=".s:orange ."'"
  507
+    exe "let s:sp_red       = ' guisp=".s:red    ."'"
  508
+    exe "let s:sp_magenta   = ' guisp=".s:magenta."'"
  509
+    exe "let s:sp_violet    = ' guisp=".s:violet ."'"
  510
+    exe "let s:sp_blue      = ' guisp=".s:blue   ."'"
  511
+    exe "let s:sp_cyan      = ' guisp=".s:cyan   ."'"
  512
+else
  513
+    let s:sp_none      = ""
  514
+    let s:sp_back      = ""
  515
+    let s:sp_base03    = ""
  516
+    let s:sp_base02    = ""
  517
+    let s:sp_base01    = ""
  518
+    let s:sp_base00    = ""
  519
+    let s:sp_base0     = ""
  520
+    let s:sp_base1     = ""
  521
+    let s:sp_base2     = ""
  522
+    let s:sp_base3     = ""
  523
+    let s:sp_green     = ""
  524
+    let s:sp_yellow    = ""
  525
+    let s:sp_orange    = ""
  526
+    let s:sp_red       = ""
  527
+    let s:sp_magenta   = ""
  528
+    let s:sp_violet    = ""
  529
+    let s:sp_blue      = ""
  530
+    let s:sp_cyan      = ""
  531
+endif
  532
+
  533
+"}}}
  534
+" Basic highlighting"{{{
  535
+" ---------------------------------------------------------------------
  536
+" note that link syntax to avoid duplicate configuration doesn't work with the
  537
+" exe compiled formats
  538
+
  539
+exe "hi! Normal"         .s:fmt_none   .s:fg_base0  .s:bg_back
  540
+
  541
+exe "hi! Comment"        .s:fmt_ital   .s:fg_base01 .s:bg_none
  542
+"       *Comment         any comment
  543
+
  544
+exe "hi! Constant"       .s:fmt_none   .s:fg_cyan   .s:bg_none
  545
+"       *Constant        any constant
  546
+"        String          a string constant: "this is a string"
  547
+"        Character       a character constant: 'c', '\n'
  548
+"        Number          a number constant: 234, 0xff
  549
+"        Boolean         a boolean constant: TRUE, false
  550
+"        Float           a floating point constant: 2.3e10
  551
+
  552
+exe "hi! Identifier"     .s:fmt_none   .s:fg_blue   .s:bg_none
  553
+"       *Identifier      any variable name
  554
+"        Function        function name (also: methods for classes)
  555
+"
  556
+exe "hi! Statement"      .s:fmt_none   .s:fg_green  .s:bg_none
  557
+"       *Statement       any statement
  558
+"        Conditional     if, then, else, endif, switch, etc.
  559
+"        Repeat          for, do, while, etc.
  560
+"        Label           case, default, etc.
  561
+"        Operator        "sizeof", "+", "*", etc.
  562
+"        Keyword         any other keyword
  563
+"        Exception       try, catch, throw
  564
+
  565
+exe "hi! PreProc"        .s:fmt_none   .s:fg_orange .s:bg_none
  566
+"       *PreProc         generic Preprocessor
  567
+"        Include         preprocessor #include
  568
+"        Define          preprocessor #define
  569
+"        Macro           same as Define
  570
+"        PreCondit       preprocessor #if, #else, #endif, etc.
  571
+
  572
+exe "hi! Type"           .s:fmt_none   .s:fg_yellow .s:bg_none
  573
+"       *Type            int, long, char, etc.
  574
+"        StorageClass    static, register, volatile, etc.
  575
+"        Structure       struct, union, enum, etc.
  576
+"        Typedef         A typedef
  577
+
  578
+exe "hi! Special"        .s:fmt_none   .s:fg_red    .s:bg_none
  579
+"       *Special         any special symbol
  580
+"        SpecialChar     special character in a constant
  581
+"        Tag             you can use CTRL-] on this
  582
+"        Delimiter       character that needs attention
  583
+"        SpecialComment  special things inside a comment
  584
+"        Debug           debugging statements
  585
+
  586
+exe "hi! Underlined"     .s:fmt_none   .s:fg_violet .s:bg_none
  587
+"       *Underlined      text that stands out, HTML links
  588
+
  589
+exe "hi! Ignore"         .s:fmt_none   .s:fg_none   .s:bg_none
  590
+"       *Ignore          left blank, hidden  |hl-Ignore|
  591
+
  592
+exe "hi! Error"          .s:fmt_bold   .s:fg_red    .s:bg_none
  593
+"       *Error           any erroneous construct
  594
+
  595
+exe "hi! Todo"           .s:fmt_bold   .s:fg_magenta.s:bg_none
  596
+"       *Todo            anything that needs extra attention; mostly the
  597
+"                        keywords TODO FIXME and XXX
  598
+"
  599
+"}}}
  600
+" Extended highlighting "{{{
  601
+" ---------------------------------------------------------------------
  602
+if      (g:solarized_visibility=="high")
  603
+    exe "hi! SpecialKey" .s:fmt_revr   .s:fg_red    .s:bg_none
  604
+    exe "hi! NonText"    .s:fmt_bold   .s:fg_red    .s:bg_none
  605
+elseif  (g:solarized_visibility=="low")
  606
+    exe "hi! SpecialKey" .s:fmt_bold   .s:fg_base02 .s:bg_none
  607
+    exe "hi! NonText"    .s:fmt_bold   .s:fg_base02 .s:bg_none
  608
+else
  609
+    exe "hi! SpecialKey" .s:fmt_bold   .s:fg_base00 .s:bg_base02
  610
+    exe "hi! NonText"    .s:fmt_bold   .s:fg_base00 .s:bg_none
  611
+endif
  612
+exe "hi! StatusLine"     .s:fmt_none   .s:fg_base1  .s:bg_base02 .s:fmt_revbb
  613
+exe "hi! StatusLineNC"   .s:fmt_none   .s:fg_base00 .s:bg_base02 .s:fmt_revbb
  614
+exe "hi! Visual"         .s:fmt_none   .s:fg_base01 .s:bg_base03 .s:fmt_revbb
  615
+exe "hi! Directory"      .s:fmt_none   .s:fg_blue   .s:bg_none
  616
+exe "hi! ErrorMsg"       .s:fmt_revr   .s:fg_red    .s:bg_none
  617
+exe "hi! IncSearch"      .s:fmt_stnd   .s:fg_orange .s:bg_none
  618
+exe "hi! Search"         .s:fmt_revr   .s:fg_yellow .s:bg_none
  619
+exe "hi! MoreMsg"        .s:fmt_none   .s:fg_blue   .s:bg_none
  620
+exe "hi! ModeMsg"        .s:fmt_none   .s:fg_blue   .s:bg_none
  621
+exe "hi! LineNr"         .s:fmt_none   .s:fg_base01 .s:bg_base02
  622
+exe "hi! Question"       .s:fmt_bold   .s:fg_cyan   .s:bg_none
  623
+if ( has("gui_running") || &t_Co > 8 )
  624
+    exe "hi! VertSplit"  .s:fmt_none   .s:fg_base00 .s:bg_base00
  625
+else
  626
+    exe "hi! VertSplit"  .s:fmt_revbb  .s:fg_base00 .s:bg_base02
  627
+endif
  628
+exe "hi! Title"          .s:fmt_bold   .s:fg_orange .s:bg_none
  629
+exe "hi! VisualNOS"      .s:fmt_stnd   .s:fg_none   .s:bg_base02 .s:fmt_revbb
  630
+exe "hi! WarningMsg"     .s:fmt_bold   .s:fg_red    .s:bg_none
  631
+exe "hi! WildMenu"       .s:fmt_none   .s:fg_base2  .s:bg_base02 .s:fmt_revbb
  632
+exe "hi! Folded"         .s:fmt_undb   .s:fg_base0  .s:bg_base02  .s:sp_base03
  633
+exe "hi! FoldColumn"     .s:fmt_none   .s:fg_base0  .s:bg_base02
  634
+if      (g:solarized_diffmode=="high")
  635
+exe "hi! DiffAdd"        .s:fmt_revr   .s:fg_green  .s:bg_none
  636
+exe "hi! DiffChange"     .s:fmt_revr   .s:fg_yellow .s:bg_none
  637
+exe "hi! DiffDelete"     .s:fmt_revr   .s:fg_red    .s:bg_none
  638
+exe "hi! DiffText"       .s:fmt_revr   .s:fg_blue   .s:bg_none
  639
+elseif  (g:solarized_diffmode=="low")
  640
+exe "hi! DiffAdd"        .s:fmt_undr   .s:fg_green  .s:bg_none   .s:sp_green
  641
+exe "hi! DiffChange"     .s:fmt_undr   .s:fg_yellow .s:bg_none   .s:sp_yellow
  642
+exe "hi! DiffDelete"     .s:fmt_bold   .s:fg_red    .s:bg_none
  643
+exe "hi! DiffText"       .s:fmt_undr   .s:fg_blue   .s:bg_none   .s:sp_blue
  644
+else " normal
  645
+    if has("gui_running")
  646
+exe "hi! DiffAdd"        .s:fmt_bold   .s:fg_green  .s:bg_base02 .s:sp_green
  647
+exe "hi! DiffChange"     .s:fmt_bold   .s:fg_yellow .s:bg_base02 .s:sp_yellow
  648
+exe "hi! DiffDelete"     .s:fmt_bold   .s:fg_red    .s:bg_base02
  649
+exe "hi! DiffText"       .s:fmt_bold   .s:fg_blue   .s:bg_base02 .s:sp_blue
  650
+    else
  651
+exe "hi! DiffAdd"        .s:fmt_none   .s:fg_green  .s:bg_base02 .s:sp_green
  652
+exe "hi! DiffChange"     .s:fmt_none   .s:fg_yellow .s:bg_base02 .s:sp_yellow
  653
+exe "hi! DiffDelete"     .s:fmt_none   .s:fg_red    .s:bg_base02
  654
+exe "hi! DiffText"       .s:fmt_none   .s:fg_blue   .s:bg_base02 .s:sp_blue
  655
+    endif
  656
+endif
  657
+exe "hi! SignColumn"     .s:fmt_none   .s:fg_base0
  658
+exe "hi! Conceal"        .s:fmt_none   .s:fg_blue   .s:bg_none
  659
+exe "hi! SpellBad"       .s:fmt_curl   .s:fg_none   .s:bg_none    .s:sp_red
  660
+exe "hi! SpellCap"       .s:fmt_curl   .s:fg_none   .s:bg_none    .s:sp_violet
  661
+exe "hi! SpellRare"      .s:fmt_curl   .s:fg_none   .s:bg_none    .s:sp_cyan
  662
+exe "hi! SpellLocal"     .s:fmt_curl   .s:fg_none   .s:bg_none    .s:sp_yellow
  663
+exe "hi! Pmenu"          .s:fmt_none   .s:fg_base0  .s:bg_base02  .s:fmt_revbb
  664
+exe "hi! PmenuSel"       .s:fmt_none   .s:fg_base01 .s:bg_base2   .s:fmt_revbb
  665
+exe "hi! PmenuSbar"      .s:fmt_none   .s:fg_base2  .s:bg_base0   .s:fmt_revbb
  666
+exe "hi! PmenuThumb"     .s:fmt_none   .s:fg_base0  .s:bg_base03  .s:fmt_revbb
  667
+exe "hi! TabLine"        .s:fmt_undr   .s:fg_base0  .s:bg_base02  .s:sp_base0
  668
+exe "hi! TabLineFill"    .s:fmt_undr   .s:fg_base0  .s:bg_base02  .s:sp_base0
  669
+exe "hi! TabLineSel"     .s:fmt_undr   .s:fg_base01 .s:bg_base2   .s:sp_base0  .s:fmt_revbbu
  670
+exe "hi! CursorColumn"   .s:fmt_none   .s:fg_none   .s:bg_base02
  671
+exe "hi! CursorLine"     .s:fmt_uopt   .s:fg_none   .s:bg_base02  .s:sp_base1
  672
+exe "hi! ColorColumn"    .s:fmt_none   .s:fg_none   .s:bg_base02
  673
+exe "hi! Cursor"         .s:fmt_none   .s:fg_base03 .s:bg_base0
  674
+hi! link lCursor Cursor
  675
+exe "hi! MatchParen"     .s:fmt_bold   .s:fg_red    .s:bg_base01
  676
+
  677
+"}}}
  678
+" vim syntax highlighting "{{{
  679
+" ---------------------------------------------------------------------
  680
+"exe "hi! vimLineComment" . s:fg_base01 .s:bg_none   .s:fmt_ital
  681
+"hi! link vimComment Comment
  682
+"hi! link vimLineComment Comment
  683
+hi! link vimVar Identifier
  684
+hi! link vimFunc Function
  685
+hi! link vimUserFunc Function
  686
+hi! link helpSpecial Special
  687
+hi! link vimSet Normal
  688
+hi! link vimSetEqual Normal
  689
+exe "hi! vimCommentString"  .s:fmt_none    .s:fg_violet .s:bg_none
  690
+exe "hi! vimCommand"        .s:fmt_none    .s:fg_yellow .s:bg_none
  691
+exe "hi! vimCmdSep"         .s:fmt_bold    .s:fg_blue   .s:bg_none
  692
+exe "hi! helpExample"       .s:fmt_none    .s:fg_base1  .s:bg_none
  693
+exe "hi! helpOption"        .s:fmt_none    .s:fg_cyan   .s:bg_none
  694
+exe "hi! helpNote"          .s:fmt_none    .s:fg_magenta.s:bg_none
  695
+exe "hi! helpVim"           .s:fmt_none    .s:fg_magenta.s:bg_none
  696
+exe "hi! helpHyperTextJump" .s:fmt_undr    .s:fg_blue   .s:bg_none
  697
+exe "hi! helpHyperTextEntry".s:fmt_none    .s:fg_green  .s:bg_none
  698
+exe "hi! vimIsCommand"      .s:fmt_none    .s:fg_base00 .s:bg_none
  699
+exe "hi! vimSynMtchOpt"     .s:fmt_none    .s:fg_yellow .s:bg_none
  700
+exe "hi! vimSynType"        .s:fmt_none    .s:fg_cyan   .s:bg_none
  701
+exe "hi! vimHiLink"         .s:fmt_none    .s:fg_blue   .s:bg_none
  702
+exe "hi! vimHiGroup"        .s:fmt_none    .s:fg_blue   .s:bg_none
  703
+exe "hi! vimGroup"          .s:fmt_undb    .s:fg_blue   .s:bg_none
  704
+"}}}
  705
+" diff highlighting "{{{
  706
+" ---------------------------------------------------------------------
  707
+hi! link diffAdded Statement
  708
+hi! link diffLine Identifier
  709
+"}}}
  710
+" git & gitcommit highlighting "{{{
  711
+"git
  712
+"exe "hi! gitDateHeader"
  713
+"exe "hi! gitIdentityHeader"
  714
+"exe "hi! gitIdentityKeyword"
  715
+"exe "hi! gitNotesHeader"
  716
+"exe "hi! gitReflogHeader"
  717
+"exe "hi! gitKeyword"
  718
+"exe "hi! gitIdentity"
  719
+"exe "hi! gitEmailDelimiter"
  720
+"exe "hi! gitEmail"
  721
+"exe "hi! gitDate"
  722
+"exe "hi! gitMode"
  723
+"exe "hi! gitHashAbbrev"
  724
+"exe "hi! gitHash"
  725
+"exe "hi! gitReflogMiddle"
  726
+"exe "hi! gitReference"
  727
+"exe "hi! gitStage"
  728
+"exe "hi! gitType"
  729
+"exe "hi! gitDiffAdded"
  730
+"exe "hi! gitDiffRemoved"
  731
+"gitcommit
  732
+"exe "hi! gitcommitSummary"      
  733
+exe "hi! gitcommitComment"      .s:fmt_ital     .s:fg_base01    .s:bg_none