tabula.vim 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620
  1. " ============================================================================
  2. " Filename: tabula.vim
  3. " Last Modified: 2007-02-01
  4. " Version: 1.3
  5. " Maintainer: Bernd Pol (bernd.pol AT online DOT de)
  6. " Copyright: 2006 Bernd Pol
  7. " This script is free software; you can redistribute it and/or
  8. " modify it under the terms of the GNU General Public License as
  9. " published by the Free Software Foundation; either version 2 of
  10. " the License, or (at your option) any later version.
  11. " Description: Vim colorscheme based on marklar.vim by SM Smithfield,
  12. " slightly modified for harmonic, yet easily distinguishable
  13. " display on GUI and a 256 color xterm as well.
  14. " Install: Put this file in the users colors directory (~/.vim/colors)
  15. " then load it with :colorscheme tabula
  16. " =============================================================================
  17. " TODO
  18. " - automize options setting
  19. " - keep options in some setup file, e.g.:
  20. " tabula.rc, sub e.g. "<OPTIONS> ... </OPTIONS>" marks
  21. " - options set up per directory (autoload option)
  22. " such that text files be displayed other than e.g. c sources
  23. " =============================================================================
  24. hi clear
  25. set background=dark
  26. if exists("syntax_on")
  27. syntax reset
  28. endif
  29. let g:colors_name = "tabula"
  30. "let g:Tabula_setOptions = 0
  31. "==============================================================================
  32. " Option Settings {{{1
  33. "==============================================================================
  34. "
  35. " Use these in your .vimrc file before the ':colorscheme tabula' line
  36. "
  37. " Alternatively set the options variable from the command line, e.g.
  38. " :let Tabula_LNumUnderline=1
  39. " and then call
  40. " :colorscheme tabula
  41. " again.
  42. "------------------------------------------------------------------------------
  43. " Display Statements In Bold: {{{2
  44. " Tabula_BoldStatement = 0 statements display not bold
  45. " Tabula_BoldStatement = 1 statements display bold
  46. " Defaults to non-bold display.
  47. "------------------------------------------------------------------------------
  48. "
  49. let s:BoldStatement = 0
  50. if exists("g:Tabula_BoldStatement")
  51. let s:BoldStatement = g:Tabula_BoldStatement
  52. endif
  53. "------------------------------------------------------------------------------
  54. " Set GUI Cursor Color: {{{2
  55. " Tabula_CurColor = 'blue'
  56. " Tabula_CurColor = 'red'
  57. " Tabula_CurColor = 'yellow'
  58. " Tabula_CurColor = 'white'
  59. " Defaults to 'blue'.
  60. "------------------------------------------------------------------------------
  61. "
  62. let s:CurColor = "blue"
  63. if exists("g:Tabula_CurColor")
  64. let s:CurColor = g:Tabula_CurColor
  65. endif
  66. "------------------------------------------------------------------------------
  67. " Set Color For Preprocessor Statements: {{{2
  68. " Tabula_ColorPre = 'blue' purple-blue
  69. " Tabula_ColorPre = 'red' orange-red
  70. " Tabula_ColorPre = 'yellow' lightgreen-yellow
  71. " Defaults to 'blue'.
  72. "------------------------------------------------------------------------------
  73. "
  74. let s:ColorPre = "blue"
  75. if exists("g:Tabula_ColorPre")
  76. if g:Tabula_ColorPre == "red" || g:Tabula_ColorPre == "yellow"
  77. let s:ColorPre = g:Tabula_ColorPre
  78. endif
  79. endif
  80. "------------------------------------------------------------------------------
  81. " Use Dark Error Background: {{{2
  82. " Sometimes desirable for less distracting error highlighting.
  83. " Tabula_DarkError = 0 light red error background
  84. " Tabula_DarkError = 1 dark red error background
  85. " Defaults to light error background.
  86. "------------------------------------------------------------------------------
  87. "
  88. let s:DarkError = 0
  89. if exists("g:Tabula_DarkError")
  90. let s:DarkError = g:Tabula_DarkError
  91. endif
  92. "------------------------------------------------------------------------------
  93. " Use Multiple Colors For Constant Values: {{{2
  94. " Tabula_FlatConstants = 0 use different color for each type
  95. " Tabula_FlatConstants = 1 use common color for all
  96. " Defaults to using common colors.
  97. "------------------------------------------------------------------------------
  98. "
  99. let s:FlatConstants = 1
  100. if exists("g:Tabula_FlatConstants")
  101. let s:FlatConstants = g:Tabula_FlatConstants
  102. endif
  103. "------------------------------------------------------------------------------
  104. " How To Display Ignore And NonText Characters: {{{2
  105. " Tabula_InvisibleIgnore = 0 slightly visible
  106. " (good for Vim documentation editing)
  107. " Tabula_InvisibleIgnore = 1 invisible on standard background
  108. " Defaults to invisible display.
  109. "------------------------------------------------------------------------------
  110. "
  111. let s:InvisibleIgnore = 1
  112. if exists("g:Tabula_InvisibleIgnore")
  113. let s:InvisibleIgnore = g:Tabula_InvisibleIgnore
  114. endif
  115. "------------------------------------------------------------------------------
  116. " Show Line Numbers Underlined: {{{2
  117. " Sometimes useful to spot a line more easily.
  118. " Tabula_LNumUnderline = 0 not underlined
  119. " Tabula_LNumUnderline = 1 line numbers are underlined
  120. " Defaults to not underlined.
  121. "------------------------------------------------------------------------------
  122. "
  123. let s:LNumUnderline = 0
  124. if exists("g:Tabula_LNumUnderline")
  125. let s:LNumUnderline = g:Tabula_LNumUnderline
  126. endif
  127. "------------------------------------------------------------------------------
  128. " Let Search Occurrences Stand Out More Prominently: {{{2
  129. " Tabula_SearchStandOut = 0 normal dark background display
  130. " Tabula_SearchStandOut = 1 prominent underlined display
  131. " Tabula_SearchStandOut = 2 even more prominent display
  132. " Defaults to normal display.
  133. "------------------------------------------------------------------------------
  134. "
  135. let s:SearchStandOut=0
  136. if exists("g:Tabula_SearchStandOut")
  137. let s:SearchStandOut = g:Tabula_SearchStandOut
  138. endif
  139. "------------------------------------------------------------------------------
  140. " How To Display TODOs And Similar: {{{2
  141. " Tabula_TodoUnderline = 0 display on a blue background
  142. " Tabula_TodoUnderline = 1 display them underlined white
  143. " Defaults to underlined display.
  144. "------------------------------------------------------------------------------
  145. "
  146. let s:TodoUnderline=1
  147. if exists("g:Tabula_TodoUnderline")
  148. let s:TodoUnderline = g:Tabula_TodoUnderline
  149. endif
  150. "==============================================================================
  151. " Color Definitions {{{1
  152. "==============================================================================
  153. if version >= 700
  154. hi SpellBad guisp=#FF0000
  155. hi SpellCap guisp=#afaf00
  156. hi SpellRare guisp=#bf4040
  157. hi SpellLocal guisp=#00afaf ctermbg=0
  158. hi Pmenu guifg=#00ffff guibg=#000000 ctermfg=51 ctermbg=0
  159. hi PmenuSel guifg=#ffff00 guibg=#000000 gui=bold ctermfg=226 cterm=bold
  160. hi PmenuSbar guibg=#204d40 ctermbg=6
  161. hi PmenuThumb guifg=#38ff56 ctermfg=3
  162. hi CursorColumn guibg=#096354 ctermbg=29
  163. hi CursorLine guibg=#096354 ctermbg=29
  164. hi Tabline guifg=bg guibg=fg gui=NONE ctermfg=NONE ctermbg=NONE cterm=reverse,bold
  165. hi TablineSel guifg=#20012e guibg=#00a675 gui=bold
  166. hi TablineFill guifg=#689C7C
  167. hi MatchParen guifg=#38ff56 guibg=#0000ff gui=bold ctermfg=14 ctermbg=21 cterm=bold
  168. endif
  169. "------------------------------------------------------------------------------
  170. hi Comment guifg=#00C5E7 ctermfg=45
  171. "------------------------------------------------------------------------------
  172. " Constant Colors:
  173. "------------------------------------------------------------------------------
  174. "
  175. if s:FlatConstants
  176. hi Constant guifg=#7DDCDB ctermfg=123
  177. else
  178. hi Boolean guifg=#7EDBD8 ctermfg=123
  179. hi Character guifg=#AFD000 ctermfg=148
  180. hi Float guifg=#AF87DF ctermfg=141
  181. hi Number guifg=#00A7F7 ctermfg=39
  182. hi String guifg=#00DF00 ctermfg=46
  183. endif
  184. "------------------------------------------------------------------------------
  185. " Cursor Colors:
  186. "------------------------------------------------------------------------------
  187. "
  188. if s:CurColor == "yellow"
  189. hi Cursor guifg=#000000 guibg=#EFEF00
  190. elseif s:CurColor == "red"
  191. " Note: Input cursor will be invisible on Error Group
  192. hi Cursor guifg=#00007F guibg=#F70000
  193. elseif s:CurColor == "blue"
  194. hi Cursor guifg=#00007F guibg=#00EFEF
  195. elseif s:CurColor == "white"
  196. hi Cursor guifg=#000000 guibg=#FFFFFF
  197. endif
  198. "------------------------------------------------------------------------------
  199. hi DiffAdd guifg=NONE guibg=#136769 ctermfg=4 ctermbg=7 cterm=none
  200. hi DiffDelete guifg=NONE guibg=#50694A ctermfg=1 ctermbg=7 cterm=none
  201. hi DiffChange guifg=fg guibg=#00463c gui=None ctermfg=4 ctermbg=2 cterm=none
  202. hi DiffText guifg=#7CFC94 guibg=#00463c gui=bold ctermfg=4 ctermbg=3 cterm=none
  203. hi Directory guifg=#25B9F8 guibg=NONE ctermfg=2
  204. "------------------------------------------------------------------------------
  205. " Error Colors:
  206. "------------------------------------------------------------------------------
  207. "
  208. if s:DarkError
  209. " hi Error guifg=#FF0000 guibg=#303800 gui=NONE ctermfg=9 ctermbg=236 cterm=NONE
  210. hi Error guifg=NONE guibg=#303800 gui=NONE ctermfg=NONE ctermbg=236 cterm=NONE
  211. else
  212. if s:CurColor == "red"
  213. " Note: We need another background in this case to keep the cursor visible.
  214. hi Error guifg=#FF0000 guibg=#FFFF00 gui=bold ctermfg=11 ctermbg=9 cterm=NONE
  215. else
  216. hi Error guifg=#FFFF00 guibg=#FF0000 gui=NONE ctermfg=11 ctermbg=9 cterm=NONE
  217. endif
  218. endif
  219. "------------------------------------------------------------------------------
  220. hi ErrorMsg guifg=#FFFFFF guibg=#FF0000 ctermfg=7 ctermbg=1
  221. hi FoldColumn guifg=#00BBBB guibg=#4E4E4E ctermfg=14 ctermbg=240
  222. hi Folded guifg=#44DDDD guibg=#4E4E4E ctermfg=14 ctermbg=240
  223. hi Identifier guifg=#FDAE5A ctermfg=215 cterm=none
  224. "------------------------------------------------------------------------------
  225. " Ignore Variants:
  226. "------------------------------------------------------------------------------
  227. "
  228. if s:InvisibleIgnore
  229. " completely invisible
  230. hi Ignore guifg=bg guibg=NONE ctermfg=23
  231. hi NonText guifg=bg guibg=NONE ctermfg=23
  232. else
  233. " nearly invisible
  234. hi Ignore guifg=#005FAF guibg=NONE ctermfg=26
  235. hi NonText guifg=#005FAF guibg=NONE ctermfg=26
  236. endif
  237. "------------------------------------------------------------------------------
  238. "------------------------------------------------------------------------------
  239. " Line Number Variants:
  240. " Lines can sometimes be more precisely identified if the line numbers are
  241. " underlined.
  242. "------------------------------------------------------------------------------
  243. "
  244. if s:LNumUnderline
  245. hi LineNr guifg=#00FF00 guibg=#005080 gui=underline ctermfg=84 ctermbg=24 cterm=underline
  246. else
  247. hi LineNr guifg=#00FF00 guibg=#005080 ctermfg=84 ctermbg=24
  248. endif
  249. "------------------------------------------------------------------------------
  250. hi ModeMsg guifg=#FFFFFF guibg=#0000FF gui=NONE ctermfg=7 ctermbg=4 cterm=NONE
  251. hi MoreMsg guifg=#FFFFFF guibg=#00A261 gui=NONE ctermfg=7 ctermbg=28 cterm=NONE
  252. "if &background == "dark"
  253. hi Normal guifg=#71D289 guibg=#065349 ctermfg=85 ctermbg=23
  254. "else
  255. " hi Normal guibg=#71D289 guifg=#065349 ctermfg=85 ctermbg=23
  256. "endif
  257. "------------------------------------------------------------------------------
  258. " Preprocessor Variants:
  259. "------------------------------------------------------------------------------
  260. "
  261. if s:ColorPre == "red"
  262. hi PreProc guifg=#FF5F5F guibg=bg ctermfg=203
  263. elseif s:ColorPre == "yellow"
  264. hi PreProc guifg=#AFFF00 guibg=bg ctermfg=154
  265. elseif s:ColorPre == "blue"
  266. hi PreProc guifg=#8E8CDD guibg=bg ctermfg=105
  267. endif
  268. "------------------------------------------------------------------------------
  269. hi Question guifg=#E5E500 guibg=NONE gui=none ctermfg=11 ctermbg=NONE cterm=none
  270. "------------------------------------------------------------------------------
  271. " Search Stand Out Variants:
  272. "------------------------------------------------------------------------------
  273. "
  274. if s:SearchStandOut == 0
  275. hi IncSearch guifg=#D0D0D0 guibg=#206828 gui=NONE ctermfg=NONE ctermbg=22 cterm=NONE
  276. hi Search guifg=NONE guibg=#212a81 ctermfg=NONE ctermbg=18
  277. elseif s:SearchStandOut == 1
  278. hi IncSearch guifg=#D0D0D0 guibg=#206828 gui=underline ctermfg=252 ctermbg=22 cterm=underline
  279. hi Search guifg=#FDAD5D guibg=#202880 gui=underline ctermfg=215 ctermbg=18 cterm=underline
  280. elseif s:SearchStandOut == 2
  281. hi IncSearch guibg=#D0D0D0 guifg=#206828 gui=underline ctermbg=252 ctermfg=22 cterm=underline
  282. hi Search guibg=#FDAD5D guifg=#202880 gui=underline ctermbg=215 ctermfg=18 cterm=underline
  283. endif
  284. "------------------------------------------------------------------------------
  285. hi SignColumn guifg=#00BBBB guibg=#204d40
  286. hi Special guifg=#00F2F3 guibg=NONE gui=none ctermfg=51
  287. hi SpecialKey guifg=#00F4F4 guibg=#266955
  288. "------------------------------------------------------------------------------
  289. " Statement Variants:
  290. "------------------------------------------------------------------------------
  291. "
  292. if s:BoldStatement
  293. hi Statement guifg=#DEDE00 gui=bold ctermfg=11 cterm=bold
  294. else
  295. hi Statement guifg=#E4E300 gui=none ctermfg=11
  296. endif
  297. "------------------------------------------------------------------------------
  298. hi StatusLine guifg=#000000 guibg=#7DCEAD gui=none ctermbg=00 cterm=reverse
  299. hi StatusLineNC guifg=#245748 guibg=#689C7C gui=none ctermfg=72 ctermbg=23 cterm=reverse
  300. hi Title guifg=#7CFC94 guibg=NONE gui=bold ctermfg=2 cterm=bold
  301. "------------------------------------------------------------------------------
  302. " Todo Variants:
  303. "------------------------------------------------------------------------------
  304. "
  305. if s:TodoUnderline
  306. " Underlined
  307. hi Todo guifg=#AFD7D7 guibg=NONE gui=underline ctermfg=159 ctermbg=NONE cterm=underline
  308. else
  309. " Blue background
  310. hi Todo guifg=#00FFFF guibg=#0000FF ctermfg=51 ctermbg=4
  311. endif
  312. "------------------------------------------------------------------------------
  313. hi Type guifg=#F06BDB guibg=bg gui=none ctermfg=213
  314. hi Underlined gui=underline cterm=underline
  315. hi VertSplit guifg=#245748 guibg=#689C7C gui=none ctermfg=72 ctermbg=23 cterm=reverse
  316. hi Visual guibg=#0B7260 gui=none
  317. hi WarningMsg guifg=#000087 guibg=#FFFF00 ctermfg=18 ctermbg=11
  318. hi WildMenu guifg=#20012e guibg=#00a675 gui=bold ctermfg=none ctermbg=none cterm=bold
  319. "
  320. hi pythonPreCondit ctermfg=2 cterm=none
  321. hi tkWidget guifg=#D5B11C guibg=bg gui=bold ctermfg=7 cterm=bold
  322. hi tclBookends guifg=#7CFC94 guibg=NONE gui=bold ctermfg=2 cterm=bold
  323. " ------------------------------------------------------------------------------------------------
  324. " Custom HTML Groups:
  325. " (see ':help html.vim' for more info)
  326. "------------------------------------------------------------------------------
  327. let html_my_rendering=1
  328. hi htmlBold guifg=#87FFD7 gui=bold ctermfg=122 cterm=bold
  329. hi htmlBoldItalic guifg=#87D7EF gui=bold ctermfg=117 cterm=bold
  330. hi htmlBoldUnderline guifg=#87FFD7 gui=bold,underline ctermfg=122 cterm=bold,underline
  331. hi htmlBoldUnderlineItalic guifg=#87D7EF gui=bold,underline ctermfg=117 cterm=bold,underline
  332. hi htmlH1 guifg=#00FF00 guibg=NONE gui=bold,underline ctermfg=2 cterm=bold,underline
  333. hi htmlH2 guifg=#00FF00 guibg=NONE gui=bold ctermfg=2 cterm=bold
  334. hi htmlH3 guifg=#00FF00 guibg=NONE gui=NONE ctermfg=2
  335. hi htmlH4 guifg=#00C700 guibg=NONE gui=underline ctermfg=34 cterm=underline
  336. hi htmlH5 guifg=#00C700 guibg=NONE gui=NONE ctermfg=34
  337. hi htmlH6 guifg=#00A700 guibg=NONE gui=underline ctermfg=28 cterm=underline
  338. hi htmlItalic guifg=#87D7D7 gui=NONE ctermfg=116
  339. hi htmlLink guifg=#8787D7 gui=underline ctermfg=105 cterm=underline
  340. hi htmlUnderline gui=underline cterm=underline
  341. hi htmlUnderlineItalic guifg=#87D7D7 gui=underline ctermfg=116 cterm=underline
  342. "------------------------------------------------------------------------------
  343. " Links To Other Highlight Groups:
  344. "==============================================================================
  345. " Options Processor {{{1
  346. "==============================================================================
  347. "
  348. "------------------------------------------------------------------------------
  349. " Main Dialog: {{{2
  350. "------------------------------------------------------------------------------
  351. "
  352. function! Tabula()
  353. call inputsave()
  354. let thisOption = 1
  355. while thisOption >= 1 && thisOption <= 9
  356. redraw
  357. let thisOption = inputlist([
  358. \ "Select a 'Tabula_' option:",
  359. \ "1. BoldStatement Display statements in bold",
  360. \ "2. ColorPre Set Color for preprocessor statements",
  361. \ "3. CurColor Set GUI cursor color",
  362. \ "4. DarkError Use dark error background",
  363. \ "5. FlatConstants Use multiple colors for constant values",
  364. \ "6. InvisibleIgnore Display of Ignore and NonText characters",
  365. \ "7. LNumUnderline Show line numbers underlined",
  366. \ "8. SearchStandOut Display of search occurrences",
  367. \ "9. TodoUnderline Display of TODOs and similar"
  368. \ ])
  369. redraw
  370. if thisOption >= 1 && thisOption <= 9
  371. call Tabula_{thisOption}()
  372. "let g:Tabula_setOptions = 1
  373. endif
  374. endwhile
  375. call inputrestore()
  376. endfunction
  377. "------------------------------------------------------------------------------
  378. " Bold Statements: {{{2
  379. "------------------------------------------------------------------------------
  380. "
  381. function! Tabula_1()
  382. let curOption = ""
  383. if s:BoldStatement == 0
  384. let curOption = "not "
  385. endif
  386. let optionValue = inputlist([
  387. \ "How to display statements (currently ".curOption."bold)?",
  388. \ "1. bold",
  389. \ "2. not bold"
  390. \ ])
  391. if optionValue == 1
  392. let g:Tabula_BoldStatement = 1
  393. elseif optionValue == 2
  394. let g:Tabula_BoldStatement = 0
  395. endif
  396. endfunction
  397. "------------------------------------------------------------------------------
  398. " Color For Preprocessor Statements: {{{2
  399. "------------------------------------------------------------------------------
  400. "
  401. function! Tabula_2()
  402. let optionValue = inputlist([
  403. \ "How to display preprocessor statements (currently ".s:ColorPre.")?",
  404. \ "1. blue",
  405. \ "2. red",
  406. \ "3. yellow"
  407. \ ])
  408. if optionValue == 1
  409. let g:Tabula_ColorPre = "blue"
  410. elseif optionValue == 2
  411. let g:Tabula_ColorPre = "red"
  412. elseif optionValue == 3
  413. let g:Tabula_ColorPre = "yellow"
  414. endif
  415. endfunction
  416. "------------------------------------------------------------------------------
  417. " GUI Cursor Color: {{{2
  418. "------------------------------------------------------------------------------
  419. "
  420. function! Tabula_3()
  421. let optionValue = inputlist([
  422. \ "Use which cursor color (currently ".s:CurColor.")?",
  423. \ "1. blue",
  424. \ "2. red",
  425. \ "3. yellow",
  426. \ "4. white"
  427. \ ])
  428. if optionValue == 1
  429. let g:Tabula_CurColor = "blue"
  430. elseif optionValue == 2
  431. let g:Tabula_CurColor = "red"
  432. elseif optionValue == 3
  433. let g:Tabula_CurColor = "yellow"
  434. elseif optionValue == 4
  435. let g:Tabula_CurColor = "white"
  436. endif
  437. endfunction
  438. "------------------------------------------------------------------------------
  439. " Use Dark Error Background: {{{2
  440. "------------------------------------------------------------------------------
  441. "
  442. function! Tabula_4()
  443. let curOption = "light "
  444. if s:DarkError
  445. let curOption = "dark "
  446. endif
  447. let optionValue = inputlist([
  448. \ "How to display errors in the text (currently ".curOption."background)?",
  449. \ "1. light background",
  450. \ "2. dark background"
  451. \ ])
  452. if optionValue == 1
  453. let g:Tabula_DarkError = 0
  454. elseif optionValue == 2
  455. let g:Tabula_DarkError = 1
  456. endif
  457. endfunction
  458. "------------------------------------------------------------------------------
  459. " Multiple Constant Colors: {{{2
  460. "------------------------------------------------------------------------------
  461. "
  462. function! Tabula_5()
  463. let curOption = "one color"
  464. if s:FlatConstants == 0
  465. let curOption = "multiple colors"
  466. endif
  467. let optionValue = inputlist([
  468. \ "How to display constant values (currently ".curOption.")?",
  469. \ "1. use one common color for all",
  470. \ "2. use different color for each type"
  471. \ ])
  472. if optionValue == 1
  473. let g:Tabula_FlatConstants = 1
  474. elseif optionValue == 2
  475. let g:Tabula_FlatConstants = 0
  476. endif
  477. endfunction
  478. "------------------------------------------------------------------------------
  479. " Ignore And NonText Characters: {{{2
  480. "------------------------------------------------------------------------------
  481. "
  482. function! Tabula_6()
  483. let curOption = "invisible"
  484. if s:InvisibleIgnore == 0
  485. let curOption = "slightly visible"
  486. endif
  487. let optionValue = inputlist([
  488. \ "Show Ignore and NonText characters (currently ".curOption.")?",
  489. \ "1. invisible",
  490. \ "2. slightly visible"
  491. \ ])
  492. if optionValue == 1
  493. let g:Tabula_InvisibleIgnore = 1
  494. elseif optionValue == 2
  495. let g:Tabula_InvisibleIgnore = 0
  496. endif
  497. endfunction
  498. "------------------------------------------------------------------------------
  499. " Underlined Line Numbers: {{{2
  500. "------------------------------------------------------------------------------
  501. "
  502. function! Tabula_7()
  503. let curOption = ""
  504. if s:LNumUnderline == 0
  505. let curOption = "not "
  506. endif
  507. let optionValue = inputlist([
  508. \ "How to display line numbers(currently ".curOption."underlined)?",
  509. \ "1. underlined",
  510. \ "2. not underlined"
  511. \ ])
  512. if optionValue == 1
  513. let g:Tabula_LNumUnderline = 1
  514. elseif optionValue == 2
  515. let g:Tabula_LNumUnderline = 0
  516. endif
  517. endfunction
  518. "------------------------------------------------------------------------------
  519. " Let Search Occurrences Stand Out More Prominently: {{{2
  520. "------------------------------------------------------------------------------
  521. "
  522. function! Tabula_8()
  523. if s:SearchStandOut == 0
  524. let curOption = "normal"
  525. elseif s:SearchStandOut == 1
  526. let curOption = "prominent"
  527. elseif s:SearchStandOut == 2
  528. let curOption = "very prominent"
  529. endif
  530. let optionValue = inputlist([
  531. \ "How to display search occurrences (currently ".curOption.")?",
  532. \ "1. normal",
  533. \ "2. prominent",
  534. \ "3. very prominent"
  535. \ ])
  536. if optionValue == 1
  537. let g:Tabula_SearchStandOut = 0
  538. elseif optionValue == 2
  539. let g:Tabula_SearchStandOut = 1
  540. elseif optionValue == 3
  541. let g:Tabula_SearchStandOut = 2
  542. endif
  543. endfunction
  544. "------------------------------------------------------------------------------
  545. " TODOs Display: {{{2
  546. "------------------------------------------------------------------------------
  547. "
  548. function! Tabula_9()
  549. let curOption = ""
  550. if s:TodoUnderline == 0
  551. let curOption = "not "
  552. endif
  553. let optionValue = inputlist([
  554. \ "How to display TODOs and similar (currently ".curOption."underlined)?",
  555. \ "1. underlined",
  556. \ "2. not underlined"
  557. \ ])
  558. if optionValue == 1
  559. let g:Tabula_TodoUnderline = 1
  560. elseif optionValue == 2
  561. let g:Tabula_TodoUnderline = 0
  562. endif
  563. endfunction
  564. "==========================================================================}}}1
  565. "
  566. " FIXME: This can't work!
  567. "
  568. "if g:Tabula_setOptions
  569. " :exe "color tabula"
  570. " let g:Tabula_setOptions = 0
  571. "endif
  572. " vim:tw=0:fdm=marker:fdl=0:fdc=3:fen