solarized.vim 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969
  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 Apr 14
  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. " INSTALLATION:
  21. " ---------------------------------------------------------------------
  22. "
  23. " Two options for installation: manual or pathogen
  24. "
  25. " MANUAL INSTALLATION OPTION:
  26. " ---------------------------------------------------------------------
  27. "
  28. " 1. Put the files in the right place!
  29. " 2. Move `solarized.vim` to your `.vim/colors` directory.
  30. "
  31. " RECOMMENDED PATHOGEN INSTALLATION OPTION:
  32. " ---------------------------------------------------------------------
  33. "
  34. " 1. Download and install Tim Pope's Pathogen from:
  35. " https://github.com/tpope/vim-pathogen
  36. "
  37. " 2. Next, move or clone the `vim-colors-solarized` directory so that it is
  38. " a subdirectory of the `.vim/bundle` directory.
  39. "
  40. " a. **clone with git:**
  41. "
  42. " $ cd ~/.vim/bundle
  43. " $ git clone git://github.com/altercation/vim-colors-solarized.git
  44. "
  45. " b. **or move manually into the pathogen bundle directory:**
  46. " In the parent directory of vim-colors-solarized:
  47. "
  48. " $ mv vim-colors-solarized ~/.vim/bundle/
  49. "
  50. " MODIFY VIMRC:
  51. "
  52. " After either Option 1 or Option 2 above, put the following two lines in your
  53. " .vimrc:
  54. "
  55. " syntax enable
  56. " set background=dark
  57. " colorscheme solarized
  58. "
  59. " or, for the light background mode of Solarized:
  60. "
  61. " syntax enable
  62. " set background=light
  63. " colorscheme solarized
  64. "
  65. " I like to have a different background in GUI and terminal modes, so I can use
  66. " the following if-then. However, I find vim's background autodetection to be
  67. " pretty good and, at least with MacVim, I can leave this background value
  68. " assignment out entirely and get the same results.
  69. "
  70. " if has('gui_running')
  71. " set background=light
  72. " else
  73. " set background=dark
  74. " endif
  75. "
  76. " See the Solarized homepage at http://ethanschoonover.com/solarized for
  77. " screenshots which will help you select either the light or dark background.
  78. "
  79. " Other options are detailed below.
  80. "
  81. " IMPORTANT NOTE FOR TERMINAL USERS:
  82. "
  83. " If you are going to use Solarized in Terminal mode (i.e. not in a GUI version
  84. " like gvim or macvim), **please please please** consider setting your terminal
  85. " emulator's colorscheme to used the Solarized palette. I've included palettes
  86. " for some popular terminal emulator as well as Xdefaults in the official
  87. " Solarized download available from [Solarized homepage]. If you use
  88. " Solarized *without* these colors, Solarized will need to be told to degrade
  89. " its colorscheme to a set compatible with the limited 256 terminal palette
  90. " (whereas by using the terminal's 16 ansi color values, you can set the
  91. " correct, specific values for the Solarized palette).
  92. "
  93. " If you do use the custom terminal colors, solarized.vim should work out of
  94. " the box for you. If you are using a terminal emulator that supports 256
  95. " colors and don't want to use the custom Solarized terminal colors, you will
  96. " need to use the degraded 256 colorscheme. To do so, simply add the following
  97. " line *before* the `colorschem solarized` line:
  98. "
  99. " let g:solarized_termcolors=256
  100. "
  101. " Again, I recommend just changing your terminal colors to Solarized values
  102. " either manually or via one of the many terminal schemes available for import.
  103. "
  104. " ---------------------------------------------------------------------
  105. " TOGGLE BACKGROUND FUNCTION:
  106. " ---------------------------------------------------------------------
  107. "
  108. " Solarized comes with a Toggle Background plugin that by default will map to
  109. " <F5> if that mapping is available. If it is not available you will need to
  110. " either map the function manually or change your current <F5> mapping to
  111. " something else. If you wish to map the function manually, enter the following
  112. " lines in your .vimrc:
  113. "
  114. " nmap <unique> <F5> <Plug>ToggleBackground
  115. " imap <unique> <F5> <Plug>ToggleBackground
  116. " vmap <unique> <F5> <Plug>ToggleBackground
  117. "
  118. " Note that it is important to *not* use the noremap map variants. The plugin
  119. " uses noremap internally. You may run `:help togglebg` for more information.
  120. "
  121. " ---------------------------------------------------------------------
  122. " OPTIONS
  123. " ---------------------------------------------------------------------
  124. "
  125. " Set these in your vimrc file prior to calling the colorscheme.
  126. "
  127. " option name default optional
  128. " ------------------------------------------------
  129. " g:solarized_termcolors= 16 | 256
  130. " g:solarized_termtrans = 0 | 1
  131. " g:solarized_degrade = 0 | 1
  132. " g:solarized_bold = 1 | 0
  133. " g:solarized_underline = 1 | 0
  134. " g:solarized_italic = 1 | 0
  135. " g:solarized_contrast = "normal"| "high" or "low"
  136. " g:solarized_visibility= "normal"| "high" or "low"
  137. " ------------------------------------------------
  138. "
  139. " OPTION DETAILS
  140. "
  141. " ------------------------------------------------
  142. " g:solarized_termcolors= 256 | 16
  143. " ------------------------------------------------
  144. " The most important option if you are using vim in terminal (non gui) mode!
  145. " This tells Solarized to use the 256 degraded color mode if running in a 256
  146. " color capable terminal. Otherwise, if set to `16` it will use the terminal
  147. " emulators colorscheme (best option as long as you've set the emulators colors
  148. " to the Solarized palette).
  149. "
  150. " If you are going to use Solarized in Terminal mode (i.e. not in a GUI
  151. " version like gvim or macvim), **please please please** consider setting your
  152. " terminal emulator's colorscheme to used the Solarized palette. I've included
  153. " palettes for some popular terminal emulator as well as Xdefaults in the
  154. " official Solarized download available from:
  155. " http://ethanschoonover.com/solarized . If you use Solarized without these
  156. " colors, Solarized will by default use an approximate set of 256 colors. It
  157. " isn't bad looking and has been extensively tweaked, but it's still not quite
  158. " the real thing.
  159. "
  160. " ------------------------------------------------
  161. " g:solarized_termtrans = 0 | 1
  162. " ------------------------------------------------
  163. " If you use a terminal emulator with a transparent background and Solarized
  164. " isn't displaying the background color transparently, set this to 1 and
  165. " Solarized will use the default (transparent) background of the terminal
  166. " emulator. *urxvt* required this in my testing; iTerm2 did not.
  167. "
  168. " Note that on Mac OS X Terminal.app, solarized_termtrans is set to 1 by
  169. " default as this is almost always the best option. The only exception to this
  170. " is if the working terminfo file supports 256 colors (xterm-256color).
  171. "
  172. " ------------------------------------------------
  173. " g:solarized_degrade = 0 | 1
  174. " ------------------------------------------------
  175. " For test purposes only; forces Solarized to use the 256 degraded color mode
  176. " to test the approximate color values for accuracy.
  177. "
  178. " ------------------------------------------------
  179. " g:solarized_bold = 1 | 0
  180. " ------------------------------------------------
  181. " ------------------------------------------------
  182. " g:solarized_underline = 1 | 0
  183. " ------------------------------------------------
  184. " ------------------------------------------------
  185. " g:solarized_italic = 1 | 0
  186. " ------------------------------------------------
  187. " If you wish to stop Solarized from displaying bold, underlined or
  188. " italicized typefaces, simply assign a zero value to the appropriate
  189. " variable, for example: `let g:solarized_italic=0`
  190. "
  191. " ------------------------------------------------
  192. " g:solarized_contrast = "normal"| "high" or "low"
  193. " ------------------------------------------------
  194. " Stick with normal! It's been carefully tested. Setting this option to high
  195. " or low does use the same Solarized palette but simply shifts some values up
  196. " or down in order to expand or compress the tonal range displayed.
  197. "
  198. " ------------------------------------------------
  199. " g:solarized_visibility = "normal"| "high" or "low"
  200. " ------------------------------------------------
  201. " Special characters such as trailing whitespace, tabs, newlines, when
  202. " displayed using ":set list" can be set to one of three levels depending on
  203. " your needs.
  204. "
  205. " ---------------------------------------------------------------------
  206. " COLOR VALUES
  207. " ---------------------------------------------------------------------
  208. " Download palettes and files from: http://ethanschoonover.com/solarized
  209. "
  210. " L\*a\*b values are canonical (White D65, Reference D50), other values are
  211. " matched in sRGB space.
  212. "
  213. " SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B sRGB HSB
  214. " --------- ------- ---- ------- ----------- ---------- ----------- -----------
  215. " base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21
  216. " base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26
  217. " base01 #586e75 10/7 brgreen 240 #4e4e4e 45 -07 -07 88 110 117 194 25 46
  218. " base00 #657b83 11/7 bryellow 241 #585858 50 -07 -07 101 123 131 195 23 51
  219. " base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59
  220. " base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63
  221. " base2 #eee8d5 7/7 white 254 #d7d7af 92 -00 10 238 232 213 44 11 93
  222. " base3 #fdf6e3 15/7 brwhite 230 #ffffd7 97 00 10 253 246 227 44 10 99
  223. " yellow #b58900 3/3 yellow 136 #af8700 60 10 65 181 137 0 45 100 71
  224. " orange #cb4b16 9/3 brred 166 #d75f00 50 50 55 203 75 22 18 89 80
  225. " red #dc322f 1/1 red 160 #d70000 50 65 45 220 50 47 1 79 86
  226. " magenta #d33682 5/5 magenta 125 #af005f 50 65 -05 211 54 130 331 74 83
  227. " violet #6c71c4 13/5 brmagenta 61 #5f5faf 50 15 -45 108 113 196 237 45 77
  228. " blue #268bd2 4/4 blue 33 #0087ff 55 -10 -45 38 139 210 205 82 82
  229. " cyan #2aa198 6/6 cyan 37 #00afaf 60 -35 -05 42 161 152 175 74 63
  230. " green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60
  231. "
  232. " ---------------------------------------------------------------------
  233. " COLORSCHEME HACKING
  234. " ---------------------------------------------------------------------
  235. "
  236. " Useful commands for testing colorschemes:
  237. " :source $VIMRUNTIME/syntax/hitest.vim
  238. " :help highlight-groups
  239. " :help cterm-colors
  240. " :help group-name
  241. "
  242. " Useful links for developing colorschemes:
  243. " http://www.vim.org/scripts/script.php?script_id=2937
  244. " http://vimcasts.org/episodes/creating-colorschemes-for-vim/
  245. " http://www.frexx.de/xterm-256-notes/"
  246. "
  247. "
  248. " }}}
  249. " Default option values"{{{
  250. " ---------------------------------------------------------------------
  251. if !exists("g:solarized_termtrans")
  252. if ($TERM_PROGRAM ==? "apple_terminal" && &t_Co < 256)
  253. let g:solarized_termtrans = 1
  254. else
  255. let g:solarized_termtrans = 0
  256. endif
  257. endif
  258. if !exists("g:solarized_degrade")
  259. let g:solarized_degrade = 0
  260. endif
  261. if !exists("g:solarized_bold")
  262. let g:solarized_bold = 1
  263. endif
  264. if !exists("g:solarized_underline")
  265. let g:solarized_underline = 1
  266. endif
  267. if !exists("g:solarized_italic")
  268. let g:solarized_italic = 1
  269. endif
  270. if !exists("g:solarized_termcolors")
  271. let g:solarized_termcolors = 16
  272. endif
  273. if !exists("g:solarized_contrast")
  274. let g:solarized_contrast = "normal"
  275. endif
  276. if !exists("g:solarized_visibility")
  277. let g:solarized_visibility = "normal"
  278. endif
  279. "}}}
  280. " Colorscheme initialization "{{{
  281. " ---------------------------------------------------------------------
  282. hi clear
  283. if exists("syntax_on")
  284. syntax reset
  285. endif
  286. let colors_name = "solarized"
  287. "}}}
  288. " GUI & CSApprox hexadecimal palettes"{{{
  289. " ---------------------------------------------------------------------
  290. "
  291. " Set both gui and terminal color values in separate conditional statements
  292. " Due to possibility that CSApprox is running (though I suppose we could just
  293. " leave the hex values out entirely in that case and include only cterm colors)
  294. " We also check to see if user has set solarized (force use of the
  295. " neutral gray monotone palette component)
  296. if (has("gui_running") && g:solarized_degrade == 0)
  297. let s:vmode = "gui"
  298. let s:base03 = "#002b36"
  299. let s:base02 = "#073642"
  300. let s:base01 = "#586e75"
  301. let s:base00 = "#657b83"
  302. let s:base0 = "#839496"
  303. let s:base1 = "#93a1a1"
  304. let s:base2 = "#eee8d5"
  305. let s:base3 = "#fdf6e3"
  306. let s:yellow = "#b58900"
  307. let s:orange = "#cb4b16"
  308. let s:red = "#dc322f"
  309. let s:magenta = "#d33682"
  310. let s:violet = "#6c71c4"
  311. let s:blue = "#268bd2"
  312. let s:cyan = "#2aa198"
  313. let s:green = "#859900"
  314. elseif (has("gui_running") && g:solarized_degrade == 1)
  315. " These colors are identical to the 256 color mode. They may be viewed
  316. " while in gui mode via "let g:solarized_degrade=1", though this is not
  317. " recommened and is for testing only.
  318. let s:vmode = "gui"
  319. let s:base03 = "#1c1c1c"
  320. let s:base02 = "#262626"
  321. let s:base01 = "#4e4e4e"
  322. let s:base00 = "#585858"
  323. let s:base0 = "#808080"
  324. let s:base1 = "#8a8a8a"
  325. let s:base2 = "#d7d7af"
  326. let s:base3 = "#ffffd7"
  327. let s:yellow = "#af8700"
  328. let s:orange = "#d75f00"
  329. let s:red = "#af0000"
  330. let s:magenta = "#af005f"
  331. let s:violet = "#5f5faf"
  332. let s:blue = "#0087ff"
  333. let s:cyan = "#00afaf"
  334. let s:green = "#5f8700"
  335. elseif g:solarized_termcolors != 256 && &t_Co >= 16
  336. let s:vmode = "cterm"
  337. let s:base03 = "8"
  338. let s:base02 = "0"
  339. let s:base01 = "10"
  340. let s:base00 = "11"
  341. let s:base0 = "12"
  342. let s:base1 = "14"
  343. let s:base2 = "7"
  344. let s:base3 = "15"
  345. let s:yellow = "3"
  346. let s:orange = "9"
  347. let s:red = "1"
  348. let s:magenta = "5"
  349. let s:violet = "13"
  350. let s:blue = "4"
  351. let s:cyan = "6"
  352. let s:green = "2"
  353. elseif g:solarized_termcolors == 256
  354. let s:vmode = "cterm"
  355. let s:base03 = "234"
  356. let s:base02 = "235"
  357. let s:base01 = "239"
  358. let s:base00 = "240"
  359. let s:base0 = "244"
  360. let s:base1 = "245"
  361. let s:base2 = "187"
  362. let s:base3 = "230"
  363. let s:yellow = "136"
  364. let s:orange = "166"
  365. let s:red = "124"
  366. let s:magenta = "125"
  367. let s:violet = "61"
  368. let s:blue = "33"
  369. let s:cyan = "37"
  370. let s:green = "64"
  371. else
  372. let s:vmode = "cterm"
  373. let s:bright = "* term=bold cterm=bold"
  374. let s:base03 = "0".s:bright
  375. let s:base02 = "0"
  376. let s:base01 = "2".s:bright
  377. let s:base00 = "3".s:bright
  378. let s:base0 = "4".s:bright
  379. let s:base1 = "6".s:bright
  380. let s:base2 = "7"
  381. let s:base3 = "7".s:bright
  382. let s:yellow = "3"
  383. let s:orange = "1".s:bright
  384. let s:red = "1"
  385. let s:magenta = "5"
  386. let s:violet = "13"
  387. let s:blue = "4"
  388. let s:cyan = "6"
  389. let s:green = "2"
  390. endif
  391. "}}}
  392. " Formatting options and null values for passthrough effect "{{{
  393. " ---------------------------------------------------------------------
  394. let s:none = "NONE"
  395. let s:none = "NONE"
  396. let s:t_none = "NONE"
  397. let s:n = "NONE"
  398. let s:c = ",undercurl"
  399. let s:r = ",reverse"
  400. let s:s = ",standout"
  401. let s:ou = ""
  402. let s:ob = ""
  403. "}}}
  404. " Background value based on termtrans setting "{{{
  405. " ---------------------------------------------------------------------
  406. if (has("gui_running") || g:solarized_termtrans == 0)
  407. let s:back = s:base03
  408. else
  409. let s:back = "NONE"
  410. endif
  411. "}}}
  412. " Alternate light scheme "{{{
  413. " ---------------------------------------------------------------------
  414. if &background == "light"
  415. let s:temp03 = s:base03
  416. let s:temp02 = s:base02
  417. let s:temp01 = s:base01
  418. let s:temp00 = s:base00
  419. let s:base03 = s:base3
  420. let s:base02 = s:base2
  421. let s:base01 = s:base1
  422. let s:base00 = s:base0
  423. let s:base0 = s:temp00
  424. let s:base1 = s:temp01
  425. let s:base2 = s:temp02
  426. let s:base3 = s:temp03
  427. if (s:back != "NONE")
  428. let s:back = s:base03
  429. endif
  430. endif
  431. "}}}
  432. " Optional contrast schemes "{{{
  433. " ---------------------------------------------------------------------
  434. if g:solarized_contrast == "high"
  435. let s:base01 = s:base00
  436. let s:base00 = s:base0
  437. let s:base0 = s:base1
  438. let s:base1 = s:base2
  439. let s:base2 = s:base3
  440. let s:back = s:back
  441. endif
  442. if g:solarized_contrast == "low"
  443. let s:back = s:base02
  444. let s:ou = ",underline"
  445. endif
  446. "}}}
  447. " Overrides dependent on user specified values"{{{
  448. " ---------------------------------------------------------------------
  449. if g:solarized_bold == 1
  450. let s:b = ",bold"
  451. else
  452. let s:b = ""
  453. endif
  454. if g:solarized_underline == 1
  455. let s:u = ",underline"
  456. else
  457. let s:u = ""
  458. endif
  459. if g:solarized_italic == 1
  460. let s:i = ",italic"
  461. else
  462. let s:i = ""
  463. endif
  464. "}}}
  465. " Highlighting primitives"{{{
  466. " ---------------------------------------------------------------------
  467. exe "let s:bg_none = ' ".s:vmode."bg=".s:none ."'"
  468. exe "let s:bg_back = ' ".s:vmode."bg=".s:back ."'"
  469. exe "let s:bg_base03 = ' ".s:vmode."bg=".s:base03 ."'"
  470. exe "let s:bg_base02 = ' ".s:vmode."bg=".s:base02 ."'"
  471. exe "let s:bg_base01 = ' ".s:vmode."bg=".s:base01 ."'"
  472. exe "let s:bg_base00 = ' ".s:vmode."bg=".s:base00 ."'"
  473. exe "let s:bg_base0 = ' ".s:vmode."bg=".s:base0 ."'"
  474. exe "let s:bg_base1 = ' ".s:vmode."bg=".s:base1 ."'"
  475. exe "let s:bg_base2 = ' ".s:vmode."bg=".s:base2 ."'"
  476. exe "let s:bg_base3 = ' ".s:vmode."bg=".s:base3 ."'"
  477. exe "let s:bg_green = ' ".s:vmode."bg=".s:green ."'"
  478. exe "let s:bg_yellow = ' ".s:vmode."bg=".s:yellow ."'"
  479. exe "let s:bg_orange = ' ".s:vmode."bg=".s:orange ."'"
  480. exe "let s:bg_red = ' ".s:vmode."bg=".s:red ."'"
  481. exe "let s:bg_magenta = ' ".s:vmode."bg=".s:magenta."'"
  482. exe "let s:bg_violet = ' ".s:vmode."bg=".s:violet ."'"
  483. exe "let s:bg_blue = ' ".s:vmode."bg=".s:blue ."'"
  484. exe "let s:bg_cyan = ' ".s:vmode."bg=".s:cyan ."'"
  485. exe "let s:fg_none = ' ".s:vmode."fg=".s:none ."'"
  486. exe "let s:fg_back = ' ".s:vmode."fg=".s:back ."'"
  487. exe "let s:fg_base03 = ' ".s:vmode."fg=".s:base03 ."'"
  488. exe "let s:fg_base02 = ' ".s:vmode."fg=".s:base02 ."'"
  489. exe "let s:fg_base01 = ' ".s:vmode."fg=".s:base01 ."'"
  490. exe "let s:fg_base00 = ' ".s:vmode."fg=".s:base00 ."'"
  491. exe "let s:fg_base0 = ' ".s:vmode."fg=".s:base0 ."'"
  492. exe "let s:fg_base1 = ' ".s:vmode."fg=".s:base1 ."'"
  493. exe "let s:fg_base2 = ' ".s:vmode."fg=".s:base2 ."'"
  494. exe "let s:fg_base3 = ' ".s:vmode."fg=".s:base3 ."'"
  495. exe "let s:fg_green = ' ".s:vmode."fg=".s:green ."'"
  496. exe "let s:fg_yellow = ' ".s:vmode."fg=".s:yellow ."'"
  497. exe "let s:fg_orange = ' ".s:vmode."fg=".s:orange ."'"
  498. exe "let s:fg_red = ' ".s:vmode."fg=".s:red ."'"
  499. exe "let s:fg_magenta = ' ".s:vmode."fg=".s:magenta."'"
  500. exe "let s:fg_violet = ' ".s:vmode."fg=".s:violet ."'"
  501. exe "let s:fg_blue = ' ".s:vmode."fg=".s:blue ."'"
  502. exe "let s:fg_cyan = ' ".s:vmode."fg=".s:cyan ."'"
  503. exe "let s:fmt_none = ' ".s:vmode."=NONE". " term=NONE". "'"
  504. exe "let s:fmt_bold = ' ".s:vmode."=NONE".s:b. " term=NONE".s:b."'"
  505. exe "let s:fmt_bldi = ' ".s:vmode."=NONE".s:b. " term=NONE".s:b."'"
  506. exe "let s:fmt_undr = ' ".s:vmode."=NONE".s:u. " term=NONE".s:u."'"
  507. exe "let s:fmt_undb = ' ".s:vmode."=NONE".s:u.s:b. " term=NONE".s:u.s:b."'"
  508. exe "let s:fmt_undi = ' ".s:vmode."=NONE".s:u. " term=NONE".s:u."'"
  509. exe "let s:fmt_uopt = ' ".s:vmode."=NONE".s:ou. " term=NONE".s:ou."'"
  510. exe "let s:fmt_curl = ' ".s:vmode."=NONE".s:c. " term=NONE".s:c."'"
  511. exe "let s:fmt_ital = ' ".s:vmode."=NONE". " term=NONE". "'"
  512. exe "let s:fmt_revr = ' ".s:vmode."=NONE".s:r. " term=NONE".s:r."'"
  513. exe "let s:fmt_stnd = ' ".s:vmode."=NONE".s:s. " term=NONE".s:s."'"
  514. if has("gui_running")
  515. exe "let s:sp_none = ' guisp=".s:none ."'"
  516. exe "let s:sp_back = ' guisp=".s:back ."'"
  517. exe "let s:sp_base03 = ' guisp=".s:base03 ."'"
  518. exe "let s:sp_base02 = ' guisp=".s:base02 ."'"
  519. exe "let s:sp_base01 = ' guisp=".s:base01 ."'"
  520. exe "let s:sp_base00 = ' guisp=".s:base00 ."'"
  521. exe "let s:sp_base0 = ' guisp=".s:base0 ."'"
  522. exe "let s:sp_base1 = ' guisp=".s:base1 ."'"
  523. exe "let s:sp_base2 = ' guisp=".s:base2 ."'"
  524. exe "let s:sp_base3 = ' guisp=".s:base3 ."'"
  525. exe "let s:sp_green = ' guisp=".s:green ."'"
  526. exe "let s:sp_yellow = ' guisp=".s:yellow ."'"
  527. exe "let s:sp_orange = ' guisp=".s:orange ."'"
  528. exe "let s:sp_red = ' guisp=".s:red ."'"
  529. exe "let s:sp_magenta = ' guisp=".s:magenta."'"
  530. exe "let s:sp_violet = ' guisp=".s:violet ."'"
  531. exe "let s:sp_blue = ' guisp=".s:blue ."'"
  532. exe "let s:sp_cyan = ' guisp=".s:cyan ."'"
  533. else
  534. let s:sp_none = ""
  535. let s:sp_back = ""
  536. let s:sp_base03 = ""
  537. let s:sp_base02 = ""
  538. let s:sp_base01 = ""
  539. let s:sp_base00 = ""
  540. let s:sp_base0 = ""
  541. let s:sp_base1 = ""
  542. let s:sp_base2 = ""
  543. let s:sp_base3 = ""
  544. let s:sp_green = ""
  545. let s:sp_yellow = ""
  546. let s:sp_orange = ""
  547. let s:sp_red = ""
  548. let s:sp_magenta = ""
  549. let s:sp_violet = ""
  550. let s:sp_blue = ""
  551. let s:sp_cyan = ""
  552. endif
  553. "}}}
  554. " Basic highlighting"{{{
  555. " ---------------------------------------------------------------------
  556. " note that link syntax to avoid duplicate configuration doesn't work with the
  557. " exe compiled formats
  558. exe "hi! Normal" .s:fmt_none .s:fg_base0 .s:bg_back
  559. exe "hi! Comment" .s:fmt_ital .s:fg_base01 .s:bg_none
  560. " *Comment any comment
  561. exe "hi! Constant" .s:fmt_none .s:fg_cyan .s:bg_none
  562. " *Constant any constant
  563. " String a string constant: "this is a string"
  564. " Character a character constant: 'c', '\n'
  565. " Number a number constant: 234, 0xff
  566. " Boolean a boolean constant: TRUE, false
  567. " Float a floating point constant: 2.3e10
  568. exe "hi! Identifier" .s:fmt_none .s:fg_blue .s:bg_none
  569. " *Identifier any variable name
  570. " Function function name (also: methods for classes)
  571. "
  572. exe "hi! Statement" .s:fmt_none .s:fg_green .s:bg_none
  573. " *Statement any statement
  574. " Conditional if, then, else, endif, switch, etc.
  575. " Repeat for, do, while, etc.
  576. " Label case, default, etc.
  577. " Operator "sizeof", "+", "*", etc.
  578. " Keyword any other keyword
  579. " Exception try, catch, throw
  580. exe "hi! PreProc" .s:fmt_none .s:fg_orange .s:bg_none
  581. " *PreProc generic Preprocessor
  582. " Include preprocessor #include
  583. " Define preprocessor #define
  584. " Macro same as Define
  585. " PreCondit preprocessor #if, #else, #endif, etc.
  586. exe "hi! Type" .s:fmt_none .s:fg_yellow .s:bg_none
  587. " *Type int, long, char, etc.
  588. " StorageClass static, register, volatile, etc.
  589. " Structure struct, union, enum, etc.
  590. " Typedef A typedef
  591. exe "hi! Special" .s:fmt_none .s:fg_red .s:bg_none
  592. " *Special any special symbol
  593. " SpecialChar special character in a constant
  594. " Tag you can use CTRL-] on this
  595. " Delimiter character that needs attention
  596. " SpecialComment special things inside a comment
  597. " Debug debugging statements
  598. exe "hi! Underlined" .s:fmt_none .s:fg_violet .s:bg_none
  599. " *Underlined text that stands out, HTML links
  600. exe "hi! Ignore" .s:fmt_none .s:fg_none .s:bg_none
  601. " *Ignore left blank, hidden |hl-Ignore|
  602. exe "hi! Error" .s:fmt_bold .s:fg_red .s:bg_none
  603. " *Error any erroneous construct
  604. exe "hi! Todo" .s:fmt_bold .s:fg_magenta.s:bg_none
  605. " *Todo anything that needs extra attention; mostly the
  606. " keywords TODO FIXME and XXX
  607. "
  608. "}}}
  609. " Extended highlighting "{{{
  610. " ---------------------------------------------------------------------
  611. if (g:solarized_visibility=="high")
  612. exe "hi! SpecialKey" .s:fmt_revr .s:fg_red .s:bg_none
  613. exe "hi! NonText" .s:fmt_bold .s:fg_base1 .s:bg_none
  614. elseif (g:solarized_visibility=="low")
  615. exe "hi! SpecialKey" .s:fmt_bold .s:fg_base02 .s:bg_none
  616. exe "hi! NonText" .s:fmt_bold .s:fg_base02 .s:bg_none
  617. else
  618. exe "hi! SpecialKey" .s:fmt_bold .s:fg_red .s:bg_none
  619. exe "hi! NonText" .s:fmt_bold .s:fg_base01 .s:bg_none
  620. endif
  621. if (has("gui_running")) || &t_Co > 8
  622. exe "hi! StatusLine" .s:fmt_none .s:fg_base02 .s:bg_base1
  623. exe "hi! StatusLineNC" .s:fmt_none .s:fg_base02 .s:bg_base00
  624. "exe "hi! Visual" .s:fmt_stnd .s:fg_none .s:bg_base02
  625. exe "hi! Visual" .s:fmt_none .s:fg_base03 .s:bg_base01
  626. else
  627. exe "hi! StatusLine" .s:fmt_none .s:fg_base02 .s:bg_base2
  628. exe "hi! StatusLineNC" .s:fmt_none .s:fg_base02 .s:bg_base2
  629. exe "hi! Visual" .s:fmt_none .s:fg_none .s:bg_base2
  630. endif
  631. exe "hi! Directory" .s:fmt_none .s:fg_blue .s:bg_none
  632. exe "hi! ErrorMsg" .s:fmt_revr .s:fg_red .s:bg_none
  633. exe "hi! IncSearch" .s:fmt_stnd .s:fg_orange .s:bg_none
  634. exe "hi! Search" .s:fmt_revr .s:fg_yellow .s:bg_none
  635. exe "hi! MoreMsg" .s:fmt_none .s:fg_blue .s:bg_none
  636. exe "hi! ModeMsg" .s:fmt_none .s:fg_blue .s:bg_none
  637. exe "hi! LineNr" .s:fmt_none .s:fg_base01 .s:bg_base02
  638. exe "hi! Question" .s:fmt_bold .s:fg_cyan .s:bg_none
  639. exe "hi! VertSplit" .s:fmt_bold .s:fg_base00 .s:bg_base00
  640. exe "hi! Title" .s:fmt_bold .s:fg_orange .s:bg_none
  641. exe "hi! VisualNOS" .s:fmt_stnd .s:fg_none .s:bg_base02
  642. exe "hi! WarningMsg" .s:fmt_bold .s:fg_red .s:bg_none
  643. exe "hi! WildMenu" .s:fmt_none .s:fg_base2 .s:bg_base02
  644. exe "hi! Folded" .s:fmt_undb .s:fg_base0 .s:bg_base02 .s:sp_base03
  645. exe "hi! FoldColumn" .s:fmt_bold .s:fg_base0 .s:bg_base02
  646. exe "hi! DiffAdd" .s:fmt_revr .s:fg_green .s:bg_none
  647. exe "hi! DiffChange" .s:fmt_revr .s:fg_yellow .s:bg_none
  648. exe "hi! DiffDelete" .s:fmt_revr .s:fg_red .s:bg_none
  649. exe "hi! DiffText" .s:fmt_revr .s:fg_blue .s:bg_none
  650. exe "hi! SignColumn" .s:fmt_none .s:fg_base0 .s:bg_base02
  651. exe "hi! Conceal" .s:fmt_none .s:fg_blue .s:bg_none
  652. exe "hi! SpellBad" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_red
  653. exe "hi! SpellCap" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_violet
  654. exe "hi! SpellRare" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_cyan
  655. exe "hi! SpellLocal" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_yellow
  656. exe "hi! Pmenu" .s:fmt_none .s:fg_base0 .s:bg_base02
  657. exe "hi! PmenuSel" .s:fmt_none .s:fg_base2 .s:bg_base01
  658. exe "hi! PmenuSbar" .s:fmt_none .s:fg_base0 .s:bg_base2
  659. exe "hi! PmenuThumb" .s:fmt_none .s:fg_base03 .s:bg_base0
  660. exe "hi! TabLine" .s:fmt_undr .s:fg_base0 .s:bg_base02 .s:sp_base0
  661. exe "hi! TabLineSel" .s:fmt_undr .s:fg_base2 .s:bg_base01 .s:sp_base0
  662. exe "hi! TabLineFill" .s:fmt_undr .s:fg_base0 .s:bg_base02 .s:sp_base0
  663. exe "hi! CursorColumn" .s:fmt_none .s:fg_none .s:bg_base02
  664. exe "hi! CursorLine" .s:fmt_uopt .s:fg_none .s:bg_base02 .s:sp_base1
  665. exe "hi! ColorColumn" .s:fmt_none .s:fg_none .s:bg_base02
  666. exe "hi! Cursor" .s:fmt_none .s:fg_base03 .s:bg_base0
  667. hi! link lCursor Cursor
  668. exe "hi! MatchParen" .s:fmt_bold .s:fg_red .s:bg_base01
  669. "}}}
  670. " vim syntax highlighting "{{{
  671. " ---------------------------------------------------------------------
  672. exe "hi! vimLineComment" . s:fg_base01 .s:bg_none .s:fmt_ital
  673. exe "hi! vimCommentString".s:fg_violet .s:bg_none .s:fmt_none
  674. hi! link vimVar Identifier
  675. hi! link vimFunc Function
  676. hi! link vimUserFunc Function
  677. exe "hi! vimCommand" . s:fg_yellow .s:bg_none .s:fmt_none
  678. exe "hi! vimCmdSep" . s:fg_blue .s:bg_none .s:fmt_bold
  679. exe "hi! helpExample" . s:fg_base1 .s:bg_none .s:fmt_none
  680. hi! link helpSpecial Special
  681. exe "hi! helpOption" . s:fg_cyan .s:bg_none .s:fmt_none
  682. exe "hi! helpNote" . s:fg_magenta.s:bg_none .s:fmt_none
  683. exe "hi! helpVim" . s:fg_magenta.s:bg_none .s:fmt_none
  684. exe "hi! helpHyperTextJump" .s:fg_blue .s:bg_none .s:fmt_undr
  685. exe "hi! helpHyperTextEntry".s:fg_green .s:bg_none .s:fmt_none
  686. exe "hi! vimIsCommand" . s:fg_base00 .s:bg_none .s:fmt_none
  687. exe "hi! vimSynMtchOpt" . s:fg_yellow .s:bg_none .s:fmt_none
  688. exe "hi! vimSynType" . s:fg_cyan .s:bg_none .s:fmt_none
  689. exe "hi! vimHiLink" . s:fg_blue .s:bg_none .s:fmt_none
  690. exe "hi! vimHiGroup" . s:fg_blue .s:bg_none .s:fmt_none
  691. exe "hi! vimGroup" . s:fg_blue .s:bg_none .s:fmt_undb
  692. "}}}
  693. " html highlighting "{{{
  694. " ---------------------------------------------------------------------
  695. exe "hi! htmlTag" . s:fg_base01 .s:bg_none .s:fmt_none
  696. exe "hi! htmlEndTag" . s:fg_base01 .s:bg_none .s:fmt_none
  697. exe "hi! htmlTagN" . s:fg_base1 .s:bg_none .s:fmt_bold
  698. exe "hi! htmlTagName" . s:fg_blue .s:bg_none .s:fmt_bold
  699. exe "hi! htmlSpecialTagName". s:fg_blue .s:bg_none .s:fmt_ital
  700. exe "hi! htmlArg" . s:fg_base00 .s:bg_none .s:fmt_none
  701. exe "hi! javaScript" . s:fg_yellow .s:bg_none .s:fmt_none
  702. "}}}
  703. " perl highlighting "{{{
  704. " ---------------------------------------------------------------------
  705. exe "hi! perlHereDoc" . s:fg_base1 .s:bg_back .s:fmt_none
  706. exe "hi! perlVarPlain" . s:fg_yellow .s:bg_back .s:fmt_none
  707. exe "hi! perlStatementFileDesc". s:fg_cyan.s:bg_back.s:fmt_none
  708. "}}}
  709. " tex highlighting "{{{
  710. " ---------------------------------------------------------------------
  711. exe "hi! texStatement" . s:fg_cyan .s:bg_back .s:fmt_none
  712. exe "hi! texMathZoneX" . s:fg_yellow .s:bg_back .s:fmt_none
  713. exe "hi! texMathMatcher" . s:fg_yellow .s:bg_back .s:fmt_none
  714. exe "hi! texMathMatcher" . s:fg_yellow .s:bg_back .s:fmt_none
  715. exe "hi! texRefLabel" . s:fg_yellow .s:bg_back .s:fmt_none
  716. "}}}
  717. " ruby highlighting "{{{
  718. " ---------------------------------------------------------------------
  719. exe "hi! rubyDefine" . s:fg_base1 .s:bg_back .s:fmt_bold
  720. "rubyInclude
  721. "rubySharpBang
  722. "rubyAccess
  723. "rubyPredefinedVariable
  724. "rubyBoolean
  725. "rubyClassVariable
  726. "rubyBeginEnd
  727. "rubyRepeatModifier
  728. "hi! link rubyArrayDelimiter Special " [ , , ]
  729. "rubyCurlyBlock { , , }
  730. "hi! link rubyClass Keyword
  731. "hi! link rubyModule Keyword
  732. "hi! link rubyKeyword Keyword
  733. "hi! link rubyOperator Operator
  734. "hi! link rubyIdentifier Identifier
  735. "hi! link rubyInstanceVariable Identifier
  736. "hi! link rubyGlobalVariable Identifier
  737. "hi! link rubyClassVariable Identifier
  738. "hi! link rubyConstant Type
  739. "}}}
  740. " haskell syntax highlighting"{{{
  741. " ---------------------------------------------------------------------
  742. " For use with syntax/haskell.vim : Haskell Syntax File
  743. " http://www.vim.org/scripts/script.php?script_id=3034
  744. " See also Steffen Siering's github repository:
  745. " http://github.com/urso/dotrc/blob/master/vim/syntax/haskell.vim
  746. " ---------------------------------------------------------------------
  747. "
  748. " Treat True and False specially, see the plugin referenced above
  749. let hs_highlight_boolean=1
  750. " highlight delims, see the plugin referenced above
  751. let hs_highlight_delimiters=1
  752. exe "hi! cPreCondit". s:fg_orange.s:bg_none .s:fmt_none
  753. exe "hi! VarId" . s:fg_blue .s:bg_none .s:fmt_none
  754. exe "hi! ConId" . s:fg_yellow .s:bg_none .s:fmt_none
  755. exe "hi! hsImport" . s:fg_magenta.s:bg_none .s:fmt_none
  756. exe "hi! hsString" . s:fg_base00 .s:bg_none .s:fmt_none
  757. exe "hi! hsStructure" . s:fg_cyan .s:bg_none .s:fmt_none
  758. exe "hi! hs_hlFunctionName" . s:fg_blue .s:bg_none
  759. exe "hi! hsStatement" . s:fg_cyan .s:bg_none .s:fmt_none
  760. exe "hi! hsImportLabel" . s:fg_cyan .s:bg_none .s:fmt_none
  761. exe "hi! hs_OpFunctionName" . s:fg_yellow .s:bg_none .s:fmt_none
  762. exe "hi! hs_DeclareFunction" . s:fg_orange .s:bg_none .s:fmt_none
  763. exe "hi! hsVarSym" . s:fg_cyan .s:bg_none .s:fmt_none
  764. exe "hi! hsType" . s:fg_yellow .s:bg_none .s:fmt_none
  765. exe "hi! hsTypedef" . s:fg_cyan .s:bg_none .s:fmt_none
  766. exe "hi! hsModuleName" . s:fg_green .s:bg_none .s:fmt_undr
  767. exe "hi! hsModuleStartLabel" . s:fg_magenta.s:bg_none .s:fmt_none
  768. hi! link hsImportParams Delimiter
  769. hi! link hsDelimTypeExport Delimiter
  770. hi! link hsModuleStartLabel hsStructure
  771. hi! link hsModuleWhereLabel hsModuleStartLabel
  772. " following is for the haskell-conceal plugin
  773. " the first two items don't have an impact, but better safe
  774. exe "hi! hsNiceOperator" . s:fg_cyan .s:bg_none .s:fmt_none
  775. exe "hi! hsniceoperator" . s:fg_cyan .s:bg_none .s:fmt_none
  776. "}}}
  777. " pandoc markdown syntax highlighting "{{{
  778. " ---------------------------------------------------------------------
  779. "PandocHiLink pandocNormalBlock
  780. exe "hi! pandocTitleBlock" .s:fg_blue .s:bg_none .s:fmt_none
  781. exe "hi! pandocTitleBlockTitle" .s:fg_blue .s:bg_none .s:fmt_bold
  782. exe "hi! pandocTitleComment" .s:fg_blue .s:bg_none .s:fmt_bold
  783. exe "hi! pandocComment" .s:fg_base01 .s:bg_none .s:fmt_ital
  784. exe "hi! pandocVerbatimBlock" .s:fg_yellow .s:bg_none .s:fmt_none
  785. hi! link pandocVerbatimBlockDeep pandocVerbatimBlock
  786. hi! link pandocCodeBlock pandocVerbatimBlock
  787. hi! link pandocCodeBlockDelim pandocVerbatimBlock
  788. exe "hi! pandocBlockQuote" .s:fg_blue .s:bg_none .s:fmt_none
  789. exe "hi! pandocBlockQuoteLeader1" .s:fg_blue .s:bg_none .s:fmt_none
  790. exe "hi! pandocBlockQuoteLeader2" .s:fg_cyan .s:bg_none .s:fmt_none
  791. exe "hi! pandocBlockQuoteLeader3" .s:fg_yellow .s:bg_none .s:fmt_none
  792. exe "hi! pandocBlockQuoteLeader4" .s:fg_red .s:bg_none .s:fmt_none
  793. exe "hi! pandocBlockQuoteLeader5" .s:fg_base0 .s:bg_none .s:fmt_none
  794. exe "hi! pandocBlockQuoteLeader6" .s:fg_base01 .s:bg_none .s:fmt_none
  795. exe "hi! pandocListMarker" .s:fg_magenta.s:bg_none .s:fmt_none
  796. exe "hi! pandocListReference" .s:fg_magenta.s:bg_none .s:fmt_undr
  797. " Definitions
  798. " ---------------------------------------------------------------------
  799. let s:fg_pdef = s:fg_violet
  800. exe "hi! pandocDefinitionBlock" .s:fg_pdef .s:bg_none .s:fmt_none
  801. exe "hi! pandocDefinitionTerm" .s:fg_pdef .s:bg_none .s:fmt_stnd
  802. exe "hi! pandocDefinitionIndctr" .s:fg_pdef .s:bg_none .s:fmt_bold
  803. exe "hi! pandocEmphasisDefinition" .s:fg_pdef .s:bg_none .s:fmt_ital
  804. exe "hi! pandocEmphasisNestedDefinition" .s:fg_pdef .s:bg_none .s:fmt_bldi
  805. exe "hi! pandocStrongEmphasisDefinition" .s:fg_pdef .s:bg_none .s:fmt_bold
  806. exe "hi! pandocStrongEmphasisNestedDefinition" .s:fg_pdef.s:bg_none.s:fmt_bldi
  807. exe "hi! pandocStrongEmphasisEmphasisDefinition" .s:fg_pdef.s:bg_none.s:fmt_bldi
  808. exe "hi! pandocStrikeoutDefinition" .s:fg_pdef .s:bg_none .s:fmt_revr
  809. exe "hi! pandocVerbatimInlineDefinition" .s:fg_pdef .s:bg_none .s:fmt_none
  810. exe "hi! pandocSuperscriptDefinition" .s:fg_pdef .s:bg_none .s:fmt_none
  811. exe "hi! pandocSubscriptDefinition" .s:fg_pdef .s:bg_none .s:fmt_none
  812. " Tables
  813. " ---------------------------------------------------------------------
  814. let s:fg_ptable = s:fg_blue
  815. exe "hi! pandocTable" .s:fg_ptable.s:bg_none .s:fmt_none
  816. exe "hi! pandocTableStructure" .s:fg_ptable.s:bg_none .s:fmt_none
  817. hi! link pandocTableStructureTop pandocTableStructre
  818. hi! link pandocTableStructureEnd pandocTableStructre
  819. exe "hi! pandocTableZebraLight" .s:fg_ptable.s:bg_base03.s:fmt_none
  820. exe "hi! pandocTableZebraDark" .s:fg_ptable.s:bg_base02.s:fmt_none
  821. exe "hi! pandocEmphasisTable" .s:fg_ptable.s:bg_none .s:fmt_ital
  822. exe "hi! pandocEmphasisNestedTable" .s:fg_ptable.s:bg_none .s:fmt_bldi
  823. exe "hi! pandocStrongEmphasisTable" .s:fg_ptable.s:bg_none .s:fmt_bold
  824. exe "hi! pandocStrongEmphasisNestedTable" .s:fg_ptable.s:bg_none .s:fmt_bldi
  825. exe "hi! pandocStrongEmphasisEmphasisTable" .s:fg_ptable.s:bg_none .s:fmt_bldi
  826. exe "hi! pandocStrikeoutTable" .s:fg_ptable.s:bg_none .s:fmt_revr
  827. exe "hi! pandocVerbatimInlineTable" .s:fg_ptable.s:bg_none .s:fmt_none
  828. exe "hi! pandocSuperscriptTable" .s:fg_ptable.s:bg_none .s:fmt_none
  829. exe "hi! pandocSubscriptTable" .s:fg_ptable.s:bg_none .s:fmt_none
  830. " Headings
  831. " ---------------------------------------------------------------------
  832. let s:fg_phead = s:fg_orange
  833. exe "hi! pandocHeading" .s:fg_phead .s:bg_none.s:fmt_bold
  834. exe "hi! pandocHeadingMarker" .s:fg_yellow.s:bg_none.s:fmt_bold
  835. exe "hi! pandocEmphasisHeading" .s:fg_phead .s:bg_none.s:fmt_bldi
  836. exe "hi! pandocEmphasisNestedHeading" .s:fg_phead .s:bg_none.s:fmt_bldi
  837. exe "hi! pandocStrongEmphasisHeading" .s:fg_phead .s:bg_none.s:fmt_bold
  838. exe "hi! pandocStrongEmphasisNestedHeading" .s:fg_phead .s:bg_none.s:fmt_bldi
  839. exe "hi! pandocStrongEmphasisEmphasisHeading".s:fg_phead .s:bg_none.s:fmt_bldi
  840. exe "hi! pandocStrikeoutHeading" .s:fg_phead .s:bg_none.s:fmt_revr
  841. exe "hi! pandocVerbatimInlineHeading" .s:fg_phead .s:bg_none.s:fmt_bold
  842. exe "hi! pandocSuperscriptHeading" .s:fg_phead .s:bg_none.s:fmt_bold
  843. exe "hi! pandocSubscriptHeading" .s:fg_phead .s:bg_none.s:fmt_bold
  844. " Links
  845. " ---------------------------------------------------------------------
  846. exe "hi! pandocLinkDelim" .s:fg_base01 .s:bg_none .s:fmt_none
  847. exe "hi! pandocLinkLabel" .s:fg_blue .s:bg_none .s:fmt_undr
  848. exe "hi! pandocLinkText" .s:fg_blue .s:bg_none .s:fmt_undb
  849. exe "hi! pandocLinkURL" .s:fg_base00 .s:bg_none .s:fmt_undr
  850. exe "hi! pandocLinkTitle" .s:fg_base00 .s:bg_none .s:fmt_undi
  851. exe "hi! pandocLinkTitleDelim" .s:fg_base01 .s:bg_none .s:fmt_undi .s:sp_base00
  852. exe "hi! pandocLinkDefinition" .s:fg_cyan .s:bg_none .s:fmt_undr .s:sp_base00
  853. exe "hi! pandocLinkDefinitionID" .s:fg_blue .s:bg_none .s:fmt_bold
  854. exe "hi! pandocImageCaption" .s:fg_violet .s:bg_none .s:fmt_undb
  855. exe "hi! pandocFootnoteLink" .s:fg_green .s:bg_none .s:fmt_undr
  856. exe "hi! pandocFootnoteDefLink" .s:fg_green .s:bg_none .s:fmt_bold
  857. exe "hi! pandocFootnoteInline" .s:fg_green .s:bg_none .s:fmt_undb
  858. exe "hi! pandocFootnote" .s:fg_green .s:bg_none .s:fmt_none
  859. exe "hi! pandocCitationDelim" .s:fg_magenta.s:bg_none .s:fmt_none
  860. exe "hi! pandocCitation" .s:fg_magenta.s:bg_none .s:fmt_none
  861. exe "hi! pandocCitationID" .s:fg_magenta.s:bg_none .s:fmt_undr
  862. exe "hi! pandocCitationRef" .s:fg_magenta.s:bg_none .s:fmt_none
  863. " Main Styles
  864. " ---------------------------------------------------------------------
  865. exe "hi! pandocStyleDelim" .s:fg_base01 .s:bg_none .s:fmt_none
  866. exe "hi! pandocEmphasis" .s:fg_base0 .s:bg_none .s:fmt_ital
  867. exe "hi! pandocEmphasisNested" .s:fg_base0 .s:bg_none .s:fmt_bldi
  868. exe "hi! pandocStrongEmphasis" .s:fg_base0 .s:bg_none .s:fmt_bold
  869. exe "hi! pandocStrongEmphasisNested" .s:fg_base0 .s:bg_none .s:fmt_bldi
  870. exe "hi! pandocStrongEmphasisEmphasis" .s:fg_base0 .s:bg_none .s:fmt_bldi
  871. exe "hi! pandocStrikeout" .s:fg_base01 .s:bg_none .s:fmt_revr
  872. exe "hi! pandocVerbatimInline" .s:fg_yellow .s:bg_none .s:fmt_none
  873. exe "hi! pandocSuperscript" .s:fg_violet .s:bg_none .s:fmt_none
  874. exe "hi! pandocSubscript" .s:fg_violet .s:bg_none .s:fmt_none
  875. exe "hi! pandocRule" .s:fg_blue .s:bg_none .s:fmt_bold
  876. exe "hi! pandocRuleLine" .s:fg_blue .s:bg_none .s:fmt_bold
  877. exe "hi! pandocEscapePair" .s:fg_red .s:bg_none .s:fmt_bold
  878. exe "hi! pandocCitationRef" .s:fg_magenta.s:bg_none .s:fmt_none
  879. exe "hi! pandocNonBreakingSpace" . s:fg_red .s:bg_none .s:fmt_revr
  880. hi! link pandocEscapedCharacter pandocEscapePair
  881. hi! link pandocLineBreak pandocEscapePair
  882. " Embedded Code
  883. " ---------------------------------------------------------------------
  884. exe "hi! pandocMetadataDelim" .s:fg_base01 .s:bg_none .s:fmt_none
  885. exe "hi! pandocMetadata" .s:fg_blue .s:bg_none .s:fmt_none
  886. exe "hi! pandocMetadataKey" .s:fg_blue .s:bg_none .s:fmt_none
  887. exe "hi! pandocMetadata" .s:fg_blue .s:bg_none .s:fmt_bold
  888. hi! link pandocMetadataTitle pandocMetadata
  889. "}}}
  890. " Utility autocommand "{{{
  891. " ---------------------------------------------------------------------
  892. " In cases where Solarized is initialized inside a terminal vim session and
  893. " then transferred to a gui session via the command `:gui`, the gui vim process
  894. " does not re-read the colorscheme (or .vimrc for that matter) so any `has_gui`
  895. " related code that sets gui specific values isn't executed.
  896. "
  897. " Currently, Solarized sets only the cterm or gui values for the colorscheme
  898. " depending on gui or terminal mode. It's possible that, if the following
  899. " autocommand method is deemed excessively poor form, that approach will be
  900. " used again and the autocommand below will be dropped.
  901. "
  902. " However it seems relatively benign in this case to include the autocommand
  903. " here. It fires only in cases where vim is transferring from terminal to gui
  904. " mode (detected with the script scope s:vmode variable). It also allows for
  905. " other potential terminal customizations that might make gui mode suboptimal.
  906. "
  907. autocmd GUIEnter * if (s:vmode != "gui") | exe "colorscheme " . g:colors_name | endif
  908. "}}}
  909. " License "{{{
  910. " ---------------------------------------------------------------------
  911. "
  912. " Copyright (c) 2011 Ethan Schoonover
  913. "
  914. " Permission is hereby granted, free of charge, to any person obtaining a copy
  915. " of this software and associated documentation files (the "Software"), to deal
  916. " in the Software without restriction, including without limitation the rights
  917. " to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  918. " copies of the Software, and to permit persons to whom the Software is
  919. " furnished to do so, subject to the following conditions:
  920. "
  921. " The above copyright notice and this permission notice shall be included in
  922. " all copies or substantial portions of the Software.
  923. "
  924. " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  925. " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  926. " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  927. " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  928. " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  929. " OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  930. " THE SOFTWARE.
  931. "
  932. " vim:foldmethod=marker:foldlevel=0
  933. "}}}