mirror of
https://github.com/sellout/emacs-color-theme-solarized.git
synced 2024-06-29 08:00:56 +02:00
Merge commit '6666646c69542e4759a7dd7e2b22b86287027614'
This commit is contained in:
commit
2a4b2096db
|
@ -23,9 +23,11 @@ Installation
|
||||||
|
|
||||||
### Option 1: Manual installation
|
### Option 1: Manual installation
|
||||||
|
|
||||||
1. Put the files in the right place!
|
1. Move `solarized.vim` to your `.vim/colors` directory. After downloading the
|
||||||
|
vim script or package:
|
||||||
|
|
||||||
2. Move `solarized.vim` to your `.vim/colors` directory.
|
$ cd vim-colors-solarized/colors
|
||||||
|
$ mv solarized.vim ~/.vim/colors/
|
||||||
|
|
||||||
### Option 2: Pathogen installation ***(recommended)***
|
### Option 2: Pathogen installation ***(recommended)***
|
||||||
|
|
||||||
|
@ -58,15 +60,97 @@ or, for the light background mode of Solarized:
|
||||||
set background=light
|
set background=light
|
||||||
colorscheme solarized
|
colorscheme solarized
|
||||||
|
|
||||||
|
I like to have a different background in GUI and terminal modes, so I can use
|
||||||
|
the following if-then. However, I find vim's background autodetection to be
|
||||||
|
pretty good and, at least with MacVim, I can leave this background value
|
||||||
|
assignment out entirely and get the same results.
|
||||||
|
|
||||||
|
if has('gui_running')
|
||||||
|
set background=light
|
||||||
|
else
|
||||||
|
set background=dark
|
||||||
|
endif
|
||||||
|
|
||||||
See the [Solarized homepage][solarized] for screenshots which will help you
|
See the [Solarized homepage][solarized] for screenshots which will help you
|
||||||
select either the light or dark background.
|
select either the light or dark background.
|
||||||
|
|
||||||
|
### IMPORTANT NOTE FOR TERMINAL USERS:
|
||||||
|
|
||||||
|
If you are going to use Solarized in Terminal mode (i.e. not in a GUI version
|
||||||
|
like gvim or macvim), **please please please** consider setting your terminal
|
||||||
|
emulator's colorscheme to used the Solarized palette. I've included palettes
|
||||||
|
for some popular terminal emulator as well as Xdefaults in the official
|
||||||
|
Solarized download available from [Solarized homepage][solarized]. If you use
|
||||||
|
Solarized without these colors, Solarized will by default use an approximate
|
||||||
|
set of 256 colors. It isn't bad looking and has been extensively tweaked, but
|
||||||
|
it's still not quite the real thing.
|
||||||
|
|
||||||
|
If you do use the custom terminal colors, simply add the following line
|
||||||
|
*before* the `colorschem solarized` line:
|
||||||
|
|
||||||
|
let g:solarized_termcolors=16
|
||||||
|
|
||||||
Advanced Configuration
|
Advanced Configuration
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
Solarized will work out of the box with just the two lines specified above.
|
Solarized will work out of the box with just the two lines specified above but
|
||||||
|
does include several other options that can be set in your .vimrc file.
|
||||||
|
|
||||||
|
Set these in your vimrc file prior to calling the colorscheme.
|
||||||
|
"
|
||||||
|
option name default optional
|
||||||
|
------------------------------------------------
|
||||||
|
g:solarized_termcolors= 256 | 16
|
||||||
|
g:solarized_termtrans = 0 | 1
|
||||||
|
g:solarized_degrade = 0 | 1
|
||||||
|
g:solarized_bold = 1 | 0
|
||||||
|
g:solarized_underline = 1 | 0
|
||||||
|
g:solarized_italic = 1 | 0
|
||||||
|
g:solarized_style = "dark" | "light"
|
||||||
|
g:solarized_contrast = "normal"| "high" or "low"
|
||||||
|
------------------------------------------------
|
||||||
|
|
||||||
|
### Option Details
|
||||||
|
|
||||||
|
* g:solarized_termcolors
|
||||||
|
|
||||||
|
**The most important option** if you are using vim in terminal (non gui)
|
||||||
|
mode! See my diatribe above regarding terminal colors. This tells Solarized
|
||||||
|
to use the 256 degraded color mode if running in a 256 color capable
|
||||||
|
terminal. Otherwise, if set to `16` it will use the terminal emulators
|
||||||
|
colorscheme (best option as long as you've set the emulators colors to the
|
||||||
|
Solarized palette).
|
||||||
|
|
||||||
|
* g:solarized_termtrans
|
||||||
|
|
||||||
|
If you use a terminal emulator with a transparent background and Solarized
|
||||||
|
isn't displaying the background color transparently, set this to 1 and
|
||||||
|
Solarized will use the default (transparent) background of the terminal
|
||||||
|
emulator. *urxvt* required this in my testing; Terminal.app/iTerm2 did not.
|
||||||
|
|
||||||
|
* g:solarized_degrade
|
||||||
|
|
||||||
|
For test purposes only; forces Solarized to use the 256 degraded color mode
|
||||||
|
to test the approximate color values for accuracy.
|
||||||
|
|
||||||
|
* g:solarized_bold | g:solarized_underline | g:solarized_italic
|
||||||
|
|
||||||
|
If you wish to stop Solarized from displaying bold, underlined or
|
||||||
|
italicized typefaces, simply assign a zero value to the appropriate
|
||||||
|
variable, for example: `let g:solarized_italic=0`
|
||||||
|
|
||||||
|
* g:solarized_style
|
||||||
|
|
||||||
|
Simply another way to force Solarized to use a dark or light background.
|
||||||
|
It's better to use `set background=dark` or `set background=light` in your
|
||||||
|
.vimrc file. This option is mostly used in scripts (quick background color
|
||||||
|
change) or for testing.
|
||||||
|
|
||||||
|
* g:solarized_contrast
|
||||||
|
|
||||||
|
Stick with normal! It's been carefully tested. Setting this option to high
|
||||||
|
or low does use the same Solarized palette but simply shifts some values up
|
||||||
|
or down in order to expand or compress the tonal range displayed.
|
||||||
|
|
||||||
### **IMPORTANT NOTE FOR TERMINAL USERS**
|
### **IMPORTANT NOTE FOR TERMINAL USERS**
|
||||||
|
|
||||||
|
@ -80,6 +164,26 @@ ANSI color map is specified in the table below and terminal color themes are
|
||||||
available for download from the web page listed at the top of this file,
|
available for download from the web page listed at the top of this file,
|
||||||
including xorg defaul color values and themes for OS X Terminal.app and iTerm2.
|
including xorg defaul color values and themes for OS X Terminal.app and iTerm2.
|
||||||
|
|
||||||
|
Toggle Background Function
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
Here's a quick script that toggles the background color, using F5 in this
|
||||||
|
example. You can drop this into .vimrc:
|
||||||
|
|
||||||
|
function! ToggleBackground()
|
||||||
|
if (w:solarized_style=="dark")
|
||||||
|
let w:solarized_style="light"
|
||||||
|
colorscheme solarized
|
||||||
|
else
|
||||||
|
let w:solarized_style="dark"
|
||||||
|
colorscheme solarized
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
command! Togbg call ToggleBackground()
|
||||||
|
nnoremap <F5> :call ToggleBackground()<CR>
|
||||||
|
inoremap <F5> <ESC>:call ToggleBackground()<CR>a
|
||||||
|
vnoremap <F5> <ESC>:call ToggleBackground()<CR>
|
||||||
|
|
||||||
Code Notes
|
Code Notes
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,50 @@
|
||||||
" License: OSI approved MIT license (see end of this file)
|
" License: OSI approved MIT license (see end of this file)
|
||||||
"
|
"
|
||||||
" Usage "{{{
|
" Usage "{{{
|
||||||
|
"
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" QUICKSTART:
|
" ABOUT:
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" Put the following two lines in your vimrc:
|
" Solarized is a carefully designed selective contrast colorscheme with dual
|
||||||
|
" light and dark modes that runs in both GUI, 256 and 16 color modes.
|
||||||
|
"
|
||||||
|
" See the homepage above for screenshots and details.
|
||||||
|
"
|
||||||
|
" ---------------------------------------------------------------------
|
||||||
|
" INSTALLATION:
|
||||||
|
" ---------------------------------------------------------------------
|
||||||
|
"
|
||||||
|
" Two options for installation: manual or pathogen
|
||||||
|
"
|
||||||
|
" MANUAL INSTALLATION OPTION:
|
||||||
|
" ---------------------------------------------------------------------
|
||||||
|
"
|
||||||
|
" 1. Put the files in the right place!
|
||||||
|
" 2. Move `solarized.vim` to your `.vim/colors` directory.
|
||||||
|
"
|
||||||
|
" RECOMMENDED PATHOGEN INSTALLATION OPTION:
|
||||||
|
" ---------------------------------------------------------------------
|
||||||
|
"
|
||||||
|
" 1. Download and install Tim Pope's Pathogen from:
|
||||||
|
" https://github.com/tpope/vim-pathogen
|
||||||
|
"
|
||||||
|
" 2. Next, move or clone the `vim-colors-solarized` directory so that it is
|
||||||
|
" a subdirectory of the `.vim/bundle` directory.
|
||||||
|
"
|
||||||
|
" a. **clone with git:**
|
||||||
|
"
|
||||||
|
" $ cd ~/.vim/bundle
|
||||||
|
" $ git clone git://github.com/altercation/vim-colors-solarized.git
|
||||||
|
"
|
||||||
|
" b. **or move manually into the pathogen bundle directory:**
|
||||||
|
" In the parent directory of vim-colors-solarized:
|
||||||
|
"
|
||||||
|
" $ mv vim-colors-solarized ~/.vim/bundle/
|
||||||
|
"
|
||||||
|
" MODIFY VIMRC:
|
||||||
|
"
|
||||||
|
" After either Option 1 or Option 2 above, put the following two lines in your
|
||||||
|
" .vimrc:
|
||||||
"
|
"
|
||||||
" set background=dark
|
" set background=dark
|
||||||
" colorscheme solarized
|
" colorscheme solarized
|
||||||
|
@ -18,82 +58,147 @@
|
||||||
" set background=light
|
" set background=light
|
||||||
" colorscheme solarized
|
" colorscheme solarized
|
||||||
"
|
"
|
||||||
" pathogen users can install to:
|
" I like to have a different background in GUI and terminal modes, so I can use
|
||||||
|
" the following if-then. However, I find vim's background autodetection to be
|
||||||
|
" pretty good and, at least with MacVim, I can leave this background value
|
||||||
|
" assignment out entirely and get the same results.
|
||||||
"
|
"
|
||||||
" (your vim directory)/bundle/vim-solarized/colors/solarized.vim
|
" if has('gui_running')
|
||||||
|
" set background=light
|
||||||
|
" else
|
||||||
|
" set background=dark
|
||||||
|
" endif
|
||||||
"
|
"
|
||||||
" (note that vim-solarized could be just solarized, it's up to you, but
|
" See the Solarized homepage at http://ethanschoonover.com/solarized for
|
||||||
" if you pull from git you'll get this directory name unless you change it)
|
" screenshots which will help you select either the light or dark background.
|
||||||
"
|
"
|
||||||
" Other options are detailed below.
|
" Other options are detailed below.
|
||||||
"
|
"
|
||||||
" IMPORTANT NOTE FOR TERMINAL USERS:
|
" IMPORTANT NOTE FOR TERMINAL USERS:
|
||||||
" If you are running vim in a terminal, Solarized will run in 256 color mode if
|
|
||||||
" the terminal supports it, but those 256 colors are (in all 256 color terminal
|
|
||||||
" emulators) limited to a "degraded" color palette. While the colors will all
|
|
||||||
" approximate the specific Solarized color values, if you prefer an accurate
|
|
||||||
" color palette you can set the ANSI colors in your terminal and use the 16
|
|
||||||
" color terminal mode using the g:solarized_termcolors="16" option detailed
|
|
||||||
" below. The ANSI color map is specified in the table below and terminal color
|
|
||||||
" themes are available for download from the web page listed at the top of this
|
|
||||||
" file, including xorg Xdefaults/Xresources color values and themes for OS
|
|
||||||
" X Terminal.app and iTerm 2.
|
|
||||||
"
|
"
|
||||||
|
" If you are going to use Solarized in Terminal mode (i.e. not in a GUI
|
||||||
|
" version like gvim or macvim), **please please please** consider setting your
|
||||||
|
" terminal emulator's colorscheme to used the Solarized palette. I've included
|
||||||
|
" palettes for some popular terminal emulator as well as Xdefaults in the
|
||||||
|
" official Solarized download available from:
|
||||||
|
"
|
||||||
|
" http://ethanschoonover.com/solarized
|
||||||
|
"
|
||||||
|
" If you use Solarized without these colors, Solarized will by default use an
|
||||||
|
" approximate set of 256 colors. It isn't bad looking and has been extensively
|
||||||
|
" tweaked, but it's still not quite the real thing.
|
||||||
|
"
|
||||||
|
" If you do use the custom terminal colors, simply add the following line
|
||||||
|
" *before* the `colorschem solarized` line:
|
||||||
|
"
|
||||||
|
" let g:solarized_termcolors=16
|
||||||
"
|
"
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" ABOUT
|
" TOGGLE BACKGROUND FUNCTION
|
||||||
|
" ---------------------------------------------------------------------
|
||||||
|
" Here's a quick script that toggles the background color, using F5 in this
|
||||||
|
" example. You can drop this into .vimrc:
|
||||||
|
"
|
||||||
|
" function! ToggleBackground()
|
||||||
|
" if (w:solarized_style=="dark")
|
||||||
|
" let w:solarized_style="light"
|
||||||
|
" colorscheme solarized
|
||||||
|
" else
|
||||||
|
" let w:solarized_style="dark"
|
||||||
|
" colorscheme solarized
|
||||||
|
" endif
|
||||||
|
" endfunction
|
||||||
|
" command! Togbg call ToggleBackground()
|
||||||
|
" nnoremap <F5> :call ToggleBackground()<CR>
|
||||||
|
" inoremap <F5> <ESC>:call ToggleBackground()<CR>a
|
||||||
|
" vnoremap <F5> <ESC>:call ToggleBackground()<CR>
|
||||||
|
"
|
||||||
|
" ---------------------------------------------------------------------
|
||||||
|
" OPTIONS
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
"
|
"
|
||||||
" SOLARIZED is a precisely designed color scheme with unique characteristics:
|
" Set these in your vimrc file prior to calling the colorscheme.
|
||||||
"
|
"
|
||||||
" PRECISION: Solarized is comprised of eight base monotone colors complemented
|
" option name default optional
|
||||||
" by eight accent colors. The monotone colors are specified in L*a*b*
|
" ------------------------------------------------
|
||||||
" colorspace for perceptually uniform contrast, even when the palette is
|
" g:solarized_termcolors= 256 | 16
|
||||||
" inverted from dark to light background mode. Accent colors are selected based
|
" g:solarized_termtrans = 0 | 1
|
||||||
" on specific color-wheel relationships to the base monotone series
|
" g:solarized_degrade = 0 | 1
|
||||||
" (complement, triad, tetrad, split-complement, etc).
|
" g:solarized_bold = 1 | 0
|
||||||
|
" g:solarized_underline = 1 | 0
|
||||||
|
" g:solarized_italic = 1 | 0
|
||||||
|
" g:solarized_style = "dark" | "light"
|
||||||
|
" g:solarized_contrast = "normal"| "high" or "low"
|
||||||
|
" ------------------------------------------------
|
||||||
"
|
"
|
||||||
" INVERSION: Solarized can easily switch from light to dark background mode and
|
" OPTION DETAILS
|
||||||
" yet maintains L* (lightness) relationships in the entire base monotone
|
|
||||||
" palette set. Accent colors retain excellent readability on both light and
|
|
||||||
" dark backgrounds. Thus the vim solarized colorscheme, for example, can be
|
|
||||||
" easily modified and extended without any effort spent on maintaining the
|
|
||||||
" light/dark modes separately; the mode switch is the simple inversion of four
|
|
||||||
" color values.
|
|
||||||
"
|
"
|
||||||
" READABILITY: Solarized has been designed as a "selective contrast"
|
" ------------------------------------------------
|
||||||
" colorscheme (versus the more common high or low contrast schemes). Elements
|
" g:solarized_termcolors= 256 | 16
|
||||||
" which are secondary in importance, or which should minimize their visual
|
" ------------------------------------------------
|
||||||
" intrusiveness (e.g. line numbers and comments in vim) use the lower contrast
|
" The most important option if you are using vim in terminal (non gui) mode!
|
||||||
" base color values, while high value content (e.g. code) uses higher contrast
|
" This tells Solarized to use the 256 degraded color mode if running in a 256
|
||||||
" base values as well as accent colors.
|
" color capable terminal. Otherwise, if set to `16` it will use the terminal
|
||||||
|
" emulators colorscheme (best option as long as you've set the emulators colors
|
||||||
|
" to the Solarized palette).
|
||||||
"
|
"
|
||||||
" SCALABILITY: Solarized has been designed to be used both in the full palette
|
" If you are going to use Solarized in Terminal mode (i.e. not in a GUI
|
||||||
" mode (in text editors where many colors are useful for syntax highlighting)
|
" version like gvim or macvim), **please please please** consider setting your
|
||||||
" as well as in a scaled down five color mode for graphic design purposes (web
|
" terminal emulator's colorscheme to used the Solarized palette. I've included
|
||||||
" pages).
|
" palettes for some popular terminal emulator as well as Xdefaults in the
|
||||||
|
" official Solarized download available from:
|
||||||
|
" http://ethanschoonover.com/solarized . If you use Solarized without these
|
||||||
|
" colors, Solarized will by default use an approximate set of 256 colors. It
|
||||||
|
" isn't bad looking and has been extensively tweaked, but it's still not quite
|
||||||
|
" the real thing.
|
||||||
"
|
"
|
||||||
" PERSONALITY: Solarized aims to be flexible in many contexts and as such it
|
" ------------------------------------------------
|
||||||
" maintains the common primary and secondary named colors (red, blue, yellow,
|
" g:solarized_termtrans = 0 | 1
|
||||||
" green, etc.). Despite the common nature of these hues, each color has been
|
" ------------------------------------------------
|
||||||
" carefully tuned in terms of saturation, luminosity (more accurately, L*
|
" If you use a terminal emulator with a transparent background and Solarized
|
||||||
" lightness) so that the entire palette has a rich, warm feel in the accent
|
" isn't displaying the background color transparently, set this to 1 and
|
||||||
" range as evidenced by the ochre yellow and oxygenated blood red,
|
" Solarized will use the default (transparent) background of the terminal
|
||||||
" complementing the deep-sea blue-greens of the base monotone colors.
|
" emulator. *urxvt* required this in my testing; Terminal.app/iTerm2 did not.
|
||||||
"
|
"
|
||||||
" On the name: "Solarized" refers to the dual light/dark mode of the palette,
|
" ------------------------------------------------
|
||||||
" somewhat analogous to the photographic effect of solarization. The Ian Brown
|
" g:solarized_degrade = 0 | 1
|
||||||
" album "Solarized" is also on regular rotation in my playlist.
|
" ------------------------------------------------
|
||||||
|
" For test purposes only; forces Solarized to use the 256 degraded color mode
|
||||||
|
" to test the approximate color values for accuracy.
|
||||||
"
|
"
|
||||||
|
" ------------------------------------------------
|
||||||
|
" g:solarized_bold = 1 | 0
|
||||||
|
" ------------------------------------------------
|
||||||
|
" ------------------------------------------------
|
||||||
|
" g:solarized_underline = 1 | 0
|
||||||
|
" ------------------------------------------------
|
||||||
|
" ------------------------------------------------
|
||||||
|
" g:solarized_italic = 1 | 0
|
||||||
|
" ------------------------------------------------
|
||||||
|
" If you wish to stop Solarized from displaying bold, underlined or
|
||||||
|
" italicized typefaces, simply assign a zero value to the appropriate
|
||||||
|
" variable, for example: `let g:solarized_italic=0`
|
||||||
|
"
|
||||||
|
" ------------------------------------------------
|
||||||
|
" g:solarized_style = "dark" | "light"
|
||||||
|
" ------------------------------------------------
|
||||||
|
" Simply another way to force Solarized to use a dark or light background.
|
||||||
|
" It's better to use `set background=dark` or `set background=light` in your
|
||||||
|
" .vimrc file. This option is mostly used in scripts (quick background color
|
||||||
|
" change) or for testing. Note that, if set, g:solarized_style overrides the
|
||||||
|
" setting for "background".
|
||||||
|
"
|
||||||
|
" ------------------------------------------------
|
||||||
|
" g:solarized_contrast = "normal"| "high" or "low"
|
||||||
|
" ------------------------------------------------
|
||||||
|
" Stick with normal! It's been carefully tested. Setting this option to high
|
||||||
|
" or low does use the same Solarized palette but simply shifts some values up
|
||||||
|
" or down in order to expand or compress the tonal range displayed.
|
||||||
"
|
"
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" COLOR VALUES
|
" COLOR VALUES
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
"
|
|
||||||
" Download palettes and files from: http://ethanschoonover.com/solarized
|
" Download palettes and files from: http://ethanschoonover.com/solarized
|
||||||
" let s:g_back = "#002b36" " 12 12
|
|
||||||
let s:g_base03 = "#"
|
|
||||||
let s:g_base02 = "#"
|
|
||||||
|
|
||||||
" SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB
|
" SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB
|
||||||
" --------- ------- ---- ------- ----------- ---------- ----------- -----------
|
" --------- ------- ---- ------- ----------- ---------- ----------- -----------
|
||||||
|
@ -115,101 +220,9 @@
|
||||||
" green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60
|
" green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60
|
||||||
"
|
"
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" OPTIONS
|
" COLORSCHEME HACKING
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
"
|
"
|
||||||
" Set these in your vimrc file prior to calling the colorscheme.
|
|
||||||
"
|
|
||||||
" option name default optional
|
|
||||||
" ------------------------------------------------
|
|
||||||
" g:solarized_style = "dark" | "light"
|
|
||||||
" g:solarized_contrast = "normal"| "high" or "low"
|
|
||||||
" g:solarized_termtrans = 0 | 1
|
|
||||||
" g:solarized_termcolors= 16 | 256
|
|
||||||
" g:solarized_degrade = 0 | 1
|
|
||||||
" g:solarized_bold = 1 | 0
|
|
||||||
" g:solarized_underline = 1 | 0
|
|
||||||
" g:solarized_italic = 0 | 1
|
|
||||||
" ------------------------------------------------
|
|
||||||
"
|
|
||||||
" OPTION DETAILS
|
|
||||||
"
|
|
||||||
" ------------------------------------------------
|
|
||||||
" g:solarized_style = "dark" | "light"
|
|
||||||
" ------------------------------------------------
|
|
||||||
" If "solarized_style" isn't set, Solarized will use the value set by
|
|
||||||
" "background" in your vimrc. I recommend using "background" for simplicity.
|
|
||||||
" Thus in your vimrc file, the following sequences would set Solarized to
|
|
||||||
" either dark or light mode, respectively:
|
|
||||||
"
|
|
||||||
" set background=dark
|
|
||||||
" colorscheme solarized
|
|
||||||
"
|
|
||||||
" set background=light
|
|
||||||
" colorscheme solarized
|
|
||||||
"
|
|
||||||
" The above is equivalent to:
|
|
||||||
"
|
|
||||||
" let g:solarized_style = "dark"
|
|
||||||
" colorscheme solarized
|
|
||||||
"
|
|
||||||
" let g:solarized_style = "light"
|
|
||||||
" colorscheme solarized
|
|
||||||
"
|
|
||||||
" Note that, if set, g:solarized_style overrides the setting for "background".
|
|
||||||
"
|
|
||||||
" ------------------------------------------------
|
|
||||||
" g:solarized_contrast = "normal"| "high"
|
|
||||||
" ------------------------------------------------
|
|
||||||
" Solarized has been designed to keep contrast of less critical elements low
|
|
||||||
" (e.g. comments are lower contrast). Solarized has also been tested on devices
|
|
||||||
" with a wide variety of gamma values and should perform well on most displays.
|
|
||||||
" If you find you want to increase contrast for the low contrast items
|
|
||||||
" (comments, etc.) you can set this value to "high" (default is "normal").
|
|
||||||
" I encourage you to use it in normal mode first. There is, additionally,
|
|
||||||
" a "low" contrast mode, shifting the background tone towards the main content
|
|
||||||
" tones.
|
|
||||||
"
|
|
||||||
" ------------------------------------------------
|
|
||||||
" g:solarized_termtrans = 0 | 1
|
|
||||||
" ------------------------------------------------
|
|
||||||
" On some terminals (urxvt in my tests) Vim colorthemes may override
|
|
||||||
" transparency settings of the terminal. Setting this to "1" changes the
|
|
||||||
" background value in terminal Vim mode to "NONE" allowing your terminal
|
|
||||||
" background color/transparency to be used for Vim's background. This shouldn't
|
|
||||||
" be necessary in OSX terminal applications such as Terminal and iTerm2.
|
|
||||||
"
|
|
||||||
" ------------------------------------------------
|
|
||||||
" g:solarized_termcolors= 16 | 256
|
|
||||||
" ------------------------------------------------
|
|
||||||
" A very important setting if you are using Vim in terminals and want accurate
|
|
||||||
" colors. There are two options:
|
|
||||||
" 16 - Use the named 16 colors of the terminal (red, blue, etc.). In order for
|
|
||||||
" the colors to be accurately reproduced for this colorscheme, you must set
|
|
||||||
" your terminal's 16 colors to match Solarized. I list the terminal color
|
|
||||||
" values in a table above, and also provide downloads of colorscheme for
|
|
||||||
" command terminal applications from http://ejas.net/solarized
|
|
||||||
"
|
|
||||||
" ------------------------------------------------
|
|
||||||
" g:solarized_degrade = 0 | 1
|
|
||||||
" ------------------------------------------------
|
|
||||||
" Used primarily during testing, this can be set to 1 to force Solarized to
|
|
||||||
" degrade the hex color values to xterm/256 color approximate matching values.
|
|
||||||
" Note that while in terminal mode in a 256 color terminal, these degraded
|
|
||||||
" color values will be used automatically unless you have adjusted your
|
|
||||||
" terminal's default 16 colors and set g:solarized_termcolors to 16 in your
|
|
||||||
" vimrc before setting your colorscheme.
|
|
||||||
"
|
|
||||||
" ------------------------------------------------
|
|
||||||
" g:solarized_bold = 1 | 0
|
|
||||||
" ------------------------------------------------
|
|
||||||
" ------------------------------------------------
|
|
||||||
" g:solarized_underline = 1 | 0
|
|
||||||
" ------------------------------------------------
|
|
||||||
" ------------------------------------------------
|
|
||||||
" g:solarized_italic = 0 | 1
|
|
||||||
" ------------------------------------------------
|
|
||||||
"
|
|
||||||
" Useful commands for testing colorschemes:
|
" Useful commands for testing colorschemes:
|
||||||
" :source $VIMRUNTIME/syntax/hitest.vim
|
" :source $VIMRUNTIME/syntax/hitest.vim
|
||||||
" :help highlight-groups
|
" :help highlight-groups
|
||||||
|
@ -226,39 +239,55 @@
|
||||||
" Default option values"{{{
|
" Default option values"{{{
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
if !exists("g:solarized_termtrans")
|
if !exists("g:solarized_termtrans")
|
||||||
let g:solarized_termtrans = 0
|
let w:solarized_termtrans = 0
|
||||||
|
else
|
||||||
|
let w:solarized_termtrans = g:solarized_termtrans
|
||||||
endif
|
endif
|
||||||
if !exists("g:solarized_degrade")
|
if !exists("g:solarized_degrade")
|
||||||
let g:solarized_degrade = 0
|
let w:solarized_degrade = 0
|
||||||
|
else
|
||||||
|
let w:solarized_degrade = g:solarized_degrade
|
||||||
endif
|
endif
|
||||||
if !exists("g:solarized_bold")
|
if !exists("g:solarized_bold")
|
||||||
let g:solarized_bold = 1
|
let w:solarized_bold = 1
|
||||||
|
else
|
||||||
|
let w:solarized_bold = g:solarized_bold
|
||||||
endif
|
endif
|
||||||
if !exists("g:solarized_underline")
|
if !exists("g:solarized_underline")
|
||||||
let g:solarized_underline = 1
|
let w:solarized_underline = 1
|
||||||
|
else
|
||||||
|
let w:solarized_underline = g:solarized_underline
|
||||||
endif
|
endif
|
||||||
if !exists("g:solarized_italic")
|
if !exists("g:solarized_italic")
|
||||||
let g:solarized_italic = 1
|
let w:solarized_italic = 1
|
||||||
|
else
|
||||||
|
let w:solarized_italic = g:solarized_italic
|
||||||
endif
|
endif
|
||||||
if !exists("g:solarized_termcolors")
|
if !exists("g:solarized_termcolors")
|
||||||
let g:solarized_termcolors = 256
|
let w:solarized_termcolors = 256
|
||||||
let g:solarized_termcolors = 16
|
else
|
||||||
|
let w:solarized_termcolors = g:solarized_termcolors
|
||||||
endif
|
endif
|
||||||
if !exists("g:solarized_style")
|
if !exists("w:solarized_style") && !exists("g:solarized_style")
|
||||||
let g:solarized_style = &background
|
let w:solarized_style = &background
|
||||||
|
elseif exists("g:solarized_style")
|
||||||
|
let w:solarized_style = g:solarized_style
|
||||||
|
" else we have an existing w:solarized_style
|
||||||
endif
|
endif
|
||||||
if !exists("g:solarized_contrast")
|
if !exists("g:solarized_contrast")
|
||||||
let g:solarized_contrast = "normal"
|
let w:solarized_contrast = "normal"
|
||||||
|
else
|
||||||
|
let w:solarized_contrast = g:solarized_contrast
|
||||||
endif
|
endif
|
||||||
"}}}
|
"}}}
|
||||||
" Colorscheme basic settings"{{{
|
" Colorscheme basic settings"{{{
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
if g:solarized_style == "dark"
|
if w:solarized_style == "dark"
|
||||||
set background=dark
|
set background=dark
|
||||||
elseif g:solarized_style == "light"
|
elseif w:solarized_style == "light"
|
||||||
set background=light
|
set background=light
|
||||||
else
|
else
|
||||||
let g:solarized_style = &background
|
let w:solarized_style = &background
|
||||||
endif
|
endif
|
||||||
|
|
||||||
hi clear
|
hi clear
|
||||||
|
@ -282,7 +311,7 @@ let colors_name = "solarized"
|
||||||
" leave the hex values out entirely in that case and include only cterm colors)
|
" leave the hex values out entirely in that case and include only cterm colors)
|
||||||
" We also check to see if user has set solarized (force use of the
|
" We also check to see if user has set solarized (force use of the
|
||||||
" neutral gray monotone palette component)
|
" neutral gray monotone palette component)
|
||||||
if has("gui_running") && g:solarized_degrade == 0
|
if has("gui_running") && w:solarized_degrade == 0
|
||||||
let s:g_back = "#002b36"
|
let s:g_back = "#002b36"
|
||||||
let s:g_base03 = "#002b36"
|
let s:g_base03 = "#002b36"
|
||||||
let s:g_base02 = "#073642"
|
let s:g_base02 = "#073642"
|
||||||
|
@ -331,7 +360,7 @@ endif
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" We also set this if gui is running as we use the optional formatting
|
" We also set this if gui is running as we use the optional formatting
|
||||||
" values that get set here (ou==optional underline, ob==opt bold).
|
" values that get set here (ou==optional underline, ob==opt bold).
|
||||||
if (has("gui_running") || &t_Co == 256) && g:solarized_termcolors != 16
|
if (has("gui_running") || &t_Co == 256) && w:solarized_termcolors != 16
|
||||||
let s:c_back = "233"
|
let s:c_back = "233"
|
||||||
let s:c_base03 = "233"
|
let s:c_base03 = "233"
|
||||||
let s:c_base02 = "234"
|
let s:c_base02 = "234"
|
||||||
|
@ -351,7 +380,7 @@ if (has("gui_running") || &t_Co == 256) && g:solarized_termcolors != 16
|
||||||
let s:c_green = "64"
|
let s:c_green = "64"
|
||||||
let s:ou = ""
|
let s:ou = ""
|
||||||
let s:ob = ""
|
let s:ob = ""
|
||||||
elseif &t_Co > 8 || g:solarized_termcolors == 16
|
elseif &t_Co > 8 || w:solarized_termcolors == 16
|
||||||
" NOTE: this requires terminal colors to be set to solarized standard
|
" NOTE: this requires terminal colors to be set to solarized standard
|
||||||
" 16 colors (see top of this file for details)
|
" 16 colors (see top of this file for details)
|
||||||
let s:c_back = "NONE"
|
let s:c_back = "NONE"
|
||||||
|
@ -407,7 +436,7 @@ let s:s = ",standout"
|
||||||
"}}}
|
"}}}
|
||||||
" Alternate light scheme "{{{
|
" Alternate light scheme "{{{
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
if g:solarized_style == "light"
|
if w:solarized_style == "light"
|
||||||
let s:c_temp03 = s:c_base03
|
let s:c_temp03 = s:c_base03
|
||||||
let s:c_temp02 = s:c_base02
|
let s:c_temp02 = s:c_base02
|
||||||
let s:c_temp01 = s:c_base01
|
let s:c_temp01 = s:c_base01
|
||||||
|
@ -438,7 +467,7 @@ endif
|
||||||
"}}}
|
"}}}
|
||||||
" Alternate inverted background scheme "{{{
|
" Alternate inverted background scheme "{{{
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
if g:solarized_style == "inverted"
|
if w:solarized_style == "inverted"
|
||||||
let s:c_temp03 = s:c_base03
|
let s:c_temp03 = s:c_base03
|
||||||
let s:c_temp02 = s:c_base02
|
let s:c_temp02 = s:c_base02
|
||||||
let s:c_base03 = s:c_temp02
|
let s:c_base03 = s:c_temp02
|
||||||
|
@ -453,7 +482,7 @@ endif
|
||||||
"}}}
|
"}}}
|
||||||
" Optional contrast schemes "{{{
|
" Optional contrast schemes "{{{
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
if g:solarized_contrast == "high"
|
if w:solarized_contrast == "high"
|
||||||
let s:g_base03 = s:g_base03
|
let s:g_base03 = s:g_base03
|
||||||
let s:g_base02 = s:g_base02
|
let s:g_base02 = s:g_base02
|
||||||
let s:g_base01 = s:g_base00
|
let s:g_base01 = s:g_base00
|
||||||
|
@ -464,29 +493,29 @@ if g:solarized_contrast == "high"
|
||||||
let s:g_base3 = s:g_base3
|
let s:g_base3 = s:g_base3
|
||||||
let s:g_back = s:g_back
|
let s:g_back = s:g_back
|
||||||
endif
|
endif
|
||||||
if g:solarized_contrast == "low"
|
if w:solarized_contrast == "low"
|
||||||
let s:g_back = s:g_base02
|
let s:g_back = s:g_base02
|
||||||
endif
|
endif
|
||||||
"}}}
|
"}}}
|
||||||
" Overrides dependent on user specified values"{{{
|
" Overrides dependent on user specified values"{{{
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
if g:solarized_termtrans == 1
|
if w:solarized_termtrans == 1
|
||||||
let s:c_back = "NONE"
|
let s:c_back = "NONE"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if g:solarized_bold == 1
|
if w:solarized_bold == 1
|
||||||
let s:b = ",bold"
|
let s:b = ",bold"
|
||||||
else
|
else
|
||||||
let s:b = ""
|
let s:b = ""
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if g:solarized_underline == 1
|
if w:solarized_underline == 1
|
||||||
let s:u = ",underline"
|
let s:u = ",underline"
|
||||||
else
|
else
|
||||||
let s:u = ""
|
let s:u = ""
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if g:solarized_italic == 1
|
if w:solarized_italic == 1
|
||||||
let s:i = ",italic"
|
let s:i = ",italic"
|
||||||
else
|
else
|
||||||
let s:i = ""
|
let s:i = ""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user