]> git.r.bdr.sh - rbdr/dotfiles/blame_incremental - vim/doc/solarized.txt
Remove blinking and reattach-to-user-namespace
[rbdr/dotfiles] / vim / doc / solarized.txt
... / ...
CommitLineData
1*solarized.vim* for Vim version 7.3 or newer. Modified: 2011 May 05
2
3
4 Solarized Vim Colorscheme by Ethan Schoonover ~
5
6Solarized Colorscheme *solarized*
7 *solarized-help*
8 *solarized-colors*
9 *solarized-colorscheme*
10 *vim-colors-solarized*
11
12Solarized is a carefully designed selective contrast colorscheme with dual
13light and dark modes that runs in both GUI, 256 and 16 color modes.
14
15See the homepage at http://ethanschoonover.com/solarized for screenshots and
16details.
17
180. Install |solarized-install|
191. Solarized Menu |solarized-menu|
202. Options |solarized-options|
213. Toggle Background |solarized-togglebg|
224. Terminal Issues |solarized-term|
23
24==============================================================================
250. Install *solarized-install*
26
27Note: I recommend using Tim Pope's pathogen plugin to install this
28colorscheme. See https://github.com/tpope/vim-pathogen . If you've installed
29pathogen properly you can install Solarized with the following commands,
30followed by the .vimrc configuration below.
31
32 $ cd ~/.vim/bundle
33 $ git clone https://github.com/altercation/vim-colors-solarized.git
34
35If you aren't using pathogen, you can use the following three steps to install
36Solarized:
37
381. Download the solarized distribution (available on the homepage above)
39 and unarchive the file.
40
412. Move `solarized.vim` to your `.vim/colors` directory.
42
433. Move each of the files in each subdirectories to the corresponding .vim
44 subdirectory (e.g. autoload/togglebg.vim goes into your .vim/autoload
45 directory as .vim/autoload/togglebg.vim).
46
47
48After installation, place the following lines in your .vimrc:
49
50 syntax enable
51 set background=dark
52 colorscheme solarized
53
54or, for the light background mode of Solarized:
55
56 syntax enable
57 set background=light
58 colorscheme solarized
59
60==============================================================================
611. Solarized Menu *solarized-menu*
62
63Solarized makes available a menu when used in Vim GUI mode (gvim, macvim).
64This menu includes many of the options detailed below so that you can test out
65different values quickly without modifying your .vimrc file. If you wish to
66turn off this menu permanently, simply place the following line in your .vimrc
67above the "colorscheme solarized" line.
68
69 let g:solarized_menu=0
70
71==============================================================================
722. Toggle Background *solarized-togglebg*
73 *toggle-bg* *togglebg*
74 *toggle-background*
75
76Solarized comes with Toggle Background, a simple plugin to switch between
77light and dark background modes and reset the colorscheme. This is most useful
78for colorschemes that support both light and dark modes and in terminals or
79gui vim windows where the background will be properly set.
80
81Toggle Background can be accessed by:
82
83 * the Solarized menu (in Vim gui mode)
84 * the Window menu (in Vim gui mode, even if the Solarized menu is off)
85 * the "yin/yang" toolbar button (in Vim gui mode)
86 * the default mapping of <F5>
87 * custom key mapping you set in your .vimrc (see below)
88 * command line via ":ToggleBG" (no quotes)
89
90Toggle Background starts with a default mapping to function key <F5>. If you
91are already using this in a mapping, Toggle Background will not map itself to
92a default and you will have to map it manually in your .vimrc file, or
93remove/change your existing <F5> mapping to another value. To customize the
94keyboard mapping in your .vimrc file, use the following line, changing the
95"<F5>" value to the key or key combination you wish to use:
96
97 call togglebg#map("<F5>")
98
99Note that you'll want to use a single function key or equivalent if you want
100the plugin to work in all modes (normal, insert, visual).
101
102When using the plugin during normal, visual, or insert mode, there should be
103no interruption in workflow. However, if you activate the plugin during
104REPLACE mode, you will switch to standard insert mode (you will leave the
105overwrite replace mode).
106
107==============================================================================
1083. Solarized Terminal Issues *solarized-term*
109
110If you are going to use Solarized in Terminal mode (i.e. not in a GUI version
111like gvim or macvim), **please please please** consider setting your terminal
112emulator's colorscheme to used the Solarized palette. I've included palettes
113for some popular terminal emulator as well as Xdefaults in the official
114Solarized download available from the Solarized homepage listed at the top of
115this help document. If you use Solarized *without* these colors, Solarized
116will need to be told to degrade its colorscheme to a set compatible with the
117limited 256 terminal palette (whereas by using the terminal's 16 ansi color
118values, you can set the correct, specific values for the Solarized palette).
119
120If you do use the custom terminal colors, solarized.vim should work out of
121the box for you. If you are using a terminal emulator that supports 256
122colors and don't want to use the custom Solarized terminal colors, you will
123need to use the degraded 256 colorscheme. To do so, simply add the following
124line *before* the `colorschem solarized` line:
125
126 let g:solarized_termcolors=256
127
128Again, I recommend just changing your terminal colors to Solarized values
129either manually or via one of the many terminal schemes available for import.
130
131==============================================================================
1324. Solarized Options *solarized-options*
133
134
135AUTOGENERATE OPTIONS
136
137You can easily modify and experiment with Solarized display options using the
138Solarized menu when using Vim in gui mode. Once you have things set to your
139liking, you can autogenerate the current option list in a format ready for
140insertion into your .vimrc file using the Solarized menu "Autogenerate
141Options" command or at the command line with:
142
143 :SolarizedOptions
144
145
146OPTION LIST
147
148Set these in your vimrc file prior to calling the colorscheme.
149
150option name default optional
151------------------------------------------------
152g:solarized_termcolors= 16 | 256
153g:solarized_termtrans = 0 | 1
154g:solarized_degrade = 0 | 1
155g:solarized_bold = 1 | 0
156g:solarized_underline = 1 | 0
157g:solarized_italic = 1 | 0
158g:solarized_contrast = "normal"| "high" or "low"
159g:solarized_visibility= "normal"| "high" or "low"
160g:solarized_hitrail = 0 | 1
161g:solarized_menu = 1 | 0
162------------------------------------------------
163
164
165OPTION DETAILS
166
167------------------------------------------------
168g:solarized_termcolors= 256 | 16 *'solarized_termcolors'*
169------------------------------------------------
170The most important option if you are using vim in terminal (non gui) mode!
171This tells Solarized to use the 256 degraded color mode if running in a 256
172color capable terminal. Otherwise, if set to `16` it will use the terminal
173emulators colorscheme (best option as long as you've set the emulators colors
174to the Solarized palette).
175
176If you are going to use Solarized in Terminal mode (i.e. not in a GUI
177version like gvim or macvim), **please please please** consider setting your
178terminal emulator's colorscheme to used the Solarized palette. I've included
179palettes for some popular terminal emulator as well as Xdefaults in the
180official Solarized download available from:
181http://ethanschoonover.com/solarized . If you use Solarized without these
182colors, Solarized will by default use an approximate set of 256 colors. It
183isn't bad looking and has been extensively tweaked, but it's still not quite
184the real thing.
185
186------------------------------------------------
187g:solarized_termtrans = 0 | 1 *'solarized_termtrans'*
188------------------------------------------------
189If you use a terminal emulator with a transparent background and Solarized
190isn't displaying the background color transparently, set this to 1 and
191Solarized will use the default (transparent) background of the terminal
192emulator. *urxvt* required this in my testing; iTerm2 did not.
193
194Note that on Mac OS X Terminal.app, solarized_termtrans is set to 1 by
195default as this is almost always the best option. The only exception to this
196is if the working terminfo file supports 256 colors (xterm-256color).
197
198------------------------------------------------
199g:solarized_degrade = 0 | 1 *'solarized_degrade'*
200------------------------------------------------
201For test purposes only; forces Solarized to use the 256 degraded color mode
202to test the approximate color values for accuracy.
203
204------------------------------------------------
205g:solarized_bold = 1 | 0 *'solarized_bold'*
206------------------------------------------------
207------------------------------------------------
208g:solarized_underline = 1 | 0 *'solarized_underline'*
209------------------------------------------------
210------------------------------------------------
211g:solarized_italic = 1 | 0 *'solarized_italic'*
212------------------------------------------------
213If you wish to stop Solarized from displaying bold, underlined or
214italicized typefaces, simply assign a zero value to the appropriate
215variable, for example: `let g:solarized_italic=0`
216
217------------------------------------------------
218g:solarized_contrast = "normal"| "high" or "low" *'solarized_contrast'*
219------------------------------------------------
220Stick with normal! It's been carefully tested. Setting this option to high
221or low does use the same Solarized palette but simply shifts some values up
222or down in order to expand or compress the tonal range displayed.
223
224------------------------------------------------
225g:solarized_visibility = "normal"| "high" or "low" *'solarized_visibility'*
226------------------------------------------------
227Special characters such as trailing whitespace, tabs, newlines, when
228displayed using ":set list" can be set to one of three levels depending on
229your needs.
230
231------------------------------------------------
232g:solarized_hitrail = 0 | 1 *'solarized_hitrail'*
233------------------------------------------------
234Visibility can make listchar entities more visible, but if one has set
235cursorline on, these same listchar values standout somewhat less due to the
236background color of the cursorline. g:solarized_hitrail enables highlighting
237of trailing spaces (only one of the listchar types, but a particularly
238important one) while in the cursoline in a different manner in order to make
239them more visible. This may not work consistently as Solarized is using
240a pattern match than can be overridden by a more encompassing syntax-native
241match such as a comment line.
242
243
244------------------------------------------------
245g:solarized_menu = 1 | 0 *'solarized_menu'*
246------------------------------------------------
247Solarized includes a menu providing access to several of the above
248display related options, including contrast and visibility. This allows
249for an easy method of testing different values quickly before settling
250on a final assignment for your .vimrc. If you wish to turn off this menu,
251assign g:solarized_menu a value of 0.
252
253
254 vim:tw=78:noet:ts=8:ft=help:norl: