From 43e3ec9f7cc466cff77f6f566e0b11b54ecdec2c Mon Sep 17 00:00:00 2001 From: Matthew Reschke Date: Wed, 4 Mar 2015 12:22:15 -0600 Subject: [PATCH] Fixing --- README.md | 2 - autoload/pathogen.vim | 347 --- bundle/ctrlp.vim | 1 - bundle/vim-blade | 1 - bundle/vim-nerdtree-tabs | 1 - colors/atom-dark.vim | 116 - colors/badwolf.vim | 650 ----- colors/benokai.vim | 114 - colors/bluedrake.vim | 246 -- colors/cobalt2.vim | 691 ----- colors/colorful256.vim | 88 - colors/ecostation.vim | 65 - colors/flattened_dark.vim | 524 ---- colors/flattened_light.vim | 502 ---- colors/fu.vim | 127 - colors/gentooish.vim | 163 -- colors/greenvision.vim | 72 - colors/heroku-terminal.vim | 363 --- colors/heroku.vim | 355 --- colors/icansee.vim | 61 - colors/jellybeans.vim | 569 ---- colors/molokai.vim | 276 -- colors/mustang.vim | 65 - colors/revolution.vim | 102 - colors/solarized.vim | 1117 -------- colors/sorcerer.vim | 208 -- colors/spink.vim | 220 -- doc/NERD_tree.txt | 1291 --------- doc/tags | 87 - nerdtree_plugin/exec_menuitem.vim | 41 - nerdtree_plugin/fs_menu.vim | 224 -- plugin/NERD_tree.vim | 4017 ----------------------------- syntax/nerdtree.vim | 88 - vimrc | 600 ----- vimrc-jefferyway | 190 -- vimrc-original | 58 - vimrc-vincent | 854 ------ vimrc.dpkg-old | 59 - vimrc.tiny | 13 - 39 files changed, 14568 deletions(-) delete mode 100644 README.md delete mode 100644 autoload/pathogen.vim delete mode 160000 bundle/ctrlp.vim delete mode 160000 bundle/vim-blade delete mode 160000 bundle/vim-nerdtree-tabs delete mode 100644 colors/atom-dark.vim delete mode 100644 colors/badwolf.vim delete mode 100644 colors/benokai.vim delete mode 100644 colors/bluedrake.vim delete mode 100644 colors/cobalt2.vim delete mode 100644 colors/colorful256.vim delete mode 100644 colors/ecostation.vim delete mode 100644 colors/flattened_dark.vim delete mode 100644 colors/flattened_light.vim delete mode 100644 colors/fu.vim delete mode 100644 colors/gentooish.vim delete mode 100644 colors/greenvision.vim delete mode 100644 colors/heroku-terminal.vim delete mode 100644 colors/heroku.vim delete mode 100644 colors/icansee.vim delete mode 100644 colors/jellybeans.vim delete mode 100644 colors/molokai.vim delete mode 100644 colors/mustang.vim delete mode 100644 colors/revolution.vim delete mode 100644 colors/solarized.vim delete mode 100644 colors/sorcerer.vim delete mode 100644 colors/spink.vim delete mode 100644 doc/NERD_tree.txt delete mode 100644 doc/tags delete mode 100644 nerdtree_plugin/exec_menuitem.vim delete mode 100644 nerdtree_plugin/fs_menu.vim delete mode 100644 plugin/NERD_tree.vim delete mode 100644 syntax/nerdtree.vim delete mode 100644 vimrc delete mode 100644 vimrc-jefferyway delete mode 100644 vimrc-original delete mode 100644 vimrc-vincent delete mode 100644 vimrc.dpkg-old delete mode 100644 vimrc.tiny diff --git a/README.md b/README.md deleted file mode 100644 index 84bee6f..0000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# vimrc -My vimrc stuff diff --git a/autoload/pathogen.vim b/autoload/pathogen.vim deleted file mode 100644 index a13ae08..0000000 --- a/autoload/pathogen.vim +++ /dev/null @@ -1,347 +0,0 @@ -" pathogen.vim - path option manipulation -" Maintainer: Tim Pope -" Version: 2.3 - -" Install in ~/.vim/autoload (or ~\vimfiles\autoload). -" -" For management of individually installed plugins in ~/.vim/bundle (or -" ~\vimfiles\bundle), adding `execute pathogen#infect()` to the top of your -" .vimrc is the only other setup necessary. -" -" The API is documented inline below. - -if exists("g:loaded_pathogen") || &cp - finish -endif -let g:loaded_pathogen = 1 - -" Point of entry for basic default usage. Give a relative path to invoke -" pathogen#interpose() (defaults to "bundle/{}"), or an absolute path to invoke -" pathogen#surround(). Curly braces are expanded with pathogen#expand(): -" "bundle/{}" finds all subdirectories inside "bundle" inside all directories -" in the runtime path. -function! pathogen#infect(...) abort - for path in a:0 ? filter(reverse(copy(a:000)), 'type(v:val) == type("")') : ['bundle/{}'] - if path =~# '^\%({\=[$~\\/]\|{\=\w:[\\/]\).*[{}*]' - call pathogen#surround(path) - elseif path =~# '^\%([$~\\/]\|\w:[\\/]\)' - call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') - call pathogen#surround(path . '/{}') - elseif path =~# '[{}*]' - call pathogen#interpose(path) - else - call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') - call pathogen#interpose(path . '/{}') - endif - endfor - call pathogen#cycle_filetype() - if pathogen#is_disabled($MYVIMRC) - return 'finish' - endif - return '' -endfunction - -" Split a path into a list. -function! pathogen#split(path) abort - if type(a:path) == type([]) | return a:path | endif - if empty(a:path) | return [] | endif - let split = split(a:path,'\\\@]','\\&','') - endif -endfunction - -" Like findfile(), but hardcoded to use the runtimepath. -function! pathogen#runtime_findfile(file,count) abort "{{{1 - let rtp = pathogen#join(1,pathogen#split(&rtp)) - let file = findfile(a:file,rtp,a:count) - if file ==# '' - return '' - else - return fnamemodify(file,':p') - endif -endfunction - -" Section: Deprecated - -function! s:warn(msg) abort - echohl WarningMsg - echomsg a:msg - echohl NONE -endfunction - -" Prepend all subdirectories of path to the rtp, and append all 'after' -" directories in those subdirectories. Deprecated. -function! pathogen#runtime_prepend_subdirectories(path) abort - call s:warn('Change pathogen#runtime_prepend_subdirectories('.string(a:path).') to pathogen#infect('.string(a:path.'/{}').')') - return pathogen#surround(a:path . pathogen#slash() . '{}') -endfunction - -function! pathogen#incubate(...) abort - let name = a:0 ? a:1 : 'bundle/{}' - call s:warn('Change pathogen#incubate('.(a:0 ? string(a:1) : '').') to pathogen#infect('.string(name).')') - return pathogen#interpose(name) -endfunction - -" Deprecated alias for pathogen#interpose(). -function! pathogen#runtime_append_all_bundles(...) abort - if a:0 - call s:warn('Change pathogen#runtime_append_all_bundles('.string(a:1).') to pathogen#infect('.string(a:1.'/{}').')') - else - call s:warn('Change pathogen#runtime_append_all_bundles() to pathogen#infect()') - endif - return pathogen#interpose(a:0 ? a:1 . '/{}' : 'bundle/{}') -endfunction - -if exists(':Vedit') - finish -endif - -let s:vopen_warning = 0 - -function! s:find(count,cmd,file,lcd) - let rtp = pathogen#join(1,pathogen#split(&runtimepath)) - let file = pathogen#runtime_findfile(a:file,a:count) - if file ==# '' - return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'" - endif - if !s:vopen_warning - let s:vopen_warning = 1 - let warning = '|echohl WarningMsg|echo "Install scriptease.vim to continue using :V'.a:cmd.'"|echohl NONE' - else - let warning = '' - endif - if a:lcd - let path = file[0:-strlen(a:file)-2] - execute 'lcd `=path`' - return a:cmd.' '.pathogen#fnameescape(a:file) . warning - else - return a:cmd.' '.pathogen#fnameescape(file) . warning - endif -endfunction - -function! s:Findcomplete(A,L,P) - let sep = pathogen#slash() - let cheats = { - \'a': 'autoload', - \'d': 'doc', - \'f': 'ftplugin', - \'i': 'indent', - \'p': 'plugin', - \'s': 'syntax'} - if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0]) - let request = cheats[a:A[0]].a:A[1:-1] - else - let request = a:A - endif - let pattern = substitute(request,'/\|\'.sep,'*'.sep,'g').'*' - let found = {} - for path in pathogen#split(&runtimepath) - let path = expand(path, ':p') - let matches = split(glob(path.sep.pattern),"\n") - call map(matches,'isdirectory(v:val) ? v:val.sep : v:val') - call map(matches,'expand(v:val, ":p")[strlen(path)+1:-1]') - for match in matches - let found[match] = 1 - endfor - endfor - return sort(keys(found)) -endfunction - -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(,'edit',,0) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(,'edit',,0) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(,'edit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(,'split',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(,'vsplit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(,'tabedit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(,'pedit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(,'read',,1) - -" vim:set et sw=2 foldmethod=expr foldexpr=getline(v\:lnum)=~'^\"\ Section\:'?'>1'\:getline(v\:lnum)=~#'^fu'?'a1'\:getline(v\:lnum)=~#'^endf'?'s1'\:'=': diff --git a/bundle/ctrlp.vim b/bundle/ctrlp.vim deleted file mode 160000 index b5d3fe6..0000000 --- a/bundle/ctrlp.vim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b5d3fe66a58a13d2ff8b6391f4387608496a030f diff --git a/bundle/vim-blade b/bundle/vim-blade deleted file mode 160000 index 8fc9503..0000000 --- a/bundle/vim-blade +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8fc9503941429ff773cbdef6d590c8a485e9a498 diff --git a/bundle/vim-nerdtree-tabs b/bundle/vim-nerdtree-tabs deleted file mode 160000 index 0decec1..0000000 --- a/bundle/vim-nerdtree-tabs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0decec122e9bb3e9328b01fa20a9650e79cc6ca7 diff --git a/colors/atom-dark.vim b/colors/atom-dark.vim deleted file mode 100644 index 52f52f7..0000000 --- a/colors/atom-dark.vim +++ /dev/null @@ -1,116 +0,0 @@ -" Vim color file -" -" Author: Federico Ramirez -" https://github.com/gosukiwi/vim-atom-dark -" -" Note: Based on the Monokai theme variation by Tomas Restrepo -" https://github.com/tomasr/molokai - -hi clear - -if version > 580 - " no guarantees for version 5.8 and below, but this makes it stop - " complaining - hi clear - if exists("syntax_on") - syntax reset - endif -endif -let g:colors_name="atom-dark" - -hi Boolean guifg=#99CC99 -hi Character guifg=#A8FF60 -hi Number guifg=#99CC99 -hi String guifg=#A8FF60 -hi Conditional guifg=#92C5F7 gui=none -hi Constant guifg=#99CC99 gui=none -hi Cursor guifg=#F1F1F1 guibg=#777777 -hi iCursor guifg=#F1F1F1 guibg=#777777 -hi Debug guifg=#BCA3A3 gui=none -hi Define guifg=#66D9EF -hi Delimiter guifg=#8F8F8F -hi DiffAdd guibg=#13354A -hi DiffChange guifg=#89807D guibg=#4C4745 -hi DiffDelete guifg=#960050 guibg=#1E0010 -hi DiffText guibg=#4C4745 gui=none - -hi Directory guifg=#AAAAAA gui=none -hi Error guifg=#A8FF60 guibg=#1E0010 -hi ErrorMsg guifg=#92C5F7 guibg=#232526 gui=none -hi Exception guifg=#DAD085 gui=none -hi Float guifg=#99CC99 -hi FoldColumn guifg=#465457 guibg=#000000 -hi Folded guifg=#465457 guibg=#000000 -hi Function guifg=#DAD085 -hi Identifier guifg=#B6B7EB -hi Ignore guifg=#808080 guibg=bg -hi IncSearch guifg=#C4BE89 guibg=#000000 - -hi Keyword guifg=#92C5F7 gui=none -hi Label guifg=#A8FF60 gui=none -hi Macro guifg=#C4BE89 gui=none -hi SpecialKey guifg=#66D9EF gui=none - -hi MatchParen guifg=#B7B9B8 guibg=#444444 gui=none -hi ModeMsg guifg=#A8FF60 -hi MoreMsg guifg=#A8FF60 -hi Operator guifg=#92C5F7 - -" complete menu -hi Pmenu guifg=#66D9EF guibg=#000000 -hi PmenuSel guibg=#808080 -hi PmenuSbar guibg=#080808 -hi PmenuThumb guifg=#66D9EF - -hi PreCondit guifg=#DAD085 gui=none -hi PreProc guifg=#DAD085 -hi Question guifg=#66D9EF -hi Repeat guifg=#92C5F7 gui=none -hi Search guifg=#000000 guibg=#B4EC85 -" marks -hi SignColumn guifg=#DAD085 guibg=#232526 -hi SpecialChar guifg=#92C5F7 gui=none -hi SpecialComment guifg=#7C7C7C gui=none -hi Special guifg=#66D9EF guibg=bg gui=none -if has("spell") - hi SpellBad guisp=#FF0000 gui=undercurl - hi SpellCap guisp=#7070F0 gui=undercurl - hi SpellLocal guisp=#70F0F0 gui=undercurl - hi SpellRare guisp=#FFFFFF gui=undercurl -endif -hi Statement guifg=#92C5F7 gui=none -hi StatusLine guifg=#455354 guibg=fg gui=none -hi StatusLineNC guifg=#808080 guibg=#080808 -hi StorageClass guifg=#B6B7EB gui=none -hi Structure guifg=#66D9EF -hi Tag guifg=#92C5F7 gui=none -hi Title guifg=#B6B7EB gui=none -hi Todo guifg=#FFFFFF guibg=bg gui=none - -hi Typedef guifg=#66D9EF -hi Type guifg=#66D9EF gui=none -hi Underlined guifg=#808080 gui=underline - -hi VertSplit guifg=#808080 guibg=#080808 -hi VisualNOS guibg=#403D3D -hi Visual guibg=#403D3D -hi WarningMsg guifg=#FFFFFF guibg=#333333 -hi WildMenu guifg=#66D9EF guibg=#000000 - -hi TabLineFill guifg=#1D1F21 guibg=#1D1F21 -hi TabLine guibg=#1D1F21 guifg=#808080 gui=none - -hi Normal guifg=#F8F8F2 guibg=#1D1F21 -hi Comment guifg=#7C7C7C -hi CursorLine guibg=#293739 -hi CursorLineNr guifg=#B6B7EB gui=none -hi CursorColumn guibg=#293739 -hi ColorColumn guibg=#232526 -hi LineNr guifg=#465457 guibg=#232526 -hi NonText guifg=#465457 -hi SpecialKey guifg=#465457 - -" Must be at the end, because of ctermbg=234 bug. -" https://groups.google.com/forum/#!msg/vim_dev/afPqwAFNdrU/nqh6tOM87QUJ -set background=dark - diff --git a/colors/badwolf.vim b/colors/badwolf.vim deleted file mode 100644 index 99f0ce0..0000000 --- a/colors/badwolf.vim +++ /dev/null @@ -1,650 +0,0 @@ -" _ _ _ __ -" | |__ __ _ __| | __ _____ | |/ _| -" | '_ \ / _` |/ _` | \ \ /\ / / _ \| | |_ -" | |_) | (_| | (_| | \ V V / (_) | | _| -" |_.__/ \__,_|\__,_| \_/\_/ \___/|_|_| -" -" I am the Bad Wolf. I create myself. -" I take the words. I scatter them in time and space. -" A message to lead myself here. -" -" A Vim colorscheme pieced together by Steve Losh. -" Available at http://stevelosh.com/projects/badwolf/ -" -" Why? {{{ -" -" After using Molokai for quite a long time, I started longing for -" a replacement. -" -" I love Molokai's high contrast and gooey, saturated tones, but it can be -" a little inconsistent at times. -" -" Also it's winter here in Rochester, so I wanted a color scheme that's a bit -" warmer. A little less blue and a bit more red. -" -" And so Bad Wolf was born. I'm no designer, but designers have been scattering -" beautiful colors through time and space long before I came along. I took -" advantage of that and reused some of my favorites to lead me to this scheme. -" -" }}} - -" Supporting code ------------------------------------------------------------- -" Preamble {{{ - -if !has("gui_running") && &t_Co != 88 && &t_Co != 256 - finish -endif - -set background=dark - -if exists("syntax_on") - syntax reset -endif - -let colors_name = "badwolf" - -if !exists("g:badwolf_html_link_underline") " {{{ - let g:badwolf_html_link_underline = 1 -endif " }}} - -if !exists("g:badwolf_css_props_highlight") " {{{ - let g:badwolf_css_props_highlight = 0 -endif " }}} - -" }}} -" Palette {{{ - -let s:bwc = {} - -" The most basic of all our colors is a slightly tweaked version of the Molokai -" Normal text. -let s:bwc.plain = ['f8f6f2', 15] - -" Pure and simple. -let s:bwc.snow = ['ffffff', 15] -let s:bwc.coal = ['000000', 16] - -" All of the Gravel colors are based on a brown from Clouds Midnight. -let s:bwc.brightgravel = ['d9cec3', 252] -let s:bwc.lightgravel = ['998f84', 245] -let s:bwc.gravel = ['857f78', 243] -let s:bwc.mediumgravel = ['666462', 241] -let s:bwc.deepgravel = ['45413b', 238] -let s:bwc.deepergravel = ['35322d', 236] -let s:bwc.darkgravel = ['242321', 235] -let s:bwc.blackgravel = ['1c1b1a', 233] -let s:bwc.blackestgravel = ['141413', 232] - -" A color sampled from a highlight in a photo of a glass of Dale's Pale Ale on -" my desk. -let s:bwc.dalespale = ['fade3e', 221] - -" A beautiful tan from Tomorrow Night. -let s:bwc.dirtyblonde = ['f4cf86', 222] - -" Delicious, chewy red from Made of Code for the poppiest highlights. -let s:bwc.taffy = ['ff2c4b', 196] - -" Another chewy accent, but use sparingly! -let s:bwc.saltwatertaffy = ['8cffba', 121] - -" The star of the show comes straight from Made of Code. -let s:bwc.tardis = ['0a9dff', 39] - -" This one's from Mustang, not Florida! -let s:bwc.orange = ['ffa724', 214] - -" A limier green from Getafe. -let s:bwc.lime = ['aeee00', 154] - -" Rose's dress in The Idiot's Lantern. -let s:bwc.dress = ['ff9eb8', 211] - -" Another play on the brown from Clouds Midnight. I love that color. -let s:bwc.toffee = ['b88853', 137] - -" Also based on that Clouds Midnight brown. -let s:bwc.coffee = ['c7915b', 173] -let s:bwc.darkroast = ['88633f', 95] - -" }}} -" Highlighting Function {{{ -function! s:HL(group, fg, ...) - " Arguments: group, guifg, guibg, gui, guisp - - let histring = 'hi ' . a:group . ' ' - - if strlen(a:fg) - if a:fg == 'fg' - let histring .= 'guifg=fg ctermfg=fg ' - else - let c = get(s:bwc, a:fg) - let histring .= 'guifg=#' . c[0] . ' ctermfg=' . c[1] . ' ' - endif - endif - - if a:0 >= 1 && strlen(a:1) - if a:1 == 'bg' - let histring .= 'guibg=bg ctermbg=bg ' - else - let c = get(s:bwc, a:1) - let histring .= 'guibg=#' . c[0] . ' ctermbg=' . c[1] . ' ' - endif - endif - - if a:0 >= 2 && strlen(a:2) - let histring .= 'gui=' . a:2 . ' cterm=' . a:2 . ' ' - endif - - if a:0 >= 3 && strlen(a:3) - let c = get(s:bwc, a:3) - let histring .= 'guisp=#' . c[0] . ' ' - endif - - " echom histring - - execute histring -endfunction -" }}} -" Configuration Options {{{ - -if exists('g:badwolf_darkgutter') && g:badwolf_darkgutter - let s:gutter = 'blackestgravel' -else - let s:gutter = 'blackgravel' -endif - -if exists('g:badwolf_tabline') - if g:badwolf_tabline == 0 - let s:tabline = 'blackestgravel' - elseif g:badwolf_tabline == 1 - let s:tabline = 'blackgravel' - elseif g:badwolf_tabline == 2 - let s:tabline = 'darkgravel' - elseif g:badwolf_tabline == 3 - let s:tabline = 'deepgravel' - else - let s:tabline = 'blackestgravel' - endif -else - let s:tabline = 'blackgravel' -endif - -" }}} - -" Actual colorscheme ---------------------------------------------------------- -" Vanilla Vim {{{ - -" General/UI {{{ - -call s:HL('Normal', 'plain', 'blackgravel') - -call s:HL('Folded', 'mediumgravel', 'bg', 'none') - -call s:HL('VertSplit', 'lightgravel', 'bg', 'none') - -call s:HL('CursorLine', '', 'darkgravel', 'none') -call s:HL('CursorColumn', '', 'darkgravel') -call s:HL('ColorColumn', '', 'darkgravel') - -call s:HL('TabLine', 'plain', s:tabline, 'none') -call s:HL('TabLineFill', 'plain', s:tabline, 'none') -call s:HL('TabLineSel', 'coal', 'tardis', 'none') - -call s:HL('MatchParen', 'dalespale', 'darkgravel', 'bold') - -call s:HL('NonText', 'deepgravel', 'bg') -call s:HL('SpecialKey', 'deepgravel', 'bg') - -call s:HL('Visual', '', 'deepgravel') -call s:HL('VisualNOS', '', 'deepgravel') - -call s:HL('Search', 'coal', 'dalespale', 'bold') -call s:HL('IncSearch', 'coal', 'tardis', 'bold') - -call s:HL('Underlined', 'fg', '', 'underline') - -call s:HL('StatusLine', 'coal', 'tardis', 'bold') -call s:HL('StatusLineNC', 'snow', 'deepgravel', 'bold') - -call s:HL('Directory', 'dirtyblonde', '', 'bold') - -call s:HL('Title', 'lime') - -call s:HL('ErrorMsg', 'taffy', 'bg', 'bold') -call s:HL('MoreMsg', 'dalespale', '', 'bold') -call s:HL('ModeMsg', 'dirtyblonde', '', 'bold') -call s:HL('Question', 'dirtyblonde', '', 'bold') -call s:HL('WarningMsg', 'dress', '', 'bold') - -" This is a ctags tag, not an HTML one. 'Something you can use c-] on'. -call s:HL('Tag', '', '', 'bold') - -" hi IndentGuides guibg=#373737 -" hi WildMenu guifg=#66D9EF guibg=#000000 - -" }}} -" Gutter {{{ - -call s:HL('LineNr', 'mediumgravel', s:gutter) -call s:HL('SignColumn', '', s:gutter) -call s:HL('FoldColumn', 'mediumgravel', s:gutter) - -" }}} -" Cursor {{{ - -call s:HL('Cursor', 'coal', 'tardis', 'bold') -call s:HL('vCursor', 'coal', 'tardis', 'bold') -call s:HL('iCursor', 'coal', 'tardis', 'none') - -" }}} -" Syntax highlighting {{{ - -" Start with a simple base. -call s:HL('Special', 'plain') - -" Comments are slightly brighter than folds, to make 'headers' easier to see. -call s:HL('Comment', 'gravel') -call s:HL('Todo', 'snow', 'bg', 'bold') -call s:HL('SpecialComment', 'snow', 'bg', 'bold') - -" Strings are a nice, pale straw color. Nothing too fancy. -call s:HL('String', 'dirtyblonde') - -" Control flow stuff is taffy. -call s:HL('Statement', 'taffy', '', 'bold') -call s:HL('Keyword', 'taffy', '', 'bold') -call s:HL('Conditional', 'taffy', '', 'bold') -call s:HL('Operator', 'taffy', '', 'none') -call s:HL('Label', 'taffy', '', 'none') -call s:HL('Repeat', 'taffy', '', 'none') - -" Functions and variable declarations are orange, because plain looks weird. -call s:HL('Identifier', 'orange', '', 'none') -call s:HL('Function', 'orange', '', 'none') - -" Preprocessor stuff is lime, to make it pop. -" -" This includes imports in any given language, because they should usually be -" grouped together at the beginning of a file. If they're in the middle of some -" other code they should stand out, because something tricky is -" probably going on. -call s:HL('PreProc', 'lime', '', 'none') -call s:HL('Macro', 'lime', '', 'none') -call s:HL('Define', 'lime', '', 'none') -call s:HL('PreCondit', 'lime', '', 'bold') - -" Constants of all kinds are colored together. -" I'm not really happy with the color yet... -call s:HL('Constant', 'toffee', '', 'bold') -call s:HL('Character', 'toffee', '', 'bold') -call s:HL('Boolean', 'toffee', '', 'bold') - -call s:HL('Number', 'toffee', '', 'bold') -call s:HL('Float', 'toffee', '', 'bold') - -" Not sure what 'special character in a constant' means, but let's make it pop. -call s:HL('SpecialChar', 'dress', '', 'bold') - -call s:HL('Type', 'dress', '', 'none') -call s:HL('StorageClass', 'taffy', '', 'none') -call s:HL('Structure', 'taffy', '', 'none') -call s:HL('Typedef', 'taffy', '', 'bold') - -" Make try/catch blocks stand out. -call s:HL('Exception', 'lime', '', 'bold') - -" Misc -call s:HL('Error', 'snow', 'taffy', 'bold') -call s:HL('Debug', 'snow', '', 'bold') -call s:HL('Ignore', 'gravel', '', '') - -" }}} -" Completion Menu {{{ - -call s:HL('Pmenu', 'plain', 'deepergravel') -call s:HL('PmenuSel', 'coal', 'tardis', 'bold') -call s:HL('PmenuSbar', '', 'deepergravel') -call s:HL('PmenuThumb', 'brightgravel') - -" }}} -" Diffs {{{ - -call s:HL('DiffDelete', 'coal', 'coal') -call s:HL('DiffAdd', '', 'deepergravel') -call s:HL('DiffChange', '', 'darkgravel') -call s:HL('DiffText', 'snow', 'deepergravel', 'bold') - -" }}} -" Spelling {{{ - -if has("spell") - call s:HL('SpellCap', 'dalespale', 'bg', 'undercurl,bold', 'dalespale') - call s:HL('SpellBad', '', 'bg', 'undercurl', 'dalespale') - call s:HL('SpellLocal', '', '', 'undercurl', 'dalespale') - call s:HL('SpellRare', '', '', 'undercurl', 'dalespale') -endif - -" }}} - -" }}} -" Plugins {{{ - -" CtrlP {{{ - - " the message when no match is found - call s:HL('CtrlPNoEntries', 'snow', 'taffy', 'bold') - - " the matched pattern - call s:HL('CtrlPMatch', 'orange', 'bg', 'none') - - " the line prefix '>' in the match window - call s:HL('CtrlPLinePre', 'deepgravel', 'bg', 'none') - - " the prompt’s base - call s:HL('CtrlPPrtBase', 'deepgravel', 'bg', 'none') - - " the prompt’s text - call s:HL('CtrlPPrtText', 'plain', 'bg', 'none') - - " the prompt’s cursor when moving over the text - call s:HL('CtrlPPrtCursor', 'coal', 'tardis', 'bold') - - " 'prt' or 'win', also for 'regex' - call s:HL('CtrlPMode1', 'coal', 'tardis', 'bold') - - " 'file' or 'path', also for the local working dir - call s:HL('CtrlPMode2', 'coal', 'tardis', 'bold') - - " the scanning status - call s:HL('CtrlPStats', 'coal', 'tardis', 'bold') - - " TODO: CtrlP extensions. - " CtrlPTabExtra : the part of each line that’s not matched against (Comment) - " CtrlPqfLineCol : the line and column numbers in quickfix mode (|s:HL-Search|) - " CtrlPUndoT : the elapsed time in undo mode (|s:HL-Directory|) - " CtrlPUndoBr : the square brackets [] in undo mode (Comment) - " CtrlPUndoNr : the undo number inside [] in undo mode (String) - -" }}} -" EasyMotion {{{ - -call s:HL('EasyMotionTarget', 'tardis', 'bg', 'bold') -call s:HL('EasyMotionShade', 'deepgravel', 'bg') - -" }}} -" Interesting Words {{{ - -" These are only used if you're me or have copied the hNUM mappings -" from my Vimrc. -call s:HL('InterestingWord1', 'coal', 'orange') -call s:HL('InterestingWord2', 'coal', 'lime') -call s:HL('InterestingWord3', 'coal', 'saltwatertaffy') -call s:HL('InterestingWord4', 'coal', 'toffee') -call s:HL('InterestingWord5', 'coal', 'dress') -call s:HL('InterestingWord6', 'coal', 'taffy') - - -" }}} -" Makegreen {{{ - -" hi GreenBar term=reverse ctermfg=white ctermbg=green guifg=coal guibg=#9edf1c -" hi RedBar term=reverse ctermfg=white ctermbg=red guifg=white guibg=#C50048 - -" }}} -" Rainbow Parentheses {{{ - -call s:HL('level16c', 'mediumgravel', '', 'bold') -call s:HL('level15c', 'dalespale', '', '') -call s:HL('level14c', 'dress', '', '') -call s:HL('level13c', 'orange', '', '') -call s:HL('level12c', 'tardis', '', '') -call s:HL('level11c', 'lime', '', '') -call s:HL('level10c', 'toffee', '', '') -call s:HL('level9c', 'saltwatertaffy', '', '') -call s:HL('level8c', 'coffee', '', '') -call s:HL('level7c', 'dalespale', '', '') -call s:HL('level6c', 'dress', '', '') -call s:HL('level5c', 'orange', '', '') -call s:HL('level4c', 'tardis', '', '') -call s:HL('level3c', 'lime', '', '') -call s:HL('level2c', 'toffee', '', '') -call s:HL('level1c', 'saltwatertaffy', '', '') - -" }}} -" ShowMarks {{{ - -call s:HL('ShowMarksHLl', 'tardis', 'blackgravel') -call s:HL('ShowMarksHLu', 'tardis', 'blackgravel') -call s:HL('ShowMarksHLo', 'tardis', 'blackgravel') -call s:HL('ShowMarksHLm', 'tardis', 'blackgravel') - -" }}} - -" }}} -" Filetype-specific {{{ - -" Clojure {{{ - -call s:HL('clojureSpecial', 'taffy', '', '') -call s:HL('clojureDefn', 'taffy', '', '') -call s:HL('clojureDefMacro', 'taffy', '', '') -call s:HL('clojureDefine', 'taffy', '', '') -call s:HL('clojureMacro', 'taffy', '', '') -call s:HL('clojureCond', 'taffy', '', '') - -call s:HL('clojureKeyword', 'orange', '', 'none') - -call s:HL('clojureFunc', 'dress', '', 'none') -call s:HL('clojureRepeat', 'dress', '', 'none') - -call s:HL('clojureParen0', 'lightgravel', '', 'none') - -call s:HL('clojureAnonArg', 'snow', '', 'bold') - -" }}} -" CSS {{{ - -if g:badwolf_css_props_highlight - call s:HL('cssColorProp', 'dirtyblonde', '', 'none') - call s:HL('cssBoxProp', 'dirtyblonde', '', 'none') - call s:HL('cssTextProp', 'dirtyblonde', '', 'none') - call s:HL('cssRenderProp', 'dirtyblonde', '', 'none') - call s:HL('cssGeneratedContentProp', 'dirtyblonde', '', 'none') -else - call s:HL('cssColorProp', 'fg', '', 'none') - call s:HL('cssBoxProp', 'fg', '', 'none') - call s:HL('cssTextProp', 'fg', '', 'none') - call s:HL('cssRenderProp', 'fg', '', 'none') - call s:HL('cssGeneratedContentProp', 'fg', '', 'none') -end - -call s:HL('cssValueLength', 'toffee', '', 'bold') -call s:HL('cssColor', 'toffee', '', 'bold') -call s:HL('cssBraces', 'lightgravel', '', 'none') -call s:HL('cssIdentifier', 'orange', '', 'bold') -call s:HL('cssClassName', 'orange', '', 'none') - -" }}} -" Diff {{{ - -call s:HL('gitDiff', 'lightgravel', '',) - -call s:HL('diffRemoved', 'dress', '',) -call s:HL('diffAdded', 'lime', '',) -call s:HL('diffFile', 'coal', 'taffy', 'bold') -call s:HL('diffNewFile', 'coal', 'taffy', 'bold') - -call s:HL('diffLine', 'coal', 'orange', 'bold') -call s:HL('diffSubname', 'orange', '', 'none') - -" }}} -" Django Templates {{{ - -call s:HL('djangoArgument', 'dirtyblonde', '',) -call s:HL('djangoTagBlock', 'orange', '') -call s:HL('djangoVarBlock', 'orange', '') -" hi djangoStatement guifg=#ff3853 gui=bold -" hi djangoVarBlock guifg=#f4cf86 - -" }}} -" HTML {{{ - -" Punctuation -call s:HL('htmlTag', 'darkroast', 'bg', 'none') -call s:HL('htmlEndTag', 'darkroast', 'bg', 'none') - -" Tag names -call s:HL('htmlTagName', 'coffee', '', 'bold') -call s:HL('htmlSpecialTagName', 'coffee', '', 'bold') -call s:HL('htmlSpecialChar', 'lime', '', 'none') - -" Attributes -call s:HL('htmlArg', 'coffee', '', 'none') - -" Stuff inside an tag - -if g:badwolf_html_link_underline - call s:HL('htmlLink', 'lightgravel', '', 'underline') -else - call s:HL('htmlLink', 'lightgravel', '', 'none') -endif - -" }}} -" Java {{{ - -call s:HL('javaClassDecl', 'taffy', '', 'bold') -call s:HL('javaScopeDecl', 'taffy', '', 'bold') -call s:HL('javaCommentTitle', 'gravel', '') -call s:HL('javaDocTags', 'snow', '', 'none') -call s:HL('javaDocParam', 'dalespale', '', '') - -" }}} -" LaTeX {{{ - -call s:HL('texStatement', 'tardis', '', 'none') -call s:HL('texMathZoneX', 'orange', '', 'none') -call s:HL('texMathZoneA', 'orange', '', 'none') -call s:HL('texMathZoneB', 'orange', '', 'none') -call s:HL('texMathZoneC', 'orange', '', 'none') -call s:HL('texMathZoneD', 'orange', '', 'none') -call s:HL('texMathZoneE', 'orange', '', 'none') -call s:HL('texMathZoneV', 'orange', '', 'none') -call s:HL('texMathZoneX', 'orange', '', 'none') -call s:HL('texMath', 'orange', '', 'none') -call s:HL('texMathMatcher', 'orange', '', 'none') -call s:HL('texRefLabel', 'dirtyblonde', '', 'none') -call s:HL('texRefZone', 'lime', '', 'none') -call s:HL('texComment', 'darkroast', '', 'none') -call s:HL('texDelimiter', 'orange', '', 'none') -call s:HL('texZone', 'brightgravel', '', 'none') - -augroup badwolf_tex - au! - - au BufRead,BufNewFile *.tex syn region texMathZoneV start="\\(" end="\\)\|%stopzone\>" keepend contains=@texMathZoneGroup - au BufRead,BufNewFile *.tex syn region texMathZoneX start="\$" skip="\\\\\|\\\$" end="\$\|%stopzone\>" keepend contains=@texMathZoneGroup -augroup END - -" }}} -" LessCSS {{{ - -call s:HL('lessVariable', 'lime', '', 'none') - -" }}} -" Lispyscript {{{ - -call s:HL('lispyscriptDefMacro', 'lime', '', '') -call s:HL('lispyscriptRepeat', 'dress', '', 'none') - -" }}} -" Mail {{{ - -call s:HL('mailSubject', 'orange', '', 'bold') -call s:HL('mailHeader', 'lightgravel', '', '') -call s:HL('mailHeaderKey', 'lightgravel', '', '') -call s:HL('mailHeaderEmail', 'snow', '', '') -call s:HL('mailURL', 'toffee', '', 'underline') -call s:HL('mailSignature', 'gravel', '', 'none') - -call s:HL('mailQuoted1', 'gravel', '', 'none') -call s:HL('mailQuoted2', 'dress', '', 'none') -call s:HL('mailQuoted3', 'dirtyblonde', '', 'none') -call s:HL('mailQuoted4', 'orange', '', 'none') -call s:HL('mailQuoted5', 'lime', '', 'none') - -" }}} -" Markdown {{{ - -call s:HL('markdownHeadingRule', 'lightgravel', '', 'bold') -call s:HL('markdownHeadingDelimiter', 'lightgravel', '', 'bold') -call s:HL('markdownOrderedListMarker', 'lightgravel', '', 'bold') -call s:HL('markdownListMarker', 'lightgravel', '', 'bold') -call s:HL('markdownItalic', 'snow', '', 'bold') -call s:HL('markdownBold', 'snow', '', 'bold') -call s:HL('markdownH1', 'orange', '', 'bold') -call s:HL('markdownH2', 'lime', '', 'bold') -call s:HL('markdownH3', 'lime', '', 'none') -call s:HL('markdownH4', 'lime', '', 'none') -call s:HL('markdownH5', 'lime', '', 'none') -call s:HL('markdownH6', 'lime', '', 'none') -call s:HL('markdownLinkText', 'toffee', '', 'underline') -call s:HL('markdownIdDeclaration', 'toffee') -call s:HL('markdownAutomaticLink', 'toffee', '', 'bold') -call s:HL('markdownUrl', 'toffee', '', 'bold') -call s:HL('markdownUrldelimiter', 'lightgravel', '', 'bold') -call s:HL('markdownLinkDelimiter', 'lightgravel', '', 'bold') -call s:HL('markdownLinkTextDelimiter', 'lightgravel', '', 'bold') -call s:HL('markdownCodeDelimiter', 'dirtyblonde', '', 'bold') -call s:HL('markdownCode', 'dirtyblonde', '', 'none') -call s:HL('markdownCodeBlock', 'dirtyblonde', '', 'none') - -" }}} -" MySQL {{{ - -call s:HL('mysqlSpecial', 'dress', '', 'bold') - -" }}} -" Python {{{ - -hi def link pythonOperator Operator -call s:HL('pythonBuiltin', 'dress') -call s:HL('pythonBuiltinObj', 'dress') -call s:HL('pythonBuiltinFunc', 'dress') -call s:HL('pythonEscape', 'dress') -call s:HL('pythonException', 'lime', '', 'bold') -call s:HL('pythonExceptions', 'lime', '', 'none') -call s:HL('pythonPrecondit', 'lime', '', 'none') -call s:HL('pythonDecorator', 'taffy', '', 'none') -call s:HL('pythonRun', 'gravel', '', 'bold') -call s:HL('pythonCoding', 'gravel', '', 'bold') - -" }}} -" SLIMV {{{ - -" Rainbow parentheses -call s:HL('hlLevel0', 'gravel') -call s:HL('hlLevel1', 'orange') -call s:HL('hlLevel2', 'saltwatertaffy') -call s:HL('hlLevel3', 'dress') -call s:HL('hlLevel4', 'coffee') -call s:HL('hlLevel5', 'dirtyblonde') -call s:HL('hlLevel6', 'orange') -call s:HL('hlLevel7', 'saltwatertaffy') -call s:HL('hlLevel8', 'dress') -call s:HL('hlLevel9', 'coffee') - -" }}} -" Vim {{{ - -call s:HL('VimCommentTitle', 'lightgravel', '', 'bold') - -call s:HL('VimMapMod', 'dress', '', 'none') -call s:HL('VimMapModKey', 'dress', '', 'none') -call s:HL('VimNotation', 'dress', '', 'none') -call s:HL('VimBracket', 'dress', '', 'none') - -" }}} - -" }}} - diff --git a/colors/benokai.vim b/colors/benokai.vim deleted file mode 100644 index 64954f3..0000000 --- a/colors/benokai.vim +++ /dev/null @@ -1,114 +0,0 @@ -" Vim color file -" A Modified Monokai by Ben White - -set background=dark -highlight clear - -if exists("syntax_on") - syntax reset -endif - -let g:colors_name = "Benokai" - -hi Cursor ctermfg=235 ctermbg=231 cterm=NONE guifg=#272822 guibg=#f8f8f0 gui=NONE -hi Visual ctermfg=NONE ctermbg=59 cterm=NONE guifg=NONE guibg=#49483e gui=NONE -hi CursorLine ctermfg=NONE ctermbg=237 cterm=NONE guifg=NONE guibg=#3c3d37 gui=NONE -hi CursorColumn ctermfg=NONE ctermbg=237 cterm=NONE guifg=NONE guibg=#3c3d37 gui=NONE -hi ColorColumn ctermfg=NONE ctermbg=237 cterm=NONE guifg=NONE guibg=#3c3d37 gui=NONE -hi LineNr ctermfg=102 ctermbg=237 cterm=NONE guifg=#90908a guibg=#3c3d37 gui=NONE -hi VertSplit ctermfg=241 ctermbg=241 cterm=NONE guifg=#64645e guibg=#64645e gui=NONE -hi MatchParen ctermfg=197 ctermbg=NONE cterm=underline guifg=#f92672 guibg=NONE gui=underline -hi StatusLine ctermfg=231 ctermbg=241 cterm=bold guifg=#f8f8f2 guibg=#64645e gui=bold -hi StatusLineNC ctermfg=231 ctermbg=241 cterm=NONE guifg=#f8f8f2 guibg=#64645e gui=NONE -hi Pmenu ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE -hi PmenuSel ctermfg=NONE ctermbg=59 cterm=NONE guifg=NONE guibg=#49483e gui=NONE -hi IncSearch ctermfg=235 ctermbg=186 cterm=NONE guifg=#272822 guibg=#e6db74 gui=NONE -hi Search ctermfg=NONE ctermbg=NONE cterm=underline guifg=NONE guibg=NONE gui=underline -hi Directory ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE -hi Folded ctermfg=242 ctermbg=235 cterm=NONE guifg=#75715e guibg=#272822 gui=NONE -hi TabLineFill term=bold cterm=bold ctermbg=0 -hi Normal ctermfg=231 ctermbg=234 cterm=NONE guifg=#f8f8f2 guibg=#272822 gui=NONE -hi Boolean ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE -hi Character ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE -hi Comment ctermfg=242 ctermbg=NONE cterm=NONE guifg=#75715e guibg=NONE gui=NONE -hi Conditional ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE -hi Constant ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE -hi Define ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE -hi DiffAdd ctermfg=231 ctermbg=64 cterm=bold guifg=#f8f8f2 guibg=#46830c gui=bold -hi DiffDelete ctermfg=88 ctermbg=NONE cterm=NONE guifg=#8b0807 guibg=NONE gui=NONE -hi DiffChange ctermfg=231 ctermbg=23 cterm=NONE guifg=#f8f8f2 guibg=#243955 gui=NONE -hi DiffText ctermfg=231 ctermbg=24 cterm=bold guifg=#f8f8f2 guibg=#204a87 gui=bold -hi ErrorMsg ctermfg=231 ctermbg=197 cterm=NONE guifg=#f8f8f0 guibg=#f92672 gui=NONE -hi WarningMsg ctermfg=231 ctermbg=197 cterm=NONE guifg=#f8f8f0 guibg=#f92672 gui=NONE -hi Float ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE -hi Function ctermfg=148 ctermbg=NONE cterm=NONE guifg=#a6e22e guibg=NONE gui=NONE -hi Identifier ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=italic -hi Keyword ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE -hi Label ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE -hi NonText ctermfg=238 ctermbg=NONE cterm=NONE guifg=#49483e guibg=NONE gui=NONE -hi Number ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE -hi Structure ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE -hi Operator ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE -hi PreProc ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE -hi Special ctermfg=231 ctermbg=NONE cterm=NONE guifg=#f8f8f2 guibg=NONE gui=NONE -hi SpecialKey ctermfg=236 ctermbg=None cterm=NONE guifg=#49483e guibg=#3c3d37 gui=NONE -hi Statement ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE -hi StorageClass ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=italic -hi String ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE -hi Tag ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE -hi Title ctermfg=231 ctermbg=NONE cterm=bold guifg=#f8f8f2 guibg=NONE gui=bold -hi Todo ctermfg=95 ctermbg=NONE cterm=inverse,bold guifg=#75715e guibg=NONE gui=inverse,bold -hi Type ctermfg=148 ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE -hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline guifg=NONE guibg=NONE gui=underline -hi rubyClass ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE -hi rubyFunction ctermfg=148 ctermbg=NONE cterm=NONE guifg=#a6e22e guibg=NONE gui=NONE -hi rubyInterpolationDelimiter ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE -hi rubySymbol ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE -hi rubyConstant ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=italic -hi rubyStringDelimiter ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE -hi rubyBlockParameter ctermfg=208 ctermbg=NONE cterm=NONE guifg=#fd971f guibg=NONE gui=italic -hi rubyInstanceVariable ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE -hi rubyInclude ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE -hi rubyGlobalVariable ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE -hi rubyRegexp ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE -hi rubyRegexpDelimiter ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE -hi rubyEscape ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE -hi rubyControl ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE -hi rubyClassVariable ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE -hi rubyOperator ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE -hi rubyException ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE -hi rubyPseudoVariable ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE -hi rubyRailsUserClass ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=italic -hi rubyRailsARAssociationMethod ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE -hi rubyRailsARMethod ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE -hi rubyRailsRenderMethod ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE -hi rubyRailsMethod ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE -hi erubyDelimiter ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE -hi erubyComment ctermfg=95 ctermbg=NONE cterm=NONE guifg=#75715e guibg=NONE gui=NONE -hi erubyRailsMethod ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE -hi htmlH1 ctermfg=197 ctermbg=NONE cterm=NONE guifg=#67930f guibg=NONE gui=NONE -hi htmlH2 ctermfg=148 ctermbg=NONE cterm=NONE guifg=#67930f guibg=NONE gui=NONE -hi htmlH3 ctermfg=81 ctermbg=NONE cterm=NONE guifg=#67930f guibg=NONE gui=NONE -hi htmlH4 ctermfg=81 ctermbg=NONE cterm=NONE guifg=#67930f guibg=NONE gui=NONE -hi htmlH5 ctermfg=81 ctermbg=NONE cterm=NONE guifg=#67930f guibg=NONE gui=NONE -hi htmlH6 ctermfg=81 ctermbg=NONE cterm=NONE guifg=#67930f guibg=NONE gui=NONE -hi htmlTag ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE -hi htmlEndTag ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE -hi htmlTagName ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE -hi htmlArg ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE -hi htmlSpecialChar ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE -hi javaScriptFunction ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=italic -hi javaScriptRailsFunction ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE -hi javaScriptBraces ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE -hi yamlKey ctermfg=197 ctermbg=NONE cterm=NONE guifg=#f92672 guibg=NONE gui=NONE -hi yamlAnchor ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE -hi yamlAlias ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE -hi yamlDocumentHeader ctermfg=186 ctermbg=NONE cterm=NONE guifg=#e6db74 guibg=NONE gui=NONE -hi cssURL ctermfg=208 ctermbg=NONE cterm=NONE guifg=#fd971f guibg=NONE gui=italic -hi cssFunctionName ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE -hi cssColor ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE -hi cssPseudoClassId ctermfg=148 ctermbg=NONE cterm=NONE guifg=#a6e22e guibg=NONE gui=NONE -hi cssClassName ctermfg=148 ctermbg=NONE cterm=NONE guifg=#a6e22e guibg=NONE gui=NONE -hi cssValueLength ctermfg=141 ctermbg=NONE cterm=NONE guifg=#ae81ff guibg=NONE gui=NONE -hi cssCommonAttr ctermfg=81 ctermbg=NONE cterm=NONE guifg=#66d9ef guibg=NONE gui=NONE -hi cssBraces ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE diff --git a/colors/bluedrake.vim b/colors/bluedrake.vim deleted file mode 100644 index af0a771..0000000 --- a/colors/bluedrake.vim +++ /dev/null @@ -1,246 +0,0 @@ -" bluedrake.vim -" -" Designer: Michael Malick -" Version: 0.08 - - -hi clear - -if exists("syntax_on") - syntax reset -endif - -let g:colors_name = "bluedrake" -" let g:bluedrake_256 = 1 - -if has("gui_running") - let s:base00 = "002d49" - let s:base01 = "003951" - let s:base10 = "2f5468" - let s:base11 = "b4c3cf" - let s:base20 = "577284" - let s:base21 = "8ea2b0" - let s:base30 = "dae6f0" - let s:base31 = "edf8ff" - - if &background=="dark" - let s:baseback0 = s:base00 - let s:baseback1 = s:base01 - let s:basecolor0 = s:base10 - let s:basecolor1 = s:base11 - let s:basecolor2 = s:base20 - let s:basecolor3 = s:base21 - let s:basefore0 = s:base30 - let s:basefore1 = s:base31 - endif - - if &background=="light" - let s:baseback0 = s:base31 - let s:baseback1 = s:base30 - let s:basecolor0 = s:base11 - let s:basecolor1 = s:base10 - let s:basecolor2 = s:base21 - let s:basecolor3 = s:base20 - let s:basefore0 = s:base00 - let s:basefore1 = s:base01 - endif - - " Multi-color palette (hue) - let s:blue = "0094d4" - let s:red = "d75a69" - let s:orange = "b67800" - let s:yellow = "768f00" - let s:green = "009e3c" - let s:cyan = "00a39a" - let s:purple = "976ce2" - let s:magenta = "d74bb9" - - function! X(group, fg, bg, attr) - if a:fg != "" - exec "hi " . a:group . " guifg=#" . a:fg - endif - if a:bg != "" - exec "hi " . a:group . " guibg=#" . a:bg - endif - if a:attr != "" - exec "hi " . a:group . " gui=" . a:attr - endif - endfunction -endif - - -if !has("gui_running") - if !exists("g:bluedrake_256") - let s:base00 = "0" - let s:base01 = "8" - let s:base10 = "11" - let s:base11 = "12" - let s:base20 = "9" - let s:base21 = "14" - let s:base30 = "7" - let s:base31 = "15" - let s:blue = "4" - let s:red = "1" - let s:orange = "10" - let s:yellow = "3" - let s:green = "2" - let s:cyan = "6" - let s:purple = "13" - let s:magenta = "5" - endif - - if exists("g:bluedrake_256") - let s:base00 = "235" - let s:base01 = "236" - let s:base10 = "24" - let s:base11 = "110" - let s:base20 = "242" - let s:base21 = "247" - let s:base30 = "253" - let s:base31 = "254" - let s:blue = "32" - let s:red = "167" - let s:orange = "136" - let s:yellow = "100" - let s:green = "28" - let s:cyan = "37" - let s:purple = "99" - let s:magenta = "170" - endif - - if &background=="dark" - let s:baseback0 = s:base00 - let s:baseback1 = s:base01 - let s:basecolor0 = s:base10 - let s:basecolor1 = s:base11 - let s:basecolor2 = s:base20 - let s:basecolor3 = s:base21 - let s:basefore0 = s:base30 - let s:basefore1 = s:base31 - endif - - if &background=="light" - let s:baseback0 = s:base31 - let s:baseback1 = s:base30 - let s:basecolor0 = s:base11 - let s:basecolor1 = s:base10 - let s:basecolor2 = s:base21 - let s:basecolor3 = s:base20 - let s:basefore0 = s:base00 - let s:basefore1 = s:base01 - endif - - function! X(group, fg, bg, attr) - if a:fg != "" - exec "hi " . a:group . " ctermfg=" . a:fg - endif - if a:bg != "" - exec "hi " . a:group . " ctermbg=" . a:bg - endif - if a:attr != "" - exec "hi " . a:group . " cterm=" . a:attr - endif - endfunction -endif - - -" Vim highlighting -call X("Normal", s:blue, s:baseback0, "") -call X("Cursor", s:baseback1, s:basecolor3, "") -call X("CursorLineNr", s:basecolor1, s:baseback1, "none") -call X("LineNr", s:basecolor2, s:baseback1, "") -call X("NonText", s:basecolor3, "", "none") -call X("SpecialKey", s:basecolor3, "", "") -call X("Search", s:baseback1, s:orange, "") -call X("IncSearch", s:magenta, s:baseback1, "") -call X("TabLine", s:baseback1, s:basecolor1, "none") -call X("TabLineSel", s:basecolor1, s:baseback0, "") -call X("TabLineFill", s:basecolor1, s:blue, "reverse") -call X("StatusLine", s:basecolor1, s:baseback0, "reverse") -call X("StatusLineNC", s:basecolor2, s:baseback0, "reverse") -call X("VertSplit", s:basecolor2, s:basecolor2, "none") -call X("Visual", s:baseback1, s:basecolor1, "") -call X("Directory", s:cyan, "", "") -call X("ModeMsg", s:green, "", "") -call X("MoreMsg", s:green, "", "") -call X("Question", s:green, "", "") -call X("WarningMsg", s:red, "", "") -call X("ErrorMsg", s:basefore0, s:red, "") -call X("Error", s:basefore0, s:red, "") -call X("MatchParen", s:baseback1, s:magenta, "") -call X("FoldColumn", s:basecolor0, s:baseback0, "") -call X("vimCommand", s:magenta, "", "none") -call X("DiffText", s:green, s:baseback1, "none") -call X("DiffChange", s:orange, s:baseback1, "none") -call X("DiffAdd", s:cyan, s:baseback1, "none") -call X("DiffDelete", s:red, s:baseback1, "none") -call X("WildMenu", s:basecolor1, s:baseback1, "none") -if version >= 700 - call X("CursorLine", "", s:baseback1, "none") - call X("CursorColumn", "", s:basecolor0, "none") - call X("Folded", s:basecolor3, s:baseback0, "") - " call X("Folded", s:basecolor2, s:baseback0, "") - call X("PMenu", s:baseback1, s:basecolor1, "none") - call X("PMenuSel", s:basefore0, s:basecolor0, "") - call X("PMenuThumb", s:basecolor2, s:basecolor0, "") - call X("SignColumn", s:basecolor0, s:baseback0, "") -endif -if version >= 703 - call X("ColorColumn", "", s:baseback1, "none") - call X("Conceal", s:blue, s:baseback0, "") -endif - - -" Standard highlighting -call X("Todo", s:purple, s:baseback0, "none") -call X("Title", s:red, "", "none") -call X("Identifier", s:magenta, "", "none") -call X("Statement", s:yellow, "", "none") -call X("Conditional", s:blue, "", "none") -call X("Repeat", s:magenta, "", "none") -call X("Structure", s:purple, "", "none") -call X("Function", s:cyan, "", "none") -call X("Constant", s:red, "", "none") -call X("Special", s:cyan, "", "none") -call X("PreProc", s:purple, "", "none") -call X("Operator", s:cyan, "", "none") -call X("Type", s:orange, "", "none") -call X("Define", s:purple, "", "none") -call X("Include", s:red, "", "none") -call X("Underlined", s:purple, s:baseback0, "underline") - - -" Terminal and GUI differences (no italics in mac terminal) -if has("gui_running") - call X("String", s:green, "", "italic") - call X("Comment", s:basecolor2, "", "italic") -else - call X("String", s:green, "", "") - call X("Comment", s:basecolor2, "", "") - call X("SpellBad", s:red, s:baseback0, "") -endif - - - -" Pandoc -call X("pandocYAMLHeader", s:orange, "", "") -call X("pandocAtxHeader", s:orange, "", "") -call X("pandocSetexHeader", s:orange, "", "") -call X("pandocAtxStart", s:orange, "", "") - -call X("pandocListItemBullet", s:basecolor3, "", "") -call X("pandocUListItemBullet", s:basecolor3, "", "") -call X("pandocListItemBulletId", s:basecolor3, "", "") - -call X("pandocPCite", s:purple, "", "") -call X("pandocICite", s:purple, "", "") -call X("pandocCiteAnchor", s:purple, "", "") -call X("pandocCiteKey", s:purple, "", "") -call X("pandocCiteLocator", s:cyan, "", "") - -call X("pandocDelimitedCodeBlockLanguage", s:basecolor3, "", "") -call X("pandocDelimitedCodeBlockStart", s:basecolor3, "", "") -call X("pandocDelimitedCodeBlockEnd", s:basecolor3, "", "") - -call X("pandocReferenceLabel", s:purple, "", "") " wrapped citations -call X("pandocReferenceURL", s:red, "", "") diff --git a/colors/cobalt2.vim b/colors/cobalt2.vim deleted file mode 100644 index eb5136e..0000000 --- a/colors/cobalt2.vim +++ /dev/null @@ -1,691 +0,0 @@ -" Vim color file -" Author: Gertjan Reynaert (port from theme of Wes Bos) -" Notes: Cobalt2 color scheme port for VIM - -set background=dark - -hi clear - -if exists("syntax_on") - syntax reset -endif - -let colors_name = "cobalt" - -if has("gui_running") || &t_Co == 88 || &t_Co == 256 - let s:low_color = 0 -else - let s:low_color = 1 -endif -" Color approximation functions by Henry So, Jr. and David Liang - -" returns an approximate grey index for the given grey level -fun! s:grey_number(x) - if &t_Co == 88 - if a:x < 23 - return 0 - elseif a:x < 69 - return 1 - elseif a:x < 103 - return 2 - elseif a:x < 127 - return 3 - elseif a:x < 150 - return 4 - elseif a:x < 173 - return 5 - elseif a:x < 196 - return 6 - elseif a:x < 219 - return 7 - elseif a:x < 243 - return 8 - else - return 9 - endif - else - if a:x < 14 - return 0 - else - let l:n = (a:x - 8) / 10 - let l:m = (a:x - 8) % 10 - if l:m < 5 - return l:n - else - return l:n + 1 - endif - endif - endif -endfun - -" returns the actual grey level represented by the grey index -fun! s:grey_level(n) - if &t_Co == 88 - if a:n == 0 - return 0 - elseif a:n == 1 - return 46 - elseif a:n == 2 - return 92 - elseif a:n == 3 - return 115 - elseif a:n == 4 - return 139 - elseif a:n == 5 - return 162 - elseif a:n == 6 - return 185 - elseif a:n == 7 - return 208 - elseif a:n == 8 - return 231 - else - return 255 - endif - else - if a:n == 0 - return 0 - else - return 8 + (a:n * 10) - endif - endif -endfun - -" returns the palette index for the given grey index -fun! s:grey_color(n) - if &t_Co == 88 - if a:n == 0 - return 16 - elseif a:n == 9 - return 79 - else - return 79 + a:n - endif - else - if a:n == 0 - return 16 - elseif a:n == 25 - return 231 - else - return 231 + a:n - endif - endif -endfun - -" returns an approximate color index for the given color level -fun! s:rgb_number(x) - if &t_Co == 88 - if a:x < 69 - return 0 - elseif a:x < 172 - return 1 - elseif a:x < 230 - return 2 - else - return 3 - endif - else - if a:x < 75 - return 0 - else - let l:n = (a:x - 55) / 40 - let l:m = (a:x - 55) % 40 - if l:m < 20 - return l:n - else - return l:n + 1 - endif - endif - endif -endfun - -" returns the actual color level for the given color index -fun! s:rgb_level(n) - if &t_Co == 88 - if a:n == 0 - return 0 - elseif a:n == 1 - return 139 - elseif a:n == 2 - return 205 - else - return 255 - endif - else - if a:n == 0 - return 0 - else - return 55 + (a:n * 40) - endif - endif -endfun - -" returns the palette index for the given R/G/B color indices -fun! s:rgb_color(x, y, z) - if &t_Co == 88 - return 16 + (a:x * 16) + (a:y * 4) + a:z - else - return 16 + (a:x * 36) + (a:y * 6) + a:z - endif -endfun - -" returns the palette index to approximate the given R/G/B color levels -fun! s:color(r, g, b) - " get the closest grey - let l:gx = s:grey_number(a:r) - let l:gy = s:grey_number(a:g) - let l:gz = s:grey_number(a:b) - - " get the closest color - let l:x = s:rgb_number(a:r) - let l:y = s:rgb_number(a:g) - let l:z = s:rgb_number(a:b) - - if l:gx == l:gy && l:gy == l:gz - " there are two possibilities - let l:dgr = s:grey_level(l:gx) - a:r - let l:dgg = s:grey_level(l:gy) - a:g - let l:dgb = s:grey_level(l:gz) - a:b - let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb) - let l:dr = s:rgb_level(l:gx) - a:r - let l:dg = s:rgb_level(l:gy) - a:g - let l:db = s:rgb_level(l:gz) - a:b - let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db) - if l:dgrey < l:drgb - " use the grey - return s:grey_color(l:gx) - else - " use the color - return s:rgb_color(l:x, l:y, l:z) - endif - else - " only one possibility - return s:rgb_color(l:x, l:y, l:z) - endif -endfun - -" returns the palette index to approximate the 'rrggbb' hex string -fun! s:rgb(rgb) - let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0 - let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0 - let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0 - return s:color(l:r, l:g, l:b) -endfun - -" sets the highlighting for the given group -fun! s:X(group, fg, bg, attr, lcfg, lcbg) - if s:low_color - let l:fge = empty(a:lcfg) - let l:bge = empty(a:lcbg) - - if !l:fge && !l:bge - exec "hi ".a:group." ctermfg=".a:lcfg." ctermbg=".a:lcbg - elseif !l:fge && l:bge - exec "hi ".a:group." ctermfg=".a:lcfg." ctermbg=NONE" - elseif l:fge && !l:bge - exec "hi ".a:group." ctermfg=NONE ctermbg=".a:lcbg - endif - else - let l:fge = empty(a:fg) - let l:bge = empty(a:bg) - - if !l:fge && !l:bge - exec "hi ".a:group." guifg=#".a:fg." guibg=#".a:bg." ctermfg=".s:rgb(a:fg)." ctermbg=".s:rgb(a:bg) - elseif !l:fge && l:bge - exec "hi ".a:group." guifg=#".a:fg." guibg=NONE ctermfg=".s:rgb(a:fg)." ctermbg=NONE" - elseif l:fge && !l:bge - exec "hi ".a:group." guifg=NONE guibg=#".a:bg." ctermfg=NONE ctermbg=".s:rgb(a:bg) - endif - endif - - if a:attr == "" - exec "hi ".a:group." gui=none cterm=none" - else - let l:noitalic = join(filter(split(a:attr, ","), "v:val !=? 'italic'"), ",") - if empty(l:noitalic) - let l:noitalic = "none" - endif - exec "hi ".a:group." gui=".a:attr." cterm=".l:noitalic - endif -endfun - -if !exists("g:cobalt_bg") - let g:cobalt_bg = "193549" -end - -let g:black = "000000" " #000000 -let g:light_grey = "CCCCCC" " #CCCCCC -let g:white = "FFFFFF" " #FFFFFF -let g:dark_orange = "FF9A00" " #FF9A00 -let g:light_orange = "FF9D00" " #FF9D00 -let g:yellow = "FFC600" " #FFC600 -let g:light_yellow = "F2ED7F" " #F2ED7F -let g:green = "3AD900" " #3AD900 -let g:light_green = "88FF88" " #88FF88 -let g:purple = "967EFB" " #967EFB -let g:darkest_blue = "0050A4" " #0050A4 -let g:dark_blue = "0088FF" " #0088FF -let g:blue = "00AAFF" " #00AAFF -let g:light_blue = "80FCFF" " #80FCFF -let g:dark_red = "902020" " #902020 -let g:red = "FF0000" " #FF0000 -let g:dark_pink = "FF628C" " #FF628C -let g:pink = "FF00FF" " #FF00FF -let g:light_pink = "EE80E1" " #EE80E1 -let g:lightest_pink = "FFA5F3" " #FFA5F3 -let g:dirty_pink = "EB939A" " #EB939A - -" regex -let g:regex_or = "22FF00" " #22FF00 -let g:regex_group = "22FF00" " #22FF00 -let g:regex_quantifier = "55FF66" " #55FF66 -let g:regex_boundary = "88FF88" " #88FF88 -let g:regex_char_group = "9DFF99" " #9DFF99 -let g:regex_string = "BBFFDD" " #BBFFDD - -call s:X("Normal",g:white,g:cobalt_bg,"","White","") -set background=dark - -let s:termBlack = "Black" - -call s:X("MatchParen",g:white,"556779","bold","","DarkCyan") - -" vim tabpane headers -call s:X("TabLine",g:black,"b0b8c0","italic","",s:termBlack) -call s:X("TabLineFill","9098a0","","","",s:termBlack) -call s:X("TabLineSel",g:black,g:yellow,"italic,bold",s:termBlack,"White") - -" Auto-completion -call s:X("Pmenu",g:white,"606060","","White",s:termBlack) -call s:X("PmenuSel","101010","eeeeee","",s:termBlack,"White") - -call s:X("Visual","",g:darkest_blue,"","",s:termBlack) - -call s:X("Cursor",g:cobalt_bg,g:yellow,"","","") -call s:X("CursorColumn","",g:yellow,"","",s:termBlack) -call s:X("CursorLine","",g:yellow,"","",s:termBlack) -call s:X("CursorLineNr",g:light_blue,"","none","White","") - -call s:X("LineNr","605958",g:cobalt_bg,"none",s:termBlack,"") -call s:X("Comment",g:dark_blue,"","italic","Grey","") -call s:X("Todo",g:dark_blue,"","bold","Grey", "") - -call s:X("StatusLine",g:black,"dddddd","italic","","White") -call s:X("StatusLineNC",g:white,"403c41","italic","White","Black") -call s:X("VertSplit",g:yellow,"","","","") -call s:X("WildMenu","f0a0c0","302028","","Magenta","") - -call s:X("Folded","a0a8b0","384048","italic",s:termBlack,"") -call s:X("FoldColumn","535D66","1f1f1f","","",s:termBlack) -call s:X("SignColumn","777777","333333","","",s:termBlack) -call s:X("ColorColumn","",g:black,"","",s:termBlack) - -call s:X("Title","70b950","","bold","Green","") - -call s:X("Constant",g:dark_pink,"","","Red","") -call s:X("Special",g:light_green,"","","Green","") -call s:X("Delimiter","668799","","","Grey","") - -call s:X("String",g:green,"","","Green","") -call s:X("StringDelimiter",g:green,"","","Green","") - -call s:X("Identifier",g:dark_orange,"","",g:dark_orange,"") -hi! link Structure Comment -" call s:X("Structure","#8fbfdc","","","LightCyan","") -call s:X("Function",g:yellow,"","","","") -call s:X("Statement",g:dark_orange,"","","","") -hi! link PreProc Identifier - -hi! link Operator Structure - -call s:X("Type",g:yellow,"","","Yellow","") -call s:X("NonText","606060",g:cobalt_bg,"",s:termBlack,"") - -call s:X("SpecialKey","444444","1c1c1c","",s:termBlack,"") - -call s:X("Search",g:yellow,"302028","underline","Magenta","") - -call s:X("Directory",g:yellow,"","","Yellow","") -call s:X("ErrorMsg","",g:dark_red,"","","DarkRed") -hi! link Error ErrorMsg -hi! link MoreMsg Special -call s:X("Question","65C254","","","Green","") - -" Spell Checking - -call s:X("SpellBad",g:dark_red,"","underline","","DarkRed") -call s:X("SpellCap","","0000df","underline","","Blue") -call s:X("SpellRare","","540063","underline","","DarkMagenta") -call s:X("SpellLocal","","2D7067","underline","","Green") - -" Diff - -hi! link diffRemoved Constant -hi! link diffAdded String - -" VimDiff - -call s:X("DiffAdd","D2EBBE","437019","","White","DarkGreen") -call s:X("DiffDelete","40000A","700009","","DarkRed","DarkRed") -call s:X("DiffChange","","2B5B77","","White","DarkBlue") -call s:X("DiffText","8fbfdc",g:black,"reverse","Yellow","") - -" PHP - -hi! link phpFunctions Function -call s:X("StorageClass","c59f6f","","","Red","") -hi! link phpSuperglobal Identifier -hi! link phpQuoteSingle StringDelimiter -hi! link phpQuoteDouble StringDelimiter -hi! link phpBoolean Constant -hi! link phpNull Constant -hi! link phpArrayPair Operator -hi! link phpOperator Normal -hi! link phpRelation Normal -hi! link phpVarSelector Identifier - -" Python - -hi! link pythonOperator Statement - -" Ruby - -call s:X("rubyClass",g:dark_orange,"","","DarkBlue","") -hi! link rubyModule rubyClass - -call s:X("rubyInstanceVariable",g:light_grey,"","","Cyan","") -call s:X("rubySymbol",g:dark_pink,"","","Magenta","") -hi! link rubyGlobalVariable rubyInstanceVariable - -call s:X("rubyAccess",g:purple,"","","","") - -" params between pipes after do, and pipes themselfs -call s:X("rubyBlockParameter",g:light_grey,"","","Blue","") -call s:X("rubyBlockParameterList",g:white,"","","Blue","") - -call s:X("rubyInterpolation","9EFF80","","","Magenta","") -call s:X("rubyInterpolationDelimiter",g:white,"","","Magenta","") - -call s:X("rubyRegexpDelimiter","80FFC2","","","","") -call s:X("rubyRegexp","80FFC2","","","","") -call s:X("rubyRegexpSpecial",g:white,"","","","") -call s:X("rubyRegexpEscape","80FFC2","","","","") - -" JavaScript - -hi! link javaScriptValue Constant -hi! link javaScriptRegexpString rubyRegexp - -call s:X("jsFunction",g:light_pink,"","","","") -call s:X("jsFuncCall",g:yellow,"","","","") -call s:X("jsOperator",g:light_orange,"","","","") -call s:X("jsStorageClass",g:yellow,"","","","") -call s:X("jsFuncArgs",g:light_grey,"","","","") - -call s:X("jsBuiltins",g:light_orange,"","","","") -call s:X("jsUndefined",g:dark_pink,"","","","") -call s:X("jsThis",g:light_pink,"","","","") -call s:X("jsPrototype","EB939A","","","","") - -call s:X("jsRegexpOr","22FF00","","","","") " #22FF00 | highlight -call s:X("jsRegexpQuantifier","55FF66","","","","") " #55FF66 ? and {4} -call s:X("jsRegexpGroup","22FF00","","","","") " #22FF00 ( and ) -call s:X("jsRegexpBoundary","88FF88","","","","") " #88FF88 start and end of regex -call s:X("jsRegexpCharClass","9DFF99","","","","") " #9DFF99 [A-z] -call s:X("jsRegexpString","BBFFDD","","","","") " #BBFFDD regular text -call s:X("jsRegexpMod",g:pink,"","","","") -call s:X("jsRegexpBackRef",g:light_orange,"","","","") - -" CoffeeScript - -hi! link coffeeComment comment -hi! link coffeeBlockComment comment -hi! link coffeeTodo todo -hi! link coffeeHeregexComment comment -call s:X("coffeeKeyword",g:dark_orange,"","","","") -call s:X("coffeeObject",g:blue,"","","","") -call s:X("coffeeObjAssign",g:yellow,"","","","") -call s:X("coffeeExtendedOp",g:dark_orange,"","","","") -call s:X("coffeeParen",g:light_grey,"","","","") -call s:X("coffeeParens",g:light_grey,"","","","") -call s:X("coffeeSpecialOp",g:light_grey,"","","","") -call s:X("coffeeStatement",g:dark_orange,"","","","") -hi! link coffeeString String -hi! link coffeeHeredoc String -call s:X("coffeeInterpDelim",g:white,"","","","") -call s:X("coffeeInterp","9EFF80","","","","") " #9EFF80 -call s:X("coffeeRegex","80FFC2","","","","") " #80FFC2 -call s:X("coffeeEscape","98F99D","","","","") " #98F99D -call s:X("coffeeRegexCharSet","22FF00","","","","") " #22FF00 -call s:X("coffeeHeregex","80FFC2","","","","") " #80FFC2 -call s:X("coffeeHeregexCharSet","22FF00","","","","") " #22FF00 -call s:X("coffeeSpecialIdent",g:light_grey,"","","","") -call s:X("coffeeBracket",g:white,"","","","") -call s:X("coffeeBrackets",g:white,"","","","") -call s:X("coffeeNumber",g:dark_pink,"","","","") -call s:X("coffeeFloat",g:dark_pink,"","","","") -call s:X("coffeeCurly",g:white,"","","","") -call s:X("coffeeCurlies",g:white,"","","","") -call s:X("coffeeConditional",g:dark_orange,"","","","") -call s:X("coffeeBoolean",g:dark_pink,"","","","") -call s:X("coffeeSpecialVar",g:light_pink,"","","","") -call s:X("coffeeDotAccess",g:white,"","","","") -call s:X("coffeeConstant",g:dark_pink,"","","","") -call s:X("coffeeRepeat",g:dark_orange,"","","","") -call s:X("coffeeGlobal",g:dark_pink,"","","","") -call s:X("coffeeOperator",g:dark_orange,"","","","") -hi! link coffeeSemicolonError ErrorMsg -hi! link coffeeReservedError ErrorMsg -hi! link coffeeSpaceError ErrorMsg - -" HTML -call s:X("htmlTag",g:light_grey,"","","","") -call s:X("htmlEndTag",g:light_grey,"","","","") -call s:X("htmlTagName",g:light_blue,"","","","") -call s:X("htmlSpecialTagName",g:blue,"","","","") - - -call s:X("htmlArg",g:dark_orange,"","","","") -call s:X("htmlEvent",g:dark_orange,"","","","") -call s:X("htmlString",g:yellow,"","","","") - -call s:X("htmlTitle",g:purple,"","","","") -call s:X("htmlH1",g:light_orange,"","","","") -call s:X("htmlItalic",g:pink,"","","","") - -" Haml -hi! link hamlTag htmlTag -hi! link hamlIdChar hamlId -hi! link hamlClassChar hamlClass -call s:X("hamlAttributes",g:pink,"","","","") -call s:X("hamlInterpolationDelimiter",g:green,"","","","") - -" call s:X("hamlInterpolation",g:pink,"","","","") -" call s:X("hamlObject",g:pink,"","","","") -" call s:X("hamlInterpolatable",g:pink,"","","","") -" call s:X("hamlRubyFilter",g:pink,"","","","") -" call s:X("hamlBegin",g:pink,"","","","") -" call s:X("hamlEscapedFilter",g:pink,"","","","") - -" call s:X("hamlPlainFilter",g:pink,"","","","") -" call s:X("hamlSassFilter",g:pink,"","","","") -" call s:X("hamlErbFilter",g:pink,"","","","") -" call s:X("hamlJavascriptFilter",g:pink,"","","","") -" call s:X("hamlCSSFilter",g:pink,"","","","") -" call s:X("hamlJavascriptBlock",g:pink,"","","","") -" call s:X("hamlCssBlock",g:pink,"","","","") -" call s:X("hamlCoffeescriptFilter",g:pink,"","","","") - -" Markdown -call s:X("markdownH1",g:yellow,"","","","") -hi! link markdownH2 markdownH1 -hi! link markdownH3 markdownH1 -hi! link markdownH4 markdownH1 -hi! link markdownH5 markdownH1 -hi! link markdownH6 markdownH1 -call s:X("markdownHeadingRule",g:dark_orange,"","","","") -hi! link markdownHeadingDelimiter markdownHeadingRule - -call s:X("markdownRule",g:light_blue,"","","","") - -call s:X("markdownCode","AAAAAA","","","","") -hi! link markdownCodeBlock markdownCode -call s:X("markdownCodeDelimiter",g:dark_blue,"","","","") - -call s:X("markdownLinkText",g:green,"","","","") -call s:X("markdownUrl",g:dark_pink,"","","","") - -call s:X("markdownId",g:yellow,"","","","") -hi! link markdownIdDeclaration markdownId - -" CSS -call s:X("cssIdentifier",g:yellow,"","","","") -call s:X("cssIncludeKeyword",g:dark_orange,"","","","") -call s:X("cssMediaType",g:dirty_pink,"","","","") -call s:X("cssMediaKeyword",g:dark_orange,"","","","") -call s:X("cssInclude",g:white,"","","","") -call s:X("cssMediaProp",g:light_green,"","","","") -call s:X("cssValueLength",g:light_yellow,"","","","") -call s:X("cssUnitDecorators",g:dark_orange,"","","","") -call s:X("cssBraces",g:white,"","","","") -call s:X("cssTagName",g:light_blue,"","","","") -call s:X("cssClassName",g:green,"","","","") -call s:X("cssPseudoClassFn",g:dark_pink,"","","","") - -call s:X("cssBoxAttr",g:light_yellow,"","","","") -hi! link cssValueNumber cssBoxAttr -hi! link cssCommonAttr cssBoxAttr -hi! link cssPositioningAttr cssBoxAttr -hi! link cssFontAttr cssBoxAttr -hi! link cssBorderAttr cssBoxAttr -hi! link cssTextAttr cssBoxAttr -hi! link cssDimensionAttr cssBoxAttr -hi! link cssBackgroundAttr cssBoxAttr -hi! link cssPageAttr cssBoxAttr -hi! link cssColorAttr cssBoxAttr -hi! link cssTransitionAttr cssBoxAttr -hi! link cssUIAttr cssBoxAttr - -call s:X("cssBoxProp",g:light_green,"","","","") -hi! link cssTextProp cssBoxProp -hi! link cssDimensionProp cssBoxProp -hi! link cssFontProp cssBoxProp -hi! link cssPositioningProp cssBoxProp -hi! link cssBackgroundProp cssBoxProp -hi! link cssBorderProp cssBoxProp -hi! link cssPageProp cssBoxProp -hi! link cssColorProp cssBoxProp -hi! link cssTransitionProp cssBoxProp -hi! link cssUIProp cssBoxProp - -" SCSS/SASS -hi! link sassIdChar cssIdentifier -hi! link sassId cssIdentifier -hi! link sassClass cssClassName -hi! link sassCssAttribute cssBoxAttr - -" JSON -call s:X("jsonBraces",g:purple,"","","","") -call s:X("jsonQuote",g:dark_blue,"","","","") -call s:X("jsonNoise",g:dark_blue,"","","","") -call s:X("jsonKeywordMatch",g:dark_blue,"","","","") - -" Erlang - -hi! link erlangAtom rubySymbol -hi! link erlangBIF rubyPredefinedIdentifier -hi! link erlangFunction rubyPredefinedIdentifier -hi! link erlangDirective Statement -hi! link erlangNode Identifier - -" Lua - -hi! link luaOperator Conditional - -" C - -hi! link cFormat Identifier -hi! link cOperator Constant - -" Objective-C/Cocoa - -hi! link objcClass Type -hi! link cocoaClass objcClass -hi! link objcSubclass objcClass -hi! link objcSuperclass objcClass -hi! link objcDirective rubyClass -hi! link objcStatement Constant -hi! link cocoaFunction Function -hi! link objcMethodName Identifier -hi! link objcMethodArg Normal -hi! link objcMessageName Identifier - -" Vimscript - -hi! link vimOper Normal - -" Debugger.vim - -call s:X("DbgCurrent","DEEBFE","345FA8","","White","DarkBlue") -call s:X("DbgBreakPt","","4F0037","","","DarkMagenta") - -" vim-indent-guides - -if !exists("g:indent_guides_auto_colors") - let g:indent_guides_auto_colors = 0 -endif -call s:X("IndentGuidesOdd","","232323","","","") -call s:X("IndentGuidesEven","","1b1b1b","","","") - -" Plugins, etc. - -hi! link TagListFileName Directory -call s:X("PreciseJumpTarget","B9ED67","405026","","White","Green") - -" NERDTree - -call s:X("NERDTreeHelp","345FA8","","","","") -call s:X("NERDTreeUp","345FA8","","","","") - -call s:X("NERDTreeOpenable",g:yellow,"","","","") -call s:X("NERDTreeClosable",g:red,"","","","") -call s:X("NERDTreeDir",g:yellow,"","","","") -hi! link NERDTreeDirSlash Ignore - -call s:X("NERDTreeExecFile",g:purple,"","","","") - -" Grep search -call s:X("qfLineNr",g:dark_blue,"","","","") - -if !exists("g:cobalt_bg_256") - let g:cobalt_bg_256="NONE" -end - -" Manual overrides for 256-color terminals. Dark colors auto-map badly. -if !s:low_color - hi StatusLineNC ctermbg=232 - hi Folded ctermbg=236 - hi FoldColumn ctermbg=234 - hi SignColumn ctermbg=236 - hi CursorColumn ctermbg=234 - hi CursorLine ctermbg=235 - hi SpecialKey ctermbg=234 - exec "hi NonText ctermbg=".g:cobalt_bg_256 - exec "hi LineNr ctermbg=".g:cobalt_bg_256 - hi DiffText ctermfg=81 - exec "hi Normal ctermbg=".g:cobalt_bg_256 - hi DbgBreakPt ctermbg=53 - hi IndentGuidesOdd ctermbg=235 - hi IndentGuidesEven ctermbg=234 -endif - -" delete functions -delf s:X -delf s:rgb -delf s:color -delf s:rgb_color -delf s:rgb_level -delf s:rgb_number -delf s:grey_color -delf s:grey_level -delf s:grey_number diff --git a/colors/colorful256.vim b/colors/colorful256.vim deleted file mode 100644 index 86fa476..0000000 --- a/colors/colorful256.vim +++ /dev/null @@ -1,88 +0,0 @@ -" Vim color file: colorful256.vim -" Last Change: 03 Oct, 2007 -" License: public domain -" Maintainer:: Jagpreet -" -" for a 256 color capable terminal -" "{{{ -" You must set t_Co=256 before calling this colorscheme -" -" Color numbers (0-255) see: -" http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html -" -" Added gui colors -" - -if &t_Co != 256 && ! has("gui_running") - echomsg "" - echomsg "colors not loaded first please set t_Co=256 in your .vimrc" - echomsg "" - finish -endif - -set background=dark -hi clear -if exists("syntax_on") - syntax reset -endif - -let g:colors_name = "colorful256" - - highlight Normal cterm=none ctermfg=249 ctermbg=16 gui=none guifg=#b2b2b2 guibg=#000000 - highlight Special cterm=none ctermfg=105 ctermbg=16 gui=none guifg=#8787ff guibg=#000000 - highlight Comment cterm=none ctermfg=3 ctermbg=16 gui=none guifg=#808000 guibg=#000000 - highlight Constant cterm=none ctermfg=9 ctermbg=16 gui=none guifg=#ff0000 guibg=#000000 - highlight LineNr cterm=none ctermfg=48 ctermbg=16 gui=none guifg=#00ff87 guibg=#000000 - highlight Number cterm=none ctermfg=209 ctermbg=16 gui=none guifg=#ff875f guibg=#000000 - highlight PreProc cterm=none ctermfg=10 ctermbg=16 gui=none guifg=#ff00ff guibg=#000000 - highlight Statement cterm=none ctermfg=51 ctermbg=16 gui=none guifg=#00ffff guibg=#000000 - highlight Type cterm=none ctermfg=39 ctermbg=16 gui=none guifg=#00afff guibg=#000000 - highlight Error cterm=none ctermfg=9 ctermbg=16 gui=none guifg=#ff0000 guibg=#000000 - highlight Identifier cterm=none ctermfg=207 ctermbg=16 gui=none guifg=#ff5fff guibg=#000000 - highlight SpecialKey cterm=none ctermfg=36 ctermbg=16 gui=none guifg=#00af87 guibg=#000000 - highlight NonText cterm=none ctermfg=164 ctermbg=16 gui=none guifg=#df00df guibg=#000000 - highlight Directory cterm=none ctermfg=34 ctermbg=16 gui=none guifg=#00af00 guibg=#000000 - highlight ErrorMsg cterm=none ctermfg=9 ctermbg=16 gui=none guifg=#ff0000 guibg=#000000 - highlight MoreMsg cterm=none ctermfg=34 ctermbg=16 gui=none guifg=#00af00 guibg=#000000 - highlight Title cterm=none ctermfg=199 ctermbg=16 gui=none guifg=#ff00af guibg=#000000 - highlight WarningMsg cterm=none ctermfg=9 ctermbg=16 gui=none guifg=#ff0000 guibg=#000000 - highlight DiffDelete cterm=none ctermfg=207 ctermbg=16 gui=none guifg=#ff5fff guibg=#000000 - highlight Search cterm=none ctermfg=15 ctermbg=160 gui=none guifg=#ffffff guibg=#df0000 - highlight Visual cterm=none ctermfg=16 ctermbg=50 gui=none guifg=#000000 guibg=#00ffdf - highlight Cursor cterm=none ctermfg=16 ctermbg=33 gui=none guifg=#000000 guibg=#0087ff - highlight StatusLine cterm=reverse ctermfg=58 ctermbg=15 gui=reverse guifg=#5f5f00 guibg=#ffffff - highlight Question cterm=none ctermfg=16 ctermbg=226 gui=none guifg=#000000 guibg=#ffff00 - highlight Todo cterm=none ctermfg=160 ctermbg=184 gui=none guifg=#df0000 guibg=#dfdf00 - highlight Folded cterm=none ctermfg=15 ctermbg=58 gui=none guifg=#ffffff guibg=#5f5f00 - highlight ModeMsg cterm=none ctermfg=16 ctermbg=46 gui=none guifg=#000000 guibg=#00ff00 - highlight VisualNOS cterm=none ctermfg=16 ctermbg=28 gui=none guifg=#000000 guibg=#008700 - highlight WildMenu cterm=none ctermfg=16 ctermbg=226 gui=none guifg=#000000 guibg=#ffff00 - highlight FoldColumn cterm=none ctermfg=15 ctermbg=58 gui=none guifg=#ffffff guibg=#5f5f00 - highlight SignColumn cterm=none ctermfg=16 ctermbg=28 gui=none guifg=#000000 guibg=#008700 - highlight DiffText cterm=none ctermfg=16 ctermbg=34 gui=none guifg=#000000 guibg=#00af00 - highlight StatusLineNC cterm=reverse ctermfg=131 ctermbg=15 gui=reverse guifg=#af5f5f guibg=#ffffff - highlight VertSplit cterm=reverse ctermfg=172 ctermbg=15 gui=reverse guifg=#df8700 guibg=#ffffff - highlight User1 cterm=none ctermbg=20 ctermfg=15 gui=none guibg=#0000df guifg=#ffffff - highlight User2 cterm=none ctermbg=20 ctermfg=46 gui=none guibg=#0000df guifg=#00ff00 - highlight User3 cterm=none ctermbg=20 ctermfg=46 gui=none guibg=#0000df guifg=#00ff00 - highlight User4 cterm=none ctermbg=20 ctermfg=50 gui=none guibg=#0000df guifg=#00ffdf - highlight User5 cterm=none ctermbg=20 ctermfg=46 gui=none guibg=#0000df guifg=#00ff00 - -" for groups introduced in version 7 -if v:version >= 700 - highlight Pmenu cterm=none ctermfg=16 ctermbg=165 gui=none guifg=#000000 guibg=#df00ff - highlight PmenuSel cterm=none ctermfg=16 ctermbg=220 gui=none guifg=#000000 guibg=#ffdf00 - highlight tablinesel cterm=none ctermfg=15 ctermbg=58 gui=none guifg=#ffffff guibg=#5f5f00 - highlight tabline cterm=none ctermfg=7 ctermbg=58 gui=none guifg=#c0c0c0 guibg=#5f5f00 - highlight tablinefill cterm=none ctermfg=58 ctermbg=58 gui=none guifg=#5f5f00 guibg=#5f5f00 -endif - -"for taglist plugin -" -if exists('loaded_taglist') - highlight TagListTagName cterm=none ctermfg=16 ctermbg=28 gui=none guifg=#000000 guibg=#008700 - highlight TagListTagScope cterm=none ctermfg=16 ctermbg=28 gui=none guifg=#000000 guibg=#008700 - highlight TagListTitle cterm=none ctermfg=199 ctermbg=16 gui=none guifg=#ff00af guibg=#000000 - highlight TagListComment cterm=none ctermfg=16 ctermbg=28 gui=none guifg=#000000 guibg=#008700 - highlight TagListFileName cterm=none ctermfg=15 ctermbg=90 gui=none guifg=#ffffff guibg=#870087 -endif diff --git a/colors/ecostation.vim b/colors/ecostation.vim deleted file mode 100644 index 20614e5..0000000 --- a/colors/ecostation.vim +++ /dev/null @@ -1,65 +0,0 @@ -" Vim color file -" Maintainer: Yulya Shtyryakova -" Last Change: 2013 Jule 4 - -" ecostation -- for those who prefer dark background and smooth natural colors. -" Note: I use it on 16 color terminals too. Not so fine, but affordable. - -set bg=dark -hi clear -if exists("syntax_on") - syntax reset -endif - -let colors_name = "ecostation" - -hi Normal guifg=#ACB3C4 guibg=#222430 ctermfg=gray ctermbg=black -hi ErrorMsg guifg=#000000 guibg=#FF6633 ctermfg=yellow ctermbg=darkred -hi WarningMsg guifg=#000000 guibg=Orange ctermbg=darkyellow ctermfg=black -hi ModeMsg guifg=#000000 guibg=#009900 ctermfg=black ctermbg=darkgreen -hi MoreMsg guifg=#000000 guibg=#AA53D5 gui=none ctermbg=darkgreen ctermfg=bg -hi Question guifg=Orange gui=none ctermfg=green term=none -hi SpecialKey gui=bold guifg=#996699 ctermfg=red -hi Directory guifg=#99CC33 ctermfg=cyan -hi WildMenu guifg=#0099CC guibg=black ctermfg=cyan ctermbg=black cterm=none term=none - -hi Cursor guifg=#000000 guibg=#FF8B64 ctermfg=bg ctermbg=brown -hi lCursor guifg=NONE guibg=#00AA00 ctermfg=bg ctermbg=darkgreen -hi Visual guifg=#9c6666 guibg=#433c49 ctermfg=darkgray ctermbg=gray cterm=bold term=underline - -hi VisualNOS guifg=#8080ff guibg=fg gui=reverse,underline ctermfg=lightblue ctermbg=fg cterm=reverse,underline -hi Search guifg=#DDDBCF guibg=#7C7B9D ctermfg=darkgray ctermbg=gray cterm=bold term=underline -hi IncSearch guifg=#CC6666 guibg=black ctermfg=darkblue ctermbg=white - -hi NonText guifg=#996699 ctermfg=darkGray -hi StatusLine guifg=#ACB3C4 guibg=#35394D gui=none ctermfg=gray ctermbg=darkblue term=none cterm=none -hi StatusLineNC guifg=#000000 guibg=#494D5B gui=none ctermfg=black ctermbg=gray term=none cterm=none -hi VertSplit guifg=black guibg=#494D5B gui=none ctermfg=black ctermbg=gray term=none cterm=none - -hi LineNr guifg=#4093cc ctermfg=cyan cterm=none -hi Folded guifg=#996699 guibg=#222430 ctermfg=darkred ctermbg=black cterm=bold term=bold -hi FoldColumn guifg=#3E6FFF guibg=#222430 ctermfg=darkgrey ctermbg=black cterm=bold term=bold - -hi DiffDelete guifg=#0099CC guibg=#222430 ctermbg=black ctermfg=darkgray term=none -hi DiffChange guibg=#694E60 guifg=#EDA383 ctermbg=magenta cterm=none -hi DiffAdd guibg=#4F7043 guifg=#99CC33 ctermfg=blue ctermbg=cyan -hi DiffText guibg=#FF0000 guifg=white gui=none cterm=bold ctermbg=red - -hi Title guifg=#CC02B8 gui=none ctermfg=magenta cterm=bold term=bold -hi PreProc guifg=#AA53D5 gui=none ctermfg=magenta cterm=none -hi Comment guifg=#7C7B9D ctermfg=blue term=italic -hi Constant guifg=#CC6666 ctermfg=magenta cterm=none -hi Identifier guifg=#99CC33 ctermfg=green -hi Statement guifg=#009900 gui=none ctermfg=green cterm=none term=bold -hi Type guifg=#C99669 gui=none ctermfg=Brown cterm=none -hi Special guifg=#FFCC66 gui=none ctermfg=brown cterm=none term=italic -hi Error guibg=#ff0000 guifg=#000000 ctermfg=yellow ctermbg=DarkRed term=reverse,underline - -hi Todo guifg=black guibg=#993399 ctermfg=red ctermbg=darkmagenta -hi Underlined cterm=underline term=underline -hi Ignore guifg=bg ctermfg=bg - -hi Pmenu guifg=#EDA383 guibg=#694E60 ctermfg=darkgray ctermbg=gray cterm=none term=underline -hi PmenuSel guifg=#000000 guibg=#9c6666 ctermfg=gray ctermbg=darkgray cterm=bold term=reverse,underline -hi PmenuSbar guifg=#433c49 guibg=#433c49 -hi PmenuThumb guifg=#666666 guibg=#666666 diff --git a/colors/flattened_dark.vim b/colors/flattened_dark.vim deleted file mode 100644 index c93d496..0000000 --- a/colors/flattened_dark.vim +++ /dev/null @@ -1,524 +0,0 @@ -" 'flattened_dark.vim' -- Vim color scheme. -" Maintainer: Romain Lafourcade (romainlafourcade@gmail.com) -" A no-bullshit dark Solarized. - -hi clear - -if exists('syntax_on') - syntax reset - -endif - -let colors_name = 'flattened_dark' - -if &t_Co >= 256 || has('gui_running') - hi Normal cterm=NONE ctermfg=244 ctermbg=234 guifg=#839496 guibg=#002b36 - - set background=dark - - hi ColorColumn cterm=NONE ctermbg=235 guibg=#073642 - hi Comment cterm=NONE ctermfg=239 guifg=#586e75 gui=italic - hi ConId cterm=NONE ctermfg=136 guifg=#b58900 - hi Conceal cterm=NONE ctermfg=33 guifg=#268bd2 - hi Constant cterm=NONE ctermfg=37 guifg=#2aa198 - hi Cursor cterm=NONE ctermfg=234 ctermbg=244 guifg=#002b36 guibg=#839496 - hi CursorColumn cterm=NONE ctermbg=235 guibg=#073642 - hi CursorLine cterm=NONE ctermbg=235 guibg=#073642 guisp=#93a1a1 - hi CursorLineNr term=bold cterm=bold ctermfg=11 guifg=Yellow gui=bold - hi DiffAdd cterm=NONE ctermfg=64 ctermbg=235 guifg=#719e07 guibg=#073642 guisp=#719e07 gui=bold - hi DiffChange cterm=NONE ctermfg=136 ctermbg=235 guifg=#b58900 guibg=#073642 guisp=#b58900 gui=bold - hi DiffDelete cterm=NONE ctermfg=124 ctermbg=235 guifg=#dc322f guibg=#073642 gui=bold - hi DiffText cterm=NONE ctermfg=33 ctermbg=235 guifg=#268bd2 guibg=#073642 guisp=#268bd2 gui=bold - hi Directory cterm=NONE ctermfg=33 guifg=#268bd2 - hi Error term=bold cterm=bold ctermfg=124 guifg=#dc322f gui=bold - hi ErrorMsg term=reverse cterm=reverse ctermfg=124 guifg=#dc322f gui=reverse - hi FoldColumn cterm=NONE ctermfg=244 ctermbg=235 guifg=#839496 guibg=#073642 - hi Folded term=bold,underline cterm=bold,underline ctermfg=244 ctermbg=235 guifg=#839496 guibg=#073642 guisp=#002b36 gui=bold,underline - hi HelpExample cterm=NONE ctermfg=245 guifg=#93a1a1 - hi Identifier cterm=NONE ctermfg=33 guifg=#268bd2 - hi IncSearch term=standout cterm=standout ctermfg=166 guifg=#cb4b16 gui=standout - hi LineNr cterm=NONE ctermfg=239 ctermbg=235 guifg=#586e75 guibg=#073642 - hi MatchParen term=bold cterm=bold ctermfg=124 ctermbg=239 guifg=#dc322f guibg=#586e75 gui=bold - hi ModeMsg cterm=NONE ctermfg=33 guifg=#268bd2 - hi MoreMsg cterm=NONE ctermfg=33 guifg=#268bd2 - hi NonText term=bold cterm=bold ctermfg=240 guifg=#657b83 gui=bold - hi Pmenu term=reverse cterm=reverse ctermfg=244 ctermbg=235 guifg=#839496 guibg=#073642 gui=reverse - hi PmenuSbar term=reverse cterm=reverse ctermfg=187 ctermbg=244 guifg=#eee8d5 guibg=#839496 gui=reverse - hi PmenuSel term=reverse cterm=reverse ctermfg=239 ctermbg=187 guifg=#586e75 guibg=#eee8d5 gui=reverse - hi PmenuThumb term=reverse cterm=reverse ctermfg=244 ctermbg=234 guifg=#839496 guibg=#002b36 gui=reverse - hi PreProc cterm=NONE ctermfg=166 guifg=#cb4b16 - hi Question term=bold cterm=bold ctermfg=37 guifg=#2aa198 gui=bold - hi Search term=reverse cterm=reverse ctermfg=136 guifg=#b58900 gui=reverse - hi SignColumn cterm=NONE ctermfg=244 ctermbg=242 guifg=#839496 guibg=Grey - hi Special cterm=NONE ctermfg=124 guifg=#dc322f - hi SpecialKey term=bold cterm=bold ctermfg=240 ctermbg=235 guifg=#657b83 guibg=#073642 gui=bold - hi SpellBad term=undercurl cterm=undercurl guisp=#dc322f gui=undercurl - hi SpellCap term=undercurl cterm=undercurl guisp=#6c71c4 gui=undercurl - hi SpellLocal term=undercurl cterm=undercurl guisp=#b58900 gui=undercurl - hi SpellRare term=undercurl cterm=undercurl guisp=#2aa198 gui=undercurl - hi Statement cterm=NONE ctermfg=64 guifg=#719e07 - hi StatusLine term=reverse cterm=reverse ctermfg=245 ctermbg=235 guifg=#93a1a1 guibg=#073642 gui=reverse - hi StatusLineNC term=reverse cterm=reverse ctermfg=240 ctermbg=235 guifg=#657b83 guibg=#073642 gui=reverse - hi TabLine term=underline cterm=underline ctermfg=244 ctermbg=235 guifg=#839496 guibg=#073642 guisp=#839496 gui=underline - hi TabLineFill term=underline cterm=underline ctermfg=244 ctermbg=235 guifg=#839496 guibg=#073642 guisp=#839496 gui=underline - hi TabLineSel term=underline,reverse cterm=underline,reverse ctermfg=239 ctermbg=187 guifg=#586e75 guibg=#eee8d5 guisp=#839496 gui=underline,reverse - hi Title term=bold cterm=bold ctermfg=166 guifg=#cb4b16 gui=bold - hi Todo term=bold cterm=bold ctermfg=125 guifg=#d33682 gui=bold - hi Type cterm=NONE ctermfg=136 guifg=#b58900 - hi Underlined cterm=NONE ctermfg=61 guifg=#6c71c4 - hi VarId cterm=NONE ctermfg=33 guifg=#268bd2 - hi VertSplit cterm=NONE ctermfg=240 ctermbg=240 guifg=#657b83 guibg=#657b83 - hi Visual term=reverse cterm=reverse ctermfg=239 ctermbg=234 guifg=#586e75 guibg=#002b36 gui=reverse - hi VisualNOS term=reverse cterm=reverse ctermbg=235 guibg=#073642 gui=reverse - hi WarningMsg term=bold cterm=bold ctermfg=124 guifg=#dc322f gui=bold - hi WildMenu term=reverse cterm=reverse ctermfg=187 ctermbg=235 guifg=#eee8d5 guibg=#073642 gui=reverse - - hi cPreCondit cterm=NONE ctermfg=166 guifg=#cb4b16 - - hi gitcommitBranch term=bold cterm=bold ctermfg=125 guifg=#d33682 gui=bold - hi gitcommitComment cterm=NONE ctermfg=239 guifg=#586e75 gui=italic - hi gitcommitDiscardedFile term=bold cterm=bold ctermfg=124 guifg=#dc322f gui=bold - hi gitcommitDiscardedType cterm=NONE ctermfg=124 guifg=#dc322f - hi gitcommitFile term=bold cterm=bold ctermfg=244 guifg=#839496 gui=bold - hi gitcommitHeader cterm=NONE ctermfg=239 guifg=#586e75 - hi gitcommitOnBranch term=bold cterm=bold ctermfg=239 guifg=#586e75 gui=bold - hi gitcommitSelectedFile term=bold cterm=bold ctermfg=64 guifg=#719e07 gui=bold - hi gitcommitSelectedType cterm=NONE ctermfg=64 guifg=#719e07 - hi gitcommitUnmerged term=bold cterm=bold ctermfg=64 guifg=#719e07 gui=bold - hi gitcommitUnmergedFile term=bold cterm=bold ctermfg=136 guifg=#b58900 gui=bold - hi gitcommitUntrackedFile term=bold cterm=bold ctermfg=37 guifg=#2aa198 gui=bold - - hi helpHyperTextEntry cterm=NONE ctermfg=64 guifg=#719e07 - hi helpHyperTextJump term=underline cterm=underline ctermfg=33 guifg=#268bd2 gui=underline - hi helpNote cterm=NONE ctermfg=125 guifg=#d33682 - hi helpOption cterm=NONE ctermfg=37 guifg=#2aa198 - hi helpVim cterm=NONE ctermfg=125 guifg=#d33682 - - hi hsImport cterm=NONE ctermfg=125 guifg=#d33682 - hi hsImportLabel cterm=NONE ctermfg=37 guifg=#2aa198 - hi hsModuleName term=underline cterm=underline ctermfg=64 guifg=#719e07 gui=underline - hi hsNiceOperator cterm=NONE ctermfg=37 guifg=#2aa198 - hi hsStatement cterm=NONE ctermfg=37 guifg=#2aa198 - hi hsString cterm=NONE ctermfg=240 guifg=#657b83 - hi hsStructure cterm=NONE ctermfg=37 guifg=#2aa198 - hi hsType cterm=NONE ctermfg=136 guifg=#b58900 - hi hsTypedef cterm=NONE ctermfg=37 guifg=#2aa198 - hi hsVarSym cterm=NONE ctermfg=37 guifg=#2aa198 - hi hs_DeclareFunction cterm=NONE ctermfg=166 guifg=#cb4b16 - hi hs_OpFunctionName cterm=NONE ctermfg=136 guifg=#b58900 - hi hs_hlFunctionName cterm=NONE ctermfg=33 guifg=#268bd2 - - hi htmlArg cterm=NONE ctermfg=240 guifg=#657b83 - hi htmlEndTag cterm=NONE ctermfg=239 guifg=#586e75 - hi htmlSpecialTagName cterm=NONE ctermfg=33 guifg=#268bd2 gui=italic - hi htmlTag cterm=NONE ctermfg=239 guifg=#586e75 - hi htmlTagN term=bold cterm=bold ctermfg=245 guifg=#93a1a1 gui=bold - hi htmlTagName term=bold cterm=bold ctermfg=33 guifg=#268bd2 gui=bold - - hi javaScript cterm=NONE ctermfg=136 guifg=#b58900 - - hi pandocBlockQuote cterm=NONE ctermfg=33 guifg=#268bd2 - hi pandocBlockQuoteLeader1 cterm=NONE ctermfg=33 guifg=#268bd2 - hi pandocBlockQuoteLeader2 cterm=NONE ctermfg=37 guifg=#2aa198 - hi pandocBlockQuoteLeader3 cterm=NONE ctermfg=136 guifg=#b58900 - hi pandocBlockQuoteLeader4 cterm=NONE ctermfg=124 guifg=#dc322f - hi pandocBlockQuoteLeader5 cterm=NONE ctermfg=244 guifg=#839496 - hi pandocBlockQuoteLeader6 cterm=NONE ctermfg=239 guifg=#586e75 - hi pandocCitation cterm=NONE ctermfg=125 guifg=#d33682 - hi pandocCitationDelim cterm=NONE ctermfg=125 guifg=#d33682 - hi pandocCitationID term=underline cterm=underline ctermfg=125 guifg=#d33682 gui=underline - hi pandocCitationRef cterm=NONE ctermfg=125 guifg=#d33682 - hi pandocComment cterm=NONE ctermfg=239 guifg=#586e75 gui=italic - hi pandocDefinitionBlock cterm=NONE ctermfg=61 guifg=#6c71c4 - hi pandocDefinitionIndctr term=bold cterm=bold ctermfg=61 guifg=#6c71c4 gui=bold - hi pandocDefinitionTerm term=standout cterm=standout ctermfg=61 guifg=#6c71c4 gui=standout - hi pandocEmphasis cterm=NONE ctermfg=244 guifg=#839496 gui=italic - hi pandocEmphasisDefinition cterm=NONE ctermfg=61 guifg=#6c71c4 gui=italic - hi pandocEmphasisHeading term=bold cterm=bold ctermfg=166 guifg=#cb4b16 gui=bold - hi pandocEmphasisNested term=bold cterm=bold ctermfg=244 guifg=#839496 gui=bold - hi pandocEmphasisNestedDefinition term=bold cterm=bold ctermfg=61 guifg=#6c71c4 gui=bold - hi pandocEmphasisNestedHeading term=bold cterm=bold ctermfg=166 guifg=#cb4b16 gui=bold - hi pandocEmphasisNestedTable term=bold cterm=bold ctermfg=33 guifg=#268bd2 gui=bold - hi pandocEmphasisTable cterm=NONE ctermfg=33 guifg=#268bd2 gui=italic - hi pandocEscapePair term=bold cterm=bold ctermfg=124 guifg=#dc322f gui=bold - hi pandocFootnote cterm=NONE ctermfg=64 guifg=#719e07 - hi pandocFootnoteDefLink term=bold cterm=bold ctermfg=64 guifg=#719e07 gui=bold - hi pandocFootnoteInline term=bold,underline cterm=bold,underline ctermfg=64 guifg=#719e07 gui=bold,underline - hi pandocFootnoteLink term=underline cterm=underline ctermfg=64 guifg=#719e07 gui=underline - hi pandocHeading term=bold cterm=bold ctermfg=166 guifg=#cb4b16 gui=bold - hi pandocHeadingMarker term=bold cterm=bold ctermfg=136 guifg=#b58900 gui=bold - hi pandocImageCaption term=bold,underline cterm=bold,underline ctermfg=61 guifg=#6c71c4 gui=bold,underline - hi pandocLinkDefinition term=underline cterm=underline ctermfg=37 guifg=#2aa198 guisp=#657b83 gui=underline - hi pandocLinkDefinitionID term=bold cterm=bold ctermfg=33 guifg=#268bd2 gui=bold - hi pandocLinkDelim cterm=NONE ctermfg=239 guifg=#586e75 - hi pandocLinkLabel term=underline cterm=underline ctermfg=33 guifg=#268bd2 gui=underline - hi pandocLinkText term=bold,underline cterm=bold,underline ctermfg=33 guifg=#268bd2 gui=bold,underline - hi pandocLinkTitle term=underline cterm=underline ctermfg=240 guifg=#657b83 gui=underline - hi pandocLinkTitleDelim term=underline cterm=underline ctermfg=239 guifg=#586e75 guisp=#657b83 gui=underline - hi pandocLinkURL term=underline cterm=underline ctermfg=240 guifg=#657b83 gui=underline - hi pandocListMarker cterm=NONE ctermfg=125 guifg=#d33682 - hi pandocListReference term=underline cterm=underline ctermfg=125 guifg=#d33682 gui=underline - hi pandocMetadata term=bold cterm=bold ctermfg=33 guifg=#268bd2 gui=bold - hi pandocMetadataDelim cterm=NONE ctermfg=239 guifg=#586e75 - hi pandocMetadataKey cterm=NONE ctermfg=33 guifg=#268bd2 - hi pandocNonBreakingSpace term=reverse cterm=reverse ctermfg=124 guifg=#dc322f gui=reverse - hi pandocRule term=bold cterm=bold ctermfg=33 guifg=#268bd2 gui=bold - hi pandocRuleLine term=bold cterm=bold ctermfg=33 guifg=#268bd2 gui=bold - hi pandocStrikeout term=reverse cterm=reverse ctermfg=239 guifg=#586e75 gui=reverse - hi pandocStrikeoutDefinition term=reverse cterm=reverse ctermfg=61 guifg=#6c71c4 gui=reverse - hi pandocStrikeoutHeading term=reverse cterm=reverse ctermfg=166 guifg=#cb4b16 gui=reverse - hi pandocStrikeoutTable term=reverse cterm=reverse ctermfg=33 guifg=#268bd2 gui=reverse - hi pandocStrongEmphasis term=bold cterm=bold ctermfg=244 guifg=#839496 gui=bold - hi pandocStrongEmphasisDefinition term=bold cterm=bold ctermfg=61 guifg=#6c71c4 gui=bold - hi pandocStrongEmphasisEmphasis term=bold cterm=bold ctermfg=244 guifg=#839496 gui=bold - hi pandocStrongEmphasisEmphasisDefinition term=bold cterm=bold ctermfg=61 guifg=#6c71c4 gui=bold - hi pandocStrongEmphasisEmphasisHeading term=bold cterm=bold ctermfg=166 guifg=#cb4b16 gui=bold - hi pandocStrongEmphasisEmphasisTable term=bold cterm=bold ctermfg=33 guifg=#268bd2 gui=bold - hi pandocStrongEmphasisHeading term=bold cterm=bold ctermfg=166 guifg=#cb4b16 gui=bold - hi pandocStrongEmphasisNested term=bold cterm=bold ctermfg=244 guifg=#839496 gui=bold - hi pandocStrongEmphasisNestedDefinition term=bold cterm=bold ctermfg=61 guifg=#6c71c4 gui=bold - hi pandocStrongEmphasisNestedHeading term=bold cterm=bold ctermfg=166 guifg=#cb4b16 gui=bold - hi pandocStrongEmphasisNestedTable term=bold cterm=bold ctermfg=33 guifg=#268bd2 gui=bold - hi pandocStrongEmphasisTable term=bold cterm=bold ctermfg=33 guifg=#268bd2 gui=bold - hi pandocStyleDelim cterm=NONE ctermfg=239 guifg=#586e75 - hi pandocSubscript cterm=NONE ctermfg=61 guifg=#6c71c4 - hi pandocSubscriptDefinition cterm=NONE ctermfg=61 guifg=#6c71c4 - hi pandocSubscriptHeading term=bold cterm=bold ctermfg=166 guifg=#cb4b16 gui=bold - hi pandocSubscriptTable cterm=NONE ctermfg=33 guifg=#268bd2 - hi pandocSuperscript cterm=NONE ctermfg=61 guifg=#6c71c4 - hi pandocSuperscriptDefinition cterm=NONE ctermfg=61 guifg=#6c71c4 - hi pandocSuperscriptHeading term=bold cterm=bold ctermfg=166 guifg=#cb4b16 gui=bold - hi pandocSuperscriptTable cterm=NONE ctermfg=33 guifg=#268bd2 - hi pandocTable cterm=NONE ctermfg=33 guifg=#268bd2 - hi pandocTableStructure cterm=NONE ctermfg=33 guifg=#268bd2 - hi pandocTableZebraDark cterm=NONE ctermfg=33 ctermbg=235 guifg=#268bd2 guibg=#073642 - hi pandocTableZebraLight cterm=NONE ctermfg=33 ctermbg=234 guifg=#268bd2 guibg=#002b36 - hi pandocTitleBlock cterm=NONE ctermfg=33 guifg=#268bd2 - hi pandocTitleBlockTitle term=bold cterm=bold ctermfg=33 guifg=#268bd2 gui=bold - hi pandocTitleComment term=bold cterm=bold ctermfg=33 guifg=#268bd2 gui=bold - hi pandocVerbatimBlock cterm=NONE ctermfg=136 guifg=#b58900 - hi pandocVerbatimInline cterm=NONE ctermfg=136 guifg=#b58900 - hi pandocVerbatimInlineDefinition cterm=NONE ctermfg=61 guifg=#6c71c4 - hi pandocVerbatimInlineHeading term=bold cterm=bold ctermfg=166 guifg=#cb4b16 gui=bold - hi pandocVerbatimInlineTable cterm=NONE ctermfg=33 guifg=#268bd2 - - hi perlHereDoc cterm=NONE ctermfg=245 ctermbg=234 guifg=#93a1a1 guibg=#002b36 - hi perlStatementFileDesc cterm=NONE ctermfg=37 ctermbg=234 guifg=#2aa198 guibg=#002b36 - hi perlVarPlain cterm=NONE ctermfg=136 ctermbg=234 guifg=#b58900 guibg=#002b36 - - hi rubyDefine term=bold cterm=bold ctermfg=245 ctermbg=234 guifg=#93a1a1 guibg=#002b36 gui=bold - - hi texMathMatcher cterm=NONE ctermfg=136 ctermbg=234 guifg=#b58900 guibg=#002b36 - hi texMathZoneX cterm=NONE ctermfg=136 ctermbg=234 guifg=#b58900 guibg=#002b36 - hi texRefLabel cterm=NONE ctermfg=136 ctermbg=234 guifg=#b58900 guibg=#002b36 - hi texStatement cterm=NONE ctermfg=37 ctermbg=234 guifg=#2aa198 guibg=#002b36 - - hi vimCmdSep term=bold cterm=bold ctermfg=33 guifg=#268bd2 gui=bold - hi vimCommand cterm=NONE ctermfg=136 guifg=#b58900 - hi vimCommentString cterm=NONE ctermfg=61 guifg=#6c71c4 - hi vimGroup term=bold,underline cterm=bold,underline ctermfg=33 guifg=#268bd2 gui=bold,underline - hi vimHiGroup cterm=NONE ctermfg=33 guifg=#268bd2 - hi vimHiLink cterm=NONE ctermfg=33 guifg=#268bd2 - hi vimIsCommand cterm=NONE ctermfg=240 guifg=#657b83 - hi vimSynMtchOpt cterm=NONE ctermfg=136 guifg=#b58900 - hi vimSynType cterm=NONE ctermfg=37 guifg=#2aa198 - -else - " 16 color terminals - " ugly without a solarized terminal palette - hi Normal ctermfg=12 ctermbg=8 - - set background=dark - - hi ColorColumn ctermbg=0 - hi Comment ctermfg=10 - hi ConId ctermfg=3 - hi Conceal ctermfg=4 - hi Constant ctermfg=6 - hi Cursor ctermfg=8 ctermbg=12 - hi CursorColumn ctermbg=0 - hi CursorLine cterm=NONE ctermbg=0 - hi CursorLineNr term=bold ctermfg=11 - hi DiffAdd ctermfg=2 ctermbg=0 - hi DiffChange ctermfg=3 ctermbg=0 - hi DiffDelete ctermfg=1 ctermbg=0 - hi DiffText ctermfg=4 ctermbg=0 - hi Directory ctermfg=4 - hi Error term=bold cterm=bold ctermfg=1 - hi ErrorMsg term=reverse cterm=reverse ctermfg=1 - hi FoldColumn ctermfg=12 ctermbg=0 - hi Folded term=bold,underline cterm=bold,underline ctermfg=12 ctermbg=0 - hi HelpExample ctermfg=14 - hi Identifier ctermfg=4 - hi IncSearch term=standout cterm=standout ctermfg=9 - hi LineNr ctermfg=10 ctermbg=0 - hi MatchParen term=bold cterm=bold ctermfg=1 ctermbg=10 - hi ModeMsg ctermfg=4 - hi MoreMsg ctermfg=4 - hi NonText term=bold cterm=bold ctermfg=11 - hi Pmenu term=reverse cterm=reverse ctermfg=12 ctermbg=0 - hi PmenuSbar term=reverse cterm=reverse ctermfg=7 ctermbg=12 - hi PmenuSel term=reverse cterm=reverse ctermfg=10 ctermbg=7 - hi PmenuThumb term=reverse cterm=reverse ctermfg=12 ctermbg=8 - hi PreProc cterm=bold ctermfg=1 - hi Question term=bold cterm=bold ctermfg=6 - hi Search term=reverse cterm=reverse ctermfg=3 - hi SignColumn ctermfg=12 ctermbg=242 - hi Special ctermfg=1 - hi SpecialKey term=bold cterm=bold ctermfg=11 ctermbg=0 - hi SpellBad term=undercurl cterm=undercurl - hi SpellCap term=undercurl cterm=undercurl - hi SpellLocal term=undercurl cterm=undercurl - hi SpellRare term=undercurl cterm=undercurl - hi Statement ctermfg=2 - hi StatusLine term=reverse cterm=reverse ctermfg=14 ctermbg=0 - hi StatusLineNC term=reverse cterm=reverse ctermfg=11 ctermbg=0 - hi TabLine term=underline cterm=underline ctermfg=12 ctermbg=0 - hi TabLineFill term=underline cterm=underline ctermfg=12 ctermbg=0 - hi TabLineSel term=underline,reverse cterm=underline,reverse ctermfg=10 ctermbg=7 - hi Title term=bold cterm=bold ctermfg=9 - hi Todo term=bold cterm=bold ctermfg=5 - hi Type ctermfg=3 - hi Underlined ctermfg=13 - hi VarId ctermfg=4 - hi VertSplit ctermfg=11 ctermbg=11 - hi Visual term=reverse cterm=reverse ctermfg=10 ctermbg=8 - hi VisualNOS term=reverse cterm=reverse ctermbg=0 - hi WarningMsg term=bold cterm=bold ctermfg=1 - hi WildMenu term=reverse cterm=reverse ctermfg=7 ctermbg=0 - - hi cPreCondit ctermfg=9 - - hi gitcommitBranch term=bold cterm=bold ctermfg=5 - hi gitcommitComment ctermfg=10 - hi gitcommitDiscardedFile term=bold cterm=bold ctermfg=1 - hi gitcommitDiscardedType ctermfg=1 - hi gitcommitFile term=bold cterm=bold ctermfg=12 - hi gitcommitHeader ctermfg=10 - hi gitcommitOnBranch term=bold cterm=bold ctermfg=10 - hi gitcommitSelectedFile term=bold cterm=bold ctermfg=2 - hi gitcommitSelectedType ctermfg=2 - hi gitcommitUnmerged term=bold cterm=bold ctermfg=2 - hi gitcommitUnmergedFile term=bold cterm=bold ctermfg=3 - hi gitcommitUntrackedFile term=bold cterm=bold ctermfg=6 - - hi helpHyperTextEntry ctermfg=2 - hi helpHyperTextJump term=underline cterm=underline ctermfg=4 - hi helpNote ctermfg=5 - hi helpOption ctermfg=6 - hi helpVim ctermfg=5 - - hi hsImport ctermfg=5 - hi hsImportLabel ctermfg=6 - hi hsModuleName term=underline cterm=underline ctermfg=2 - hi hsNiceOperator ctermfg=6 - hi hsStatement ctermfg=6 - hi hsString ctermfg=11 - hi hsStructure ctermfg=6 - hi hsType ctermfg=3 - hi hsTypedef ctermfg=6 - hi hsVarSym ctermfg=6 - hi hs_DeclareFunction ctermfg=9 - hi hs_OpFunctionName ctermfg=3 - hi hs_hlFunctionName ctermfg=4 - - hi htmlArg ctermfg=11 - hi htmlEndTag ctermfg=10 - hi htmlSpecialTagName ctermfg=4 - hi htmlTag ctermfg=10 - hi htmlTagN term=bold cterm=bold ctermfg=14 - hi htmlTagName term=bold cterm=bold ctermfg=4 - - hi javaScript ctermfg=3 - - hi pandocBlockQuote ctermfg=4 - hi pandocBlockQuoteLeader1 ctermfg=4 - hi pandocBlockQuoteLeader2 ctermfg=6 - hi pandocBlockQuoteLeader3 ctermfg=3 - hi pandocBlockQuoteLeader4 ctermfg=1 - hi pandocBlockQuoteLeader5 ctermfg=12 - hi pandocBlockQuoteLeader6 ctermfg=10 - hi pandocCitation ctermfg=5 - hi pandocCitationDelim ctermfg=5 - hi pandocCitationID term=underline cterm=underline ctermfg=5 - hi pandocCitationRef ctermfg=5 - hi pandocComment ctermfg=10 - hi pandocDefinitionBlock ctermfg=13 - hi pandocDefinitionIndctr term=bold cterm=bold ctermfg=13 - hi pandocDefinitionTerm term=standout cterm=standout ctermfg=13 - hi pandocEmphasis ctermfg=12 - hi pandocEmphasisDefinition ctermfg=13 - hi pandocEmphasisHeading term=bold cterm=bold ctermfg=9 - hi pandocEmphasisNested term=bold cterm=bold ctermfg=12 - hi pandocEmphasisNestedDefinition term=bold cterm=bold ctermfg=13 - hi pandocEmphasisNestedHeading term=bold cterm=bold ctermfg=9 - hi pandocEmphasisNestedTable term=bold cterm=bold ctermfg=4 - hi pandocEmphasisTable ctermfg=4 - hi pandocEscapePair term=bold cterm=bold ctermfg=1 - hi pandocFootnote ctermfg=2 - hi pandocFootnoteDefLink term=bold cterm=bold ctermfg=2 - hi pandocFootnoteInline term=bold,underline cterm=bold,underline ctermfg=2 - hi pandocFootnoteLink term=underline cterm=underline ctermfg=2 - hi pandocHeading term=bold cterm=bold ctermfg=9 - hi pandocHeadingMarker term=bold cterm=bold ctermfg=3 - hi pandocImageCaption term=bold,underline cterm=bold,underline ctermfg=13 - hi pandocLinkDefinition term=underline cterm=underline ctermfg=6 - hi pandocLinkDefinitionID term=bold cterm=bold ctermfg=4 - hi pandocLinkDelim ctermfg=10 - hi pandocLinkLabel term=underline cterm=underline ctermfg=4 - hi pandocLinkText term=bold,underline cterm=bold,underline ctermfg=4 - hi pandocLinkTitle term=underline cterm=underline ctermfg=11 - hi pandocLinkTitleDelim term=underline cterm=underline ctermfg=10 - hi pandocLinkURL term=underline cterm=underline ctermfg=11 - hi pandocListMarker ctermfg=5 - hi pandocListReference term=underline cterm=underline ctermfg=5 - hi pandocMetadata term=bold cterm=bold ctermfg=4 - hi pandocMetadataDelim ctermfg=10 - hi pandocMetadataKey ctermfg=4 - hi pandocNonBreakingSpace term=reverse cterm=reverse ctermfg=1 - hi pandocRule term=bold cterm=bold ctermfg=4 - hi pandocRuleLine term=bold cterm=bold ctermfg=4 - hi pandocStrikeout term=reverse cterm=reverse ctermfg=10 - hi pandocStrikeoutDefinition term=reverse cterm=reverse ctermfg=13 - hi pandocStrikeoutHeading term=reverse cterm=reverse ctermfg=9 - hi pandocStrikeoutTable term=reverse cterm=reverse ctermfg=4 - hi pandocStrongEmphasis term=bold cterm=bold ctermfg=12 - hi pandocStrongEmphasisDefinition term=bold cterm=bold ctermfg=13 - hi pandocStrongEmphasisEmphasis term=bold cterm=bold ctermfg=12 - hi pandocStrongEmphasisEmphasisDefinition term=bold cterm=bold ctermfg=13 - hi pandocStrongEmphasisEmphasisHeading term=bold cterm=bold ctermfg=9 - hi pandocStrongEmphasisEmphasisTable term=bold cterm=bold ctermfg=4 - hi pandocStrongEmphasisHeading term=bold cterm=bold ctermfg=9 - hi pandocStrongEmphasisNested term=bold cterm=bold ctermfg=12 - hi pandocStrongEmphasisNestedDefinition term=bold cterm=bold ctermfg=13 - hi pandocStrongEmphasisNestedHeading term=bold cterm=bold ctermfg=9 - hi pandocStrongEmphasisNestedTable term=bold cterm=bold ctermfg=4 - hi pandocStrongEmphasisTable term=bold cterm=bold ctermfg=4 - hi pandocStyleDelim ctermfg=10 - hi pandocSubscript ctermfg=13 - hi pandocSubscriptDefinition ctermfg=13 - hi pandocSubscriptHeading term=bold cterm=bold ctermfg=9 - hi pandocSubscriptTable ctermfg=4 - hi pandocSuperscript ctermfg=13 - hi pandocSuperscriptDefinition ctermfg=13 - hi pandocSuperscriptHeading term=bold cterm=bold ctermfg=9 - hi pandocSuperscriptTable ctermfg=4 - hi pandocTable ctermfg=4 - hi pandocTableStructure ctermfg=4 - hi pandocTableZebraDark ctermfg=4 ctermbg=0 - hi pandocTableZebraLight ctermfg=4 ctermbg=8 - hi pandocTitleBlock ctermfg=4 - hi pandocTitleBlockTitle term=bold cterm=bold ctermfg=4 - hi pandocTitleComment term=bold cterm=bold ctermfg=4 - hi pandocVerbatimBlock ctermfg=3 - hi pandocVerbatimInline ctermfg=3 - hi pandocVerbatimInlineDefinition ctermfg=13 - hi pandocVerbatimInlineHeading term=bold cterm=bold ctermfg=9 - hi pandocVerbatimInlineTable ctermfg=4 - - hi perlHereDoc ctermfg=14 ctermbg=8 - hi perlStatementFileDesc ctermfg=6 ctermbg=8 - hi perlVarPlain ctermfg=3 ctermbg=8 - - hi rubyDefine term=bold cterm=bold ctermfg=14 ctermbg=8 - - hi texMathMatcher ctermfg=3 ctermbg=8 - hi texMathZoneX ctermfg=3 ctermbg=8 - hi texRefLabel ctermfg=3 ctermbg=8 - hi texStatement ctermfg=6 ctermbg=8 - - hi vimCmdSep term=bold cterm=bold ctermfg=4 - hi vimCommand ctermfg=3 - hi vimCommentString ctermfg=13 - hi vimGroup term=bold,underline cterm=bold,underline ctermfg=4 - hi vimHiGroup ctermfg=4 - hi vimHiLink ctermfg=4 - hi vimIsCommand ctermfg=11 - hi vimSynMtchOpt ctermfg=3 - hi vimSynType ctermfg=6 - -endif - -hi link Boolean Constant -hi link Character Constant -hi link Conditional Statement -hi link Debug Special -hi link Define PreProc -hi link Delimiter Special -hi link Exception Statement -hi link Float Number -hi link Function Identifier -hi link HelpCommand Statement -hi link Include PreProc -hi link Keyword Statement -hi link Label Statement -hi link Macro PreProc -hi link Number Constant -hi link Operator Statement -hi link PreCondit PreProc -hi link Repeat Statement -hi link SpecialChar Special -hi link SpecialComment Special -hi link StorageClass Type -hi link String Constant -hi link Structure Type -hi link SyntasticError SpellBad -hi link SyntasticErrorSign Error -hi link SyntasticStyleErrorLine SyntasticErrorLine -hi link SyntasticStyleErrorSign SyntasticErrorSign -hi link SyntasticStyleWarningLine SyntasticWarningLine -hi link SyntasticStyleWarningSign SyntasticWarningSign -hi link SyntasticWarning SpellCap -hi link SyntasticWarningSign Todo -hi link Tag Special -hi link Typedef Type - -hi link diffAdded Statement -hi link diffBDiffer WarningMsg -hi link diffCommon WarningMsg -hi link diffDiffer WarningMsg -hi link diffIdentical WarningMsg -hi link diffIsA WarningMsg -hi link diffLine Identifier -hi link diffNoEOL WarningMsg -hi link diffOnly WarningMsg -hi link diffRemoved WarningMsg - -hi link gitcommitDiscarded gitcommitComment -hi link gitcommitDiscardedArrow gitcommitDiscardedFile -hi link gitcommitNoBranch gitcommitBranch -hi link gitcommitSelected gitcommitComment -hi link gitcommitSelectedArrow gitcommitSelectedFile -hi link gitcommitUnmergedArrow gitcommitUnmergedFile -hi link gitcommitUntracked gitcommitComment - -hi link helpSpecial Special - -hi link hsDelimTypeExport Delimiter -hi link hsImportParams Delimiter -hi link hsModuleStartLabel hsStructure -hi link hsModuleWhereLabel hsModuleStartLabel -hi link htmlLink Function - -hi link lCursor Cursor - -hi link pandocCodeBlock pandocVerbatimBlock -hi link pandocCodeBlockDelim pandocVerbatimBlock -hi link pandocEscapedCharacter pandocEscapePair -hi link pandocLineBreak pandocEscapePair -hi link pandocMetadataTitle pandocMetadata -hi link pandocTableStructureEnd pandocTableStructre -hi link pandocTableStructureTop pandocTableStructre -hi link pandocVerbatimBlockDeep pandocVerbatimBlock - -hi link vimFunc Function -hi link vimSet Normal -hi link vimSetEqual Normal -hi link vimUserFunc Function -hi link vipmVar Identifier - -hi clear SyntasticErrorLine -hi clear SyntasticWarningLine -hi clear helpLeadBlank -hi clear helpNormal -hi clear pandocTableStructre diff --git a/colors/flattened_light.vim b/colors/flattened_light.vim deleted file mode 100644 index 3d8f182..0000000 --- a/colors/flattened_light.vim +++ /dev/null @@ -1,502 +0,0 @@ -" 'flattened_dark.vim' -- Vim color scheme. -" Maintainer: Romain Lafourcade (romainlafourcade@gmail.com) -" A no-bullshit light Solarized. - -hi clear - -if exists('syntax_on') - syntax reset - -endif - -let colors_name = 'flattened_light' - -if &t_Co >= 256 || has('gui_running') - hi Normal cterm=NONE ctermfg=240 ctermbg=230 guifg=#657b83 guibg=#fdf6e3 - - set background=light - - hi ColorColumn cterm=NONE ctermbg=187 guibg=#eee8d5 - hi Comment cterm=NONE ctermfg=245 gui=italic guifg=#93a1a1 - hi ConId cterm=NONE ctermfg=136 guifg=#b58900 - hi Conceal cterm=NONE ctermfg=33 guifg=#268bd2 - hi Constant cterm=NONE ctermfg=37 guifg=#2aa198 - hi Cursor cterm=NONE ctermfg=230 ctermbg=240 guifg=#fdf6e3 guibg=#657b83 - hi CursorColumn cterm=NONE ctermbg=187 guibg=#eee8d5 - hi CursorLine cterm=NONE ctermbg=187 guibg=#eee8d5 guisp=#586e75 - hi CursorLineNr term=bold ctermfg=130 gui=bold guifg=Brown - hi DiffAdd cterm=NONE ctermfg=64 ctermbg=187 gui=bold guifg=#719e07 guibg=#eee8d5 guisp=#719e07 - hi DiffChange cterm=NONE ctermfg=136 ctermbg=187 gui=bold guifg=#b58900 guibg=#eee8d5 guisp=#b58900 - hi DiffDelete cterm=NONE ctermfg=124 ctermbg=187 gui=bold guifg=#dc322f guibg=#eee8d5 - hi DiffText cterm=NONE ctermfg=33 ctermbg=187 gui=bold guifg=#268bd2 guibg=#eee8d5 guisp=#268bd2 - hi Directory cterm=NONE ctermfg=33 guifg=#268bd2 - hi Error term=bold cterm=bold ctermfg=124 gui=bold guifg=#dc322f - hi ErrorMsg term=reverse cterm=reverse ctermfg=124 gui=reverse guifg=#dc322f - hi FoldColumn cterm=NONE ctermfg=240 ctermbg=187 guifg=#657b83 guibg=#eee8d5 - hi Folded term=bold,underline cterm=bold,underline ctermfg=240 ctermbg=187 gui=bold,underline guifg=#657b83 guibg=#eee8d5 guisp=#fdf6e3 - hi HelpExample cterm=NONE ctermfg=239 guifg=#586e75 - hi Identifier cterm=NONE ctermfg=33 guifg=#268bd2 - hi IncSearch term=standout cterm=standout ctermfg=166 gui=standout guifg=#cb4b16 - hi LineNr cterm=NONE ctermfg=245 ctermbg=187 guifg=#93a1a1 guibg=#eee8d5 - hi MatchParen term=bold cterm=bold ctermfg=124 ctermbg=245 gui=bold guifg=#dc322f guibg=#93a1a1 - hi ModeMsg cterm=NONE ctermfg=33 guifg=#268bd2 - hi MoreMsg cterm=NONE ctermfg=33 guifg=#268bd2 - hi NonText term=bold cterm=bold ctermfg=244 gui=bold guifg=#839496 - hi Pmenu term=reverse cterm=reverse ctermfg=240 ctermbg=187 gui=reverse guifg=#657b83 guibg=#eee8d5 - hi PmenuSbar term=reverse cterm=reverse ctermfg=235 ctermbg=240 gui=reverse guifg=#073642 guibg=#657b83 - hi PmenuSel term=reverse cterm=reverse ctermfg=245 ctermbg=235 gui=reverse guifg=#93a1a1 guibg=#073642 - hi PmenuThumb term=reverse cterm=reverse ctermfg=240 ctermbg=230 gui=reverse guifg=#657b83 guibg=#fdf6e3 - hi PreProc cterm=NONE ctermfg=166 guifg=#cb4b16 - hi Question term=bold cterm=bold ctermfg=37 gui=bold guifg=#2aa198 - hi Search term=reverse cterm=reverse ctermfg=136 gui=reverse guifg=#b58900 - hi SignColumn cterm=NONE ctermfg=240 ctermbg=248 guifg=#657b83 guibg=Grey - hi Special cterm=NONE ctermfg=124 guifg=#dc322f - hi SpecialKey term=bold cterm=bold ctermfg=244 ctermbg=187 gui=bold guifg=#839496 guibg=#eee8d5 - hi SpellBad term=undercurl cterm=undercurl gui=undercurl guisp=#dc322f - hi SpellCap term=undercurl cterm=undercurl gui=undercurl guisp=#6c71c4 - hi SpellLocal term=undercurl cterm=undercurl gui=undercurl guisp=#b58900 - hi SpellRare term=undercurl cterm=undercurl gui=undercurl guisp=#2aa198 - hi Statement cterm=NONE ctermfg=64 guifg=#719e07 - hi StatusLine term=reverse cterm=reverse ctermfg=239 ctermbg=187 gui=reverse guifg=#586e75 guibg=#eee8d5 - hi StatusLineNC term=reverse cterm=reverse ctermfg=244 ctermbg=187 gui=reverse guifg=#839496 guibg=#eee8d5 - hi TabLine term=underline cterm=underline ctermfg=240 ctermbg=187 gui=underline guifg=#657b83 guibg=#eee8d5 guisp=#657b83 - hi TabLineFill term=underline cterm=underline ctermfg=240 ctermbg=187 gui=underline guifg=#657b83 guibg=#eee8d5 guisp=#657b83 - hi TabLineSel term=underline,reverse cterm=underline,reverse ctermfg=245 ctermbg=235 gui=underline,reverse guifg=#93a1a1 guibg=#073642 guisp=#657b83 - hi Title term=bold cterm=bold ctermfg=166 gui=bold guifg=#cb4b16 - hi Todo term=bold cterm=bold ctermfg=125 gui=bold guifg=#d33682 - hi Type cterm=NONE ctermfg=136 guifg=#b58900 - hi Underlined cterm=NONE ctermfg=61 guifg=#6c71c4 - hi VarId cterm=NONE ctermfg=33 guifg=#268bd2 - hi VertSplit cterm=NONE ctermfg=244 ctermbg=244 guifg=#839496 guibg=#839496 - hi Visual term=reverse cterm=reverse ctermfg=245 ctermbg=230 gui=reverse guifg=#93a1a1 guibg=#fdf6e3 - hi VisualNOS term=reverse cterm=reverse ctermbg=187 gui=reverse guibg=#eee8d5 - hi WarningMsg term=bold cterm=bold ctermfg=124 gui=bold guifg=#dc322f - hi WildMenu term=reverse cterm=reverse ctermfg=235 ctermbg=187 gui=reverse guifg=#073642 guibg=#eee8d5 - hi cPreCondit cterm=NONE ctermfg=166 guifg=#cb4b16 - hi gitcommitBranch term=bold cterm=bold ctermfg=125 gui=bold guifg=#d33682 - hi gitcommitComment cterm=NONE ctermfg=245 gui=italic guifg=#93a1a1 - hi gitcommitDiscardedFile term=bold cterm=bold ctermfg=124 gui=bold guifg=#dc322f - hi gitcommitDiscardedType cterm=NONE ctermfg=124 guifg=#dc322f - hi gitcommitFile term=bold cterm=bold ctermfg=240 gui=bold guifg=#657b83 - hi gitcommitHeader cterm=NONE ctermfg=245 guifg=#93a1a1 - hi gitcommitOnBranch term=bold cterm=bold ctermfg=245 gui=bold guifg=#93a1a1 - hi gitcommitSelectedFile term=bold cterm=bold ctermfg=64 gui=bold guifg=#719e07 - hi gitcommitSelectedType cterm=NONE ctermfg=64 guifg=#719e07 - hi gitcommitUnmerged term=bold cterm=bold ctermfg=64 gui=bold guifg=#719e07 - hi gitcommitUnmergedFile term=bold cterm=bold ctermfg=136 gui=bold guifg=#b58900 - hi gitcommitUntrackedFile term=bold cterm=bold ctermfg=37 gui=bold guifg=#2aa198 - hi helpHyperTextEntry cterm=NONE ctermfg=64 guifg=#719e07 - hi helpHyperTextJump term=underline cterm=underline ctermfg=33 gui=underline guifg=#268bd2 - hi helpNote cterm=NONE ctermfg=125 guifg=#d33682 - hi helpOption cterm=NONE ctermfg=37 guifg=#2aa198 - hi helpVim cterm=NONE ctermfg=125 guifg=#d33682 - hi hsImport cterm=NONE ctermfg=125 guifg=#d33682 - hi hsImportLabel cterm=NONE ctermfg=37 guifg=#2aa198 - hi hsModuleName term=underline cterm=underline ctermfg=64 gui=underline guifg=#719e07 - hi hsNiceOperator cterm=NONE ctermfg=37 guifg=#2aa198 - hi hsStatement cterm=NONE ctermfg=37 guifg=#2aa198 - hi hsString cterm=NONE ctermfg=244 guifg=#839496 - hi hsStructure cterm=NONE ctermfg=37 guifg=#2aa198 - hi hsType cterm=NONE ctermfg=136 guifg=#b58900 - hi hsTypedef cterm=NONE ctermfg=37 guifg=#2aa198 - hi hsVarSym cterm=NONE ctermfg=37 guifg=#2aa198 - hi hs_DeclareFunction cterm=NONE ctermfg=166 guifg=#cb4b16 - hi hs_OpFunctionName cterm=NONE ctermfg=136 guifg=#b58900 - hi hs_hlFunctionName cterm=NONE ctermfg=33 guifg=#268bd2 - hi htmlArg cterm=NONE ctermfg=244 guifg=#839496 - hi htmlEndTag cterm=NONE ctermfg=245 guifg=#93a1a1 - hi htmlSpecialTagName cterm=NONE ctermfg=33 gui=italic guifg=#268bd2 - hi htmlTag cterm=NONE ctermfg=245 guifg=#93a1a1 - hi htmlTagN term=bold cterm=bold ctermfg=239 gui=bold guifg=#586e75 - hi htmlTagName term=bold cterm=bold ctermfg=33 gui=bold guifg=#268bd2 - hi javaScript cterm=NONE ctermfg=136 guifg=#b58900 - hi pandocBlockQuote cterm=NONE ctermfg=33 guifg=#268bd2 - hi pandocBlockQuoteLeader1 cterm=NONE ctermfg=33 guifg=#268bd2 - hi pandocBlockQuoteLeader2 cterm=NONE ctermfg=37 guifg=#2aa198 - hi pandocBlockQuoteLeader3 cterm=NONE ctermfg=136 guifg=#b58900 - hi pandocBlockQuoteLeader4 cterm=NONE ctermfg=124 guifg=#dc322f - hi pandocBlockQuoteLeader5 cterm=NONE ctermfg=240 guifg=#657b83 - hi pandocBlockQuoteLeader6 cterm=NONE ctermfg=245 guifg=#93a1a1 - hi pandocCitation cterm=NONE ctermfg=125 guifg=#d33682 - hi pandocCitationDelim cterm=NONE ctermfg=125 guifg=#d33682 - hi pandocCitationID term=underline cterm=underline ctermfg=125 gui=underline guifg=#d33682 - hi pandocCitationRef cterm=NONE ctermfg=125 guifg=#d33682 - hi pandocComment cterm=NONE ctermfg=245 gui=italic guifg=#93a1a1 - hi pandocDefinitionBlock cterm=NONE ctermfg=61 guifg=#6c71c4 - hi pandocDefinitionIndctr term=bold cterm=bold ctermfg=61 gui=bold guifg=#6c71c4 - hi pandocDefinitionTerm term=standout cterm=standout ctermfg=61 gui=standout guifg=#6c71c4 - hi pandocEmphasis cterm=NONE ctermfg=240 gui=italic guifg=#657b83 - hi pandocEmphasisDefinition cterm=NONE ctermfg=61 gui=italic guifg=#6c71c4 - hi pandocEmphasisHeading term=bold cterm=bold ctermfg=166 gui=bold guifg=#cb4b16 - hi pandocEmphasisNested term=bold cterm=bold ctermfg=240 gui=bold guifg=#657b83 - hi pandocEmphasisNestedDefinition term=bold cterm=bold ctermfg=61 gui=bold guifg=#6c71c4 - hi pandocEmphasisNestedHeading term=bold cterm=bold ctermfg=166 gui=bold guifg=#cb4b16 - hi pandocEmphasisNestedTable term=bold cterm=bold ctermfg=33 gui=bold guifg=#268bd2 - hi pandocEmphasisTable cterm=NONE ctermfg=33 gui=italic guifg=#268bd2 - hi pandocEscapePair term=bold cterm=bold ctermfg=124 gui=bold guifg=#dc322f - hi pandocFootnote cterm=NONE ctermfg=64 guifg=#719e07 - hi pandocFootnoteDefLink term=bold cterm=bold ctermfg=64 gui=bold guifg=#719e07 - hi pandocFootnoteInline term=bold,underline cterm=bold,underline ctermfg=64 gui=bold,underline guifg=#719e07 - hi pandocFootnoteLink term=underline cterm=underline ctermfg=64 gui=underline guifg=#719e07 - hi pandocHeading term=bold cterm=bold ctermfg=166 gui=bold guifg=#cb4b16 - hi pandocHeadingMarker term=bold cterm=bold ctermfg=136 gui=bold guifg=#b58900 - hi pandocImageCaption term=bold,underline cterm=bold,underline ctermfg=61 gui=bold,underline guifg=#6c71c4 - hi pandocLinkDefinition term=underline cterm=underline ctermfg=37 gui=underline guifg=#2aa198 guisp=#839496 - hi pandocLinkDefinitionID term=bold cterm=bold ctermfg=33 gui=bold guifg=#268bd2 - hi pandocLinkDelim cterm=NONE ctermfg=245 guifg=#93a1a1 - hi pandocLinkLabel term=underline cterm=underline ctermfg=33 gui=underline guifg=#268bd2 - hi pandocLinkText term=bold,underline cterm=bold,underline ctermfg=33 gui=bold,underline guifg=#268bd2 - hi pandocLinkTitle term=underline cterm=underline ctermfg=244 gui=underline guifg=#839496 - hi pandocLinkTitleDelim term=underline cterm=underline ctermfg=245 gui=underline guifg=#93a1a1 guisp=#839496 - hi pandocLinkURL term=underline cterm=underline ctermfg=244 gui=underline guifg=#839496 - hi pandocListMarker cterm=NONE ctermfg=125 guifg=#d33682 - hi pandocListReference term=underline cterm=underline ctermfg=125 gui=underline guifg=#d33682 - hi pandocMetadata term=bold cterm=bold ctermfg=33 gui=bold guifg=#268bd2 - hi pandocMetadataDelim cterm=NONE ctermfg=245 guifg=#93a1a1 - hi pandocMetadataKey cterm=NONE ctermfg=33 guifg=#268bd2 - hi pandocNonBreakingSpace term=reverse cterm=reverse ctermfg=124 gui=reverse guifg=#dc322f - hi pandocRule term=bold cterm=bold ctermfg=33 gui=bold guifg=#268bd2 - hi pandocRuleLine term=bold cterm=bold ctermfg=33 gui=bold guifg=#268bd2 - hi pandocStrikeout term=reverse cterm=reverse ctermfg=245 gui=reverse guifg=#93a1a1 - hi pandocStrikeoutDefinition term=reverse cterm=reverse ctermfg=61 gui=reverse guifg=#6c71c4 - hi pandocStrikeoutHeading term=reverse cterm=reverse ctermfg=166 gui=reverse guifg=#cb4b16 - hi pandocStrikeoutTable term=reverse cterm=reverse ctermfg=33 gui=reverse guifg=#268bd2 - hi pandocStrongEmphasis term=bold cterm=bold ctermfg=240 gui=bold guifg=#657b83 - hi pandocStrongEmphasisDefinition term=bold cterm=bold ctermfg=61 gui=bold guifg=#6c71c4 - hi pandocStrongEmphasisEmphasis term=bold cterm=bold ctermfg=240 gui=bold guifg=#657b83 - hi pandocStrongEmphasisEmphasisDefinition term=bold cterm=bold ctermfg=61 gui=bold guifg=#6c71c4 - hi pandocStrongEmphasisEmphasisHeading term=bold cterm=bold ctermfg=166 gui=bold guifg=#cb4b16 - hi pandocStrongEmphasisEmphasisTable term=bold cterm=bold ctermfg=33 gui=bold guifg=#268bd2 - hi pandocStrongEmphasisHeading term=bold cterm=bold ctermfg=166 gui=bold guifg=#cb4b16 - hi pandocStrongEmphasisNested term=bold cterm=bold ctermfg=240 gui=bold guifg=#657b83 - hi pandocStrongEmphasisNestedDefinition term=bold cterm=bold ctermfg=61 gui=bold guifg=#6c71c4 - hi pandocStrongEmphasisNestedHeading term=bold cterm=bold ctermfg=166 gui=bold guifg=#cb4b16 - hi pandocStrongEmphasisNestedTable term=bold cterm=bold ctermfg=33 gui=bold guifg=#268bd2 - hi pandocStrongEmphasisTable term=bold cterm=bold ctermfg=33 gui=bold guifg=#268bd2 - hi pandocStyleDelim cterm=NONE ctermfg=245 guifg=#93a1a1 - hi pandocSubscript cterm=NONE ctermfg=61 guifg=#6c71c4 - hi pandocSubscriptDefinition cterm=NONE ctermfg=61 guifg=#6c71c4 - hi pandocSubscriptHeading term=bold cterm=bold ctermfg=166 gui=bold guifg=#cb4b16 - hi pandocSubscriptTable cterm=NONE ctermfg=33 guifg=#268bd2 - hi pandocSuperscript cterm=NONE ctermfg=61 guifg=#6c71c4 - hi pandocSuperscriptDefinition cterm=NONE ctermfg=61 guifg=#6c71c4 - hi pandocSuperscriptHeading term=bold cterm=bold ctermfg=166 gui=bold guifg=#cb4b16 - hi pandocSuperscriptTable cterm=NONE ctermfg=33 guifg=#268bd2 - hi pandocTable cterm=NONE ctermfg=33 guifg=#268bd2 - hi pandocTableStructure cterm=NONE ctermfg=33 guifg=#268bd2 - hi pandocTableZebraDark cterm=NONE ctermfg=33 ctermbg=187 guifg=#268bd2 guibg=#eee8d5 - hi pandocTableZebraLight cterm=NONE ctermfg=33 ctermbg=230 guifg=#268bd2 guibg=#fdf6e3 - hi pandocTitleBlock cterm=NONE ctermfg=33 guifg=#268bd2 - hi pandocTitleBlockTitle term=bold cterm=bold ctermfg=33 gui=bold guifg=#268bd2 - hi pandocTitleComment term=bold cterm=bold ctermfg=33 gui=bold guifg=#268bd2 - hi pandocVerbatimBlock cterm=NONE ctermfg=136 guifg=#b58900 - hi pandocVerbatimInline cterm=NONE ctermfg=136 guifg=#b58900 - hi pandocVerbatimInlineDefinition cterm=NONE ctermfg=61 guifg=#6c71c4 - hi pandocVerbatimInlineHeading term=bold cterm=bold ctermfg=166 gui=bold guifg=#cb4b16 - hi pandocVerbatimInlineTable cterm=NONE ctermfg=33 guifg=#268bd2 - hi perlHereDoc cterm=NONE ctermfg=239 ctermbg=230 guifg=#586e75 guibg=#fdf6e3 - hi perlStatementFileDesc cterm=NONE ctermfg=37 ctermbg=230 guifg=#2aa198 guibg=#fdf6e3 - hi perlVarPlain cterm=NONE ctermfg=136 ctermbg=230 guifg=#b58900 guibg=#fdf6e3 - hi rubyDefine term=bold cterm=bold ctermfg=239 ctermbg=230 gui=bold guifg=#586e75 guibg=#fdf6e3 - hi texMathMatcher cterm=NONE ctermfg=136 ctermbg=230 guifg=#b58900 guibg=#fdf6e3 - hi texMathZoneX cterm=NONE ctermfg=136 ctermbg=230 guifg=#b58900 guibg=#fdf6e3 - hi texRefLabel cterm=NONE ctermfg=136 ctermbg=230 guifg=#b58900 guibg=#fdf6e3 - hi texStatement cterm=NONE ctermfg=37 ctermbg=230 guifg=#2aa198 guibg=#fdf6e3 - hi vimCmdSep term=bold cterm=bold ctermfg=33 gui=bold guifg=#268bd2 - hi vimCommand cterm=NONE ctermfg=136 guifg=#b58900 - hi vimCommentString cterm=NONE ctermfg=61 guifg=#6c71c4 - hi vimGroup term=bold,underline cterm=bold,underline ctermfg=33 gui=bold,underline guifg=#268bd2 - hi vimHiGroup cterm=NONE ctermfg=33 guifg=#268bd2 - hi vimHiLink cterm=NONE ctermfg=33 guifg=#268bd2 - hi vimIsCommand cterm=NONE ctermfg=244 guifg=#839496 - hi vimSynMtchOpt cterm=NONE ctermfg=136 guifg=#b58900 - hi vimSynType cterm=NONE ctermfg=37 guifg=#2aa198 - -else - " 16 color terminals - " ugly without a solarized terminal palette - hi Normal cterm=NONE ctermfg=11 ctermbg=15 - - set background=light - - hi ColorColumn cterm=NONE ctermbg=7 - hi Comment cterm=NONE ctermfg=14 - hi ConId cterm=NONE ctermfg=3 - hi Conceal cterm=NONE ctermfg=4 - hi Constant cterm=NONE ctermfg=6 - hi Cursor cterm=NONE ctermfg=15 ctermbg=11 - hi CursorColumn cterm=NONE ctermbg=7 - hi CursorLine cterm=NONE ctermbg=7 - hi CursorLineNr term=bold ctermfg=130 - hi DiffAdd cterm=NONE ctermfg=2 ctermbg=7 - hi DiffChange cterm=NONE ctermfg=3 ctermbg=7 - hi DiffDelete cterm=NONE ctermfg=1 ctermbg=7 - hi DiffText cterm=NONE ctermfg=4 ctermbg=7 - hi Directory cterm=NONE ctermfg=4 - hi Error term=bold cterm=bold ctermfg=1 - hi ErrorMsg term=reverse cterm=reverse ctermfg=1 - hi FoldColumn cterm=NONE ctermfg=11 ctermbg=7 - hi Folded term=bold,underline cterm=bold,underline ctermfg=11 ctermbg=7 - hi HelpExample cterm=NONE ctermfg=10 - hi Identifier cterm=NONE ctermfg=4 - hi IncSearch term=standout cterm=standout ctermfg=9 - hi LineNr cterm=NONE ctermfg=14 ctermbg=7 - hi MatchParen term=bold cterm=bold ctermfg=1 ctermbg=14 - hi ModeMsg cterm=NONE ctermfg=4 - hi MoreMsg cterm=NONE ctermfg=4 - hi NonText term=bold cterm=bold ctermfg=12 - hi Pmenu term=reverse cterm=reverse ctermfg=11 ctermbg=7 - hi PmenuSbar term=reverse cterm=reverse ctermfg=0 ctermbg=11 - hi PmenuSel term=reverse cterm=reverse ctermfg=14 ctermbg=0 - hi PmenuThumb term=reverse cterm=reverse ctermfg=11 ctermbg=15 - hi PreProc cterm=NONE ctermfg=9 - hi Question term=bold cterm=bold ctermfg=6 - hi Search term=reverse cterm=reverse ctermfg=3 - hi SignColumn cterm=NONE ctermfg=11 ctermbg=248 - hi Special cterm=NONE ctermfg=1 - hi SpecialKey term=bold cterm=bold ctermfg=12 ctermbg=7 - hi SpellBad term=undercurl cterm=undercurl - hi SpellCap term=undercurl cterm=undercurl - hi SpellLocal term=undercurl cterm=undercurl - hi SpellRare term=undercurl cterm=undercurl - hi Statement cterm=NONE ctermfg=2 - hi StatusLine term=reverse cterm=reverse ctermfg=10 ctermbg=7 - hi StatusLineNC term=reverse cterm=reverse ctermfg=12 ctermbg=7 - hi TabLine term=underline cterm=underline ctermfg=11 ctermbg=7 - hi TabLineFill term=underline cterm=underline ctermfg=11 ctermbg=7 - hi TabLineSel term=underline,reverse cterm=underline,reverse ctermfg=14 ctermbg=0 - hi Title term=bold cterm=bold ctermfg=9 - hi Todo term=bold cterm=bold ctermfg=5 - hi Type cterm=NONE ctermfg=3 - hi Underlined cterm=NONE ctermfg=13 - hi VarId cterm=NONE ctermfg=4 - hi VertSplit cterm=NONE ctermfg=12 ctermbg=12 - hi Visual term=reverse cterm=reverse ctermfg=14 ctermbg=15 - hi VisualNOS term=reverse cterm=reverse ctermbg=7 - hi WarningMsg term=bold cterm=bold ctermfg=1 - hi WildMenu term=reverse cterm=reverse ctermfg=0 ctermbg=7 - hi cPreCondit cterm=NONE ctermfg=9 - hi gitcommitBranch term=bold cterm=bold ctermfg=5 - hi gitcommitComment cterm=NONE ctermfg=14 - hi gitcommitDiscardedFile term=bold cterm=bold ctermfg=1 - hi gitcommitDiscardedType cterm=NONE ctermfg=1 - hi gitcommitFile term=bold cterm=bold ctermfg=11 - hi gitcommitHeader cterm=NONE ctermfg=14 - hi gitcommitOnBranch term=bold cterm=bold ctermfg=14 - hi gitcommitSelectedFile term=bold cterm=bold ctermfg=2 - hi gitcommitSelectedType cterm=NONE ctermfg=2 - hi gitcommitUnmerged term=bold cterm=bold ctermfg=2 - hi gitcommitUnmergedFile term=bold cterm=bold ctermfg=3 - hi gitcommitUntrackedFile term=bold cterm=bold ctermfg=6 - hi helpHyperTextEntry cterm=NONE ctermfg=2 - hi helpHyperTextJump term=underline cterm=underline ctermfg=4 - hi helpNote cterm=NONE ctermfg=5 - hi helpOption cterm=NONE ctermfg=6 - hi helpVim cterm=NONE ctermfg=5 - hi hsImport cterm=NONE ctermfg=5 - hi hsImportLabel cterm=NONE ctermfg=6 - hi hsModuleName term=underline cterm=underline ctermfg=2 - hi hsNiceOperator cterm=NONE ctermfg=6 - hi hsStatement cterm=NONE ctermfg=6 - hi hsString cterm=NONE ctermfg=12 - hi hsStructure cterm=NONE ctermfg=6 - hi hsType cterm=NONE ctermfg=3 - hi hsTypedef cterm=NONE ctermfg=6 - hi hsVarSym cterm=NONE ctermfg=6 - hi hs_DeclareFunction cterm=NONE ctermfg=9 - hi hs_OpFunctionName cterm=NONE ctermfg=3 - hi hs_hlFunctionName cterm=NONE ctermfg=4 - hi htmlArg cterm=NONE ctermfg=12 - hi htmlEndTag cterm=NONE ctermfg=14 - hi htmlSpecialTagName cterm=NONE ctermfg=4 - hi htmlTag cterm=NONE ctermfg=14 - hi htmlTagN term=bold cterm=bold ctermfg=10 - hi htmlTagName term=bold cterm=bold ctermfg=4 - hi javaScript cterm=NONE ctermfg=3 - hi pandocBlockQuote cterm=NONE ctermfg=4 - hi pandocBlockQuoteLeader1 cterm=NONE ctermfg=4 - hi pandocBlockQuoteLeader2 cterm=NONE ctermfg=6 - hi pandocBlockQuoteLeader3 cterm=NONE ctermfg=3 - hi pandocBlockQuoteLeader4 cterm=NONE ctermfg=1 - hi pandocBlockQuoteLeader5 cterm=NONE ctermfg=11 - hi pandocBlockQuoteLeader6 cterm=NONE ctermfg=14 - hi pandocCitation cterm=NONE ctermfg=5 - hi pandocCitationDelim cterm=NONE ctermfg=5 - hi pandocCitationID term=underline cterm=underline ctermfg=5 - hi pandocCitationRef cterm=NONE ctermfg=5 - hi pandocComment cterm=NONE ctermfg=14 - hi pandocDefinitionBlock cterm=NONE ctermfg=13 - hi pandocDefinitionIndctr term=bold cterm=bold ctermfg=13 - hi pandocDefinitionTerm term=standout cterm=standout ctermfg=13 - hi pandocEmphasis cterm=NONE ctermfg=11 - hi pandocEmphasisDefinition cterm=NONE ctermfg=13 - hi pandocEmphasisHeading term=bold cterm=bold ctermfg=9 - hi pandocEmphasisNested term=bold cterm=bold ctermfg=11 - hi pandocEmphasisNestedDefinition term=bold cterm=bold ctermfg=13 - hi pandocEmphasisNestedHeading term=bold cterm=bold ctermfg=9 - hi pandocEmphasisNestedTable term=bold cterm=bold ctermfg=4 - hi pandocEmphasisTable cterm=NONE ctermfg=4 - hi pandocEscapePair term=bold cterm=bold ctermfg=1 - hi pandocFootnote cterm=NONE ctermfg=2 - hi pandocFootnoteDefLink term=bold cterm=bold ctermfg=2 - hi pandocFootnoteInline term=bold,underline cterm=bold,underline ctermfg=2 - hi pandocFootnoteLink term=underline cterm=underline ctermfg=2 - hi pandocHeading term=bold cterm=bold ctermfg=9 - hi pandocHeadingMarker term=bold cterm=bold ctermfg=3 - hi pandocImageCaption term=bold,underline cterm=bold,underline ctermfg=13 - hi pandocLinkDefinition term=underline cterm=underline ctermfg=6 - hi pandocLinkDefinitionID term=bold cterm=bold ctermfg=4 - hi pandocLinkDelim cterm=NONE ctermfg=14 - hi pandocLinkLabel term=underline cterm=underline ctermfg=4 - hi pandocLinkText term=bold,underline cterm=bold,underline ctermfg=4 - hi pandocLinkTitle term=underline cterm=underline ctermfg=12 - hi pandocLinkTitleDelim term=underline cterm=underline ctermfg=14 - hi pandocLinkURL term=underline cterm=underline ctermfg=12 - hi pandocListMarker cterm=NONE ctermfg=5 - hi pandocListReference term=underline cterm=underline ctermfg=5 - hi pandocMetadata term=bold cterm=bold ctermfg=4 - hi pandocMetadataDelim cterm=NONE ctermfg=14 - hi pandocMetadataKey cterm=NONE ctermfg=4 - hi pandocNonBreakingSpace term=reverse cterm=reverse ctermfg=1 - hi pandocRule term=bold cterm=bold ctermfg=4 - hi pandocRuleLine term=bold cterm=bold ctermfg=4 - hi pandocStrikeout term=reverse cterm=reverse ctermfg=14 - hi pandocStrikeoutDefinition term=reverse cterm=reverse ctermfg=13 - hi pandocStrikeoutHeading term=reverse cterm=reverse ctermfg=9 - hi pandocStrikeoutTable term=reverse cterm=reverse ctermfg=4 - hi pandocStrongEmphasis term=bold cterm=bold ctermfg=11 - hi pandocStrongEmphasisDefinition term=bold cterm=bold ctermfg=13 - hi pandocStrongEmphasisEmphasis term=bold cterm=bold ctermfg=11 - hi pandocStrongEmphasisEmphasisDefinition term=bold cterm=bold ctermfg=13 - hi pandocStrongEmphasisEmphasisHeading term=bold cterm=bold ctermfg=9 - hi pandocStrongEmphasisEmphasisTable term=bold cterm=bold ctermfg=4 - hi pandocStrongEmphasisHeading term=bold cterm=bold ctermfg=9 - hi pandocStrongEmphasisNested term=bold cterm=bold ctermfg=11 - hi pandocStrongEmphasisNestedDefinition term=bold cterm=bold ctermfg=13 - hi pandocStrongEmphasisNestedHeading term=bold cterm=bold ctermfg=9 - hi pandocStrongEmphasisNestedTable term=bold cterm=bold ctermfg=4 - hi pandocStrongEmphasisTable term=bold cterm=bold ctermfg=4 - hi pandocStyleDelim cterm=NONE ctermfg=14 - hi pandocSubscript cterm=NONE ctermfg=13 - hi pandocSubscriptDefinition cterm=NONE ctermfg=13 - hi pandocSubscriptHeading term=bold cterm=bold ctermfg=9 - hi pandocSubscriptTable cterm=NONE ctermfg=4 - hi pandocSuperscript cterm=NONE ctermfg=13 - hi pandocSuperscriptDefinition cterm=NONE ctermfg=13 - hi pandocSuperscriptHeading term=bold cterm=bold ctermfg=9 - hi pandocSuperscriptTable cterm=NONE ctermfg=4 - hi pandocTable cterm=NONE ctermfg=4 - hi pandocTableStructure cterm=NONE ctermfg=4 - hi pandocTableZebraDark cterm=NONE ctermfg=4 ctermbg=7 - hi pandocTableZebraLight cterm=NONE ctermfg=4 ctermbg=15 - hi pandocTitleBlock cterm=NONE ctermfg=4 - hi pandocTitleBlockTitle term=bold cterm=bold ctermfg=4 - hi pandocTitleComment term=bold cterm=bold ctermfg=4 - hi pandocVerbatimBlock cterm=NONE ctermfg=3 - hi pandocVerbatimInline cterm=NONE ctermfg=3 - hi pandocVerbatimInlineDefinition cterm=NONE ctermfg=13 - hi pandocVerbatimInlineHeading term=bold cterm=bold ctermfg=9 - hi pandocVerbatimInlineTable cterm=NONE ctermfg=4 - hi perlHereDoc cterm=NONE ctermfg=10 ctermbg=15 - hi perlStatementFileDesc cterm=NONE ctermfg=6 ctermbg=15 - hi perlVarPlain cterm=NONE ctermfg=3 ctermbg=15 - hi rubyDefine term=bold cterm=bold ctermfg=10 ctermbg=15 - hi texMathMatcher cterm=NONE ctermfg=3 ctermbg=15 - hi texMathZoneX cterm=NONE ctermfg=3 ctermbg=15 - hi texRefLabel cterm=NONE ctermfg=3 ctermbg=15 - hi texStatement cterm=NONE ctermfg=6 ctermbg=15 - hi vimCmdSep term=bold cterm=bold ctermfg=4 - hi vimCommand cterm=NONE ctermfg=3 - hi vimCommentString cterm=NONE ctermfg=13 - hi vimGroup term=bold,underline cterm=bold,underline ctermfg=4 - hi vimHiGroup cterm=NONE ctermfg=4 - hi vimHiLink cterm=NONE ctermfg=4 - hi vimIsCommand cterm=NONE ctermfg=12 - hi vimSynMtchOpt cterm=NONE ctermfg=3 - hi vimSynType cterm=NONE ctermfg=6 - -endif - -hi link Boolean Constant -hi link Character Constant -hi link Conditional Statement -hi link Debug Special -hi link Define PreProc -hi link Delimiter Special -hi link Exception Statement -hi link Float Number -hi link Function Identifier -hi link HelpCommand Statement -hi link Include PreProc -hi link Keyword Statement -hi link Label Statement -hi link Macro PreProc -hi link Number Constant -hi link Operator Statement -hi link PreCondit PreProc -hi link Repeat Statement -hi link SpecialChar Special -hi link SpecialComment Special -hi link StorageClass Type -hi link String Constant -hi link Structure Type -hi link SyntasticError SpellBad -hi link SyntasticErrorSign Error -hi link SyntasticStyleErrorLine SyntasticErrorLine -hi link SyntasticStyleErrorSign SyntasticErrorSign -hi link SyntasticStyleWarningLine SyntasticWarningLine -hi link SyntasticStyleWarningSign SyntasticWarningSign -hi link SyntasticWarning SpellCap -hi link SyntasticWarningSign Todo -hi link Tag Special -hi link Typedef Type - -hi link diffAdded Statement -hi link diffBDiffer WarningMsg -hi link diffCommon WarningMsg -hi link diffDiffer WarningMsg -hi link diffIdentical WarningMsg -hi link diffIsA WarningMsg -hi link diffLine Identifier -hi link diffNoEOL WarningMsg -hi link diffOnly WarningMsg -hi link diffRemoved WarningMsg - -hi link gitcommitDiscarded gitcommitComment -hi link gitcommitDiscardedArrow gitcommitDiscardedFile -hi link gitcommitNoBranch gitcommitBranch -hi link gitcommitSelected gitcommitComment -hi link gitcommitSelectedArrow gitcommitSelectedFile -hi link gitcommitUnmergedArrow gitcommitUnmergedFile -hi link gitcommitUntracked gitcommitComment - -hi link helpSpecial Special - -hi link hsDelimTypeExport Delimiter -hi link hsImportParams Delimiter -hi link hsModuleStartLabel hsStructure -hi link hsModuleWhereLabel hsModuleStartLabel -hi link htmlLink Function - -hi link lCursor Cursor - -hi link pandocCodeBlock pandocVerbatimBlock -hi link pandocCodeBlockDelim pandocVerbatimBlock -hi link pandocEscapedCharacter pandocEscapePair -hi link pandocLineBreak pandocEscapePair -hi link pandocMetadataTitle pandocMetadata -hi link pandocTableStructureEnd pandocTableStructre -hi link pandocTableStructureTop pandocTableStructre -hi link pandocVerbatimBlockDeep pandocVerbatimBlock - -hi link vimFunc Function -hi link vimSet Normal -hi link vimSetEqual Normal -hi link vimUserFunc Function -hi link vipmVar Identifier - -hi clear SyntasticErrorLine -hi clear SyntasticWarningLine -hi clear helpLeadBlank -hi clear helpNormal -hi clear pandocTableStructre diff --git a/colors/fu.vim b/colors/fu.vim deleted file mode 100644 index 10ab0e0..0000000 --- a/colors/fu.vim +++ /dev/null @@ -1,127 +0,0 @@ -" Vim color file -" -" Name: fu.vim -" Version: 1.1 -" Maintainer: Aaron Mueller -" Contributors: Florian Eitel -" Tinou -" -" This is a compositon from railscast, mustang and xoria256 with a lot of -" improvemts in the colors. Want to change toe colors to your needs? Go to -" this page to see what number is set wo what color: -" http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html -" -" History: -" 2010-06-09 - Merge changes from Florian Eitel in this file. There was many -" whitespace issues and some unused highlight settings which are removed -" now. Also merged Tinous GUI version of the whole colorscheme. Thanks a -" lot dudes! -" -" 2010-06-09 - Initial setup and creation of this file. Additional colors for -" Ruby and the diff view are added. -" - -if &t_Co != 256 && ! has("gui_running") - echomsg "err: please use GUI or a 256-color terminal (so that t_Co=256 could be set)" - finish -endif - -set background=dark -hi clear - -if exists("syntax_on") - syntax reset -endif -let colors_name = "fu" - - -" General colors -hi Normal ctermfg=252 ctermbg=234 guifg=#d0d0d0 guibg=#1c1c1c -hi CursorColumn ctermbg=238 guibg=#444444 -hi Cursor ctermbg=214 guibg=#ffaf00 -hi CursorLine ctermbg=238 guibg=#444444 -hi FoldColumn ctermfg=248 ctermbg=bg guifg=#a8a8a8 guibg=#000000 -hi Folded ctermfg=255 ctermbg=60 guifg=#eeeeee guibg=#5f5f87 -hi IncSearch ctermfg=0 ctermbg=223 guifg=#000000 guibg=#ffd7af -hi NonText ctermfg=248 ctermbg=233 cterm=bold guifg=#a8a8a8 guibg=#121212 -hi Search ctermfg=0 ctermbg=149 guifg=#000000 guibg=#afd75f -hi SignColumn ctermfg=248 ctermbg=232 guifg=#a8a8a8 -hi SpecialKey ctermfg=77 guifg=#5fd75f -hi StatusLine ctermfg=232 ctermbg=255 guifg=#080808 guibg=#eeeeee -hi StatusLineNC ctermfg=237 ctermbg=253 guifg=#3a3a3a guibg=#dadada -hi TabLine ctermfg=253 ctermbg=237 guifg=#dadada guibg=#3a3a3a -hi TabLineFill ctermfg=0 ctermbg=0 guifg=#000000 guibg=#000000 -hi TabLineSel ctermfg=255 ctermbg=33 guifg=#eeeeee guibg=#0087ff -hi VertSplit ctermfg=237 ctermbg=237 guifg=#3a3a3a guibg=#3a3a3a -hi Visual ctermfg=24 ctermbg=153 guifg=#005f87 guibg=#afd7ff -hi VIsualNOS ctermfg=24 ctermbg=153 guifg=#005f87 guibg=#afd7ff -hi LineNr ctermfg=234 ctermbg=232 guifg=#a8a8a8 guibg=#080808 -hi ModeMsg ctermfg=220 guifg=#ffd700 - -hi ErrorMsg ctermfg=196 ctermbg=52 guifg=#ff0000 guibg=#5f0000 -hi SpellBad ctermfg=196 ctermbg=52 - -if version >= 700 - hi CursorLine ctermbg=236 guibg=#303030 - hi CursorColumn ctermbg=236 guibg=#303030 - hi MatchParen ctermfg=157 ctermbg=237 cterm=bold guifg=#afffaf guibg=#3a3a3a - hi Pmenu ctermfg=255 ctermbg=236 guifg=#eeeeee guibg=#303030 - hi PmenuSel ctermfg=0 ctermbg=74 guifg=#000000 guibg=#5fafd7 - hi PmenuSbar ctermbg=243 guibg=#767676 - hi PmenuThumb ctermbg=252 guibg=#d0d0d0 - hi WildMenu ctermfg=255 ctermbg=33 guifg=#eeeeee guibg=#0087ff -endif - -" Syntax highlighting -hi Comment ctermfg=244 guifg=#808080 - -hi Constant ctermfg=220 cterm=bold guifg=#ffd700 -hi String ctermfg=107 ctermbg=233 guifg=#87af5f guibg=#121212 -hi Character ctermfg=228 ctermbg=16 guifg=#ffff87 guibg=#000000 -hi Number ctermfg=214 guifg=#ffaf00 -hi Boolean ctermfg=148 guifg=#afd700 - -hi Identifier ctermfg=149 guifg=#afd75f -hi Function ctermfg=231 guifg=#ffffff - -hi Statement ctermfg=103 guifg=#8787af -hi Conditional ctermfg=105 guifg=#8787ff -hi Repeat ctermfg=105 guifg=#8787ff -hi Label ctermfg=105 guifg=#8787ff -hi Operator ctermfg=243 guifg=#767676 -hi Keyword ctermfg=190 guifg=#d7ff00 -hi Exception ctermfg=166 ctermbg=0 guifg=#d75f00 guibg=#000000 - -hi PreProc ctermfg=229 guifg=#ffffaf - -hi Type ctermfg=111 guifg=#87afff -hi Structure ctermfg=111 ctermbg=233 guifg=#87afff guibg=#121212 - -hi Special ctermfg=220 guifg=#ffd700 -hi SpecialComment ctermfg=228 ctermbg=16 guifg=#ffff87 guibg=#000000 - -hi Error ctermfg=196 ctermbg=52 guifg=#ff0000 guibg=#5f0000 -hi Todo ctermfg=46 ctermbg=22 guifg=#00ff00 guibg=#005f00 - -" Diff -hi diffAdd ctermfg=bg ctermbg=151 guifg=#afd787 -hi diffDelete ctermfg=bg ctermbg=246 guifg=#d78787 -hi diffChange ctermfg=bg ctermbg=181 guifg=#000000 guibg=#afd7af -hi diffText ctermfg=bg ctermbg=174 cterm=bold guifg=#000000 guibg=#949494 - -" Ruby -hi rubyBlockParameter ctermfg=27 guifg=#005fff -hi rubyClass ctermfg=75 guifg=#5fafff -hi rubyConstant ctermfg=167 guifg=#d75f5f -hi rubyInterpolation ctermfg=107 guifg=#87af5f -hi rubyLocalVariableOrMethod ctermfg=189 guifg=#d7d7ff -hi rubyPredefinedConstant ctermfg=167 guifg=#d75f5f -hi rubyPseudoVariable ctermfg=221 guifg=#ffd75f -hi rubyStringDelimiter ctermfg=143 guifg=#afaf5f - -" git gutter -hi GitGutterAdd ctermbg=232 ctermfg=2 guifg=#009900 -hi GitGutterChange ctermbg=232 ctermfg=3 guifg=#bbbb00 -hi GitGutterDelete ctermbg=232 ctermfg=1 guifg=#ff2222 -hi GitGutterChangeDelete ctermbg=232 ctermfg=3 guifg=#bbbb00 -hi link GitGutterChangeDelete GitGutterChange diff --git a/colors/gentooish.vim b/colors/gentooish.vim deleted file mode 100644 index c823c28..0000000 --- a/colors/gentooish.vim +++ /dev/null @@ -1,163 +0,0 @@ -" Vim color file -" Name: gentooish.vim -" Author: Brian Carper -" Version: 0.3 - -set background=dark -hi clear -if exists("syntax_on") - syntax reset -endif - -if has('gui_running') - hi Normal gui=NONE guifg=#cccccc guibg=#191919 - - hi IncSearch gui=NONE guifg=#000000 guibg=#8bff95 - hi Search gui=NONE guifg=#cccccc guibg=#863132 - hi ErrorMsg gui=NONE guifg=#cccccc guibg=#863132 - hi WarningMsg gui=NONE guifg=#cccccc guibg=#863132 - hi ModeMsg gui=NONE guifg=#cccccc guibg=NONE - hi MoreMsg gui=NONE guifg=#cccccc guibg=NONE - hi Question gui=NONE guifg=#cccccc guibg=NONE - - hi StatusLine gui=BOLD guifg=#cccccc guibg=#333333 - hi User1 gui=BOLD guifg=#999999 guibg=#333333 - hi User2 gui=BOLD guifg=#8bff95 guibg=#333333 - hi StatusLineNC gui=NONE guifg=#999999 guibg=#333333 - hi VertSplit gui=NONE guifg=#cccccc guibg=#333333 - - hi WildMenu gui=BOLD guifg=#cf7dff guibg=#1F0F29 - - hi DiffText gui=NONE guifg=#000000 guibg=#4cd169 - hi DiffChange gui=NONE guifg=NONE guibg=#541691 - hi DiffDelete gui=NONE guifg=#cccccc guibg=#863132 - hi DiffAdd gui=NONE guifg=#cccccc guibg=#306d30 - - hi Cursor gui=NONE guifg=#000000 guibg=#8bff95 - - hi Folded gui=NONE guifg=#aaa400 guibg=#000000 - hi FoldColumn gui=NONE guifg=#cccccc guibg=#000000 - - hi Directory gui=NONE guifg=#8bff95 guibg=NONE - hi LineNr gui=NONE guifg=#bbbbbb guibg=#222222 - hi NonText gui=NONE guifg=#555555 guibg=NONE - hi SpecialKey gui=NONE guifg=#6f6f2f guibg=NONE - hi Title gui=NONE guifg=#9a383a guibg=NONE - hi Visual gui=NONE guifg=#cccccc guibg=#1d474f - - hi Comment gui=NONE guifg=#666666 guibg=NONE - hi Constant gui=NONE guifg=#b8bb00 guibg=NONE - hi Boolean gui=NONE guifg=#00ff00 guibg=NONE - hi String gui=NONE guifg=#5dff9e guibg=#0f291a - hi Error gui=NONE guifg=#990000 guibg=#000000 - hi Identifier gui=NONE guifg=#4cbbd1 guibg=NONE - hi Ignore gui=NONE guifg=#555555 - hi Number gui=NONE guifg=#ddaa66 guibg=NONE - hi PreProc gui=NONE guifg=#9a383a guibg=NONE - - hi Special gui=NONE guifg=#ffcd8b guibg=NONE - - hi Statement gui=NONE guifg=#4cd169 guibg=NONE - hi Todo gui=NONE guifg=#cccccc guibg=#863132 - hi Type gui=NONE guifg=#c476f1 guibg=NONE - hi Underlined gui=UNDERLINE guifg=#cccccc guibg=NONE - - hi Visual gui=NONE guifg=#ffffff guibg=#6e4287 - hi VisualNOS gui=NONE guifg=#cccccc guibg=#000000 - - hi CursorLine gui=NONE guifg=NONE guibg=#222222 - hi CursorColumn gui=NONE guifg=NONE guibg=#222222 - - hi lispList gui=NONE guifg=#555555 - - if v:version >= 700 - hi Pmenu gui=NONE guifg=#cccccc guibg=#222222 - hi PMenuSel gui=BOLD guifg=#c476f1 guibg=#000000 - hi PmenuSbar gui=NONE guifg=#cccccc guibg=#000000 - hi PmenuThumb gui=NONE guifg=#cccccc guibg=#333333 - - hi SpellBad gui=undercurl guisp=#cc6666 - hi SpellRare gui=undercurl guisp=#cc66cc - hi SpellLocal gui=undercurl guisp=#cccc66 - hi SpellCap gui=undercurl guisp=#66cccc - - hi MatchParen gui=NONE guifg=#ffffff guibg=#005500 - endif -else - " Dumped via CSApprox, then edited slightly - " (http://www.vim.org/scripts/script.php?script_id=2390) - hi SpecialKey term=bold ctermfg=58 - hi NonText term=bold ctermfg=240 - hi Directory term=bold ctermfg=120 - hi ErrorMsg term=standout ctermfg=252 ctermbg=95 - hi IncSearch term=reverse ctermfg=16 ctermbg=120 - hi Search term=reverse ctermfg=252 ctermbg=95 - hi MoreMsg term=bold ctermfg=252 - hi ModeMsg term=bold ctermfg=252 - hi LineNr term=underline ctermfg=250 ctermbg=235 - hi Question term=standout ctermfg=252 - hi StatusLine term=bold,reverse cterm=bold ctermfg=252 ctermbg=236 - hi StatusLineNC term=reverse cterm=bold ctermfg=240 ctermbg=236 - hi VertSplit term=reverse ctermfg=252 ctermbg=236 - hi Title term=bold ctermfg=95 - hi Visual term=reverse ctermfg=231 ctermbg=60 - hi VisualNOS term=bold,underline ctermfg=252 ctermbg=16 - hi WarningMsg term=standout ctermfg=252 ctermbg=95 - hi WildMenu term=standout cterm=bold ctermfg=177 ctermbg=16 - hi Folded term=standout ctermfg=142 ctermbg=16 - hi FoldColumn term=standout ctermfg=252 ctermbg=16 - hi DiffAdd term=bold ctermfg=252 ctermbg=59 - hi DiffChange term=bold ctermbg=54 - hi DiffDelete term=bold ctermfg=252 ctermbg=95 - hi DiffText term=reverse ctermfg=16 ctermbg=77 - hi SignColumn term=standout ctermfg=51 ctermbg=250 - hi TabLine term=underline cterm=underline ctermbg=248 - hi TabLineSel term=bold cterm=bold - hi TabLineFill term=reverse ctermfg=234 ctermbg=252 - hi CursorColumn term=reverse ctermbg=235 - hi CursorLine term=underline ctermbg=235 - hi Cursor ctermfg=16 ctermbg=120 - hi lCursor ctermfg=234 ctermbg=252 - hi Normal ctermfg=252 ctermbg=234 - hi Comment term=bold ctermfg=241 - hi Constant term=underline ctermfg=142 - hi Special term=bold ctermfg=222 - hi Identifier term=underline ctermfg=74 - hi Statement term=bold ctermfg=77 - hi PreProc term=underline ctermfg=95 - hi Type term=underline ctermfg=177 - hi Underlined term=underline cterm=underline ctermfg=252 - hi Ignore ctermfg=240 - hi Error term=reverse ctermfg=88 ctermbg=16 - hi Todo term=standout ctermfg=252 ctermbg=95 - hi String ctermfg=85 ctermbg=16 - hi Number ctermfg=179 - hi Boolean ctermfg=46 - hi Special term=bold ctermfg=222 - hi Identifier term=underline ctermfg=74 - hi Statement term=bold ctermfg=77 - hi PreProc term=underline ctermfg=95 - hi Type term=underline ctermfg=177 - hi Underlined term=underline cterm=underline ctermfg=252 - hi Ignore ctermfg=240 - hi Error term=reverse ctermfg=88 ctermbg=16 - hi Todo term=standout ctermfg=252 ctermbg=95 - hi String ctermfg=85 ctermbg=16 - hi Number ctermfg=179 - hi Boolean ctermfg=46 - hi User1 cterm=bold ctermfg=246 ctermbg=236 - hi User2 cterm=bold ctermfg=120 ctermbg=236 - if v:version >= 700 - hi SpellBad term=reverse cterm=undercurl ctermfg=167 - hi SpellCap term=reverse cterm=undercurl ctermfg=80 - hi SpellRare term=reverse cterm=undercurl ctermfg=170 - hi SpellLocal term=underline cterm=undercurl ctermfg=185 - hi Pmenu ctermfg=252 ctermbg=235 - hi PmenuSel cterm=bold ctermfg=177 ctermbg=16 - hi PmenuSbar ctermfg=252 ctermbg=16 - hi PmenuThumb ctermfg=252 ctermbg=236 - hi MatchParen term=reverse ctermfg=231 ctermbg=22 - endif -endif - - diff --git a/colors/greenvision.vim b/colors/greenvision.vim deleted file mode 100644 index c20329c..0000000 --- a/colors/greenvision.vim +++ /dev/null @@ -1,72 +0,0 @@ -" Vim color file -" Name: greenvision.vim -" Maintainer: Paul B. Mahol -" Last Change: 6.6.2008 -" License: Vim License -" Revision: 29 - -if !has("gui_running") && &t_Co != 256 && &t_Co != 88 - echomsg "" - echomsg "err: please use GUI or a 256-color terminal or 88-color terminal" - echomsg "" - finish -endif - -if &background == "light" - set background=dark -endif - -hi clear - -if exists("syntax_on") - syntax reset -endif - -let g:colors_name = 'greenvision' - -hi Comment guifg=#008220 guibg=#000000 gui=none ctermfg=034 ctermbg=000 cterm=none -hi Constant guifg=#1fc700 guibg=#001c00 gui=none ctermfg=041 ctermbg=000 cterm=none -hi Cursor guifg=#00ff00 gui=bold,reverse ctermfg=010 ctermbg=000 cterm=bold,reverse -hi CursorColumn guifg=#000000 guibg=#00cc00 gui=none ctermfg=000 ctermbg=002 cterm=none -hi CursorIM guifg=#00ff00 guibg=#000000 gui=bold ctermfg=046 ctermbg=000 cterm=bold -hi CursorLine guifg=#000000 guibg=#00cc00 gui=none ctermfg=000 ctermbg=002 cterm=none -hi DiffAdd guifg=#00bf00 guibg=#002200 gui=none ctermfg=034 ctermbg=000 cterm=none -hi DiffChange guifg=#00a900 guibg=#002200 gui=none ctermfg=040 ctermbg=000 cterm=none -hi DiffDelete guifg=#000000 guibg=#005500 gui=none ctermfg=002 ctermbg=000 cterm=none -hi DiffText guifg=#00aa00 guibg=#004400 gui=underline ctermfg=028 ctermbg=000 cterm=none -hi Directory guifg=#009330 guibg=#000000 gui=none ctermfg=022 ctermbg=000 cterm=none -hi Error guifg=#000000 guibg=#00d000 gui=none ctermfg=000 ctermbg=010 cterm=none -hi ErrorMsg guifg=#000000 guibg=#00ff00 gui=bold ctermfg=000 ctermbg=010 cterm=none -hi FoldColumn guifg=#00b900 guibg=#000300 gui=none ctermfg=046 ctermbg=016 cterm=none -hi Folded guifg=#00bf00 guibg=#001200 gui=none ctermfg=010 ctermbg=022 cterm=none -hi Identifier guifg=#50d930 guibg=#000000 gui=none ctermfg=028 ctermbg=000 cterm=none -hi IncSearch gui=reverse cterm=reverse -hi LineNr guifg=#007900 guibg=#000600 gui=none ctermfg=034 ctermbg=016 cterm=none -hi MatchParen guifg=#304300 guibg=#00fe00 gui=none ctermfg=010 ctermbg=022 cterm=bold -hi ModeMsg guifg=#00ea00 guibg=#000900 gui=none ctermfg=002 ctermbg=000 cterm=none -hi MoreMsg guifg=#00e700 guibg=#001000 gui=bold ctermfg=002 ctermbg=000 cterm=bold -hi NonText guifg=#008700 guibg=#001000 gui=none ctermfg=022 ctermbg=000 cterm=none -hi Normal guifg=#00a900 guibg=#000000 gui=none ctermfg=002 ctermbg=000 cterm=none -hi Pmenu guifg=#00bf00 guibg=#000a00 gui=none ctermfg=002 ctermbg=000 cterm=none -hi PmenuSbar guifg=#00dc00 guibg=#001c00 gui=none ctermfg=034 ctermbg=022 cterm=none -hi PmenuSel guifg=#00f300 guibg=#002200 gui=none ctermfg=010 ctermbg=022 cterm=none -hi PreProc guifg=#00ac5c guibg=#000000 gui=none ctermfg=047 ctermbg=000 cterm=none -hi Question guifg=#009f00 guibg=#000000 gui=none ctermfg=040 ctermbg=000 cterm=none -hi Search gui=reverse cterm=reverse -hi Special guifg=#00d700 guibg=#001200 gui=none ctermfg=002 ctermbg=000 cterm=none -hi SpecialKey guifg=#008000 guibg=#002300 gui=bold ctermfg=034 ctermbg=000 cterm=bold -hi Statement guifg=#2fc626 guibg=#000000 gui=none ctermfg=010 ctermbg=000 cterm=none -hi StatusLine guifg=#00ff00 guibg=#001000 gui=none ctermfg=047 ctermbg=022 cterm=bold -hi StatusLineNC guifg=#005500 guibg=#001000 gui=none ctermfg=034 ctermbg=022 cterm=none -hi TabLine guifg=#00f400 guibg=#000a00 gui=none ctermfg=040 ctermbg=000 cterm=none -hi TabLineFill guifg=#00ea00 guibg=#000000 gui=none ctermfg=000 ctermbg=000 cterm=none -hi TabLineSel guifg=#00f000 guibg=#002a00 gui=none ctermfg=046 ctermbg=022 cterm=bold -hi Title guifg=#09ab00 guibg=#000000 gui=bold ctermfg=010 ctermbg=000 cterm=bold -hi Todo guifg=#000000 guibg=#00ed00 gui=none ctermfg=000 ctermbg=002 cterm=none -hi Type guifg=#1fb631 guibg=#000000 gui=none ctermfg=046 ctermbg=000 cterm=none -hi Underlined guifg=#00b400 guibg=#000000 gui=underline ctermfg=002 ctermbg=000 cterm=underline -hi VertSplit guifg=#000600 guibg=#001f00 gui=none ctermfg=022 ctermbg=022 cterm=none -hi Visual guibg=#001500 gui=reverse ctermbg=000 cterm=reverse -hi VisualNOS guibg=#002700 gui=reverse ctermbg=022 cterm=reverse -hi WarningMsg guifg=#000000 guibg=#00ff00 gui=none ctermfg=010 ctermbg=000 cterm=none -hi WildMenu guifg=#00cb00 guibg=#000000 gui=reverse ctermfg=000 ctermbg=010 cterm=reverse diff --git a/colors/heroku-terminal.vim b/colors/heroku-terminal.vim deleted file mode 100644 index 23c5b3e..0000000 --- a/colors/heroku-terminal.vim +++ /dev/null @@ -1,363 +0,0 @@ -" Heroku Colorscheme -" -" - iTerm2 only -" - Depends on heroku colorscheme for iTerm2 -" - It's for terminal vim only; -" - Hex color conversion functions borrowed from the theme 'Desert256'" - -let s:background = "1b1b24" -let s:foreground = "8584ae" -let s:selection = "ffffff" -let s:line = "262633" -let s:comment = "62548b" -let s:red = "c13333" -let s:orange = "ffa500" -let s:yellow = "ffea00" -let s:green = "6dba09" -let s:aqua = "b4f5fe" -let s:blue = "09afed" -let s:purple = "a292ff" -let s:window = "17171d" - -set background=dark -hi clear -hi clear SpellCap -hi clear SpellBad -hi SpellBad cterm=underline -syntax reset - -let g:colors_name = "heroku-terminal" - -if &t_Co == 88 || &t_Co == 256 - " Returns an approximate grey index for the given grey level - fun grey_number(x) - if &t_Co == 88 - if a:x < 23 - return 0 - elseif a:x < 69 - return 1 - elseif a:x < 103 - return 2 - elseif a:x < 127 - return 3 - elseif a:x < 150 - return 4 - elseif a:x < 173 - return 5 - elseif a:x < 196 - return 6 - elseif a:x < 219 - return 7 - elseif a:x < 243 - return 8 - else - return 9 - endif - else - if a:x < 14 - return 0 - else - let l:n = (a:x - 8) / 10 - let l:m = (a:x - 8) % 10 - if l:m < 5 - return l:n - else - return l:n + 1 - endif - endif - endif - endfun - - " Returns the actual grey level represented by the grey index - fun grey_level(n) - if &t_Co == 88 - if a:n == 0 - return 0 - elseif a:n == 1 - return 46 - elseif a:n == 2 - return 92 - elseif a:n == 3 - return 115 - elseif a:n == 4 - return 139 - elseif a:n == 5 - return 162 - elseif a:n == 6 - return 185 - elseif a:n == 7 - return 208 - elseif a:n == 8 - return 231 - else - return 255 - endif - else - if a:n == 0 - return 0 - else - return 8 + (a:n * 10) - endif - endif - endfun - - " Returns the palette index for the given grey index - fun grey_colour(n) - if &t_Co == 88 - if a:n == 0 - return 16 - elseif a:n == 9 - return 79 - else - return 79 + a:n - endif - else - if a:n == 0 - return 16 - elseif a:n == 25 - return 231 - else - return 231 + a:n - endif - endif - endfun - - " Returns an approximate colour index for the given colour level - fun rgb_number(x) - if &t_Co == 88 - if a:x < 69 - return 0 - elseif a:x < 172 - return 1 - elseif a:x < 230 - return 2 - else - return 3 - endif - else - if a:x < 75 - return 0 - else - let l:n = (a:x - 55) / 40 - let l:m = (a:x - 55) % 40 - if l:m < 20 - return l:n - else - return l:n + 1 - endif - endif - endif - endfun - - " Returns the actual colour level for the given colour index - fun rgb_level(n) - if &t_Co == 88 - if a:n == 0 - return 0 - elseif a:n == 1 - return 139 - elseif a:n == 2 - return 205 - else - return 255 - endif - else - if a:n == 0 - return 0 - else - return 55 + (a:n * 40) - endif - endif - endfun - - " Returns the palette index for the given R/G/B colour indices - fun rgb_colour(x, y, z) - if &t_Co == 88 - return 16 + (a:x * 16) + (a:y * 4) + a:z - else - return 16 + (a:x * 36) + (a:y * 6) + a:z - endif - endfun - - " Returns the palette index to approximate the given R/G/B colour levels - fun colour(r, g, b) - " Get the closest grey - let l:gx = grey_number(a:r) - let l:gy = grey_number(a:g) - let l:gz = grey_number(a:b) - - " Get the closest colour - let l:x = rgb_number(a:r) - let l:y = rgb_number(a:g) - let l:z = rgb_number(a:b) - - if l:gx == l:gy && l:gy == l:gz - " There are two possibilities - let l:dgr = grey_level(l:gx) - a:r - let l:dgg = grey_level(l:gy) - a:g - let l:dgb = grey_level(l:gz) - a:b - let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb) - let l:dr = rgb_level(l:gx) - a:r - let l:dg = rgb_level(l:gy) - a:g - let l:db = rgb_level(l:gz) - a:b - let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db) - if l:dgrey < l:drgb - " Use the grey - return grey_colour(l:gx) - else - " Use the colour - return rgb_colour(l:x, l:y, l:z) - endif - else - " Only one possibility - return rgb_colour(l:x, l:y, l:z) - endif - endfun - - " Returns the palette index to approximate the 'rrggbb' hex string - fun rgb(rgb) - let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0 - let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0 - let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0 - - return colour(l:r, l:g, l:b) - endfun - - " Sets the highlighting for the given group - fun X(group, fg, bg, attr) - if a:fg != "" - exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . rgb(a:fg) - endif - if a:bg != "" - exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . rgb(a:bg) - endif - if a:attr != "" - exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr - endif - endfun - - " Vim Highlighting - highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE - call X("NonText", s:comment, "", "") - call X("SpecialKey", s:selection, "", "") - call X("Search", s:yellow, s:background, "") - call X("TabLine", s:foreground, s:background, "reverse") - call X("StatusLine", s:window, s:yellow, "reverse") - call X("StatusLineNC", s:window, s:foreground, "reverse") - call X("VertSplit", s:window, s:window, "none") - call X("Visual", "", s:selection, "") - call X("Directory", s:blue, "", "") - call X("ModeMsg", s:green, "", "") - call X("MoreMsg", s:green, "", "") - call X("Question", s:green, "", "") - call X("WarningMsg", s:red, "", "") - call X("MatchParen", s:selection, s:foreground, "") - call X("Folded", s:comment, s:background, "") - call X("FoldColumn", "", s:background, "") - if version >= 700 - call X("CursorLine", "", s:line, "none") - call X("CursorColumn", "", s:line, "none") - call X("PMenu", s:foreground, s:selection, "none") - call X("PMenuSel", s:foreground, s:selection, "reverse") - end - if version >= 703 - call X("ColorColumn", "", s:line, "none") - end - - " Standard Highlighting - call X("Comment", s:comment, "", "") - call X("Todo", s:comment, s:foreground, "") - call X("Title", s:comment, "", "") - call X("Identifier", s:red, "", "none") - call X("Statement", s:foreground, "", "") - call X("Conditional", s:foreground, "", "") - call X("Repeat", s:foreground, "", "") - call X("Structure", s:purple, "", "") - call X("Function", s:blue, "", "") - call X("Constant", s:orange, "", "") - call X("String", s:green, "", "") - call X("Special", s:foreground, "", "") - call X("PreProc", s:purple, "", "") - call X("Operator", s:aqua, "", "none") - call X("Type", s:blue, "", "none") - call X("Define", s:purple, "", "none") - call X("Include", s:blue, "", "") - "call X("Ignore", "666666", "", "") - - " Vim Highlighting - call X("vimCommand", s:red, "", "none") - - " C Highlighting - call X("cType", s:yellow, "", "") - call X("cStorageClass", s:purple, "", "") - call X("cConditional", s:purple, "", "") - call X("cRepeat", s:purple, "", "") - - " PHP Highlighting - call X("phpVarSelector", s:red, "", "") - call X("phpKeyword", s:purple, "", "") - call X("phpRepeat", s:purple, "", "") - call X("phpConditional", s:purple, "", "") - call X("phpStatement", s:purple, "", "") - call X("phpMemberSelector", s:foreground, "", "") - - " Ruby Highlighting - call X("rubySymbol", s:green, "", "") - call X("rubyConstant", s:yellow, "", "") - call X("rubyAttribute", s:blue, "", "") - call X("rubyInclude", s:blue, "", "") - call X("rubyLocalVariableOrMethod", s:orange, "", "") - call X("rubyCurlyBlock", s:orange, "", "") - call X("rubyStringDelimiter", s:green, "", "") - call X("rubyInterpolationDelimiter", s:orange, "", "") - call X("rubyConditional", s:purple, "", "") - call X("rubyRepeat", s:purple, "", "") - - " Python Highlighting - call X("pythonInclude", s:purple, "", "") - call X("pythonStatement", s:purple, "", "") - call X("pythonConditional", s:purple, "", "") - call X("pythonFunction", s:blue, "", "") - - " JavaScript Highlighting - call X("javaScriptBraces", s:foreground, "", "") - call X("javaScriptFunction", s:purple, "", "") - call X("javaScriptConditional", s:purple, "", "") - call X("javaScriptRepeat", s:purple, "", "") - call X("javaScriptNumber", s:orange, "", "") - call X("javaScriptMember", s:orange, "", "") - - " CoffeeScript Highlighting - call X("coffeeKeyword", s:orange, "", "") - call X("coffeeRepeat", s:orange, "", "") - call X("coffeeConditional", s:orange, "", "") - - call X("coffeeParen", s:aqua, "", "") - call X("coffeeParens", s:blue, "", "") - call X("coffeeBracket", s:aqua, "", "") - call X("coffeeBrackets", s:blue, "", "") - - call X("coffeeDotAccess", s:aqua, "", "") - call X("coffeeStatement", s:red, "", "") - - " HTML Highlighting - call X("htmlTag", s:red, "", "") - call X("htmlTagName", s:red, "", "") - call X("htmlArg", s:red, "", "") - call X("htmlScriptTag", s:red, "", "") - - " Diff Highlighting - call X("diffAdded", s:green, "", "") - call X("diffRemoved", s:red, "", "") - - " Delete Functions - delf X - delf rgb - delf colour - delf rgb_colour - delf rgb_level - delf rgb_number - delf grey_colour - delf grey_level - delf grey_number -endif diff --git a/colors/heroku.vim b/colors/heroku.vim deleted file mode 100644 index a11b931..0000000 --- a/colors/heroku.vim +++ /dev/null @@ -1,355 +0,0 @@ -let s:foreground = "8584ae" -let s:background = "1b1b24" -let s:selection = "ffffff" -let s:line = "262633" -let s:comment = "62548b" -let s:red = "c13333" -let s:orange = "ffa500" -let s:yellow = "ffea00" -let s:green = "6dba09" -let s:aqua = "b4f5fe" -let s:blue = "09afed" -let s:purple = "a292ff" -let s:window = "17171d" - -set background=dark -hi clear -hi clear SpellBad -syntax reset - -let g:colors_name = "heroku" - -if has("gui_running") - " Returns an approximate grey index for the given grey level - fun grey_number(x) - if &t_Co == 88 - if a:x < 23 - return 0 - elseif a:x < 69 - return 1 - elseif a:x < 103 - return 2 - elseif a:x < 127 - return 3 - elseif a:x < 150 - return 4 - elseif a:x < 173 - return 5 - elseif a:x < 196 - return 6 - elseif a:x < 219 - return 7 - elseif a:x < 243 - return 8 - else - return 9 - endif - else - if a:x < 14 - return 0 - else - let l:n = (a:x - 8) / 10 - let l:m = (a:x - 8) % 10 - if l:m < 5 - return l:n - else - return l:n + 1 - endif - endif - endif - endfun - - " Returns the actual grey level represented by the grey index - fun grey_level(n) - if &t_Co == 88 - if a:n == 0 - return 0 - elseif a:n == 1 - return 46 - elseif a:n == 2 - return 92 - elseif a:n == 3 - return 115 - elseif a:n == 4 - return 139 - elseif a:n == 5 - return 162 - elseif a:n == 6 - return 185 - elseif a:n == 7 - return 208 - elseif a:n == 8 - return 231 - else - return 255 - endif - else - if a:n == 0 - return 0 - else - return 8 + (a:n * 10) - endif - endif - endfun - - " Returns the palette index for the given grey index - fun grey_colour(n) - if &t_Co == 88 - if a:n == 0 - return 16 - elseif a:n == 9 - return 79 - else - return 79 + a:n - endif - else - if a:n == 0 - return 16 - elseif a:n == 25 - return 231 - else - return 231 + a:n - endif - endif - endfun - - " Returns an approximate colour index for the given colour level - fun rgb_number(x) - if &t_Co == 88 - if a:x < 69 - return 0 - elseif a:x < 172 - return 1 - elseif a:x < 230 - return 2 - else - return 3 - endif - else - if a:x < 75 - return 0 - else - let l:n = (a:x - 55) / 40 - let l:m = (a:x - 55) % 40 - if l:m < 20 - return l:n - else - return l:n + 1 - endif - endif - endif - endfun - - " Returns the actual colour level for the given colour index - fun rgb_level(n) - if &t_Co == 88 - if a:n == 0 - return 0 - elseif a:n == 1 - return 139 - elseif a:n == 2 - return 205 - else - return 255 - endif - else - if a:n == 0 - return 0 - else - return 55 + (a:n * 40) - endif - endif - endfun - - " Returns the palette index for the given R/G/B colour indices - fun rgb_colour(x, y, z) - if &t_Co == 88 - return 16 + (a:x * 16) + (a:y * 4) + a:z - else - return 16 + (a:x * 36) + (a:y * 6) + a:z - endif - endfun - - " Returns the palette index to approximate the given R/G/B colour levels - fun colour(r, g, b) - " Get the closest grey - let l:gx = grey_number(a:r) - let l:gy = grey_number(a:g) - let l:gz = grey_number(a:b) - - " Get the closest colour - let l:x = rgb_number(a:r) - let l:y = rgb_number(a:g) - let l:z = rgb_number(a:b) - - if l:gx == l:gy && l:gy == l:gz - " There are two possibilities - let l:dgr = grey_level(l:gx) - a:r - let l:dgg = grey_level(l:gy) - a:g - let l:dgb = grey_level(l:gz) - a:b - let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb) - let l:dr = rgb_level(l:gx) - a:r - let l:dg = rgb_level(l:gy) - a:g - let l:db = rgb_level(l:gz) - a:b - let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db) - if l:dgrey < l:drgb - " Use the grey - return grey_colour(l:gx) - else - " Use the colour - return rgb_colour(l:x, l:y, l:z) - endif - else - " Only one possibility - return rgb_colour(l:x, l:y, l:z) - endif - endfun - - " Returns the palette index to approximate the 'rrggbb' hex string - fun rgb(rgb) - let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0 - let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0 - let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0 - - return colour(l:r, l:g, l:b) - endfun - - " Sets the highlighting for the given group - fun X(group, fg, bg, attr) - if a:fg != "" - exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . rgb(a:fg) - endif - if a:bg != "" - exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . rgb(a:bg) - endif - if a:attr != "" - exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr - endif - endfun - - " Vim Highlighting - call X("Normal", s:foreground, s:background, "") - highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE - call X("NonText", s:comment, "", "") - call X("SpecialKey", s:selection, "", "") - call X("Search", s:foreground, s:yellow, "") - call X("TabLine", s:foreground, s:background, "reverse") - call X("StatusLine", s:window, s:yellow, "reverse") - call X("StatusLineNC", s:window, s:foreground, "reverse") - call X("VertSplit", s:window, s:window, "none") - call X("Visual", "", s:selection, "") - call X("Directory", s:blue, "", "") - call X("ModeMsg", s:green, "", "") - call X("MoreMsg", s:green, "", "") - call X("Question", s:green, "", "") - call X("WarningMsg", s:red, "", "") - call X("MatchParen", "", s:selection, "") - call X("Folded", s:comment, s:background, "") - call X("FoldColumn", "", s:background, "") - if version >= 700 - call X("CursorLine", "", s:line, "none") - call X("CursorColumn", "", s:line, "none") - call X("PMenu", s:foreground, s:selection, "none") - call X("PMenuSel", s:foreground, s:selection, "reverse") - end - if version >= 703 - call X("ColorColumn", "", s:line, "none") - end - - " Standard Highlighting - call X("Comment", s:comment, "", "") - call X("Todo", s:comment, s:background, "") - call X("Title", s:comment, "", "") - call X("Identifier", s:red, "", "none") - call X("Statement", s:foreground, "", "") - call X("Conditional", s:foreground, "", "") - call X("Repeat", s:foreground, "", "") - call X("Structure", s:purple, "", "") - call X("Function", s:blue, "", "") - call X("Constant", s:orange, "", "") - call X("String", s:green, "", "") - call X("Special", s:foreground, "", "") - call X("PreProc", s:purple, "", "") - call X("Operator", s:aqua, "", "none") - call X("Type", s:blue, "", "none") - call X("Define", s:purple, "", "none") - call X("Include", s:blue, "", "") - "call X("Ignore", "666666", "", "") - - " Vim Highlighting - call X("vimCommand", s:red, "", "none") - - " C Highlighting - call X("cType", s:yellow, "", "") - call X("cStorageClass", s:purple, "", "") - call X("cConditional", s:purple, "", "") - call X("cRepeat", s:purple, "", "") - - " PHP Highlighting - call X("phpVarSelector", s:red, "", "") - call X("phpKeyword", s:purple, "", "") - call X("phpRepeat", s:purple, "", "") - call X("phpConditional", s:purple, "", "") - call X("phpStatement", s:purple, "", "") - call X("phpMemberSelector", s:foreground, "", "") - - " Ruby Highlighting - call X("rubySymbol", s:green, "", "") - call X("rubyConstant", s:yellow, "", "") - call X("rubyAttribute", s:blue, "", "") - call X("rubyInclude", s:blue, "", "") - call X("rubyLocalVariableOrMethod", s:orange, "", "") - call X("rubyCurlyBlock", s:orange, "", "") - call X("rubyStringDelimiter", s:green, "", "") - call X("rubyInterpolationDelimiter", s:orange, "", "") - call X("rubyConditional", s:purple, "", "") - call X("rubyRepeat", s:purple, "", "") - - " Python Highlighting - call X("pythonInclude", s:purple, "", "") - call X("pythonStatement", s:purple, "", "") - call X("pythonConditional", s:purple, "", "") - call X("pythonFunction", s:blue, "", "") - - " JavaScript Highlighting - call X("javaScriptBraces", s:foreground, "", "") - call X("javaScriptFunction", s:purple, "", "") - call X("javaScriptConditional", s:purple, "", "") - call X("javaScriptRepeat", s:purple, "", "") - call X("javaScriptNumber", s:orange, "", "") - call X("javaScriptMember", s:orange, "", "") - - " CoffeeScript Highlighting - call X("coffeeKeyword", s:orange, "", "") - call X("coffeeRepeat", s:orange, "", "") - call X("coffeeConditional", s:orange, "", "") - - call X("coffeeParen", s:aqua, "", "") - call X("coffeeParens", s:blue, "", "") - call X("coffeeBracket", s:aqua, "", "") - call X("coffeeBrackets", s:blue, "", "") - - call X("coffeeDotAccess", s:aqua, "", "") - call X("coffeeStatement", s:red, "", "") - - " HTML Highlighting - call X("htmlTag", s:red, "", "") - call X("htmlTagName", s:red, "", "") - call X("htmlArg", s:red, "", "") - call X("htmlScriptTag", s:red, "", "") - - " Diff Highlighting - call X("diffAdded", s:green, "", "") - call X("diffRemoved", s:red, "", "") - - " Delete Functions - delf X - delf rgb - delf colour - delf rgb_colour - delf rgb_level - delf rgb_number - delf grey_colour - delf grey_level - delf grey_number -endif diff --git a/colors/icansee.vim b/colors/icansee.vim deleted file mode 100644 index 615f035..0000000 --- a/colors/icansee.vim +++ /dev/null @@ -1,61 +0,0 @@ -" Vim color file tailored legibility on black background. -" Add below line to your vimrc file to ensure optimal experience (sets term to use -" 256, instead of 16, colors): -" set t_Co=256 -" -" Maintainer: John Rhee -" Last Change: 2007/09/11 v0.2 Set PreProc (set variables) to white. - -hi clear -set background=dark -if exists("syntax_on") - syntax reset -endif -let g:colors_name = "icansee" - -"color settings for these terminal types: -"Black term=NONE cterm=NONE ctermfg=0 ctermbg=0 -"DarkRed term=NONE cterm=NONE ctermfg=1 ctermbg=0 -"DarkGreen term=NONE cterm=NONE ctermfg=2 ctermbg=0 -"Brown term=NONE cterm=NONE ctermfg=3 ctermbg=0 -"DarkBlue term=NONE cterm=NONE ctermfg=4 ctermbg=0 -"DarkMagenta term=NONE cterm=NONE ctermfg=5 ctermbg=0 -"DarkCyan term=NONE cterm=NONE ctermfg=6 ctermbg=0 -"Gray term=NONE cterm=NONE ctermfg=7 ctermbg=0 -"DarkGray term=NONE cterm=bold ctermfg=0 ctermbg=0 -"Red term=NONE cterm=bold ctermfg=1 ctermbg=0 -"Green term=NONE cterm=bold ctermfg=2 ctermbg=0 -"Yellow term=NONE cterm=bold ctermfg=3 ctermbg=0 -"Blue term=NONE cterm=bold ctermfg=4 ctermbg=0 -"Magenta term=NONE cterm=bold ctermfg=5 ctermbg=0 -"Cyan term=NONE cterm=bold ctermfg=6 ctermbg=0 -"White term=NONE cterm=bold ctermfg=7 ctermbg=0 - -"hi Comment term=bold ctermfg=Blue guifg=Blue -hi Comment term=bold ctermfg=DarkGray guifg=DarkGray -hi Constant term=underline ctermfg=DarkGreen gui=NONE guifg=DarkGreen -hi Cursor guibg=fg guifg=Orchid -hi Directory term=bold ctermfg=Cyan guifg=Cyan -hi Error term=reverse ctermbg=Red ctermfg=White guibg=Red guifg=White -hi ErrorMsg term=standout ctermbg=DarkRed ctermfg=White guibg=Red guifg=White -hi Identifier term=underline ctermfg=Cyan guifg=Cyan -hi Ignore ctermfg=Black guifg=bg -hi IncSearch term=reverse cterm=reverse gui=reverse -hi LineNr term=underline ctermfg=DarkYellow guifg=Yellow -hi ModeMsg term=bold cterm=bold gui=bold -hi MoreMsg term=bold ctermfg=Green gui=bold guifg=SeaGreen -hi NonText term=bold ctermfg=DarkGreen gui=bold guifg=DarkGreen -hi Normal ctermbg=Black ctermfg=Gray guibg=Black guifg=Gray -hi PreProc term=underline ctermfg=White guifg=White -hi Question term=standout ctermfg=Green gui=bold guifg=Green -hi Search ctermbg=Magenta ctermfg=White guibg=Magenta guifg=White -hi Special term=bold ctermfg=Red guifg=Red -hi SpecialKey term=bold ctermfg=Green guifg=Green -hi Statement term=bold ctermfg=Yellow gui=NONE guifg=Yellow -hi StatusLine term=reverse,bold cterm=reverse gui=reverse -hi StatusLineNC term=reverse cterm=reverse gui=reverse -hi Title term=bold ctermfg=Magenta gui=bold guifg=Pink -hi Todo term=standout ctermbg=DarkYellow ctermfg=Black guibg=Yellow guifg=Black -hi Type ctermfg=Green gui=NONE guifg=Green -hi Visual term=reverse cterm=reverse guibg=DarkGreen guifg=White -hi WarningMsg term=standout ctermfg=Red guifg=Red diff --git a/colors/jellybeans.vim b/colors/jellybeans.vim deleted file mode 100644 index f9d5397..0000000 --- a/colors/jellybeans.vim +++ /dev/null @@ -1,569 +0,0 @@ -" Vim color file -" -" " __ _ _ _ " -" " \ \ ___| | |_ _| |__ ___ __ _ _ __ ___ " -" " \ \/ _ \ | | | | | _ \ / _ \/ _ | _ \/ __| " -" " /\_/ / __/ | | |_| | |_| | __/ |_| | | | \__ \ " -" " \___/ \___|_|_|\__ |____/ \___|\____|_| |_|___/ " -" " \___/ " -" -" "A colorful, dark color scheme for Vim." -" -" File: jellybeans.vim -" URL: github.com/nanotech/jellybeans.vim -" Scripts URL: vim.org/scripts/script.php?script_id=2555 -" Maintainer: NanoTech (nanotech.nanotechcorp.net) -" Version: 1.6~git -" Last Change: January 15th, 2012 -" License: MIT -" Contributors: Daniel Herbert (pocketninja) -" Henry So, Jr. -" David Liang -" Rich Healey (richo) -" Andrew Wong (w0ng) -" -" Copyright (c) 2009-2012 NanoTech -" -" Permission is hereby granted, free of charge, to any per‐ -" son obtaining a copy of this software and associated doc‐ -" umentation files (the “Software”), to deal in the Soft‐ -" ware without restriction, including without limitation -" the rights to use, copy, modify, merge, publish, distrib‐ -" ute, sublicense, and/or sell copies of the Software, and -" to permit persons to whom the Software is furnished to do -" so, subject to the following conditions: -" -" The above copyright notice and this permission notice -" shall be included in all copies or substantial portions -" of the Software. -" -" THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY -" KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO -" THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICU‐ -" LAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CON‐ -" TRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON‐ -" NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -" THE SOFTWARE. - -set background=dark - -hi clear - -if exists("syntax_on") - syntax reset -endif - -let colors_name = "jellybeans" - -if has("gui_running") || &t_Co == 88 || &t_Co == 256 - let s:low_color = 0 -else - let s:low_color = 1 -endif - -" Color approximation functions by Henry So, Jr. and David Liang {{{ -" Added to jellybeans.vim by Daniel Herbert - -" returns an approximate grey index for the given grey level -fun! s:grey_number(x) - if &t_Co == 88 - if a:x < 23 - return 0 - elseif a:x < 69 - return 1 - elseif a:x < 103 - return 2 - elseif a:x < 127 - return 3 - elseif a:x < 150 - return 4 - elseif a:x < 173 - return 5 - elseif a:x < 196 - return 6 - elseif a:x < 219 - return 7 - elseif a:x < 243 - return 8 - else - return 9 - endif - else - if a:x < 14 - return 0 - else - let l:n = (a:x - 8) / 10 - let l:m = (a:x - 8) % 10 - if l:m < 5 - return l:n - else - return l:n + 1 - endif - endif - endif -endfun - -" returns the actual grey level represented by the grey index -fun! s:grey_level(n) - if &t_Co == 88 - if a:n == 0 - return 0 - elseif a:n == 1 - return 46 - elseif a:n == 2 - return 92 - elseif a:n == 3 - return 115 - elseif a:n == 4 - return 139 - elseif a:n == 5 - return 162 - elseif a:n == 6 - return 185 - elseif a:n == 7 - return 208 - elseif a:n == 8 - return 231 - else - return 255 - endif - else - if a:n == 0 - return 0 - else - return 8 + (a:n * 10) - endif - endif -endfun - -" returns the palette index for the given grey index -fun! s:grey_color(n) - if &t_Co == 88 - if a:n == 0 - return 16 - elseif a:n == 9 - return 79 - else - return 79 + a:n - endif - else - if a:n == 0 - return 16 - elseif a:n == 25 - return 231 - else - return 231 + a:n - endif - endif -endfun - -" returns an approximate color index for the given color level -fun! s:rgb_number(x) - if &t_Co == 88 - if a:x < 69 - return 0 - elseif a:x < 172 - return 1 - elseif a:x < 230 - return 2 - else - return 3 - endif - else - if a:x < 75 - return 0 - else - let l:n = (a:x - 55) / 40 - let l:m = (a:x - 55) % 40 - if l:m < 20 - return l:n - else - return l:n + 1 - endif - endif - endif -endfun - -" returns the actual color level for the given color index -fun! s:rgb_level(n) - if &t_Co == 88 - if a:n == 0 - return 0 - elseif a:n == 1 - return 139 - elseif a:n == 2 - return 205 - else - return 255 - endif - else - if a:n == 0 - return 0 - else - return 55 + (a:n * 40) - endif - endif -endfun - -" returns the palette index for the given R/G/B color indices -fun! s:rgb_color(x, y, z) - if &t_Co == 88 - return 16 + (a:x * 16) + (a:y * 4) + a:z - else - return 16 + (a:x * 36) + (a:y * 6) + a:z - endif -endfun - -" returns the palette index to approximate the given R/G/B color levels -fun! s:color(r, g, b) - " get the closest grey - let l:gx = s:grey_number(a:r) - let l:gy = s:grey_number(a:g) - let l:gz = s:grey_number(a:b) - - " get the closest color - let l:x = s:rgb_number(a:r) - let l:y = s:rgb_number(a:g) - let l:z = s:rgb_number(a:b) - - if l:gx == l:gy && l:gy == l:gz - " there are two possibilities - let l:dgr = s:grey_level(l:gx) - a:r - let l:dgg = s:grey_level(l:gy) - a:g - let l:dgb = s:grey_level(l:gz) - a:b - let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb) - let l:dr = s:rgb_level(l:gx) - a:r - let l:dg = s:rgb_level(l:gy) - a:g - let l:db = s:rgb_level(l:gz) - a:b - let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db) - if l:dgrey < l:drgb - " use the grey - return s:grey_color(l:gx) - else - " use the color - return s:rgb_color(l:x, l:y, l:z) - endif - else - " only one possibility - return s:rgb_color(l:x, l:y, l:z) - endif -endfun - -" returns the palette index to approximate the 'rrggbb' hex string -fun! s:rgb(rgb) - let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0 - let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0 - let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0 - return s:color(l:r, l:g, l:b) -endfun - -" sets the highlighting for the given group -fun! s:X(group, fg, bg, attr, lcfg, lcbg) - if s:low_color - let l:fge = empty(a:lcfg) - let l:bge = empty(a:lcbg) - - if !l:fge && !l:bge - exec "hi ".a:group." ctermfg=".a:lcfg." ctermbg=".a:lcbg - elseif !l:fge && l:bge - exec "hi ".a:group." ctermfg=".a:lcfg." ctermbg=NONE" - elseif l:fge && !l:bge - exec "hi ".a:group." ctermfg=NONE ctermbg=".a:lcbg - endif - else - let l:fge = empty(a:fg) - let l:bge = empty(a:bg) - - if !l:fge && !l:bge - exec "hi ".a:group." guifg=#".a:fg." guibg=#".a:bg." ctermfg=".s:rgb(a:fg)." ctermbg=".s:rgb(a:bg) - elseif !l:fge && l:bge - exec "hi ".a:group." guifg=#".a:fg." guibg=NONE ctermfg=".s:rgb(a:fg)." ctermbg=NONE" - elseif l:fge && !l:bge - exec "hi ".a:group." guifg=NONE guibg=#".a:bg." ctermfg=NONE ctermbg=".s:rgb(a:bg) - endif - endif - - if a:attr == "" - exec "hi ".a:group." gui=none cterm=none" - else - let l:noitalic = join(filter(split(a:attr, ","), "v:val !=? 'italic'"), ",") - if empty(l:noitalic) - let l:noitalic = "none" - endif - exec "hi ".a:group." gui=".a:attr." cterm=".l:noitalic - endif -endfun -" }}} - -if !exists("g:jellybeans_background_color") - let g:jellybeans_background_color = "151515" -end - -call s:X("Normal","e8e8d3",g:jellybeans_background_color,"","White","") -set background=dark - -if !exists("g:jellybeans_use_lowcolor_black") || g:jellybeans_use_lowcolor_black - let s:termBlack = "Black" -else - let s:termBlack = "Grey" -endif - -if version >= 700 - call s:X("CursorLine","","1c1c1c","","",s:termBlack) - call s:X("CursorColumn","","1c1c1c","","",s:termBlack) - call s:X("MatchParen","ffffff","556779","bold","","DarkCyan") - - call s:X("TabLine","000000","b0b8c0","italic","",s:termBlack) - call s:X("TabLineFill","9098a0","","","",s:termBlack) - call s:X("TabLineSel","000000","f0f0f0","italic,bold",s:termBlack,"White") - - " Auto-completion - call s:X("Pmenu","ffffff","606060","","White",s:termBlack) - call s:X("PmenuSel","101010","eeeeee","",s:termBlack,"White") -endif - -call s:X("Visual","","404040","","",s:termBlack) -call s:X("Cursor",g:jellybeans_background_color,"b0d0f0","","","") - -call s:X("LineNr","605958",g:jellybeans_background_color,"none",s:termBlack,"") -call s:X("CursorLineNr","ccc5c4","","none","White","") -call s:X("Comment","888888","","italic","Grey","") -call s:X("Todo","c7c7c7","","bold","White",s:termBlack) - -call s:X("StatusLine","000000","dddddd","italic","","White") -call s:X("StatusLineNC","ffffff","403c41","italic","White","Black") -call s:X("VertSplit","777777","403c41","",s:termBlack,s:termBlack) -call s:X("WildMenu","f0a0c0","302028","","Magenta","") - -call s:X("Folded","a0a8b0","384048","italic",s:termBlack,"") -call s:X("FoldColumn","535D66","1f1f1f","","",s:termBlack) -call s:X("SignColumn","777777","333333","","",s:termBlack) -call s:X("ColorColumn","","000000","","",s:termBlack) - -call s:X("Title","70b950","","bold","Green","") - -call s:X("Constant","cf6a4c","","","Red","") -call s:X("Special","799d6a","","","Green","") -call s:X("Delimiter","668799","","","Grey","") - -call s:X("String","99ad6a","","","Green","") -call s:X("StringDelimiter","556633","","","DarkGreen","") - -call s:X("Identifier","c6b6ee","","","LightCyan","") -call s:X("Structure","8fbfdc","","","LightCyan","") -call s:X("Function","fad07a","","","Yellow","") -call s:X("Statement","8197bf","","","DarkBlue","") -call s:X("PreProc","8fbfdc","","","LightBlue","") - -hi! link Operator Structure - -call s:X("Type","ffb964","","","Yellow","") -call s:X("NonText","606060",g:jellybeans_background_color,"",s:termBlack,"") - -call s:X("SpecialKey","444444","1c1c1c","",s:termBlack,"") - -call s:X("Search","f0a0c0","302028","underline","Magenta","") - -call s:X("Directory","dad085","","","Yellow","") -call s:X("ErrorMsg","","902020","","","DarkRed") -hi! link Error ErrorMsg -hi! link MoreMsg Special -call s:X("Question","65C254","","","Green","") - - -" Spell Checking - -call s:X("SpellBad","","902020","underline","","DarkRed") -call s:X("SpellCap","","0000df","underline","","Blue") -call s:X("SpellRare","","540063","underline","","DarkMagenta") -call s:X("SpellLocal","","2D7067","underline","","Green") - -" Diff - -hi! link diffRemoved Constant -hi! link diffAdded String - -" VimDiff - -call s:X("DiffAdd","D2EBBE","437019","","White","DarkGreen") -call s:X("DiffDelete","40000A","700009","","DarkRed","DarkRed") -call s:X("DiffChange","","2B5B77","","White","DarkBlue") -call s:X("DiffText","8fbfdc","000000","reverse","Yellow","") - -" PHP - -hi! link phpFunctions Function -call s:X("StorageClass","c59f6f","","","Red","") -hi! link phpSuperglobal Identifier -hi! link phpQuoteSingle StringDelimiter -hi! link phpQuoteDouble StringDelimiter -hi! link phpBoolean Constant -hi! link phpNull Constant -hi! link phpArrayPair Operator -hi! link phpOperator Normal -hi! link phpRelation Normal -hi! link phpVarSelector Identifier - -" Python - -hi! link pythonOperator Statement - -" Ruby - -hi! link rubySharpBang Comment -call s:X("rubyClass","447799","","","DarkBlue","") -call s:X("rubyIdentifier","c6b6fe","","","Cyan","") -hi! link rubyConstant Type -hi! link rubyFunction Function - -call s:X("rubyInstanceVariable","c6b6fe","","","Cyan","") -call s:X("rubySymbol","7697d6","","","Blue","") -hi! link rubyGlobalVariable rubyInstanceVariable -hi! link rubyModule rubyClass -call s:X("rubyControl","7597c6","","","Blue","") - -hi! link rubyString String -hi! link rubyStringDelimiter StringDelimiter -hi! link rubyInterpolationDelimiter Identifier - -call s:X("rubyRegexpDelimiter","540063","","","Magenta","") -call s:X("rubyRegexp","dd0093","","","DarkMagenta","") -call s:X("rubyRegexpSpecial","a40073","","","Magenta","") - -call s:X("rubyPredefinedIdentifier","de5577","","","Red","") - -" Erlang - -hi! link erlangAtom rubySymbol -hi! link erlangBIF rubyPredefinedIdentifier -hi! link erlangFunction rubyPredefinedIdentifier -hi! link erlangDirective Statement -hi! link erlangNode Identifier - -" JavaScript - -hi! link javaScriptValue Constant -hi! link javaScriptRegexpString rubyRegexp - -" CoffeeScript - -hi! link coffeeRegExp javaScriptRegexpString - -" Lua - -hi! link luaOperator Conditional - -" C - -hi! link cFormat Identifier -hi! link cOperator Constant - -" Objective-C/Cocoa - -hi! link objcClass Type -hi! link cocoaClass objcClass -hi! link objcSubclass objcClass -hi! link objcSuperclass objcClass -hi! link objcDirective rubyClass -hi! link objcStatement Constant -hi! link cocoaFunction Function -hi! link objcMethodName Identifier -hi! link objcMethodArg Normal -hi! link objcMessageName Identifier - -" Vimscript - -hi! link vimOper Normal - -" HTML - -hi! link htmlTag Statement -hi! link htmlEndTag htmlTag -hi! link htmlTagName htmlTag - -" XML - -hi! link xmlTag Statement -hi! link xmlEndTag xmlTag -hi! link xmlTagName xmlTag -hi! link xmlEqual xmlTag -hi! link xmlEntity Special -hi! link xmlEntityPunct xmlEntity -hi! link xmlDocTypeDecl PreProc -hi! link xmlDocTypeKeyword PreProc -hi! link xmlProcessingDelim xmlAttrib - -" Debugger.vim - -call s:X("DbgCurrent","DEEBFE","345FA8","","White","DarkBlue") -call s:X("DbgBreakPt","","4F0037","","","DarkMagenta") - -" vim-indent-guides - -if !exists("g:indent_guides_auto_colors") - let g:indent_guides_auto_colors = 0 -endif -call s:X("IndentGuidesOdd","","232323","","","") -call s:X("IndentGuidesEven","","1b1b1b","","","") - -" Plugins, etc. - -hi! link TagListFileName Directory -call s:X("PreciseJumpTarget","B9ED67","405026","","White","Green") - -if !exists("g:jellybeans_background_color_256") - let g:jellybeans_background_color_256=233 -end -" Manual overrides for 256-color terminals. Dark colors auto-map badly. -if !s:low_color - hi StatusLineNC ctermbg=235 - hi Folded ctermbg=236 - hi FoldColumn ctermbg=234 - hi SignColumn ctermbg=236 - hi CursorColumn ctermbg=234 - hi CursorLine ctermbg=234 - hi SpecialKey ctermbg=234 - exec "hi NonText ctermbg=".g:jellybeans_background_color_256 - exec "hi LineNr ctermbg=".g:jellybeans_background_color_256 - hi DiffText ctermfg=81 - exec "hi Normal ctermbg=".g:jellybeans_background_color_256 - hi DbgBreakPt ctermbg=53 - hi IndentGuidesOdd ctermbg=235 - hi IndentGuidesEven ctermbg=234 -endif - -if exists("g:jellybeans_overrides") - fun! s:load_colors(defs) - for [l:group, l:v] in items(a:defs) - call s:X(l:group, get(l:v, 'guifg', ''), get(l:v, 'guibg', ''), - \ get(l:v, 'attr', ''), - \ get(l:v, 'ctermfg', ''), get(l:v, 'ctermbg', '')) - if !s:low_color - for l:prop in ['ctermfg', 'ctermbg'] - let l:override_key = '256'.l:prop - if has_key(l:v, l:override_key) - exec "hi ".l:group." ".l:prop."=".l:v[l:override_key] - endif - endfor - endif - unlet l:group - unlet l:v - endfor - endfun - call s:load_colors(g:jellybeans_overrides) - delf s:load_colors -endif - -" delete functions {{{ -delf s:X -delf s:rgb -delf s:color -delf s:rgb_color -delf s:rgb_level -delf s:rgb_number -delf s:grey_color -delf s:grey_level -delf s:grey_number -" }}} diff --git a/colors/molokai.vim b/colors/molokai.vim deleted file mode 100644 index 6d97053..0000000 --- a/colors/molokai.vim +++ /dev/null @@ -1,276 +0,0 @@ -" Vim color file -" -" Author: Tomas Restrepo -" https://github.com/tomasr/molokai -" -" Note: Based on the Monokai theme for TextMate -" by Wimer Hazenberg and its darker variant -" by Hamish Stuart Macpherson -" - -hi clear - -if version > 580 - " no guarantees for version 5.8 and below, but this makes it stop - " complaining - hi clear - if exists("syntax_on") - syntax reset - endif -endif -let g:colors_name="molokai" - -if exists("g:molokai_original") - let s:molokai_original = g:molokai_original -else - let s:molokai_original = 0 -endif - - -hi Boolean guifg=#AE81FF -hi Character guifg=#E6DB74 -hi Number guifg=#AE81FF -hi String guifg=#E6DB74 -hi Conditional guifg=#F92672 gui=bold -hi Constant guifg=#AE81FF gui=bold -hi Cursor guifg=#000000 guibg=#F8F8F0 -hi iCursor guifg=#000000 guibg=#F8F8F0 -hi Debug guifg=#BCA3A3 gui=bold -hi Define guifg=#66D9EF -hi Delimiter guifg=#8F8F8F -hi DiffAdd guibg=#13354A -hi DiffChange guifg=#89807D guibg=#4C4745 -hi DiffDelete guifg=#960050 guibg=#1E0010 -hi DiffText guibg=#4C4745 gui=italic,bold - -hi Directory guifg=#A6E22E gui=bold -hi Error guifg=#E6DB74 guibg=#1E0010 -hi ErrorMsg guifg=#F92672 guibg=#232526 gui=bold -hi Exception guifg=#A6E22E gui=bold -hi Float guifg=#AE81FF -hi FoldColumn guifg=#465457 guibg=#000000 -hi Folded guifg=#465457 guibg=#000000 -hi Function guifg=#A6E22E -hi Identifier guifg=#FD971F -hi Ignore guifg=#808080 guibg=bg -hi IncSearch guifg=#C4BE89 guibg=#000000 - -hi Keyword guifg=#F92672 gui=bold -hi Label guifg=#E6DB74 gui=none -hi Macro guifg=#C4BE89 gui=italic -hi SpecialKey guifg=#66D9EF gui=italic - -hi MatchParen guifg=#000000 guibg=#FD971F gui=bold -hi ModeMsg guifg=#E6DB74 -hi MoreMsg guifg=#E6DB74 -hi Operator guifg=#F92672 - -" complete menu -hi Pmenu guifg=#66D9EF guibg=#000000 -hi PmenuSel guibg=#808080 -hi PmenuSbar guibg=#080808 -hi PmenuThumb guifg=#66D9EF - -hi PreCondit guifg=#A6E22E gui=bold -hi PreProc guifg=#A6E22E -hi Question guifg=#66D9EF -hi Repeat guifg=#F92672 gui=bold -hi Search guifg=#000000 guibg=#FFE792 -" marks -hi SignColumn guifg=#A6E22E guibg=#232526 -hi SpecialChar guifg=#F92672 gui=bold -hi SpecialComment guifg=#7E8E91 gui=bold -hi Special guifg=#66D9EF guibg=bg gui=italic -if has("spell") - hi SpellBad guisp=#FF0000 gui=undercurl - hi SpellCap guisp=#7070F0 gui=undercurl - hi SpellLocal guisp=#70F0F0 gui=undercurl - hi SpellRare guisp=#FFFFFF gui=undercurl -endif -hi Statement guifg=#F92672 gui=bold -hi StatusLine guifg=#455354 guibg=fg -hi StatusLineNC guifg=#808080 guibg=#080808 -hi StorageClass guifg=#FD971F gui=italic -hi Structure guifg=#66D9EF -hi Tag guifg=#F92672 gui=italic -hi Title guifg=#ef5939 -hi Todo guifg=#FFFFFF guibg=bg gui=bold - -hi Typedef guifg=#66D9EF -hi Type guifg=#66D9EF gui=none -hi Underlined guifg=#808080 gui=underline - -hi VertSplit guifg=#808080 guibg=#080808 gui=bold -hi VisualNOS guibg=#403D3D -hi Visual guibg=#403D3D -hi WarningMsg guifg=#FFFFFF guibg=#333333 gui=bold -hi WildMenu guifg=#66D9EF guibg=#000000 - -hi TabLineFill guifg=#1B1D1E guibg=#1B1D1E -hi TabLine guibg=#1B1D1E guifg=#808080 gui=none - -if s:molokai_original == 1 - hi Normal guifg=#F8F8F2 guibg=#272822 - hi Comment guifg=#75715E - hi CursorLine guibg=#3E3D32 - hi CursorLineNr guifg=#FD971F gui=none - hi CursorColumn guibg=#3E3D32 - hi ColorColumn guibg=#3B3A32 - hi LineNr guifg=#BCBCBC guibg=#3B3A32 - hi NonText guifg=#75715E - hi SpecialKey guifg=#75715E -else - hi Normal guifg=#F8F8F2 guibg=#1B1D1E - hi Comment guifg=#7E8E91 - hi CursorLine guibg=#293739 - hi CursorLineNr guifg=#FD971F gui=none - hi CursorColumn guibg=#293739 - hi ColorColumn guibg=#232526 - hi LineNr guifg=#465457 guibg=#232526 - hi NonText guifg=#465457 - hi SpecialKey guifg=#465457 -end - -" -" Support for 256-color terminal -" -if &t_Co > 255 - if s:molokai_original == 1 - hi Normal ctermbg=234 - hi CursorLine ctermbg=235 cterm=none - hi CursorLineNr ctermfg=208 cterm=none - else - hi Normal ctermfg=252 ctermbg=233 - hi CursorLine ctermbg=234 cterm=none - hi CursorLineNr ctermfg=208 cterm=none - endif - hi Boolean ctermfg=135 - hi Character ctermfg=144 - hi Number ctermfg=135 - hi String ctermfg=144 - hi Conditional ctermfg=161 cterm=bold - hi Constant ctermfg=135 cterm=bold - hi Cursor ctermfg=16 ctermbg=253 - hi Debug ctermfg=225 cterm=bold - hi Define ctermfg=81 - hi Delimiter ctermfg=241 - - hi DiffAdd ctermbg=24 - hi DiffChange ctermfg=181 ctermbg=239 - hi DiffDelete ctermfg=162 ctermbg=53 - hi DiffText ctermbg=102 cterm=bold - - hi Directory ctermfg=118 cterm=bold - hi Error ctermfg=219 ctermbg=89 - hi ErrorMsg ctermfg=199 ctermbg=16 cterm=bold - hi Exception ctermfg=118 cterm=bold - hi Float ctermfg=135 - hi FoldColumn ctermfg=67 ctermbg=16 - hi Folded ctermfg=67 ctermbg=16 - hi Function ctermfg=118 - hi Identifier ctermfg=208 cterm=none - hi Ignore ctermfg=244 ctermbg=232 - hi IncSearch ctermfg=193 ctermbg=16 - - hi keyword ctermfg=161 cterm=bold - hi Label ctermfg=229 cterm=none - hi Macro ctermfg=193 - hi SpecialKey ctermfg=81 - - hi MatchParen ctermfg=233 ctermbg=208 cterm=bold - hi ModeMsg ctermfg=229 - hi MoreMsg ctermfg=229 - hi Operator ctermfg=161 - - " complete menu - hi Pmenu ctermfg=81 ctermbg=16 - hi PmenuSel ctermfg=255 ctermbg=242 - hi PmenuSbar ctermbg=232 - hi PmenuThumb ctermfg=81 - - hi PreCondit ctermfg=118 cterm=bold - hi PreProc ctermfg=118 - hi Question ctermfg=81 - hi Repeat ctermfg=161 cterm=bold - hi Search ctermfg=0 ctermbg=222 cterm=NONE - - " marks column - hi SignColumn ctermfg=118 ctermbg=235 - hi SpecialChar ctermfg=161 cterm=bold - hi SpecialComment ctermfg=245 cterm=bold - hi Special ctermfg=81 - if has("spell") - hi SpellBad ctermbg=52 - hi SpellCap ctermbg=17 - hi SpellLocal ctermbg=17 - hi SpellRare ctermfg=none ctermbg=none cterm=reverse - endif - hi Statement ctermfg=161 cterm=bold - hi StatusLine ctermfg=238 ctermbg=253 - hi StatusLineNC ctermfg=244 ctermbg=232 - hi StorageClass ctermfg=208 - hi Structure ctermfg=81 - hi Tag ctermfg=161 - hi Title ctermfg=166 - hi Todo ctermfg=231 ctermbg=232 cterm=bold - - hi Typedef ctermfg=81 - hi Type ctermfg=81 cterm=none - hi Underlined ctermfg=244 cterm=underline - - hi VertSplit ctermfg=244 ctermbg=232 cterm=bold - hi VisualNOS ctermbg=238 - hi Visual ctermbg=235 - hi WarningMsg ctermfg=231 ctermbg=238 cterm=bold - hi WildMenu ctermfg=81 ctermbg=16 - - hi Comment ctermfg=59 - hi CursorColumn ctermbg=236 - hi ColorColumn ctermbg=236 - hi LineNr ctermfg=250 ctermbg=236 - hi NonText ctermfg=59 - - hi SpecialKey ctermfg=59 - - if exists("g:rehash256") && g:rehash256 == 1 - hi Normal ctermfg=252 ctermbg=234 - hi CursorLine ctermbg=236 cterm=none - hi CursorLineNr ctermfg=208 cterm=none - - hi Boolean ctermfg=141 - hi Character ctermfg=222 - hi Number ctermfg=141 - hi String ctermfg=222 - hi Conditional ctermfg=197 cterm=bold - hi Constant ctermfg=141 cterm=bold - - hi DiffDelete ctermfg=125 ctermbg=233 - - hi Directory ctermfg=154 cterm=bold - hi Error ctermfg=222 ctermbg=233 - hi Exception ctermfg=154 cterm=bold - hi Float ctermfg=141 - hi Function ctermfg=154 - hi Identifier ctermfg=208 - - hi Keyword ctermfg=197 cterm=bold - hi Operator ctermfg=197 - hi PreCondit ctermfg=154 cterm=bold - hi PreProc ctermfg=154 - hi Repeat ctermfg=197 cterm=bold - - hi Statement ctermfg=197 cterm=bold - hi Tag ctermfg=197 - hi Title ctermfg=203 - hi Visual ctermbg=238 - - hi Comment ctermfg=244 - hi LineNr ctermfg=239 ctermbg=235 - hi NonText ctermfg=239 - hi SpecialKey ctermfg=239 - endif -end - -" Must be at the end, because of ctermbg=234 bug. -" https://groups.google.com/forum/#!msg/vim_dev/afPqwAFNdrU/nqh6tOM87QUJ -set background=dark diff --git a/colors/mustang.vim b/colors/mustang.vim deleted file mode 100644 index e7175f6..0000000 --- a/colors/mustang.vim +++ /dev/null @@ -1,65 +0,0 @@ -" Maintainer: Henrique C. Alves (hcarvalhoalves@gmail.com) -" Version: 1.0 -" Last Change: September 25 2008 - -set background=dark - -hi clear - -if exists("syntax_on") - syntax reset -endif - -let colors_name = "mustang" - -" Vim >= 7.0 specific colors -if version >= 700 - hi CursorLine guibg=#2d2d2d ctermbg=236 - hi ColorColumn guibg=#2d2d2d ctermbg=236 - hi CursorColumn guibg=#2d2d2d ctermbg=236 - hi MatchParen guifg=#d0ffc0 guibg=#2f2f2f gui=bold ctermfg=157 ctermbg=237 cterm=bold - hi Pmenu guifg=#ffffff guibg=#444444 ctermfg=255 ctermbg=238 - hi PmenuSel guifg=#000000 guibg=#b1d631 ctermfg=0 ctermbg=148 -endif - -" General colors -hi Cursor guifg=NONE guibg=#626262 gui=none ctermbg=241 -hi Normal guifg=#e2e2e5 guibg=#202020 gui=none ctermfg=253 ctermbg=234 -hi NonText guifg=#808080 guibg=#202020 gui=none ctermfg=244 ctermbg=235 -hi LineNr guifg=#808080 guibg=#202020 gui=none ctermfg=244 ctermbg=232 -hi StatusLine guifg=#d3d3d5 guibg=#444444 gui=italic ctermfg=253 ctermbg=238 cterm=italic -hi StatusLineNC guifg=#939395 guibg=#444444 gui=none ctermfg=246 ctermbg=238 -hi VertSplit guifg=#444444 guibg=#444444 gui=none ctermfg=238 ctermbg=238 -hi Folded guifg=#a0a8b0 guibg=#202020 gui=none ctermbg=4 ctermfg=248 -hi Title guifg=#f6f3e8 guibg=NONE gui=bold ctermfg=254 cterm=bold -hi Visual guifg=#faf4c6 guibg=#3c414c gui=none ctermfg=254 ctermbg=4 -hi SpecialKey guifg=#808080 guibg=#202020 gui=none ctermfg=244 ctermbg=236 - -" Syntax highlighting -hi Comment guifg=#808080 gui=italic ctermfg=244 -hi Todo guifg=#8f8f8f gui=italic ctermfg=245 -hi Boolean guifg=#b1d631 gui=none ctermfg=148 -hi String guifg=#b1d631 gui=italic ctermfg=148 -hi Identifier guifg=#b1d631 gui=none ctermfg=148 -hi Function guifg=#ffffff gui=bold ctermfg=255 -hi Type guifg=#7e8aa2 gui=none ctermfg=103 -hi Statement guifg=#7e8aa2 gui=none ctermfg=103 -hi Keyword guifg=#ff9800 gui=none ctermfg=208 -hi Constant guifg=#ff9800 gui=none ctermfg=208 -hi Number guifg=#ff9800 gui=none ctermfg=208 -hi Special guifg=#ff9800 gui=none ctermfg=208 -hi PreProc guifg=#faf4c6 gui=none ctermfg=230 -hi Todo guifg=#000000 guibg=#e6ea50 gui=italic - -" Code-specific colors -hi pythonOperator guifg=#7e8aa2 gui=none ctermfg=103 - -" NERDTree colors -hi NERDTreeFile guifg=#cdd2db ctermfg=250 -hi NERDTreeDir guifg=#a5aebe ctermfg=111 -hi NERDTreeUp guifg=#5b646d ctermfg=62 - -hi def link NERDTreeOpenable String -hi def link NERDTreeCloseable NERDTreeOpenable -hi def link NERDTreeCWD String -hi def link NERDTreePart String diff --git a/colors/revolution.vim b/colors/revolution.vim deleted file mode 100644 index 1719cd1..0000000 --- a/colors/revolution.vim +++ /dev/null @@ -1,102 +0,0 @@ -" Vim color file - Revolution -set background=dark -if version > 580 - hi clear - if exists("syntax_on") - syntax reset - endif -endif - -set t_Co=256 -let g:colors_name = "Revolution" - -hi IncSearch guifg=#bdae88 guibg=#492224 guisp=#492224 gui=NONE ctermfg=144 ctermbg=52 cterm=NONE -hi WildMenu guifg=NONE guibg=#A1A6A8 guisp=#A1A6A8 gui=NONE ctermfg=NONE ctermbg=248 cterm=NONE -hi SignColumn guifg=#192224 guibg=#536991 guisp=#536991 gui=NONE ctermfg=235 ctermbg=60 cterm=NONE -hi SpecialComment guifg=#BD9800 guibg=NONE guisp=NONE gui=NONE ctermfg=1 ctermbg=NONE cterm=NONE -hi Typedef guifg=#536991 guibg=NONE guisp=NONE gui=bold ctermfg=60 ctermbg=NONE cterm=bold -hi Title guifg=#b5b5b5 guibg=#492224 guisp=#492224 gui=bold ctermfg=249 ctermbg=52 cterm=bold -hi Folded guifg=#192224 guibg=#A1A6A8 guisp=#A1A6A8 gui=bold ctermfg=235 ctermbg=248 cterm=bold -hi PreCondit guifg=#965b3f guibg=NONE guisp=NONE gui=NONE ctermfg=137 ctermbg=NONE cterm=NONE -hi Include guifg=#BD9800 guibg=NONE guisp=NONE gui=NONE ctermfg=1 ctermbg=NONE cterm=NONE -hi Float guifg=#A1A6A8 guibg=NONE guisp=NONE gui=NONE ctermfg=248 ctermbg=NONE cterm=NONE -hi StatusLineNC guifg=#bdae88 guibg=#4b4b4b guisp=#4b4b4b gui=bold ctermfg=144 ctermbg=239 cterm=bold -"hi CTagsMember -- no settings -- -hi NonText guifg=#5E6C70 guibg=NONE guisp=NONE gui=NONE ctermfg=66 ctermbg=NONE cterm=NONE -"hi CTagsGlobalConstant -- no settings -- -hi DiffText guifg=NONE guibg=#492224 guisp=#492224 gui=NONE ctermfg=NONE ctermbg=52 cterm=NONE -hi ErrorMsg guifg=#cfcfcf guibg=#a33202 guisp=#a33202 gui=NONE ctermfg=252 ctermbg=130 cterm=NONE -"hi Ignore -- no settings -- -hi Debug guifg=#BD9800 guibg=NONE guisp=NONE gui=NONE ctermfg=1 ctermbg=NONE cterm=NONE -hi PMenuSbar guifg=NONE guibg=#828282 guisp=#828282 gui=NONE ctermfg=NONE ctermbg=8 cterm=NONE -hi Identifier guifg=#BD9800 guibg=NONE guisp=NONE gui=NONE ctermfg=1 ctermbg=NONE cterm=NONE -hi SpecialChar guifg=#BD9800 guibg=NONE guisp=NONE gui=NONE ctermfg=1 ctermbg=NONE cterm=NONE -hi Conditional guifg=#BD9800 guibg=NONE guisp=NONE gui=bold ctermfg=1 ctermbg=NONE cterm=bold -hi StorageClass guifg=#536991 guibg=NONE guisp=NONE gui=bold ctermfg=60 ctermbg=NONE cterm=bold -hi Todo guifg=#ff0d0d guibg=#262626 guisp=#262626 gui=NONE ctermfg=196 ctermbg=235 cterm=NONE -hi Special guifg=#BD9800 guibg=NONE guisp=NONE gui=NONE ctermfg=1 ctermbg=NONE cterm=NONE -hi LineNr guifg=#525252 guibg=NONE guisp=NONE gui=NONE ctermfg=239 ctermbg=NONE cterm=NONE -hi StatusLine guifg=#bdae88 guibg=#613830 guisp=#613830 gui=bold ctermfg=144 ctermbg=52 cterm=bold -hi Normal guifg=#bdae88 guibg=#262626 guisp=#262626 gui=NONE ctermfg=144 ctermbg=235 cterm=NONE -hi Label guifg=#BD9800 guibg=NONE guisp=NONE gui=bold ctermfg=1 ctermbg=NONE cterm=bold -"hi CTagsImport -- no settings -- -hi PMenuSel guifg=#bdae88 guibg=#492224 guisp=#492224 gui=NONE ctermfg=144 ctermbg=52 cterm=NONE -hi Search guifg=#bdae88 guibg=#492224 guisp=#492224 gui=NONE ctermfg=144 ctermbg=52 cterm=NONE -"hi CTagsGlobalVariable -- no settings -- -hi Delimiter guifg=#BD9800 guibg=NONE guisp=NONE gui=NONE ctermfg=1 ctermbg=NONE cterm=NONE -hi Statement guifg=#a26344 guibg=NONE guisp=NONE gui=bold ctermfg=137 ctermbg=NONE cterm=bold -hi SpellRare guifg=#F9F9FF guibg=#192224 guisp=#192224 gui=underline ctermfg=189 ctermbg=235 cterm=underline -"hi EnumerationValue -- no settings -- -hi Comment guifg=#6b6b6b guibg=NONE guisp=NONE gui=NONE ctermfg=242 ctermbg=NONE cterm=NONE -hi Character guifg=#A1A6A8 guibg=NONE guisp=NONE gui=NONE ctermfg=248 ctermbg=NONE cterm=NONE -hi TabLineSel guifg=#bdae88 guibg=#613830 guisp=#613830 gui=bold ctermfg=144 ctermbg=52 cterm=bold -hi Number guifg=#c4c7c8 guibg=NONE guisp=NONE gui=NONE ctermfg=251 ctermbg=NONE cterm=NONE -hi Boolean guifg=#A1A6A8 guibg=NONE guisp=NONE gui=NONE ctermfg=248 ctermbg=NONE cterm=NONE -hi Operator guifg=#d9d5d5 guibg=NONE guisp=NONE gui=bold ctermfg=253 ctermbg=NONE cterm=bold -hi CursorLine guifg=NONE guibg=#161616 guisp=#161616 gui=NONE ctermfg=NONE ctermbg=237 cterm=NONE -"hi Union -- no settings -- -hi TabLineFill guifg=#192224 guibg=#4b4b4b guisp=#4b4b4b gui=bold ctermfg=235 ctermbg=239 cterm=bold -"hi Question -- no settings -- -hi WarningMsg guifg=#A1A6A8 guibg=#912C00 guisp=#912C00 gui=NONE ctermfg=248 ctermbg=88 cterm=NONE -hi VisualNOS guifg=#192224 guibg=#F9F9FF guisp=#F9F9FF gui=underline ctermfg=235 ctermbg=189 cterm=underline -hi DiffDelete guifg=NONE guibg=#241919 guisp=#241919 gui=NONE ctermfg=NONE ctermbg=235 cterm=NONE -hi ModeMsg guifg=#dedede guibg=#192224 guisp=#192224 gui=bold ctermfg=253 ctermbg=235 cterm=bold -hi CursorColumn guifg=NONE guibg=#282828 guisp=#282828 gui=NONE ctermfg=NONE ctermbg=236 cterm=NONE -hi Define guifg=#BD9800 guibg=NONE guisp=NONE gui=NONE ctermfg=1 ctermbg=NONE cterm=NONE -hi Function guifg=#536991 guibg=NONE guisp=NONE gui=bold ctermfg=60 ctermbg=NONE cterm=bold -hi FoldColumn guifg=#192224 guibg=#A1A6A8 guisp=#A1A6A8 gui=bold ctermfg=235 ctermbg=248 cterm=bold -hi PreProc guifg=#835cad guibg=NONE guisp=NONE gui=NONE ctermfg=97 ctermbg=NONE cterm=NONE -"hi EnumerationName -- no settings -- -"hi MarkdownCodeBlock guifg=#dedede guibg=NONE guisp=NONE gui=BOLD -hi Visual guifg=#bdae88 guibg=#613830 guisp=#613830 gui=NONE ctermfg=144 ctermbg=52 cterm=NONE -hi MoreMsg guifg=#BD9800 guibg=NONE guisp=NONE gui=bold ctermfg=1 ctermbg=NONE cterm=bold -hi SpellCap guifg=#F9F9FF guibg=#192224 guisp=#192224 gui=underline ctermfg=189 ctermbg=235 cterm=underline -hi VertSplit guifg=#262626 guibg=#4b4b4b guisp=#4b4b4b gui=bold ctermfg=235 ctermbg=239 cterm=bold -hi Exception guifg=#BD9800 guibg=NONE guisp=NONE gui=bold ctermfg=1 ctermbg=NONE cterm=bold -hi Keyword guifg=#BD9800 guibg=NONE guisp=NONE gui=bold ctermfg=1 ctermbg=NONE cterm=bold -hi Type guifg=#536991 guibg=NONE guisp=NONE gui=bold ctermfg=60 ctermbg=NONE cterm=bold -hi DiffChange guifg=NONE guibg=#492224 guisp=#492224 gui=NONE ctermfg=NONE ctermbg=52 cterm=NONE -hi Cursor guifg=NONE guibg=#b5b5b5 guisp=#b5b5b5 gui=NONE ctermfg=254 ctermbg=131 cterm=NONE -hi SpellLocal guifg=#F9F9FF guibg=#192224 guisp=#192224 gui=underline ctermfg=189 ctermbg=235 cterm=underline -hi Error guifg=#A1A6A8 guibg=#912C00 guisp=#912C00 gui=NONE ctermfg=248 ctermbg=88 cterm=NONE -hi PMenu guifg=#bdae88 guibg=#262626 guisp=#262626 gui=NONE ctermfg=144 ctermbg=235 cterm=NONE -hi SpecialKey guifg=#5E6C70 guibg=NONE guisp=NONE gui=bold ctermfg=66 ctermbg=NONE cterm=bold -hi Constant guifg=#A1A6A8 guibg=NONE guisp=NONE gui=NONE ctermfg=248 ctermbg=NONE cterm=NONE -"hi DefinedName -- no settings -- -hi Tag guifg=#BD9800 guibg=NONE guisp=NONE gui=NONE ctermfg=1 ctermbg=NONE cterm=NONE -hi String guifg=#a3b4ba guibg=NONE guisp=NONE gui=NONE ctermfg=109 ctermbg=NONE cterm=NONE -hi PMenuThumb guifg=#e6e6e6 guibg=#a4a6a8 guisp=#a4a6a8 gui=NONE ctermfg=254 ctermbg=248 cterm=NONE -hi MatchParen guifg=#BD9800 guibg=NONE guisp=NONE gui=bold ctermfg=1 ctermbg=NONE cterm=bold -hi LocalVariable guifg=#efae87 guibg=NONE guisp=NONE gui=bold ctermfg=209 ctermbg=NONE cterm=bold -hi Repeat guifg=#bd9700 guibg=NONE guisp=NONE gui=bold ctermfg=1 ctermbg=NONE cterm=bold -hi SpellBad guifg=#F9F9FF guibg=#192224 guisp=#192224 gui=underline ctermfg=189 ctermbg=235 cterm=underline -"hi CTagsClass -- no settings -- -hi Directory guifg=#536991 guibg=NONE guisp=NONE gui=bold ctermfg=60 ctermbg=NONE cterm=bold -hi Structure guifg=#536991 guibg=NONE guisp=NONE gui=bold ctermfg=60 ctermbg=NONE cterm=bold -hi Macro guifg=#BD9800 guibg=NONE guisp=NONE gui=NONE ctermfg=1 ctermbg=NONE cterm=NONE -hi Underlined guifg=#F9F9FF guibg=#192224 guisp=#192224 gui=underline ctermfg=189 ctermbg=235 cterm=underline -hi DiffAdd guifg=NONE guibg=#193224 guisp=#193224 gui=NONE ctermfg=NONE ctermbg=236 cterm=NONE -hi TabLine guifg=#192224 guibg=#969693 guisp=#969693 gui=bold ctermfg=235 ctermbg=246 cterm=bold -hi cursorim guifg=NONE guibg=#b5b5b5 guisp=#b5b5b5 gui=NONE ctermfg=235 ctermbg=52 cterm=NONE -hi colorcolumn guifg=NONE guibg=#3a3c3e guisp=#3a3c3e gui=NONE ctermfg=NONE ctermbg=237 cterm=NONE -"hi clear -- no settings -- diff --git a/colors/solarized.vim b/colors/solarized.vim deleted file mode 100644 index 70f5223..0000000 --- a/colors/solarized.vim +++ /dev/null @@ -1,1117 +0,0 @@ -" Name: Solarized vim colorscheme -" Author: Ethan Schoonover -" URL: http://ethanschoonover.com/solarized -" (see this url for latest release & screenshots) -" License: OSI approved MIT license (see end of this file) -" Created: In the middle of the night -" Modified: 2011 May 05 -" -" Usage "{{{ -" -" --------------------------------------------------------------------- -" ABOUT: -" --------------------------------------------------------------------- -" 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. -" -" --------------------------------------------------------------------- -" OPTIONS: -" --------------------------------------------------------------------- -" See the "solarized.txt" help file included with this colorscheme (in the -" "doc" subdirectory) for information on options, usage, the Toggle Background -" function and more. If you have already installed Solarized, this is available -" from the Solarized menu and command line as ":help solarized" -" -" --------------------------------------------------------------------- -" INSTALLATION: -" --------------------------------------------------------------------- -" Two options for installation: manual or pathogen -" -" MANUAL INSTALLATION OPTION: -" --------------------------------------------------------------------- -" -" 1. Download the solarized distribution (available on the homepage above) -" and unarchive the file. -" 2. Move `solarized.vim` to your `.vim/colors` directory. -" 3. Move each of the files in each subdirectories to the corresponding .vim -" subdirectory (e.g. autoload/togglebg.vim goes into your .vim/autoload -" directory as .vim/autoload/togglebg.vim). -" -" 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: -" -" syntax enable -" set background=dark -" colorscheme solarized -" -" or, for the light background mode of Solarized: -" -" syntax enable -" set background=light -" 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 at http://ethanschoonover.com/solarized for -" screenshots which will help you select either the light or dark background. -" -" --------------------------------------------------------------------- -" COLOR VALUES -" --------------------------------------------------------------------- -" Download palettes and files from: http://ethanschoonover.com/solarized -" -" L\*a\*b values are canonical (White D65, Reference D50), other values are -" matched in sRGB space. -" -" SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B sRGB HSB -" --------- ------- ---- ------- ----------- ---------- ----------- ----------- -" base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21 -" base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26 -" base01 #586e75 10/7 brgreen 240 #4e4e4e 45 -07 -07 88 110 117 194 25 46 -" base00 #657b83 11/7 bryellow 241 #585858 50 -07 -07 101 123 131 195 23 51 -" base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59 -" base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63 -" base2 #eee8d5 7/7 white 254 #d7d7af 92 -00 10 238 232 213 44 11 93 -" base3 #fdf6e3 15/7 brwhite 230 #ffffd7 97 00 10 253 246 227 44 10 99 -" yellow #b58900 3/3 yellow 136 #af8700 60 10 65 181 137 0 45 100 71 -" orange #cb4b16 9/3 brred 166 #d75f00 50 50 55 203 75 22 18 89 80 -" red #dc322f 1/1 red 160 #d70000 50 65 45 220 50 47 1 79 86 -" magenta #d33682 5/5 magenta 125 #af005f 50 65 -05 211 54 130 331 74 83 -" violet #6c71c4 13/5 brmagenta 61 #5f5faf 50 15 -45 108 113 196 237 45 77 -" blue #268bd2 4/4 blue 33 #0087ff 55 -10 -45 38 139 210 205 82 82 -" cyan #2aa198 6/6 cyan 37 #00afaf 60 -35 -05 42 161 152 175 74 63 -" green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60 -" -" --------------------------------------------------------------------- -" COLORSCHEME HACKING -" --------------------------------------------------------------------- -" -" Useful commands for testing colorschemes: -" :source $VIMRUNTIME/syntax/hitest.vim -" :help highlight-groups -" :help cterm-colors -" :help group-name -" -" Useful links for developing colorschemes: -" http://www.vim.org/scripts/script.php?script_id=2937 -" http://vimcasts.org/episodes/creating-colorschemes-for-vim/ -" http://www.frexx.de/xterm-256-notes/" -" -" }}} -" Environment Specific Overrides "{{{ -" Allow or disallow certain features based on current terminal emulator or -" environment. - -" Terminals that support italics -let s:terms_italic=[ - \"rxvt", - \"gnome-terminal" - \] -" For reference only, terminals are known to be incomptible. -" Terminals that are in neither list need to be tested. -let s:terms_noitalic=[ - \"iTerm.app", - \"Apple_Terminal" - \] -if has("gui_running") - let s:terminal_italic=1 " TODO: could refactor to not require this at all -else - let s:terminal_italic=0 " terminals will be guilty until proven compatible - for term in s:terms_italic - if $TERM_PROGRAM =~ term - let s:terminal_italic=1 - endif - endfor -endif - -" }}} -" Default option values"{{{ -" --------------------------------------------------------------------- -" s:options_list is used to autogenerate a list of all non-default options -" using "call SolarizedOptions()" or with the "Generate .vimrc commands" -" Solarized menu option. See the "Menus" section below for the function itself. -let s:options_list=[ - \'" this block of commands has been autogenerated by solarized.vim and', - \'" includes the current, non-default Solarized option values.', - \'" To use, place these commands in your .vimrc file (replacing any', - \'" existing colorscheme commands). See also ":help solarized"', - \'', - \'" ------------------------------------------------------------------', - \'" Solarized Colorscheme Config', - \'" ------------------------------------------------------------------', - \] -let s:colorscheme_list=[ - \'syntax enable', - \'set background='.&background, - \'colorscheme solarized', - \] -let s:defaults_list=[ - \'" ------------------------------------------------------------------', - \'', - \'" The following items are available options, but do not need to be', - \'" included in your .vimrc as they are currently set to their defaults.', - \'' - \] -let s:lazycat_list=[ - \'" lazy method of appending this onto your .vimrc ":w! >> ~/.vimrc"', - \'" ------------------------------------------------------------------', - \] - -function! s:SetOption(name,default) - if type(a:default) == type(0) - let l:wrap='' - let l:ewrap='' - else - let l:wrap='"' - let l:ewrap='\"' - endif - if !exists("g:solarized_".a:name) || g:solarized_{a:name}==a:default - exe 'let g:solarized_'.a:name.'='.l:wrap.a:default.l:wrap.'"' - exe 'call add(s:defaults_list, "\" let g:solarized_'.a:name.'='.l:ewrap.g:solarized_{a:name}.l:ewrap.'")' - else - exe 'call add(s:options_list, "let g:solarized_'.a:name.'='.l:ewrap.g:solarized_{a:name}.l:ewrap.' \"default value is '.a:default.'")' - endif -endfunction - -if ($TERM_PROGRAM ==? "apple_terminal" && &t_Co < 256) - let s:solarized_termtrans_default = 1 -else - let s:solarized_termtrans_default = 0 -endif -call s:SetOption("termtrans",s:solarized_termtrans_default) -call s:SetOption("degrade",0) -call s:SetOption("bold",1) -call s:SetOption("underline",1) -call s:SetOption("italic",1) " note that we need to override this later if the terminal doesn't support -call s:SetOption("termcolors",16) -call s:SetOption("contrast","normal") -call s:SetOption("visibility","normal") -call s:SetOption("diffmode","normal") -call s:SetOption("hitrail",0) -call s:SetOption("menu",1) - -"}}} -" Colorscheme initialization "{{{ -" --------------------------------------------------------------------- -hi clear -if exists("syntax_on") - syntax reset -endif -let colors_name = "solarized" - -"}}} -" GUI & CSApprox hexadecimal palettes"{{{ -" --------------------------------------------------------------------- -" -" Set both gui and terminal color values in separate conditional statements -" Due to possibility that CSApprox is running (though I suppose we could just -" 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 -" neutral gray monotone palette component) -if (has("gui_running") && g:solarized_degrade == 0) - let s:vmode = "gui" - let s:base03 = "#002b36" - let s:base02 = "#073642" - let s:base01 = "#586e75" - let s:base00 = "#657b83" - let s:base0 = "#839496" - let s:base1 = "#93a1a1" - let s:base2 = "#eee8d5" - let s:base3 = "#fdf6e3" - let s:yellow = "#b58900" - let s:orange = "#cb4b16" - let s:red = "#dc322f" - let s:magenta = "#d33682" - let s:violet = "#6c71c4" - let s:blue = "#268bd2" - let s:cyan = "#2aa198" - "let s:green = "#859900" "original - let s:green = "#719e07" "experimental -elseif (has("gui_running") && g:solarized_degrade == 1) - " These colors are identical to the 256 color mode. They may be viewed - " while in gui mode via "let g:solarized_degrade=1", though this is not - " recommened and is for testing only. - let s:vmode = "gui" - let s:base03 = "#1c1c1c" - let s:base02 = "#262626" - let s:base01 = "#4e4e4e" - let s:base00 = "#585858" - let s:base0 = "#808080" - let s:base1 = "#8a8a8a" - let s:base2 = "#d7d7af" - let s:base3 = "#ffffd7" - let s:yellow = "#af8700" - let s:orange = "#d75f00" - let s:red = "#af0000" - let s:magenta = "#af005f" - let s:violet = "#5f5faf" - let s:blue = "#0087ff" - let s:cyan = "#00afaf" - let s:green = "#5f8700" -elseif g:solarized_termcolors != 256 && &t_Co >= 16 - let s:vmode = "cterm" - let s:base03 = "8" - let s:base02 = "0" - let s:base01 = "10" - let s:base00 = "11" - let s:base0 = "12" - let s:base1 = "14" - let s:base2 = "7" - let s:base3 = "15" - let s:yellow = "3" - let s:orange = "9" - let s:red = "1" - let s:magenta = "5" - let s:violet = "13" - let s:blue = "4" - let s:cyan = "6" - let s:green = "2" -elseif g:solarized_termcolors == 256 - let s:vmode = "cterm" - let s:base03 = "234" - let s:base02 = "235" - let s:base01 = "239" - let s:base00 = "240" - let s:base0 = "244" - let s:base1 = "245" - let s:base2 = "187" - let s:base3 = "230" - let s:yellow = "136" - let s:orange = "166" - let s:red = "124" - let s:magenta = "125" - let s:violet = "61" - let s:blue = "33" - let s:cyan = "37" - let s:green = "64" -else - let s:vmode = "cterm" - let s:bright = "* term=bold cterm=bold" -" let s:base03 = "0".s:bright -" let s:base02 = "0" -" let s:base01 = "2".s:bright -" let s:base00 = "3".s:bright -" let s:base0 = "4".s:bright -" let s:base1 = "6".s:bright -" let s:base2 = "7" -" let s:base3 = "7".s:bright -" let s:yellow = "3" -" let s:orange = "1".s:bright -" let s:red = "1" -" let s:magenta = "5" -" let s:violet = "5".s:bright -" let s:blue = "4" -" let s:cyan = "6" -" let s:green = "2" - let s:base03 = "DarkGray" " 0* - let s:base02 = "Black" " 0 - let s:base01 = "LightGreen" " 2* - let s:base00 = "LightYellow" " 3* - let s:base0 = "LightBlue" " 4* - let s:base1 = "LightCyan" " 6* - let s:base2 = "LightGray" " 7 - let s:base3 = "White" " 7* - let s:yellow = "DarkYellow" " 3 - let s:orange = "LightRed" " 1* - let s:red = "DarkRed" " 1 - let s:magenta = "DarkMagenta" " 5 - let s:violet = "LightMagenta" " 5* - let s:blue = "DarkBlue" " 4 - let s:cyan = "DarkCyan" " 6 - let s:green = "DarkGreen" " 2 - -endif -"}}} -" Formatting options and null values for passthrough effect "{{{ -" --------------------------------------------------------------------- - let s:none = "NONE" - let s:none = "NONE" - let s:t_none = "NONE" - let s:n = "NONE" - let s:c = ",undercurl" - let s:r = ",reverse" - let s:s = ",standout" - let s:ou = "" - let s:ob = "" -"}}} -" Background value based on termtrans setting "{{{ -" --------------------------------------------------------------------- -if (has("gui_running") || g:solarized_termtrans == 0) - let s:back = s:base03 -else - let s:back = "NONE" -endif -"}}} -" Alternate light scheme "{{{ -" --------------------------------------------------------------------- -if &background == "light" - let s:temp03 = s:base03 - let s:temp02 = s:base02 - let s:temp01 = s:base01 - let s:temp00 = s:base00 - let s:base03 = s:base3 - let s:base02 = s:base2 - let s:base01 = s:base1 - let s:base00 = s:base0 - let s:base0 = s:temp00 - let s:base1 = s:temp01 - let s:base2 = s:temp02 - let s:base3 = s:temp03 - if (s:back != "NONE") - let s:back = s:base03 - endif -endif -"}}} -" Optional contrast schemes "{{{ -" --------------------------------------------------------------------- -if g:solarized_contrast == "high" - let s:base01 = s:base00 - let s:base00 = s:base0 - let s:base0 = s:base1 - let s:base1 = s:base2 - let s:base2 = s:base3 - let s:back = s:back -endif -if g:solarized_contrast == "low" - let s:back = s:base02 - let s:ou = ",underline" -endif -"}}} -" Overrides dependent on user specified values and environment "{{{ -" --------------------------------------------------------------------- -if (g:solarized_bold == 0 || &t_Co == 8 ) - let s:b = "" - let s:bb = ",bold" -else - let s:b = ",bold" - let s:bb = "" -endif - -if g:solarized_underline == 0 - let s:u = "" -else - let s:u = ",underline" -endif - -if g:solarized_italic == 0 || s:terminal_italic == 0 - let s:i = "" -else - let s:i = ",italic" -endif -"}}} -" Highlighting primitives"{{{ -" --------------------------------------------------------------------- - -exe "let s:bg_none = ' ".s:vmode."bg=".s:none ."'" -exe "let s:bg_back = ' ".s:vmode."bg=".s:back ."'" -exe "let s:bg_base03 = ' ".s:vmode."bg=".s:base03 ."'" -exe "let s:bg_base02 = ' ".s:vmode."bg=".s:base02 ."'" -exe "let s:bg_base01 = ' ".s:vmode."bg=".s:base01 ."'" -exe "let s:bg_base00 = ' ".s:vmode."bg=".s:base00 ."'" -exe "let s:bg_base0 = ' ".s:vmode."bg=".s:base0 ."'" -exe "let s:bg_base1 = ' ".s:vmode."bg=".s:base1 ."'" -exe "let s:bg_base2 = ' ".s:vmode."bg=".s:base2 ."'" -exe "let s:bg_base3 = ' ".s:vmode."bg=".s:base3 ."'" -exe "let s:bg_green = ' ".s:vmode."bg=".s:green ."'" -exe "let s:bg_yellow = ' ".s:vmode."bg=".s:yellow ."'" -exe "let s:bg_orange = ' ".s:vmode."bg=".s:orange ."'" -exe "let s:bg_red = ' ".s:vmode."bg=".s:red ."'" -exe "let s:bg_magenta = ' ".s:vmode."bg=".s:magenta."'" -exe "let s:bg_violet = ' ".s:vmode."bg=".s:violet ."'" -exe "let s:bg_blue = ' ".s:vmode."bg=".s:blue ."'" -exe "let s:bg_cyan = ' ".s:vmode."bg=".s:cyan ."'" - -exe "let s:fg_none = ' ".s:vmode."fg=".s:none ."'" -exe "let s:fg_back = ' ".s:vmode."fg=".s:back ."'" -exe "let s:fg_base03 = ' ".s:vmode."fg=".s:base03 ."'" -exe "let s:fg_base02 = ' ".s:vmode."fg=".s:base02 ."'" -exe "let s:fg_base01 = ' ".s:vmode."fg=".s:base01 ."'" -exe "let s:fg_base00 = ' ".s:vmode."fg=".s:base00 ."'" -exe "let s:fg_base0 = ' ".s:vmode."fg=".s:base0 ."'" -exe "let s:fg_base1 = ' ".s:vmode."fg=".s:base1 ."'" -exe "let s:fg_base2 = ' ".s:vmode."fg=".s:base2 ."'" -exe "let s:fg_base3 = ' ".s:vmode."fg=".s:base3 ."'" -exe "let s:fg_green = ' ".s:vmode."fg=".s:green ."'" -exe "let s:fg_yellow = ' ".s:vmode."fg=".s:yellow ."'" -exe "let s:fg_orange = ' ".s:vmode."fg=".s:orange ."'" -exe "let s:fg_red = ' ".s:vmode."fg=".s:red ."'" -exe "let s:fg_magenta = ' ".s:vmode."fg=".s:magenta."'" -exe "let s:fg_violet = ' ".s:vmode."fg=".s:violet ."'" -exe "let s:fg_blue = ' ".s:vmode."fg=".s:blue ."'" -exe "let s:fg_cyan = ' ".s:vmode."fg=".s:cyan ."'" - -exe "let s:fmt_none = ' ".s:vmode."=NONE". " term=NONE". "'" -exe "let s:fmt_bold = ' ".s:vmode."=NONE".s:b. " term=NONE".s:b."'" -exe "let s:fmt_bldi = ' ".s:vmode."=NONE".s:b. " term=NONE".s:b."'" -exe "let s:fmt_undr = ' ".s:vmode."=NONE".s:u. " term=NONE".s:u."'" -exe "let s:fmt_undb = ' ".s:vmode."=NONE".s:u.s:b. " term=NONE".s:u.s:b."'" -exe "let s:fmt_undi = ' ".s:vmode."=NONE".s:u. " term=NONE".s:u."'" -exe "let s:fmt_uopt = ' ".s:vmode."=NONE".s:ou. " term=NONE".s:ou."'" -exe "let s:fmt_curl = ' ".s:vmode."=NONE".s:c. " term=NONE".s:c."'" -exe "let s:fmt_ital = ' ".s:vmode."=NONE".s:i. " term=NONE".s:i."'" -exe "let s:fmt_stnd = ' ".s:vmode."=NONE".s:s. " term=NONE".s:s."'" -exe "let s:fmt_revr = ' ".s:vmode."=NONE".s:r. " term=NONE".s:r."'" -exe "let s:fmt_revb = ' ".s:vmode."=NONE".s:r.s:b. " term=NONE".s:r.s:b."'" -" revbb (reverse bold for bright colors) is only set to actual bold in low -" color terminals (t_co=8, such as OS X Terminal.app) and should only be used -" with colors 8-15. -exe "let s:fmt_revbb = ' ".s:vmode."=NONE".s:r.s:bb. " term=NONE".s:r.s:bb."'" -exe "let s:fmt_revbbu = ' ".s:vmode."=NONE".s:r.s:bb.s:u." term=NONE".s:r.s:bb.s:u."'" - -if has("gui_running") - exe "let s:sp_none = ' guisp=".s:none ."'" - exe "let s:sp_back = ' guisp=".s:back ."'" - exe "let s:sp_base03 = ' guisp=".s:base03 ."'" - exe "let s:sp_base02 = ' guisp=".s:base02 ."'" - exe "let s:sp_base01 = ' guisp=".s:base01 ."'" - exe "let s:sp_base00 = ' guisp=".s:base00 ."'" - exe "let s:sp_base0 = ' guisp=".s:base0 ."'" - exe "let s:sp_base1 = ' guisp=".s:base1 ."'" - exe "let s:sp_base2 = ' guisp=".s:base2 ."'" - exe "let s:sp_base3 = ' guisp=".s:base3 ."'" - exe "let s:sp_green = ' guisp=".s:green ."'" - exe "let s:sp_yellow = ' guisp=".s:yellow ."'" - exe "let s:sp_orange = ' guisp=".s:orange ."'" - exe "let s:sp_red = ' guisp=".s:red ."'" - exe "let s:sp_magenta = ' guisp=".s:magenta."'" - exe "let s:sp_violet = ' guisp=".s:violet ."'" - exe "let s:sp_blue = ' guisp=".s:blue ."'" - exe "let s:sp_cyan = ' guisp=".s:cyan ."'" -else - let s:sp_none = "" - let s:sp_back = "" - let s:sp_base03 = "" - let s:sp_base02 = "" - let s:sp_base01 = "" - let s:sp_base00 = "" - let s:sp_base0 = "" - let s:sp_base1 = "" - let s:sp_base2 = "" - let s:sp_base3 = "" - let s:sp_green = "" - let s:sp_yellow = "" - let s:sp_orange = "" - let s:sp_red = "" - let s:sp_magenta = "" - let s:sp_violet = "" - let s:sp_blue = "" - let s:sp_cyan = "" -endif - -"}}} -" Basic highlighting"{{{ -" --------------------------------------------------------------------- -" note that link syntax to avoid duplicate configuration doesn't work with the -" exe compiled formats - -exe "hi! Normal" .s:fmt_none .s:fg_base0 .s:bg_back - -exe "hi! Comment" .s:fmt_ital .s:fg_base01 .s:bg_none -" *Comment any comment - -exe "hi! Constant" .s:fmt_none .s:fg_cyan .s:bg_none -" *Constant any constant -" String a string constant: "this is a string" -" Character a character constant: 'c', '\n' -" Number a number constant: 234, 0xff -" Boolean a boolean constant: TRUE, false -" Float a floating point constant: 2.3e10 - -exe "hi! Identifier" .s:fmt_none .s:fg_blue .s:bg_none -" *Identifier any variable name -" Function function name (also: methods for classes) -" -exe "hi! Statement" .s:fmt_none .s:fg_green .s:bg_none -" *Statement any statement -" Conditional if, then, else, endif, switch, etc. -" Repeat for, do, while, etc. -" Label case, default, etc. -" Operator "sizeof", "+", "*", etc. -" Keyword any other keyword -" Exception try, catch, throw - -exe "hi! PreProc" .s:fmt_none .s:fg_orange .s:bg_none -" *PreProc generic Preprocessor -" Include preprocessor #include -" Define preprocessor #define -" Macro same as Define -" PreCondit preprocessor #if, #else, #endif, etc. - -exe "hi! Type" .s:fmt_none .s:fg_yellow .s:bg_none -" *Type int, long, char, etc. -" StorageClass static, register, volatile, etc. -" Structure struct, union, enum, etc. -" Typedef A typedef - -exe "hi! Special" .s:fmt_none .s:fg_red .s:bg_none -" *Special any special symbol -" SpecialChar special character in a constant -" Tag you can use CTRL-] on this -" Delimiter character that needs attention -" SpecialComment special things inside a comment -" Debug debugging statements - -exe "hi! Underlined" .s:fmt_none .s:fg_violet .s:bg_none -" *Underlined text that stands out, HTML links - -exe "hi! Ignore" .s:fmt_none .s:fg_none .s:bg_none -" *Ignore left blank, hidden |hl-Ignore| - -exe "hi! Error" .s:fmt_bold .s:fg_red .s:bg_none -" *Error any erroneous construct - -exe "hi! Todo" .s:fmt_bold .s:fg_magenta.s:bg_none -" *Todo anything that needs extra attention; mostly the -" keywords TODO FIXME and XXX -" -"}}} -" Extended highlighting "{{{ -" --------------------------------------------------------------------- -if (g:solarized_visibility=="high") - exe "hi! SpecialKey" .s:fmt_revr .s:fg_red .s:bg_none - exe "hi! NonText" .s:fmt_bold .s:fg_red .s:bg_none -elseif (g:solarized_visibility=="low") - exe "hi! SpecialKey" .s:fmt_bold .s:fg_base02 .s:bg_none - exe "hi! NonText" .s:fmt_bold .s:fg_base02 .s:bg_none -else - exe "hi! SpecialKey" .s:fmt_bold .s:fg_base00 .s:bg_base02 - exe "hi! NonText" .s:fmt_bold .s:fg_base00 .s:bg_none -endif -exe "hi! StatusLine" .s:fmt_none .s:fg_base1 .s:bg_base02 .s:fmt_revbb -exe "hi! StatusLineNC" .s:fmt_none .s:fg_base00 .s:bg_base02 .s:fmt_revbb -exe "hi! Visual" .s:fmt_none .s:fg_base01 .s:bg_base03 .s:fmt_revbb -exe "hi! Directory" .s:fmt_none .s:fg_blue .s:bg_none -exe "hi! ErrorMsg" .s:fmt_revr .s:fg_red .s:bg_none -exe "hi! IncSearch" .s:fmt_stnd .s:fg_orange .s:bg_none -exe "hi! Search" .s:fmt_revr .s:fg_yellow .s:bg_none -exe "hi! MoreMsg" .s:fmt_none .s:fg_blue .s:bg_none -exe "hi! ModeMsg" .s:fmt_none .s:fg_blue .s:bg_none -exe "hi! LineNr" .s:fmt_none .s:fg_base01 .s:bg_base02 -exe "hi! Question" .s:fmt_bold .s:fg_cyan .s:bg_none -if ( has("gui_running") || &t_Co > 8 ) - exe "hi! VertSplit" .s:fmt_none .s:fg_base00 .s:bg_base00 -else - exe "hi! VertSplit" .s:fmt_revbb .s:fg_base00 .s:bg_base02 -endif -exe "hi! Title" .s:fmt_bold .s:fg_orange .s:bg_none -exe "hi! VisualNOS" .s:fmt_stnd .s:fg_none .s:bg_base02 .s:fmt_revbb -exe "hi! WarningMsg" .s:fmt_bold .s:fg_red .s:bg_none -exe "hi! WildMenu" .s:fmt_none .s:fg_base2 .s:bg_base02 .s:fmt_revbb -exe "hi! Folded" .s:fmt_undb .s:fg_base0 .s:bg_base02 .s:sp_base03 -exe "hi! FoldColumn" .s:fmt_none .s:fg_base0 .s:bg_base02 -if (g:solarized_diffmode=="high") -exe "hi! DiffAdd" .s:fmt_revr .s:fg_green .s:bg_none -exe "hi! DiffChange" .s:fmt_revr .s:fg_yellow .s:bg_none -exe "hi! DiffDelete" .s:fmt_revr .s:fg_red .s:bg_none -exe "hi! DiffText" .s:fmt_revr .s:fg_blue .s:bg_none -elseif (g:solarized_diffmode=="low") -exe "hi! DiffAdd" .s:fmt_undr .s:fg_green .s:bg_none .s:sp_green -exe "hi! DiffChange" .s:fmt_undr .s:fg_yellow .s:bg_none .s:sp_yellow -exe "hi! DiffDelete" .s:fmt_bold .s:fg_red .s:bg_none -exe "hi! DiffText" .s:fmt_undr .s:fg_blue .s:bg_none .s:sp_blue -else " normal - if has("gui_running") -exe "hi! DiffAdd" .s:fmt_bold .s:fg_green .s:bg_base02 .s:sp_green -exe "hi! DiffChange" .s:fmt_bold .s:fg_yellow .s:bg_base02 .s:sp_yellow -exe "hi! DiffDelete" .s:fmt_bold .s:fg_red .s:bg_base02 -exe "hi! DiffText" .s:fmt_bold .s:fg_blue .s:bg_base02 .s:sp_blue - else -exe "hi! DiffAdd" .s:fmt_none .s:fg_green .s:bg_base02 .s:sp_green -exe "hi! DiffChange" .s:fmt_none .s:fg_yellow .s:bg_base02 .s:sp_yellow -exe "hi! DiffDelete" .s:fmt_none .s:fg_red .s:bg_base02 -exe "hi! DiffText" .s:fmt_none .s:fg_blue .s:bg_base02 .s:sp_blue - endif -endif -exe "hi! SignColumn" .s:fmt_none .s:fg_base0 -exe "hi! Conceal" .s:fmt_none .s:fg_blue .s:bg_none -exe "hi! SpellBad" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_red -exe "hi! SpellCap" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_violet -exe "hi! SpellRare" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_cyan -exe "hi! SpellLocal" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_yellow -exe "hi! Pmenu" .s:fmt_none .s:fg_base0 .s:bg_base02 .s:fmt_revbb -exe "hi! PmenuSel" .s:fmt_none .s:fg_base01 .s:bg_base2 .s:fmt_revbb -exe "hi! PmenuSbar" .s:fmt_none .s:fg_base2 .s:bg_base0 .s:fmt_revbb -exe "hi! PmenuThumb" .s:fmt_none .s:fg_base0 .s:bg_base03 .s:fmt_revbb -exe "hi! TabLine" .s:fmt_undr .s:fg_base0 .s:bg_base02 .s:sp_base0 -exe "hi! TabLineFill" .s:fmt_undr .s:fg_base0 .s:bg_base02 .s:sp_base0 -exe "hi! TabLineSel" .s:fmt_undr .s:fg_base01 .s:bg_base2 .s:sp_base0 .s:fmt_revbbu -exe "hi! CursorColumn" .s:fmt_none .s:fg_none .s:bg_base02 -exe "hi! CursorLine" .s:fmt_uopt .s:fg_none .s:bg_base02 .s:sp_base1 -exe "hi! ColorColumn" .s:fmt_none .s:fg_none .s:bg_base02 -exe "hi! Cursor" .s:fmt_none .s:fg_base03 .s:bg_base0 -hi! link lCursor Cursor -exe "hi! MatchParen" .s:fmt_bold .s:fg_red .s:bg_base01 - -"}}} -" vim syntax highlighting "{{{ -" --------------------------------------------------------------------- -"exe "hi! vimLineComment" . s:fg_base01 .s:bg_none .s:fmt_ital -"hi! link vimComment Comment -"hi! link vimLineComment Comment -hi! link vimVar Identifier -hi! link vimFunc Function -hi! link vimUserFunc Function -hi! link helpSpecial Special -hi! link vimSet Normal -hi! link vimSetEqual Normal -exe "hi! vimCommentString" .s:fmt_none .s:fg_violet .s:bg_none -exe "hi! vimCommand" .s:fmt_none .s:fg_yellow .s:bg_none -exe "hi! vimCmdSep" .s:fmt_bold .s:fg_blue .s:bg_none -exe "hi! helpExample" .s:fmt_none .s:fg_base1 .s:bg_none -exe "hi! helpOption" .s:fmt_none .s:fg_cyan .s:bg_none -exe "hi! helpNote" .s:fmt_none .s:fg_magenta.s:bg_none -exe "hi! helpVim" .s:fmt_none .s:fg_magenta.s:bg_none -exe "hi! helpHyperTextJump" .s:fmt_undr .s:fg_blue .s:bg_none -exe "hi! helpHyperTextEntry".s:fmt_none .s:fg_green .s:bg_none -exe "hi! vimIsCommand" .s:fmt_none .s:fg_base00 .s:bg_none -exe "hi! vimSynMtchOpt" .s:fmt_none .s:fg_yellow .s:bg_none -exe "hi! vimSynType" .s:fmt_none .s:fg_cyan .s:bg_none -exe "hi! vimHiLink" .s:fmt_none .s:fg_blue .s:bg_none -exe "hi! vimHiGroup" .s:fmt_none .s:fg_blue .s:bg_none -exe "hi! vimGroup" .s:fmt_undb .s:fg_blue .s:bg_none -"}}} -" diff highlighting "{{{ -" --------------------------------------------------------------------- -hi! link diffAdded Statement -hi! link diffLine Identifier -"}}} -" git & gitcommit highlighting "{{{ -"git -"exe "hi! gitDateHeader" -"exe "hi! gitIdentityHeader" -"exe "hi! gitIdentityKeyword" -"exe "hi! gitNotesHeader" -"exe "hi! gitReflogHeader" -"exe "hi! gitKeyword" -"exe "hi! gitIdentity" -"exe "hi! gitEmailDelimiter" -"exe "hi! gitEmail" -"exe "hi! gitDate" -"exe "hi! gitMode" -"exe "hi! gitHashAbbrev" -"exe "hi! gitHash" -"exe "hi! gitReflogMiddle" -"exe "hi! gitReference" -"exe "hi! gitStage" -"exe "hi! gitType" -"exe "hi! gitDiffAdded" -"exe "hi! gitDiffRemoved" -"gitcommit -"exe "hi! gitcommitSummary" -exe "hi! gitcommitComment" .s:fmt_ital .s:fg_base01 .s:bg_none -hi! link gitcommitUntracked gitcommitComment -hi! link gitcommitDiscarded gitcommitComment -hi! link gitcommitSelected gitcommitComment -exe "hi! gitcommitUnmerged" .s:fmt_bold .s:fg_green .s:bg_none -exe "hi! gitcommitOnBranch" .s:fmt_bold .s:fg_base01 .s:bg_none -exe "hi! gitcommitBranch" .s:fmt_bold .s:fg_magenta .s:bg_none -hi! link gitcommitNoBranch gitcommitBranch -exe "hi! gitcommitDiscardedType".s:fmt_none .s:fg_red .s:bg_none -exe "hi! gitcommitSelectedType" .s:fmt_none .s:fg_green .s:bg_none -"exe "hi! gitcommitUnmergedType" -"exe "hi! gitcommitType" -"exe "hi! gitcommitNoChanges" -"exe "hi! gitcommitHeader" -exe "hi! gitcommitHeader" .s:fmt_none .s:fg_base01 .s:bg_none -exe "hi! gitcommitUntrackedFile".s:fmt_bold .s:fg_cyan .s:bg_none -exe "hi! gitcommitDiscardedFile".s:fmt_bold .s:fg_red .s:bg_none -exe "hi! gitcommitSelectedFile" .s:fmt_bold .s:fg_green .s:bg_none -exe "hi! gitcommitUnmergedFile" .s:fmt_bold .s:fg_yellow .s:bg_none -exe "hi! gitcommitFile" .s:fmt_bold .s:fg_base0 .s:bg_none -hi! link gitcommitDiscardedArrow gitcommitDiscardedFile -hi! link gitcommitSelectedArrow gitcommitSelectedFile -hi! link gitcommitUnmergedArrow gitcommitUnmergedFile -"exe "hi! gitcommitArrow" -"exe "hi! gitcommitOverflow" -"exe "hi! gitcommitBlank" -" }}} -" html highlighting "{{{ -" --------------------------------------------------------------------- -exe "hi! htmlTag" .s:fmt_none .s:fg_base01 .s:bg_none -exe "hi! htmlEndTag" .s:fmt_none .s:fg_base01 .s:bg_none -exe "hi! htmlTagN" .s:fmt_bold .s:fg_base1 .s:bg_none -exe "hi! htmlTagName" .s:fmt_bold .s:fg_blue .s:bg_none -exe "hi! htmlSpecialTagName".s:fmt_ital .s:fg_blue .s:bg_none -exe "hi! htmlArg" .s:fmt_none .s:fg_base00 .s:bg_none -exe "hi! javaScript" .s:fmt_none .s:fg_yellow .s:bg_none -"}}} -" perl highlighting "{{{ -" --------------------------------------------------------------------- -exe "hi! perlHereDoc" . s:fg_base1 .s:bg_back .s:fmt_none -exe "hi! perlVarPlain" . s:fg_yellow .s:bg_back .s:fmt_none -exe "hi! perlStatementFileDesc". s:fg_cyan.s:bg_back.s:fmt_none - -"}}} -" tex highlighting "{{{ -" --------------------------------------------------------------------- -exe "hi! texStatement" . s:fg_cyan .s:bg_back .s:fmt_none -exe "hi! texMathZoneX" . s:fg_yellow .s:bg_back .s:fmt_none -exe "hi! texMathMatcher" . s:fg_yellow .s:bg_back .s:fmt_none -exe "hi! texMathMatcher" . s:fg_yellow .s:bg_back .s:fmt_none -exe "hi! texRefLabel" . s:fg_yellow .s:bg_back .s:fmt_none -"}}} -" ruby highlighting "{{{ -" --------------------------------------------------------------------- -exe "hi! rubyDefine" . s:fg_base1 .s:bg_back .s:fmt_bold -"rubyInclude -"rubySharpBang -"rubyAccess -"rubyPredefinedVariable -"rubyBoolean -"rubyClassVariable -"rubyBeginEnd -"rubyRepeatModifier -"hi! link rubyArrayDelimiter Special " [ , , ] -"rubyCurlyBlock { , , } - -"hi! link rubyClass Keyword -"hi! link rubyModule Keyword -"hi! link rubyKeyword Keyword -"hi! link rubyOperator Operator -"hi! link rubyIdentifier Identifier -"hi! link rubyInstanceVariable Identifier -"hi! link rubyGlobalVariable Identifier -"hi! link rubyClassVariable Identifier -"hi! link rubyConstant Type -"}}} -" haskell syntax highlighting"{{{ -" --------------------------------------------------------------------- -" For use with syntax/haskell.vim : Haskell Syntax File -" http://www.vim.org/scripts/script.php?script_id=3034 -" See also Steffen Siering's github repository: -" http://github.com/urso/dotrc/blob/master/vim/syntax/haskell.vim -" --------------------------------------------------------------------- -" -" Treat True and False specially, see the plugin referenced above -let hs_highlight_boolean=1 -" highlight delims, see the plugin referenced above -let hs_highlight_delimiters=1 - -exe "hi! cPreCondit". s:fg_orange.s:bg_none .s:fmt_none - -exe "hi! VarId" . s:fg_blue .s:bg_none .s:fmt_none -exe "hi! ConId" . s:fg_yellow .s:bg_none .s:fmt_none -exe "hi! hsImport" . s:fg_magenta.s:bg_none .s:fmt_none -exe "hi! hsString" . s:fg_base00 .s:bg_none .s:fmt_none - -exe "hi! hsStructure" . s:fg_cyan .s:bg_none .s:fmt_none -exe "hi! hs_hlFunctionName" . s:fg_blue .s:bg_none -exe "hi! hsStatement" . s:fg_cyan .s:bg_none .s:fmt_none -exe "hi! hsImportLabel" . s:fg_cyan .s:bg_none .s:fmt_none -exe "hi! hs_OpFunctionName" . s:fg_yellow .s:bg_none .s:fmt_none -exe "hi! hs_DeclareFunction" . s:fg_orange .s:bg_none .s:fmt_none -exe "hi! hsVarSym" . s:fg_cyan .s:bg_none .s:fmt_none -exe "hi! hsType" . s:fg_yellow .s:bg_none .s:fmt_none -exe "hi! hsTypedef" . s:fg_cyan .s:bg_none .s:fmt_none -exe "hi! hsModuleName" . s:fg_green .s:bg_none .s:fmt_undr -exe "hi! hsModuleStartLabel" . s:fg_magenta.s:bg_none .s:fmt_none -hi! link hsImportParams Delimiter -hi! link hsDelimTypeExport Delimiter -hi! link hsModuleStartLabel hsStructure -hi! link hsModuleWhereLabel hsModuleStartLabel - -" following is for the haskell-conceal plugin -" the first two items don't have an impact, but better safe -exe "hi! hsNiceOperator" . s:fg_cyan .s:bg_none .s:fmt_none -exe "hi! hsniceoperator" . s:fg_cyan .s:bg_none .s:fmt_none - -"}}} -" pandoc markdown syntax highlighting "{{{ -" --------------------------------------------------------------------- - -"PandocHiLink pandocNormalBlock -exe "hi! pandocTitleBlock" .s:fg_blue .s:bg_none .s:fmt_none -exe "hi! pandocTitleBlockTitle" .s:fg_blue .s:bg_none .s:fmt_bold -exe "hi! pandocTitleComment" .s:fg_blue .s:bg_none .s:fmt_bold -exe "hi! pandocComment" .s:fg_base01 .s:bg_none .s:fmt_ital -exe "hi! pandocVerbatimBlock" .s:fg_yellow .s:bg_none .s:fmt_none -hi! link pandocVerbatimBlockDeep pandocVerbatimBlock -hi! link pandocCodeBlock pandocVerbatimBlock -hi! link pandocCodeBlockDelim pandocVerbatimBlock -exe "hi! pandocBlockQuote" .s:fg_blue .s:bg_none .s:fmt_none -exe "hi! pandocBlockQuoteLeader1" .s:fg_blue .s:bg_none .s:fmt_none -exe "hi! pandocBlockQuoteLeader2" .s:fg_cyan .s:bg_none .s:fmt_none -exe "hi! pandocBlockQuoteLeader3" .s:fg_yellow .s:bg_none .s:fmt_none -exe "hi! pandocBlockQuoteLeader4" .s:fg_red .s:bg_none .s:fmt_none -exe "hi! pandocBlockQuoteLeader5" .s:fg_base0 .s:bg_none .s:fmt_none -exe "hi! pandocBlockQuoteLeader6" .s:fg_base01 .s:bg_none .s:fmt_none -exe "hi! pandocListMarker" .s:fg_magenta.s:bg_none .s:fmt_none -exe "hi! pandocListReference" .s:fg_magenta.s:bg_none .s:fmt_undr - -" Definitions -" --------------------------------------------------------------------- -let s:fg_pdef = s:fg_violet -exe "hi! pandocDefinitionBlock" .s:fg_pdef .s:bg_none .s:fmt_none -exe "hi! pandocDefinitionTerm" .s:fg_pdef .s:bg_none .s:fmt_stnd -exe "hi! pandocDefinitionIndctr" .s:fg_pdef .s:bg_none .s:fmt_bold -exe "hi! pandocEmphasisDefinition" .s:fg_pdef .s:bg_none .s:fmt_ital -exe "hi! pandocEmphasisNestedDefinition" .s:fg_pdef .s:bg_none .s:fmt_bldi -exe "hi! pandocStrongEmphasisDefinition" .s:fg_pdef .s:bg_none .s:fmt_bold -exe "hi! pandocStrongEmphasisNestedDefinition" .s:fg_pdef.s:bg_none.s:fmt_bldi -exe "hi! pandocStrongEmphasisEmphasisDefinition" .s:fg_pdef.s:bg_none.s:fmt_bldi -exe "hi! pandocStrikeoutDefinition" .s:fg_pdef .s:bg_none .s:fmt_revr -exe "hi! pandocVerbatimInlineDefinition" .s:fg_pdef .s:bg_none .s:fmt_none -exe "hi! pandocSuperscriptDefinition" .s:fg_pdef .s:bg_none .s:fmt_none -exe "hi! pandocSubscriptDefinition" .s:fg_pdef .s:bg_none .s:fmt_none - -" Tables -" --------------------------------------------------------------------- -let s:fg_ptable = s:fg_blue -exe "hi! pandocTable" .s:fg_ptable.s:bg_none .s:fmt_none -exe "hi! pandocTableStructure" .s:fg_ptable.s:bg_none .s:fmt_none -hi! link pandocTableStructureTop pandocTableStructre -hi! link pandocTableStructureEnd pandocTableStructre -exe "hi! pandocTableZebraLight" .s:fg_ptable.s:bg_base03.s:fmt_none -exe "hi! pandocTableZebraDark" .s:fg_ptable.s:bg_base02.s:fmt_none -exe "hi! pandocEmphasisTable" .s:fg_ptable.s:bg_none .s:fmt_ital -exe "hi! pandocEmphasisNestedTable" .s:fg_ptable.s:bg_none .s:fmt_bldi -exe "hi! pandocStrongEmphasisTable" .s:fg_ptable.s:bg_none .s:fmt_bold -exe "hi! pandocStrongEmphasisNestedTable" .s:fg_ptable.s:bg_none .s:fmt_bldi -exe "hi! pandocStrongEmphasisEmphasisTable" .s:fg_ptable.s:bg_none .s:fmt_bldi -exe "hi! pandocStrikeoutTable" .s:fg_ptable.s:bg_none .s:fmt_revr -exe "hi! pandocVerbatimInlineTable" .s:fg_ptable.s:bg_none .s:fmt_none -exe "hi! pandocSuperscriptTable" .s:fg_ptable.s:bg_none .s:fmt_none -exe "hi! pandocSubscriptTable" .s:fg_ptable.s:bg_none .s:fmt_none - -" Headings -" --------------------------------------------------------------------- -let s:fg_phead = s:fg_orange -exe "hi! pandocHeading" .s:fg_phead .s:bg_none.s:fmt_bold -exe "hi! pandocHeadingMarker" .s:fg_yellow.s:bg_none.s:fmt_bold -exe "hi! pandocEmphasisHeading" .s:fg_phead .s:bg_none.s:fmt_bldi -exe "hi! pandocEmphasisNestedHeading" .s:fg_phead .s:bg_none.s:fmt_bldi -exe "hi! pandocStrongEmphasisHeading" .s:fg_phead .s:bg_none.s:fmt_bold -exe "hi! pandocStrongEmphasisNestedHeading" .s:fg_phead .s:bg_none.s:fmt_bldi -exe "hi! pandocStrongEmphasisEmphasisHeading".s:fg_phead .s:bg_none.s:fmt_bldi -exe "hi! pandocStrikeoutHeading" .s:fg_phead .s:bg_none.s:fmt_revr -exe "hi! pandocVerbatimInlineHeading" .s:fg_phead .s:bg_none.s:fmt_bold -exe "hi! pandocSuperscriptHeading" .s:fg_phead .s:bg_none.s:fmt_bold -exe "hi! pandocSubscriptHeading" .s:fg_phead .s:bg_none.s:fmt_bold - -" Links -" --------------------------------------------------------------------- -exe "hi! pandocLinkDelim" .s:fg_base01 .s:bg_none .s:fmt_none -exe "hi! pandocLinkLabel" .s:fg_blue .s:bg_none .s:fmt_undr -exe "hi! pandocLinkText" .s:fg_blue .s:bg_none .s:fmt_undb -exe "hi! pandocLinkURL" .s:fg_base00 .s:bg_none .s:fmt_undr -exe "hi! pandocLinkTitle" .s:fg_base00 .s:bg_none .s:fmt_undi -exe "hi! pandocLinkTitleDelim" .s:fg_base01 .s:bg_none .s:fmt_undi .s:sp_base00 -exe "hi! pandocLinkDefinition" .s:fg_cyan .s:bg_none .s:fmt_undr .s:sp_base00 -exe "hi! pandocLinkDefinitionID" .s:fg_blue .s:bg_none .s:fmt_bold -exe "hi! pandocImageCaption" .s:fg_violet .s:bg_none .s:fmt_undb -exe "hi! pandocFootnoteLink" .s:fg_green .s:bg_none .s:fmt_undr -exe "hi! pandocFootnoteDefLink" .s:fg_green .s:bg_none .s:fmt_bold -exe "hi! pandocFootnoteInline" .s:fg_green .s:bg_none .s:fmt_undb -exe "hi! pandocFootnote" .s:fg_green .s:bg_none .s:fmt_none -exe "hi! pandocCitationDelim" .s:fg_magenta.s:bg_none .s:fmt_none -exe "hi! pandocCitation" .s:fg_magenta.s:bg_none .s:fmt_none -exe "hi! pandocCitationID" .s:fg_magenta.s:bg_none .s:fmt_undr -exe "hi! pandocCitationRef" .s:fg_magenta.s:bg_none .s:fmt_none - -" Main Styles -" --------------------------------------------------------------------- -exe "hi! pandocStyleDelim" .s:fg_base01 .s:bg_none .s:fmt_none -exe "hi! pandocEmphasis" .s:fg_base0 .s:bg_none .s:fmt_ital -exe "hi! pandocEmphasisNested" .s:fg_base0 .s:bg_none .s:fmt_bldi -exe "hi! pandocStrongEmphasis" .s:fg_base0 .s:bg_none .s:fmt_bold -exe "hi! pandocStrongEmphasisNested" .s:fg_base0 .s:bg_none .s:fmt_bldi -exe "hi! pandocStrongEmphasisEmphasis" .s:fg_base0 .s:bg_none .s:fmt_bldi -exe "hi! pandocStrikeout" .s:fg_base01 .s:bg_none .s:fmt_revr -exe "hi! pandocVerbatimInline" .s:fg_yellow .s:bg_none .s:fmt_none -exe "hi! pandocSuperscript" .s:fg_violet .s:bg_none .s:fmt_none -exe "hi! pandocSubscript" .s:fg_violet .s:bg_none .s:fmt_none - -exe "hi! pandocRule" .s:fg_blue .s:bg_none .s:fmt_bold -exe "hi! pandocRuleLine" .s:fg_blue .s:bg_none .s:fmt_bold -exe "hi! pandocEscapePair" .s:fg_red .s:bg_none .s:fmt_bold -exe "hi! pandocCitationRef" .s:fg_magenta.s:bg_none .s:fmt_none -exe "hi! pandocNonBreakingSpace" . s:fg_red .s:bg_none .s:fmt_revr -hi! link pandocEscapedCharacter pandocEscapePair -hi! link pandocLineBreak pandocEscapePair - -" Embedded Code -" --------------------------------------------------------------------- -exe "hi! pandocMetadataDelim" .s:fg_base01 .s:bg_none .s:fmt_none -exe "hi! pandocMetadata" .s:fg_blue .s:bg_none .s:fmt_none -exe "hi! pandocMetadataKey" .s:fg_blue .s:bg_none .s:fmt_none -exe "hi! pandocMetadata" .s:fg_blue .s:bg_none .s:fmt_bold -hi! link pandocMetadataTitle pandocMetadata - -"}}} -" Utility autocommand "{{{ -" --------------------------------------------------------------------- -" In cases where Solarized is initialized inside a terminal vim session and -" then transferred to a gui session via the command `:gui`, the gui vim process -" does not re-read the colorscheme (or .vimrc for that matter) so any `has_gui` -" related code that sets gui specific values isn't executed. -" -" Currently, Solarized sets only the cterm or gui values for the colorscheme -" depending on gui or terminal mode. It's possible that, if the following -" autocommand method is deemed excessively poor form, that approach will be -" used again and the autocommand below will be dropped. -" -" However it seems relatively benign in this case to include the autocommand -" here. It fires only in cases where vim is transferring from terminal to gui -" mode (detected with the script scope s:vmode variable). It also allows for -" other potential terminal customizations that might make gui mode suboptimal. -" -autocmd GUIEnter * if (s:vmode != "gui") | exe "colorscheme " . g:colors_name | endif -"}}} -" Highlight Trailing Space {{{ -" Experimental: Different highlight when on cursorline -function! s:SolarizedHiTrail() - if g:solarized_hitrail==0 - hi! clear solarizedTrailingSpace - else - syn match solarizedTrailingSpace "\s*$" - exe "hi! solarizedTrailingSpace " .s:fmt_undr .s:fg_red .s:bg_none .s:sp_red - endif -endfunction -augroup SolarizedHiTrail - autocmd! - if g:solarized_hitrail==1 - autocmd! Syntax * call s:SolarizedHiTrail() - autocmd! ColorScheme * if g:colors_name == "solarized" | call s:SolarizedHiTrail() | else | augroup! s:SolarizedHiTrail | endif - endif -augroup END -" }}} -" Menus "{{{ -" --------------------------------------------------------------------- -" Turn off Solarized menu by including the following assignment in your .vimrc: -" -" let g:solarized_menu=0 - -function! s:SolarizedOptions() - new "new buffer - setf vim "vim filetype - let failed = append(0, s:defaults_list) - let failed = append(0, s:colorscheme_list) - let failed = append(0, s:options_list) - let failed = append(0, s:lazycat_list) - 0 "jump back to the top -endfunction -if !exists(":SolarizedOptions") - command SolarizedOptions :call s:SolarizedOptions() -endif - -function! SolarizedMenu() - if exists("g:loaded_solarized_menu") - try - silent! aunmenu Solarized - endtry - endif - let g:loaded_solarized_menu = 1 - - if g:colors_name == "solarized" && g:solarized_menu != 0 - - amenu &Solarized.&Contrast.&Low\ Contrast :let g:solarized_contrast="low" \| colorscheme solarized - amenu &Solarized.&Contrast.&Normal\ Contrast :let g:solarized_contrast="normal" \| colorscheme solarized - amenu &Solarized.&Contrast.&High\ Contrast :let g:solarized_contrast="high" \| colorscheme solarized - an &Solarized.&Contrast.-sep- - amenu &Solarized.&Contrast.&Help:\ Contrast :help 'solarized_contrast' - - amenu &Solarized.&Visibility.&Low\ Visibility :let g:solarized_visibility="low" \| colorscheme solarized - amenu &Solarized.&Visibility.&Normal\ Visibility :let g:solarized_visibility="normal" \| colorscheme solarized - amenu &Solarized.&Visibility.&High\ Visibility :let g:solarized_visibility="high" \| colorscheme solarized - an &Solarized.&Visibility.-sep- - amenu &Solarized.&Visibility.&Help:\ Visibility :help 'solarized_visibility' - - amenu &Solarized.&Background.&Toggle\ Background :ToggleBG - amenu &Solarized.&Background.&Dark\ Background :set background=dark \| colorscheme solarized - amenu &Solarized.&Background.&Light\ Background :set background=light \| colorscheme solarized - an &Solarized.&Background.-sep- - amenu &Solarized.&Background.&Help:\ ToggleBG :help togglebg - - if g:solarized_bold==0 | let l:boldswitch="On" | else | let l:boldswitch="Off" | endif - exe "amenu &Solarized.&Styling.&Turn\\ Bold\\ ".l:boldswitch." :let g:solarized_bold=(abs(g:solarized_bold-1)) \\| colorscheme solarized" - if g:solarized_italic==0 | let l:italicswitch="On" | else | let l:italicswitch="Off" | endif - exe "amenu &Solarized.&Styling.&Turn\\ Italic\\ ".l:italicswitch." :let g:solarized_italic=(abs(g:solarized_italic-1)) \\| colorscheme solarized" - if g:solarized_underline==0 | let l:underlineswitch="On" | else | let l:underlineswitch="Off" | endif - exe "amenu &Solarized.&Styling.&Turn\\ Underline\\ ".l:underlineswitch." :let g:solarized_underline=(abs(g:solarized_underline-1)) \\| colorscheme solarized" - - amenu &Solarized.&Diff\ Mode.&Low\ Diff\ Mode :let g:solarized_diffmode="low" \| colorscheme solarized - amenu &Solarized.&Diff\ Mode.&Normal\ Diff\ Mode :let g:solarized_diffmode="normal" \| colorscheme solarized - amenu &Solarized.&Diff\ Mode.&High\ Diff\ Mode :let g:solarized_diffmode="high" \| colorscheme solarized - - if g:solarized_hitrail==0 | let l:hitrailswitch="On" | else | let l:hitrailswitch="Off" | endif - exe "amenu &Solarized.&Experimental.&Turn\\ Highlight\\ Trailing\\ Spaces\\ ".l:hitrailswitch." :let g:solarized_hitrail=(abs(g:solarized_hitrail-1)) \\| colorscheme solarized" - an &Solarized.&Experimental.-sep- - amenu &Solarized.&Experimental.&Help:\ HiTrail :help 'solarized_hitrail' - - an &Solarized.-sep1- - - amenu &Solarized.&Autogenerate\ options :SolarizedOptions - - an &Solarized.-sep2- - - amenu &Solarized.&Help.&Solarized\ Help :help solarized - amenu &Solarized.&Help.&Toggle\ Background\ Help :help togglebg - amenu &Solarized.&Help.&Removing\ This\ Menu :help solarized-menu - - an 9999.77 &Help.&Solarized\ Colorscheme :help solarized - an 9999.78 &Help.&Toggle\ Background :help togglebg - an 9999.79 &Help.-sep3- - - endif -endfunction - -autocmd ColorScheme * if g:colors_name != "solarized" | silent! aunmenu Solarized | else | call SolarizedMenu() | endif - -"}}} -" License "{{{ -" --------------------------------------------------------------------- -" -" Copyright (c) 2011 Ethan Schoonover -" -" Permission is hereby granted, free of charge, to any person obtaining a copy -" of this software and associated documentation files (the "Software"), to deal -" in the Software without restriction, including without limitation the rights -" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -" copies of the Software, and to permit persons to whom the Software is -" furnished to do so, subject to the following conditions: -" -" The above copyright notice and this permission notice shall be included in -" all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -" THE SOFTWARE. -" -" vim:foldmethod=marker:foldlevel=0 -"}}} diff --git a/colors/sorcerer.vim b/colors/sorcerer.vim deleted file mode 100644 index ffe808d..0000000 --- a/colors/sorcerer.vim +++ /dev/null @@ -1,208 +0,0 @@ -" 'sorcerer.vim' -- Vim color scheme. -" Maintainer: Andrew Lawson -" Forked from 'vim-scripts/Sorcerer' by Jeet Sukumaran -" Based on 'Mustang' by Henrique C. Alves (hcarvalhoalves@gmail.com), - -set background=dark - -hi clear - -if exists("syntax_on") - syntax reset -endif - -let colors_name = "sorcerer" - -" GUI Colors {{{1 -" ============================================================================ - -hi Normal guifg=#c2c2b0 guibg=#222222 gui=NONE -hi ColorColumn guifg=NONE guibg=#1c1c1c -hi Cursor guifg=NONE guibg=#626262 gui=NONE -hi CursorColumn guibg=#2d2d2d -hi CursorLine guibg=#2d2d2d -hi DiffAdd guifg=#000000 guibg=#3cb371 gui=NONE -hi DiffDelete guifg=#000000 guibg=#aa4450 gui=NONE -hi DiffChange guifg=#000000 guibg=#4f94cd gui=NONE -hi DiffText guifg=#000000 guibg=#8ee5ee gui=NONE -hi Directory guifg=#1e90ff guibg=NONE gui=NONE -hi ErrorMsg guifg=#ff6a6a guibg=NONE gui=bold -hi FoldColumn guifg=#68838b guibg=#4B4B4B gui=bold -hi Folded guifg=#406060 guibg=#232c2c gui=NONE -hi IncSearch guifg=#ffffff guibg=#ff4500 gui=bold -hi LineNr guifg=#686858 guibg=NONE gui=NONE -hi MatchParen guifg=#fff000 guibg=NONE gui=bold -hi ModeMsg guifg=#000000 guibg=#00ff00 gui=bold -hi MoreMsg guifg=#2e8b57 guibg=NONE gui=bold -hi NonText guifg=#404050 guibg=NONE gui=NONE - -hi Pmenu guifg=#ffffff guibg=#444444 -hi PmenuSel guifg=#000000 guibg=#b1d631 -" hi PmenuSbar guifg=#ffffff guibg=#c1cdc1 gui=NONE -" hi PmenuThumb guifg=#ffffff guibg=#838b83 gui=NONE - -hi Question guifg=#00ee00 guibg=NONE gui=bold -hi Search guifg=#000000 guibg=#d6e770 gui=bold -hi SignColumn guifg=#ffffff guibg=NONE gui=NONE -hi SpecialKey guifg=#505060 guibg=NONE gui=NONE -hi SpellBad guisp=#ee2c2c gui=undercurl -hi SpellCap guisp=#0000ff gui=undercurl -hi SpellLocal guisp=#008b8b gui=undercurl -hi SpellRare guisp=#ff00ff gui=undercurl -hi StatusLine guifg=#000000 guibg=#808070 gui=bold -hi StatusLineNC guifg=#000000 guibg=#404c4c gui=italic -hi VertSplit guifg=#404c4c guibg=#404c4c gui=NONE -hi TabLine guifg=fg guibg=#d3d3d3 gui=underline -hi TabLineFill guifg=fg guibg=NONE gui=reverse -hi TabLineSel guifg=fg guibg=NONE gui=bold -hi Title guifg=#528b8b guibg=NONE gui=bold -hi Visual guifg=#000000 guibg=#6688aa gui=NONE -hi WarningMsg guifg=#ee9a00 guibg=NONE gui=NONE -hi WildMenu guifg=#000000 guibg=#87ceeb gui=NONE -hi ExtraWhitespace guifg=fg guibg=#528b8b gui=NONE - -" Syntax highlighting -hi Comment guifg=#686858 gui=italic -hi Boolean guifg=#ff9800 gui=NONE -hi String guifg=#779b70 gui=NONE -hi Identifier guifg=#9ebac2 gui=NONE -hi Function guifg=#faf4c6 gui=NONE -hi Type guifg=#7e8aa2 gui=NONE -hi Statement guifg=#90b0d1 gui=NONE -hi Keyword guifg=#90b0d1 gui=NONE -hi Constant guifg=#ff9800 gui=NONE -hi Number guifg=#cc8800 gui=NONE -hi Special guifg=#719611 gui=NONE -hi PreProc guifg=#528b8b gui=NONE -hi Todo guifg=#8f6f8f guibg=#202020 gui=italic,underline,bold - -" Diff -hi diffOldFile guifg=#88afcb guibg=NONE gui=italic -hi diffNewFile guifg=#88afcb guibg=NONE gui=italic -hi diffFile guifg=#88afcb guibg=NONE gui=italic -hi diffLine guifg=#88afcb guibg=NONE gui=italic -hi link diffSubname diffLine -hi diffAdded guifg=#3cb371 guibg=NONE gui=NONE -hi diffRemoved guifg=#aa4450 guibg=NONE gui=NONE -hi diffChanged guifg=#4f94cd guibg=NONE gui=NONE -hi link diffOnly Constant -hi link diffIdentical Constant -hi link diffDiffer Constant -hi link diffBDiffer Constant -hi link diffIsA Constant -hi link diffNoEOL Constant -hi link diffCommon Constant -hi link diffComment Constant - -" Python -hi pythonException guifg=#90b0d1 guibg=NONE gui=NONE -hi pythonExClass guifg=#996666 guibg=NONE gui=NONE -hi pythonDecorator guifg=#888555 guibg=NONE gui=NONE -hi link pythonDecoratorFunction pythonDecorator - -" 1}}} - -" 256 Colors {{{1 -" ============================================================================ -hi Normal cterm=NONE ctermbg=NONE ctermfg=145 -hi ColorColumn cterm=NONE ctermbg=16 ctermfg=NONE -hi Cursor cterm=NONE ctermbg=241 ctermfg=fg -hi CursorColumn cterm=NONE ctermbg=16 ctermfg=fg -hi CursorLine cterm=NONE ctermbg=236 ctermfg=fg -hi DiffAdd cterm=NONE ctermbg=71 ctermfg=16 -hi DiffDelete cterm=NONE ctermbg=124 ctermfg=16 -hi DiffChange cterm=NONE ctermbg=68 ctermfg=16 -hi DiffText cterm=NONE ctermbg=117 ctermfg=16 -hi Directory cterm=NONE ctermbg=234 ctermfg=33 -hi ErrorMsg cterm=bold ctermbg=NONE ctermfg=203 -hi FoldColumn cterm=bold ctermbg=239 ctermfg=66 -hi Folded cterm=NONE ctermbg=16 ctermfg=60 -hi IncSearch cterm=bold ctermbg=202 ctermfg=231 -hi LineNr cterm=NONE ctermbg=NONE ctermfg=59 -hi MatchParen cterm=bold ctermbg=NONE ctermfg=226 -hi ModeMsg cterm=bold ctermbg=46 ctermfg=16 -hi MoreMsg cterm=bold ctermbg=234 ctermfg=29 -hi NonText cterm=NONE ctermbg=NONE ctermfg=59 -hi Pmenu cterm=NONE ctermbg=238 ctermfg=231 -hi PmenuSbar cterm=NONE ctermbg=250 ctermfg=fg -hi PmenuSel cterm=NONE ctermbg=149 ctermfg=16 -hi Question cterm=bold ctermbg=NONE ctermfg=46 -hi Search cterm=bold ctermbg=185 ctermfg=16 -hi SignColumn cterm=NONE ctermbg=NONE ctermfg=231 -hi SpecialKey cterm=NONE ctermbg=NONE ctermfg=59 -hi SpellBad cterm=undercurl ctermbg=NONE ctermfg=196 -hi SpellCap cterm=undercurl ctermbg=NONE ctermfg=21 -hi SpellLocal cterm=undercurl ctermbg=NONE ctermfg=30 -hi SpellRare cterm=undercurl ctermbg=NONE ctermfg=201 -hi StatusLine cterm=bold ctermbg=101 ctermfg=16 -hi StatusLineNC cterm=NONE ctermbg=102 ctermfg=16 -hi VertSplit cterm=NONE ctermbg=102 ctermfg=102 -hi TabLine cterm=bold ctermbg=102 ctermfg=16 -hi TabLineFill cterm=NONE ctermbg=102 ctermfg=16 -hi TabLineSel cterm=bold ctermbg=16 ctermfg=59 -hi Title cterm=bold ctermbg=NONE ctermfg=66 -hi Visual cterm=NONE ctermbg=67 ctermfg=16 -hi WarningMsg cterm=NONE ctermbg=234 ctermfg=208 -hi WildMenu cterm=NONE ctermbg=116 ctermfg=16 -hi ExtraWhitespace cterm=NONE ctermbg=66 ctermfg=fg - -hi Comment cterm=NONE ctermbg=NONE ctermfg=59 -hi Boolean cterm=NONE ctermbg=NONE ctermfg=208 -hi String cterm=NONE ctermbg=NONE ctermfg=101 -hi Identifier cterm=NONE ctermbg=NONE ctermfg=145 -hi Function cterm=NONE ctermbg=NONE ctermfg=230 -hi Type cterm=NONE ctermbg=NONE ctermfg=103 -hi Statement cterm=NONE ctermbg=NONE ctermfg=110 -hi Keyword cterm=NONE ctermbg=NONE ctermfg=110 -hi Constant cterm=NONE ctermbg=NONE ctermfg=208 -hi Number cterm=NONE ctermbg=NONE ctermfg=172 -hi Special cterm=NONE ctermbg=NONE ctermfg=64 -hi PreProc cterm=NONE ctermbg=NONE ctermfg=66 -hi Todo cterm=bold,underline ctermbg=234 ctermfg=96 - -hi diffOldFile cterm=NONE ctermbg=NONE ctermfg=67 -hi diffNewFile cterm=NONE ctermbg=NONE ctermfg=67 -hi diffFile cterm=NONE ctermbg=NONE ctermfg=67 -hi diffLine cterm=NONE ctermbg=NONE ctermfg=67 -hi diffAdded cterm=NONE ctermfg=NONE ctermfg=71 -hi diffRemoved cterm=NONE ctermfg=NONE ctermfg=124 -hi diffChanged cterm=NONE ctermfg=NONE ctermfg=68 -hi link diffSubname diffLine -hi link diffOnly Constant -hi link diffIdentical Constant -hi link diffDiffer Constant -hi link diffBDiffer Constant -hi link diffIsA Constant -hi link diffNoEOL Constant -hi link diffCommon Constant -hi link diffComment Constant - -hi pythonClass cterm=NONE ctermbg=NONE ctermfg=fg -hi pythonDecorator cterm=NONE ctermbg=NONE ctermfg=101 -hi pythonExClass cterm=NONE ctermbg=NONE ctermfg=95 -hi pythonException cterm=NONE ctermbg=NONE ctermfg=110 -hi pythonFunc cterm=NONE ctermbg=NONE ctermfg=fg -hi pythonFuncParams cterm=NONE ctermbg=NONE ctermfg=fg -hi pythonKeyword cterm=NONE ctermbg=NONE ctermfg=fg -hi pythonParam cterm=NONE ctermbg=NONE ctermfg=fg -hi pythonRawEscape cterm=NONE ctermbg=NONE ctermfg=fg -hi pythonSuperclasses cterm=NONE ctermbg=NONE ctermfg=fg -hi pythonSync cterm=NONE ctermbg=NONE ctermfg=fg - -hi Conceal cterm=NONE ctermbg=248 ctermfg=252 -hi Error cterm=NONE ctermbg=196 ctermfg=231 -hi Ignore cterm=NONE ctermbg=NONE ctermfg=234 -hi InsertModeCursorLine cterm=NONE ctermbg=16 ctermfg=fg -hi NormalModeCursorLine cterm=NONE ctermbg=235 ctermfg=fg -hi PmenuThumb cterm=reverse ctermbg=NONE ctermfg=fg -hi StatusLineAlert cterm=NONE ctermbg=160 ctermfg=231 -hi StatusLineUnalert cterm=NONE ctermbg=238 ctermfg=144 -hi Test cterm=NONE ctermbg=NONE ctermfg=fg -hi Underlined cterm=underline ctermbg=NONE ctermfg=111 -hi VisualNOS cterm=bold,underline ctermbg=NONE ctermfg=fg -hi cCursor cterm=reverse ctermbg=NONE ctermfg=fg -hi iCursor cterm=NONE ctermbg=210 ctermfg=16 -hi lCursor cterm=NONE ctermbg=145 ctermfg=234 -hi nCursor cterm=NONE ctermbg=46 ctermfg=16 -hi vCursor cterm=NONE ctermbg=201 ctermfg=16 -" 1}}} diff --git a/colors/spink.vim b/colors/spink.vim deleted file mode 100644 index c1532e4..0000000 --- a/colors/spink.vim +++ /dev/null @@ -1,220 +0,0 @@ -" Vim color file - Spink -set background=dark -if version > 580 - hi clear - if exists("syntax_on") - syntax reset - endif -endif - -set t_Co=256 -let g:colors_name = "Spink" -let g:unite_cursor_line_highlight = 'UniteLineHi' - -" Alternative support for Vim plugins { -hi MyTagListFileName guifg=#BD9700 guibg=NONE guisp=NONE gui=underline -hi IndentGuidesOdd guifg=NONE guibg=#515e61 guisp=NONE gui=NONE -hi IndentGuidesEven guifg=NONE guibg=#777777 guisp=NONE gui=NONE -hi EasyMotionTarget guifg=#BD9700 guibg=NONE guisp=NONE gui=bold -hi EasyMotionShade guifg=#777777 guibg=NONE guisp=NONE gui=bold -hi EasyMotionTarget2First guifg=#BD9700 guibg=NONE guisp=NONE gui=bold -hi EasyMotionTarget2Second guifg=#BD9700 guibg=NONE guisp=NONE gui=bold -hi CtrlPMatch guifg=#8a3824 guibg=NONE guisp=#F9F9F9 gui=bold -hi UniteLineHi guifg=NONE guibg=#492224 guisp=NONE gui=NONE -hi SyntasticError guifg=#F9F9FF guibg=#912C00 guisp=NONE gui=NONE -hi SyntasticErrorSign guifg=#ceb67f guibg=#492224 guisp=NONE gui=NONE -hi TabLine guifg=#8a3824 guibg=NONE guisp=NONE gui=underline -hi TabLineSel guifg=#9A7B00 guibg=#492224 guisp=NONE gui=underline -hi TabLineFill guifg=#3D3D3D guibg=NONE guisp=NONE gui=underline - - -" Default syntax { -hi Boolean guifg=#A1A6A8 guibg=NONE guisp=NONE gui=NONE -hi Character guifg=#A1A6A8 guibg=NONE guisp=NONE gui=NONE -hi ColorColumn guifg=NONE guibg=#222222 guisp=#5E6C70 gui=NONE -hi Comment guifg=#515e61 guibg=NONE guisp=NONE gui=italic -hi Conditional guifg=#ceb67f guibg=NONE guisp=NONE gui=bold -hi Constant guifg=#8f1d1d guibg=NONE guisp=NONE gui=NONE -hi Cursor guifg=NONE guibg=#750000 guisp=#F9F9F9 gui=NONE -hi iCursor guifg=#BD9800 guibg=#750000 guisp=NONE gui=NONE -hi Underlined guifg=#BD9800 guibg=#750000 guisp=NONE gui=NONE -hi cursorim guifg=#BD9700 guibg=#750000 guisp=#536991 gui=NONE -hi CursorColumn guifg=NONE guibg=#222E30 guisp=#222E30 gui=NONE -hi CursorLine guifg=NONE guibg=#222E30 guisp=#222E30 gui=NONE -hi CursorLineNR guifg=#8A905D guibg=#3C3836 guisp=#222E30 gui=NONE -hi Debug guifg=#BD9800 guibg=NONE guisp=NONE gui=NONE -hi Define guifg=#ceb67f guibg=NONE guisp=NONE gui=NONE -hi Delimiter guifg=#fffedc guibg=NONE guisp=NONE gui=NONE -hi DiffAdd guifg=NONE guibg=#193224 guisp=#193224 gui=NONE -hi DiffChange guifg=NONE guibg=#492224 guisp=#492224 gui=NONE -hi DiffDelete guifg=NONE guibg=#192224 guisp=#192224 gui=NONE -hi DiffText guifg=NONE guibg=#492224 guisp=#492224 gui=NONE -hi Directory guifg=#536991 guibg=NONE guisp=NONE gui=bold -hi Error guifg=NONE guibg=NONE guisp=NONE gui=NONE -hi ErrorMsg guifg=#A1A6A8 guibg=#643c3c guisp=NONE gui=NONE -hi Exception guifg=#ceb67f guibg=NONE guisp=NONE gui=bold -hi Float guifg=#A1A6A8 guibg=NONE guisp=NONE gui=NONE -hi Folded guibg=#2D3239 guifg=#747474 guisp=NONE gui=bold -hi FoldColumn guifg=#66595f guibg=#1a1a1a guisp=#A1A6A8 gui=NONE -hi Function guifg=#8A3824 guibg=NONE guisp=NONE gui=none -hi Identifier guifg=#fffedc guibg=NONE guisp=NONE gui=NONE -hi IncSearch guifg=#400000 guibg=#515e61 guisp=#BD9800 gui=bold -hi Search guifg=NONE guibg=#710000 guisp=#F9F9FF gui=NONE -hi Include guifg=#ceb67f guibg=NONE guisp=NONE gui=NONE -hi Keyword guifg=#727152 guibg=NONE guisp=NONE gui=bold -hi Label guifg=#BD9800 guibg=NONE guisp=NONE gui=bold -hi LineNr guifg=#3C3836 guibg=NONE guisp=NONE gui=NONE -hi Macro guifg=#BD9800 guibg=NONE guisp=NONE gui=NONE -hi MatchParen guifg=NONE guibg=#3F3F3F guisp=NONE gui=bold,italic -hi ModeMsg guifg=#fffedc guibg=#192224 guisp=#192224 gui=bold -hi MoreMsg guifg=#BD9800 guibg=NONE guisp=NONE gui=bold -hi NonText guifg=#5E6C70 guibg=NONE guisp=NONE gui=italic -hi Normal guifg=#CEB67F guibg=#141414 guisp=#0e1314 gui=NONE -hi Number guifg=#8f0000 guibg=NONE guisp=NONE gui=NONE -hi Operator guifg=#BD9800 guibg=NONE guisp=NONE gui=NONE -hi PMenu guifg=#5a5a5a guibg=#141414 guisp=#1a1a1a gui=underline -hi PMenuSbar guifg=NONE guibg=#848688 guisp=#848688 gui=underline -hi PMenuSel guifg=NONE guibg=#750000 guisp=#BD9800 gui=bold,underline -hi PMenuThumb guifg=NONE guibg=#a4a6a8 guisp=#a4a6a8 gui=underline -hi PreCondit guifg=#ceb67f guibg=NONE guisp=NONE gui=NONE -hi PreProc guifg=#ceb67f guibg=NONE guisp=NONE gui=NONE -hi Repeat guifg=#ceb67f guibg=NONE guisp=NONE gui=bold -hi SignColumn guifg=#BD9800 guibg=NONE guisp=#1a1a1a gui=NONE -hi Special guifg=#Fff5bF guibg=NONE guisp=NONE gui=NONE -hi SpecialChar guifg=#ceb67f guibg=NONE guisp=NONE gui=NONE -hi SpecialComment guifg=#BD9800 guibg=NONE guisp=NONE gui=NONE -hi SpecialKey guifg=#5E6C70 guibg=NONE guisp=NONE gui=italic -hi SpellBad guifg=#F9F9FF guibg=#192224 guisp=#192224 gui=underline -hi SpellCap guifg=#F9F9FF guibg=#192224 guisp=#192224 gui=underline -hi SpellLocal guifg=#F9F9FF guibg=#192224 guisp=#192224 gui=underline -hi SpellRare guifg=#F9F9FF guibg=#192224 guisp=#192224 gui=underline -hi Statement guifg=#8a3824 guibg=NONE guisp=NONE gui=bold -hi StatusLine guifg=#9a7824 guibg=NONE guisp=#750000 gui=NONE -hi StatusLineNC guifg=#4A4A4A guibg=NONE guisp=#5E6C70 gui=NONE -hi Bufferline guifg=#4A4A4A guibg=#F9F9F9 guisp=#5E6C70 gui=NONE -hi StorageClass guifg=#A1A6A8 guibg=NONE guisp=NONE gui=italic -hi String guifg=#617689 guibg=NONE guisp=NONE gui=italic -hi Structure guifg=#A1A6A8 guibg=NONE guisp=NONE gui=italic -hi Tag guifg=#ceb67f guibg=NONE guisp=NONE gui=NONE -hi Title guifg=#F9F9FF guibg=#192224 guisp=#192224 gui=bold -hi Todo guifg=#BD9800 guibg=#492224 guisp=#BD9800 gui=NONE -hi Type guifg=#8A905D guibg=NONE guisp=NONE gui=bold -hi Typedef guifg=#536991 guibg=NONE guisp=NONE gui=italic -hi Underlined guifg=NONE guibg=#492224 guisp=NONE gui=NONE -hi VertSplit guifg=#21201F guibg=#21201F guisp=NONE gui=bold -hi Split guifg=#3D3D3D guibg=NONE guisp=NONE gui=bold -hi Visual guifg=NONE guibg=#492224 guisp=#F9F9FF gui=NONE -hi VisualNOS guifg=#192224 guibg=#750000 guisp=#F9F9FF gui=underline -hi WarningMsg guifg=#A1A6A8 guibg=#912C00 guisp=#912C00 gui=NONE -hi WildMenu guifg=#BD9800 guibg=NONE guisp=NONE gui=NONE - -" HTML syntax { -hi HtmlHiLink guifg=NONE guibg=#492224 guisp=NONE gui=underline -hi htmlLinkText guifg=NONE guibg=#492224 guisp=NONE gui=underline -hi htmlTag guifg=#245361 guibg=NONE guisp=#750000 gui=bold -hi htmlEndTag guifg=#245361 guibg=NONE guisp=NONE gui=NONE -hi htmlTagName guifg=#599cab guibg=NONE guisp=NONE gui=NONE -hi htmlTagN guifg=#ceb67f guibg=NONE guisp=NONE gui=NONE -hi htmlString guifg=#FFF5BF guibg=NONE guisp=NONE gui=NONE -hi htmlArg guifg=#599cab guibg=NONE guisp=NONE gui=NONE -hi htmlSpecialChar guifg=#ceb67f guibg=NONE guisp=NONE gui=NONE - -" PHP/ Mysql syntax { -hi PHPprivate guifg=#978A55 guibg=NONE guisp=NONE gui=underline,bold -hi PHPfunction guifg=#978A55 guibg=NONE guisp=NONE gui=underline,bold -hi PHPtest guifg=#978A55 guibg=NONE guisp=NONE gui=underline,bold -hi PHPClass guifg=#978A55 guibg=NONE guisp=NONE gui=underline,bold -hi PHPConstant guifg=#978A55 guibg=NONE guisp=NONE gui=underline,bold -hi mysqlKeyword guifg=#889CAC guibg=NONE guisp=NONE gui=NONE -hi mysqlOperator guifg=#889CAC guibg=NONE guisp=NONE gui=NONE -hi phpFunctions guifg=#6C1C00 guibg=NONE guisp=NONE gui=bold - -" Python syntax { -hi pythonFunction guifg=#8A905D guibg=NONE guisp=NONE gui=underline -hi pythonString guifg=#617689 guibg=NONE guisp=NONE gui=italic -hi pythonStatement guifg=#973824 guibg=NONE guisp=NONE gui=bold -hi pythonInclude guifg=#727152 guibg=NONE guisp=NONE gui=none -hi pythonImport guifg=#727152 guibg=NONE guisp=NONE gui=none -hi pythonOperator guifg=#BD9800 guibg=NONE guisp=NONE gui=none -hi pythonRepeat guifg=#A88800 guibg=NONE guisp=NONE gui=none -hi pythonConditional guifg=#AA8800 guibg=NONE guisp=NONE gui=none - -" Javascript syntax { -hi jsSpecial guifg=#fff5bf guibg=NONE guisp=NONE gui=NONE -hi javascriptSpecial guifg=#fff5bf guibg=NONE guisp=NONE gui=NONE -hi jsString guifg=#868F4E guibg=NONE guisp=NONE gui=italic -hi javascriptString guifg=#868F4E guibg=NONE guisp=NONE gui=italic -hi jsStringS guifg=#868F4E guibg=NONE guisp=NONE gui=italic -hi javascriptStringS guifg=#868F4E guibg=NONE guisp=NONE gui=italic -hi jsStringD guifg=#868F4E guibg=NONE guisp=NONE gui=italic -hi javascriptStringD guifg=#868F4E guibg=NONE guisp=NONE gui=italic -hi jsFunction guifg=#648A1C guibg=NONE guisp=NONE gui=underline,bold -hi javascriptFunction guifg=#648A1C guibg=NONE guisp=NONE gui=underline,bold -hi jsConditional guifg=#C6D93C guibg=NONE guisp=NONE gui=none -hi javascriptConditional guifg=#C6D93C guibg=NONE guisp=NONE gui=none -hi jsFuncName guifg=#648A1C guibg=NONE guisp=NONE gui=underline -hi javascriptFuncName guifg=#648A1C guibg=NONE guisp=NONE gui=underline -hi javascriptIdentifier guifg=#C6D93C guibg=NONE guisp=NONE gui=none -hi jsNumber guifg=#C6D93C guibg=NONE guisp=NONE gui=none -hi javascriptNumber guifg=#C6D93C guibg=NONE guisp=NONE gui=none -hi jsFloat guifg=#C6D93C guibg=NONE guisp=NONE gui=none -hi javascriptFloat guifg=#C6D93C guibg=NONE guisp=NONE gui=none -if (&ft=='javascript' || &ft=='js') - hi level12 guifg=#EEFD86 - hi level13 guifg=#EEFD86 - hi level14 guifg=#EEFD86 - hi level15 guifg=#EEFD86 - hi level16 guifg=#EEFD86 -endif - - - -" CSS syntax { -hi cssTagName guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssAttrComma guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssAttr guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssClassName guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssIdentifier guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssBraces guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssNoise guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssMediaQuery guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssMedia guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssTextProp guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssFontProp guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssUIProp guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssPageProp guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssTransformProp guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssDimensionProp guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssBackgroundPro guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssTransitionPro guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssListProp guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssBorderProp guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssTableProp guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssColorProp guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssAnimationProp guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssPositioningPr guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssBoxProp guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssMediaProp guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssFlexibleBoxPr guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssFunctionNam guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssURL guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssColor guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssClassName guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssImportant guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssStringQQ guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssValueLength guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssValueTime guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssCommonAttr guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssUnitDecorator guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssValueNumber guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi cssPseudoClass guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi sassProperty guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE -hi sassComment guifg=#599cab guibg=NONE guisp=#1a1a1a gui=NONE - -if (&ft=='css') - hi level12 guifg=#CEA65B guibg=NONE guisp=#1a1a1a gui=NONE - hi level13 guifg=#CEA65B guibg=NONE guisp=#1a1a1a gui=NONE - hi level14 guifg=#CEA65B guibg=NONE guisp=#1a1a1a gui=NONE - hi level15 guifg=#CEA65B guibg=NONE guisp=#1a1a1a gui=NONE - hi level16 guifg=#CEA65B guibg=NONE guisp=#1a1a1a gui=NONE -endif diff --git a/doc/NERD_tree.txt b/doc/NERD_tree.txt deleted file mode 100644 index 174229d..0000000 --- a/doc/NERD_tree.txt +++ /dev/null @@ -1,1291 +0,0 @@ -*NERD_tree.txt* A tree explorer plugin that owns your momma! - - - - omg its ... ~ - - ________ ________ _ ____________ ____ __________ ____________~ - /_ __/ / / / ____/ / | / / ____/ __ \/ __ \ /_ __/ __ \/ ____/ ____/~ - / / / /_/ / __/ / |/ / __/ / /_/ / / / / / / / /_/ / __/ / __/ ~ - / / / __ / /___ / /| / /___/ _, _/ /_/ / / / / _, _/ /___/ /___ ~ - /_/ /_/ /_/_____/ /_/ |_/_____/_/ |_/_____/ /_/ /_/ |_/_____/_____/ ~ - - - Reference Manual~ - - - - -============================================================================== -CONTENTS *NERDTree-contents* - - 1.Intro...................................|NERDTree| - 2.Functionality provided..................|NERDTreeFunctionality| - 2.1.Global commands...................|NERDTreeGlobalCommands| - 2.2.Bookmarks.........................|NERDTreeBookmarks| - 2.2.1.The bookmark table..........|NERDTreeBookmarkTable| - 2.2.2.Bookmark commands...........|NERDTreeBookmarkCommands| - 2.2.3.Invalid bookmarks...........|NERDTreeInvalidBookmarks| - 2.3.NERD tree mappings................|NERDTreeMappings| - 2.4.The NERD tree menu................|NERDTreeMenu| - 3.Options.................................|NERDTreeOptions| - 3.1.Option summary....................|NERDTreeOptionSummary| - 3.2.Option details....................|NERDTreeOptionDetails| - 4.The NERD tree API.......................|NERDTreeAPI| - 4.1.Key map API.......................|NERDTreeKeymapAPI| - 4.2.Menu API..........................|NERDTreeMenuAPI| - 5.About...................................|NERDTreeAbout| - 6.Changelog...............................|NERDTreeChangelog| - 7.Credits.................................|NERDTreeCredits| - 8.License.................................|NERDTreeLicense| - -============================================================================== -1. Intro *NERDTree* - -What is this "NERD tree"?? - -The NERD tree allows you to explore your filesystem and to open files and -directories. It presents the filesystem to you in the form of a tree which you -manipulate with the keyboard and/or mouse. It also allows you to perform -simple filesystem operations. - -The following features and functionality are provided by the NERD tree: - * Files and directories are displayed in a hierarchical tree structure - * Different highlighting is provided for the following types of nodes: - * files - * directories - * sym-links - * windows .lnk files - * read-only files - * executable files - * Many (customisable) mappings are provided to manipulate the tree: - * Mappings to open/close/explore directory nodes - * Mappings to open files in new/existing windows/tabs - * Mappings to change the current root of the tree - * Mappings to navigate around the tree - * ... - * Directories and files can be bookmarked. - * Most NERD tree navigation can also be done with the mouse - * Filtering of tree content (can be toggled at runtime) - * custom file filters to prevent e.g. vim backup files being displayed - * optional displaying of hidden files (. files) - * files can be "turned off" so that only directories are displayed - * The position and size of the NERD tree window can be customised - * The order in which the nodes in the tree are listed can be customised. - * A model of your filesystem is created/maintained as you explore it. This - has several advantages: - * All filesystem information is cached and is only re-read on demand - * If you revisit a part of the tree that you left earlier in your - session, the directory nodes will be opened/closed as you left them - * The script remembers the cursor position and window position in the NERD - tree so you can toggle it off (or just close the tree window) and then - reopen it (with NERDTreeToggle) the NERD tree window will appear exactly - as you left it - * You can have a separate NERD tree for each tab, share trees across tabs, - or a mix of both. - * By default the script overrides the default file browser (netw), so if - you :edit a directory a (slighly modified) NERD tree will appear in the - current window - * A programmable menu system is provided (simulates right clicking on a - node) - * one default menu plugin is provided to perform basic filesytem - operations (create/delete/move/copy files/directories) - * There's an API for adding your own keymappings - - -============================================================================== -2. Functionality provided *NERDTreeFunctionality* - ------------------------------------------------------------------------------- -2.1. Global Commands *NERDTreeGlobalCommands* - -:NERDTree [ | ] *:NERDTree* - Opens a fresh NERD tree. The root of the tree depends on the argument - given. There are 3 cases: If no argument is given, the current directory - will be used. If a directory is given, that will be used. If a bookmark - name is given, the corresponding directory will be used. For example: > - :NERDTree /home/marty/vim7/src - :NERDTree foo (foo is the name of a bookmark) -< -:NERDTreeFromBookmark *:NERDTreeFromBookmark* - Opens a fresh NERD tree with the root initialized to the dir for - . This only reason to use this command over :NERDTree is for - the completion (which is for bookmarks rather than directories). - -:NERDTreeToggle [ | ] *:NERDTreeToggle* - If a NERD tree already exists for this tab, it is reopened and rendered - again. If no NERD tree exists for this tab then this command acts the - same as the |:NERDTree| command. - -:NERDTreeMirror *:NERDTreeMirror* - Shares an existing NERD tree, from another tab, in the current tab. - Changes made to one tree are reflected in both as they are actually the - same buffer. - - If only one other NERD tree exists, that tree is automatically mirrored. If - more than one exists, the script will ask which tree to mirror. - -:NERDTreeClose *:NERDTreeClose* - Close the NERD tree in this tab. - -:NERDTreeFind *:NERDTreeFind* - Find the current file in the tree. - - If not tree exists and the current file is under vim's CWD, then init a - tree at the CWD and reveal the file. Otherwise init a tree in the current - file's directory. - - In any case, the current file is revealed and the cursor is placed on it. - ------------------------------------------------------------------------------- -2.2. Bookmarks *NERDTreeBookmarks* - -Bookmarks in the NERD tree are a way to tag files or directories of interest. -For example, you could use bookmarks to tag all of your project directories. - ------------------------------------------------------------------------------- -2.2.1. The Bookmark Table *NERDTreeBookmarkTable* - -If the bookmark table is active (see |NERDTree-B| and -|'NERDTreeShowBookmarks'|), it will be rendered above the tree. You can double -click bookmarks or use the |NERDTree-o| mapping to activate them. See also, -|NERDTree-t| and |NERDTree-T| - ------------------------------------------------------------------------------- -2.2.2. Bookmark commands *NERDTreeBookmarkCommands* - -Note that the following commands are only available in the NERD tree buffer. - -:Bookmark - Bookmark the current node as . If there is already a - bookmark, it is overwritten. must not contain spaces. - If is not provided, it defaults to the file or directory name. - For directories, a trailing slash is present. - -:BookmarkToRoot - Make the directory corresponding to the new root. If a treenode - corresponding to is already cached somewhere in the tree then - the current tree will be used, otherwise a fresh tree will be opened. - Note that if points to a file then its parent will be used - instead. - -:RevealBookmark - If the node is cached under the current root then it will be revealed - (i.e. directory nodes above it will be opened) and the cursor will be - placed on it. - -:OpenBookmark - must point to a file. The file is opened as though |NERDTree-o| - was applied. If the node is cached under the current root then it will be - revealed and the cursor will be placed on it. - -:ClearBookmarks [] - Remove all the given bookmarks. If no bookmarks are given then remove all - bookmarks on the current node. - -:ClearAllBookmarks - Remove all bookmarks. - -:ReadBookmarks - Re-read the bookmarks in the |'NERDTreeBookmarksFile'|. - -See also |:NERDTree| and |:NERDTreeFromBookmark|. - ------------------------------------------------------------------------------- -2.2.3. Invalid Bookmarks *NERDTreeInvalidBookmarks* - -If invalid bookmarks are detected, the script will issue an error message and -the invalid bookmarks will become unavailable for use. - -These bookmarks will still be stored in the bookmarks file (see -|'NERDTreeBookmarksFile'|), down the bottom. There will always be a blank line -after the valid bookmarks but before the invalid ones. - -Each line in the bookmarks file represents one bookmark. The proper format is: - - -After you have corrected any invalid bookmarks, either restart vim, or go -:ReadBookmarks from the NERD tree window. - ------------------------------------------------------------------------------- -2.3. NERD tree Mappings *NERDTreeMappings* - -Default Description~ help-tag~ -Key~ - -o.......Open files, directories and bookmarks....................|NERDTree-o| -go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go| -t.......Open selected node/bookmark in a new tab.................|NERDTree-t| -T.......Same as 't' but keep the focus on the current tab........|NERDTree-T| -i.......Open selected file in a split window.....................|NERDTree-i| -gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi| -s.......Open selected file in a new vsplit.......................|NERDTree-s| -gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs| -O.......Recursively open the selected directory..................|NERDTree-O| -x.......Close the current nodes parent...........................|NERDTree-x| -X.......Recursively close all children of the current node.......|NERDTree-X| -e.......Edit the current dif.....................................|NERDTree-e| - -...............same as |NERDTree-o|. -double-click.......same as the |NERDTree-o| map. -middle-click.......same as |NERDTree-i| for files, same as - |NERDTree-e| for dirs. - -D.......Delete the current bookmark .............................|NERDTree-D| - -P.......Jump to the root node....................................|NERDTree-P| -p.......Jump to current nodes parent.............................|NERDTree-p| -K.......Jump up inside directories at the current tree depth.....|NERDTree-K| -J.......Jump down inside directories at the current tree depth...|NERDTree-J| -...Jump down to the next sibling of the current directory...|NERDTree-C-J| -...Jump up to the previous sibling of the current directory.|NERDTree-C-K| - -C.......Change the tree root to the selected dir.................|NERDTree-C| -u.......Move the tree root up one directory......................|NERDTree-u| -U.......Same as 'u' except the old root node is left open........|NERDTree-U| -r.......Recursively refresh the current directory................|NERDTree-r| -R.......Recursively refresh the current root.....................|NERDTree-R| -m.......Display the NERD tree menu...............................|NERDTree-m| -cd......Change the CWD to the dir of the selected node...........|NERDTree-cd| - -I.......Toggle whether hidden files displayed....................|NERDTree-I| -f.......Toggle whether the file filters are used.................|NERDTree-f| -F.......Toggle whether files are displayed.......................|NERDTree-F| -B.......Toggle whether the bookmark table is displayed...........|NERDTree-B| - -q.......Close the NERDTree window................................|NERDTree-q| -A.......Zoom (maximize/minimize) the NERDTree window.............|NERDTree-A| -?.......Toggle the display of the quick help.....................|NERDTree-?| - ------------------------------------------------------------------------------- - *NERDTree-o* -Default key: o -Map option: NERDTreeMapActivateNode -Applies to: files and directories. - -If a file node is selected, it is opened in the previous window. - -If a directory is selected it is opened or closed depending on its current -state. - -If a bookmark that links to a directory is selected then that directory -becomes the new root. - -If a bookmark that links to a file is selected then that file is opened in the -previous window. - ------------------------------------------------------------------------------- - *NERDTree-go* -Default key: go -Map option: None -Applies to: files. - -If a file node is selected, it is opened in the previous window, but the -cursor does not move. - -The key combo for this mapping is always "g" + NERDTreeMapActivateNode (see -|NERDTree-o|). - ------------------------------------------------------------------------------- - *NERDTree-t* -Default key: t -Map option: NERDTreeMapOpenInTab -Applies to: files and directories. - -Opens the selected file in a new tab. If a directory is selected, a fresh -NERD Tree for that directory is opened in a new tab. - -If a bookmark which points to a directory is selected, open a NERD tree for -that directory in a new tab. If the bookmark points to a file, open that file -in a new tab. - ------------------------------------------------------------------------------- - *NERDTree-T* -Default key: T -Map option: NERDTreeMapOpenInTabSilent -Applies to: files and directories. - -The same as |NERDTree-t| except that the focus is kept in the current tab. - ------------------------------------------------------------------------------- - *NERDTree-i* -Default key: i -Map option: NERDTreeMapOpenSplit -Applies to: files. - -Opens the selected file in a new split window and puts the cursor in the new -window. - ------------------------------------------------------------------------------- - *NERDTree-gi* -Default key: gi -Map option: None -Applies to: files. - -The same as |NERDTree-i| except that the cursor is not moved. - -The key combo for this mapping is always "g" + NERDTreeMapOpenSplit (see -|NERDTree-i|). - ------------------------------------------------------------------------------- - *NERDTree-s* -Default key: s -Map option: NERDTreeMapOpenVSplit -Applies to: files. - -Opens the selected file in a new vertically split window and puts the cursor in -the new window. - ------------------------------------------------------------------------------- - *NERDTree-gs* -Default key: gs -Map option: None -Applies to: files. - -The same as |NERDTree-s| except that the cursor is not moved. - -The key combo for this mapping is always "g" + NERDTreeMapOpenVSplit (see -|NERDTree-s|). - ------------------------------------------------------------------------------- - *NERDTree-O* -Default key: O -Map option: NERDTreeMapOpenRecursively -Applies to: directories. - -Recursively opens the selelected directory. - -All files and directories are cached, but if a directory would not be -displayed due to file filters (see |'NERDTreeIgnore'| |NERDTree-f|) or the -hidden file filter (see |'NERDTreeShowHidden'|) then its contents are not -cached. This is handy, especially if you have .svn directories. - ------------------------------------------------------------------------------- - *NERDTree-x* -Default key: x -Map option: NERDTreeMapCloseDir -Applies to: files and directories. - -Closes the parent of the selected node. - ------------------------------------------------------------------------------- - *NERDTree-X* -Default key: X -Map option: NERDTreeMapCloseChildren -Applies to: directories. - -Recursively closes all children of the selected directory. - -Tip: To quickly "reset" the tree, use |NERDTree-P| with this mapping. - ------------------------------------------------------------------------------- - *NERDTree-e* -Default key: e -Map option: NERDTreeMapOpenExpl -Applies to: files and directories. - -|:edit|s the selected directory, or the selected file's directory. This could -result in a NERD tree or a netrw being opened, depending on -|'NERDTreeHijackNetrw'|. - ------------------------------------------------------------------------------- - *NERDTree-D* -Default key: D -Map option: NERDTreeMapDeleteBookmark -Applies to: lines in the bookmarks table - -Deletes the currently selected bookmark. - ------------------------------------------------------------------------------- - *NERDTree-P* -Default key: P -Map option: NERDTreeMapJumpRoot -Applies to: no restrictions. - -Jump to the tree root. - ------------------------------------------------------------------------------- - *NERDTree-p* -Default key: p -Map option: NERDTreeMapJumpParent -Applies to: files and directories. - -Jump to the parent node of the selected node. - ------------------------------------------------------------------------------- - *NERDTree-K* -Default key: K -Map option: NERDTreeMapJumpFirstChild -Applies to: files and directories. - -Jump to the first child of the current nodes parent. - -If the cursor is already on the first node then do the following: - * loop back thru the siblings of the current nodes parent until we find an - open dir with children - * go to the first child of that node - ------------------------------------------------------------------------------- - *NERDTree-J* -Default key: J -Map option: NERDTreeMapJumpLastChild -Applies to: files and directories. - -Jump to the last child of the current nodes parent. - -If the cursor is already on the last node then do the following: - * loop forward thru the siblings of the current nodes parent until we find - an open dir with children - * go to the last child of that node - ------------------------------------------------------------------------------- - *NERDTree-C-J* -Default key: -Map option: NERDTreeMapJumpNextSibling -Applies to: files and directories. - -Jump to the next sibling of the selected node. - ------------------------------------------------------------------------------- - *NERDTree-C-K* -Default key: -Map option: NERDTreeMapJumpPrevSibling -Applies to: files and directories. - -Jump to the previous sibling of the selected node. - ------------------------------------------------------------------------------- - *NERDTree-C* -Default key: C -Map option: NERDTreeMapChdir -Applies to: directories. - -Make the selected directory node the new tree root. If a file is selected, its -parent is used. - ------------------------------------------------------------------------------- - *NERDTree-u* -Default key: u -Map option: NERDTreeMapUpdir -Applies to: no restrictions. - -Move the tree root up a dir (like doing a "cd .."). - ------------------------------------------------------------------------------- - *NERDTree-U* -Default key: U -Map option: NERDTreeMapUpdirKeepOpen -Applies to: no restrictions. - -Like |NERDTree-u| except that the old tree root is kept open. - ------------------------------------------------------------------------------- - *NERDTree-r* -Default key: r -Map option: NERDTreeMapRefresh -Applies to: files and directories. - -If a dir is selected, recursively refresh that dir, i.e. scan the filesystem -for changes and represent them in the tree. - -If a file node is selected then the above is done on it's parent. - ------------------------------------------------------------------------------- - *NERDTree-R* -Default key: R -Map option: NERDTreeMapRefreshRoot -Applies to: no restrictions. - -Recursively refresh the tree root. - ------------------------------------------------------------------------------- - *NERDTree-m* -Default key: m -Map option: NERDTreeMapMenu -Applies to: files and directories. - -Display the NERD tree menu. See |NERDTreeMenu| for details. - ------------------------------------------------------------------------------- - *NERDTree-cd* -Default key: cd -Map option: NERDTreeMapChdir -Applies to: files and directories. - -Change vims current working directory to that of the selected node. - ------------------------------------------------------------------------------- - *NERDTree-I* -Default key: I -Map option: NERDTreeMapToggleHidden -Applies to: no restrictions. - -Toggles whether hidden files (i.e. "dot files") are displayed. - ------------------------------------------------------------------------------- - *NERDTree-f* -Default key: f -Map option: NERDTreeMapToggleFilters -Applies to: no restrictions. - -Toggles whether file filters are used. See |'NERDTreeIgnore'| for details. - ------------------------------------------------------------------------------- - *NERDTree-F* -Default key: F -Map option: NERDTreeMapToggleFiles -Applies to: no restrictions. - -Toggles whether file nodes are displayed. - ------------------------------------------------------------------------------- - *NERDTree-B* -Default key: B -Map option: NERDTreeMapToggleBookmarks -Applies to: no restrictions. - -Toggles whether the bookmarks table is displayed. - ------------------------------------------------------------------------------- - *NERDTree-q* -Default key: q -Map option: NERDTreeMapQuit -Applies to: no restrictions. - -Closes the NERDtree window. - ------------------------------------------------------------------------------- - *NERDTree-A* -Default key: A -Map option: NERDTreeMapToggleZoom -Applies to: no restrictions. - -Maximize (zoom) and minimize the NERDtree window. - ------------------------------------------------------------------------------- - *NERDTree-?* -Default key: ? -Map option: NERDTreeMapHelp -Applies to: no restrictions. - -Toggles whether the quickhelp is displayed. - ------------------------------------------------------------------------------- -2.3. The NERD tree menu *NERDTreeMenu* - -The NERD tree has a menu that can be programmed via the an API (see -|NERDTreeMenuAPI|). The idea is to simulate the "right click" menus that most -file explorers have. - -The script comes with two default menu plugins: exec_menuitem.vim and -fs_menu.vim. fs_menu.vim adds some basic filesystem operations to the menu for -creating/deleting/moving/copying files and dirs. exec_menuitem.vim provides a -menu item to execute executable files. - -Related tags: |NERDTree-m| |NERDTreeApi| - -============================================================================== -3. Customisation *NERDTreeOptions* - - ------------------------------------------------------------------------------- -3.1. Customisation summary *NERDTreeOptionSummary* - -The script provides the following options that can customise the behaviour the -NERD tree. These options should be set in your vimrc. - -|'loaded_nerd_tree'| Turns off the script. - -|'NERDChristmasTree'| Tells the NERD tree to make itself colourful - and pretty. - -|'NERDTreeAutoCenter'| Controls whether the NERD tree window centers - when the cursor moves within a specified - distance to the top/bottom of the window. -|'NERDTreeAutoCenterThreshold'| Controls the sensitivity of autocentering. - -|'NERDTreeCaseSensitiveSort'| Tells the NERD tree whether to be case - sensitive or not when sorting nodes. - -|'NERDTreeChDirMode'| Tells the NERD tree if/when it should change - vim's current working directory. - -|'NERDTreeHighlightCursorline'| Tell the NERD tree whether to highlight the - current cursor line. - -|'NERDTreeHijackNetrw'| Tell the NERD tree whether to replace the netrw - autocommands for exploring local directories. - -|'NERDTreeIgnore'| Tells the NERD tree which files to ignore. - -|'NERDTreeBookmarksFile'| Where the bookmarks are stored. - -|'NERDTreeMouseMode'| Tells the NERD tree how to handle mouse - clicks. - -|'NERDTreeQuitOnOpen'| Closes the tree window after opening a file. - -|'NERDTreeShowBookmarks'| Tells the NERD tree whether to display the - bookmarks table on startup. - -|'NERDTreeShowFiles'| Tells the NERD tree whether to display files - in the tree on startup. - -|'NERDTreeShowHidden'| Tells the NERD tree whether to display hidden - files on startup. - -|'NERDTreeShowLineNumbers'| Tells the NERD tree whether to display line - numbers in the tree window. - -|'NERDTreeSortOrder'| Tell the NERD tree how to sort the nodes in - the tree. - -|'NERDTreeStatusline'| Set a statusline for NERD tree windows. - -|'NERDTreeWinPos'| Tells the script where to put the NERD tree - window. - -|'NERDTreeWinSize'| Sets the window size when the NERD tree is - opened. - -|'NERDTreeMinimalUI'| Disables display of the 'Bookmarks' label and - 'Press ? for help' text. - -|'NERDTreeDirArrows'| Tells the NERD tree to use arrows instead of - + ~ chars when displaying directories. - ------------------------------------------------------------------------------- -3.2. Customisation details *NERDTreeOptionDetails* - -To enable any of the below options you should put the given line in your -~/.vimrc - - *'loaded_nerd_tree'* -If this plugin is making you feel homicidal, it may be a good idea to turn it -off with this line in your vimrc: > - let loaded_nerd_tree=1 -< ------------------------------------------------------------------------------- - *'NERDChristmasTree'* -Values: 0 or 1. -Default: 1. - -If this option is set to 1 then some extra syntax highlighting elements are -added to the nerd tree to make it more colourful. - -Set it to 0 for a more vanilla looking tree. - ------------------------------------------------------------------------------- - *'NERDTreeAutoCenter'* -Values: 0 or 1. -Default: 1 - -If set to 1, the NERD tree window will center around the cursor if it moves to -within |'NERDTreeAutoCenterThreshold'| lines of the top/bottom of the window. - -This is ONLY done in response to tree navigation mappings, -i.e. |NERDTree-J| |NERDTree-K| |NERDTree-C-J| |NERDTree-C-K| |NERDTree-p| -|NERDTree-P| - -The centering is done with a |zz| operation. - ------------------------------------------------------------------------------- - *'NERDTreeAutoCenterThreshold'* -Values: Any natural number. -Default: 3 - -This option controls the "sensitivity" of the NERD tree auto centering. See -|'NERDTreeAutoCenter'| for details. - ------------------------------------------------------------------------------- - *'NERDTreeCaseSensitiveSort'* -Values: 0 or 1. -Default: 0. - -By default the NERD tree does not sort nodes case sensitively, i.e. nodes -could appear like this: > - bar.c - Baz.c - blarg.c - boner.c - Foo.c -< -But, if you set this option to 1 then the case of the nodes will be taken into -account. The above nodes would then be sorted like this: > - Baz.c - Foo.c - bar.c - blarg.c - boner.c -< ------------------------------------------------------------------------------- - *'NERDTreeChDirMode'* - -Values: 0, 1 or 2. -Default: 0. - -Use this option to tell the script when (if at all) to change the current -working directory (CWD) for vim. - -If it is set to 0 then the CWD is never changed by the NERD tree. - -If set to 1 then the CWD is changed when the NERD tree is first loaded to the -directory it is initialized in. For example, if you start the NERD tree with > - :NERDTree /home/marty/foobar -< -then the CWD will be changed to /home/marty/foobar and will not be changed -again unless you init another NERD tree with a similar command. - -If the option is set to 2 then it behaves the same as if set to 1 except that -the CWD is changed whenever the tree root is changed. For example, if the CWD -is /home/marty/foobar and you make the node for /home/marty/foobar/baz the new -root then the CWD will become /home/marty/foobar/baz. - ------------------------------------------------------------------------------- - *'NERDTreeHighlightCursorline'* -Values: 0 or 1. -Default: 1. - -If set to 1, the current cursor line in the NERD tree buffer will be -highlighted. This is done using the |'cursorline'| option. - ------------------------------------------------------------------------------- - *'NERDTreeHijackNetrw'* -Values: 0 or 1. -Default: 1. - -If set to 1, doing a > - :edit -< -will open up a "secondary" NERD tree instead of a netrw in the target window. - -Secondary NERD trees behaves slighly different from a regular trees in the -following respects: - 1. 'o' will open the selected file in the same window as the tree, - replacing it. - 2. you can have as many secondary tree as you want in the same tab. - ------------------------------------------------------------------------------- - *'NERDTreeIgnore'* -Values: a list of regular expressions. -Default: ['\~$']. - -This option is used to specify which files the NERD tree should ignore. It -must be a list of regular expressions. When the NERD tree is rendered, any -files/dirs that match any of the regex's in 'NERDTreeIgnore' wont be -displayed. - -For example if you put the following line in your vimrc: > - let NERDTreeIgnore=['\.vim$', '\~$'] -< -then all files ending in .vim or ~ will be ignored. - -Note: to tell the NERD tree not to ignore any files you must use the following -line: > - let NERDTreeIgnore=[] -< - -The file filters can be turned on and off dynamically with the |NERDTree-f| -mapping. - ------------------------------------------------------------------------------- - *'NERDTreeBookmarksFile'* -Values: a path -Default: $HOME/.NERDTreeBookmarks - -This is where bookmarks are saved. See |NERDTreeBookmarkCommands|. - ------------------------------------------------------------------------------- - *'NERDTreeMouseMode'* -Values: 1, 2 or 3. -Default: 1. - -If set to 1 then a double click on a node is required to open it. -If set to 2 then a single click will open directory nodes, while a double -click will still be required for file nodes. -If set to 3 then a single click will open any node. - -Note: a double click anywhere on a line that a tree node is on will -activate it, but all single-click activations must be done on name of the node -itself. For example, if you have the following node: > - | | |-application.rb -< -then (to single click activate it) you must click somewhere in -'application.rb'. - ------------------------------------------------------------------------------- - *'NERDTreeQuitOnOpen'* - -Values: 0 or 1. -Default: 0 - -If set to 1, the NERD tree window will close after opening a file with the -|NERDTree-o|, |NERDTree-i|, |NERDTree-t| and |NERDTree-T| mappings. - ------------------------------------------------------------------------------- - *'NERDTreeShowBookmarks'* -Values: 0 or 1. -Default: 0. - -If this option is set to 1 then the bookmarks table will be displayed. - -This option can be toggled dynamically, per tree, with the |NERDTree-B| -mapping. - ------------------------------------------------------------------------------- - *'NERDTreeShowFiles'* -Values: 0 or 1. -Default: 1. - -If this option is set to 1 then files are displayed in the NERD tree. If it is -set to 0 then only directories are displayed. - -This option can be toggled dynamically, per tree, with the |NERDTree-F| -mapping and is useful for drastically shrinking the tree when you are -navigating to a different part of the tree. - ------------------------------------------------------------------------------- - *'NERDTreeShowHidden'* -Values: 0 or 1. -Default: 0. - -This option tells vim whether to display hidden files by default. This option -can be dynamically toggled, per tree, with the |NERDTree-I| mapping. Use one -of the follow lines to set this option: > - let NERDTreeShowHidden=0 - let NERDTreeShowHidden=1 -< - ------------------------------------------------------------------------------- - *'NERDTreeShowLineNumbers'* -Values: 0 or 1. -Default: 0. - -This option tells vim whether to display line numbers for the NERD tree -window. Use one of the follow lines to set this option: > - let NERDTreeShowLineNumbers=0 - let NERDTreeShowLineNumbers=1 -< - ------------------------------------------------------------------------------- - *'NERDTreeSortOrder'* -Values: a list of regular expressions. -Default: ['\/$', '*', '\.swp$', '\.bak$', '\~$'] - -This option is set to a list of regular expressions which are used to -specify the order of nodes under their parent. - -For example, if the option is set to: > - ['\.vim$', '\.c$', '\.h$', '*', 'foobar'] -< -then all .vim files will be placed at the top, followed by all .c files then -all .h files. All files containing the string 'foobar' will be placed at the -end. The star is a special flag: it tells the script that every node that -doesnt match any of the other regexps should be placed here. - -If no star is present in 'NERDTreeSortOrder' then one is automatically -appended to the array. - -The regex '\/$' should be used to match directory nodes. - -After this sorting is done, the files in each group are sorted alphabetically. - -Other examples: > - (1) ['*', '\/$'] - (2) [] - (3) ['\/$', '\.rb$', '\.php$', '*', '\.swp$', '\.bak$', '\~$'] -< -1. Directories will appear last, everything else will appear above. -2. Everything will simply appear in alphabetical order. -3. Dirs will appear first, then ruby and php. Swap files, bak files and vim - backup files will appear last with everything else preceding them. - ------------------------------------------------------------------------------- - *'NERDTreeStatusline'* -Values: Any valid statusline setting. -Default: %{b:NERDTreeRoot.path.strForOS(0)} - -Tells the script what to use as the |'statusline'| setting for NERD tree -windows. - -Note that the statusline is set using |:let-&| not |:set| so escaping spaces -isn't necessary. - -Setting this option to -1 will will deactivate it so that your global -statusline setting is used instead. - ------------------------------------------------------------------------------- - *'NERDTreeWinPos'* -Values: "left" or "right" -Default: "left". - -This option is used to determine where NERD tree window is placed on the -screen. - -This option makes it possible to use two different explorer plugins -simultaneously. For example, you could have the taglist plugin on the left of -the window and the NERD tree on the right. - ------------------------------------------------------------------------------- - *'NERDTreeWinSize'* -Values: a positive integer. -Default: 31. - -This option is used to change the size of the NERD tree when it is loaded. - ------------------------------------------------------------------------------- - *'NERDTreeMinimalUI'* -Values: 0 or 1 -Default: 0 - -This options disables the 'Bookmarks' label 'Press ? for help' text. Use one -of the following lines to set this option: > - let NERDTreeMinimalUI=0 - let NERDTreeMinimalUI=1 -< - ------------------------------------------------------------------------------- - *'NERDTreeDirArrows'* -Values: 0 or 1 -Default: 0. - -This option is used to change the default look of directory nodes displayed in -the tree. When set to 0 it shows old-school bars (|), + and ~ chars. If set to -1 it shows right and down arrows. Use one of the follow lines to set this -option: > - let NERDTreeDirArrows=0 - let NERDTreeDirArrows=1 -< - -============================================================================== -4. The NERD tree API *NERDTreeAPI* - -The NERD tree script allows you to add custom key mappings and menu items via -a set of API calls. Any scripts that use this API should be placed in -~/.vim/nerdtree_plugin/ (*nix) or ~/vimfiles/nerdtree_plugin (windows). - -The script exposes some prototype objects that can be used to manipulate the -tree and/or get information from it: > - g:NERDTreePath - g:NERDTreeDirNode - g:NERDTreeFileNode - g:NERDTreeBookmark -< -See the code/comments in NERD_tree.vim to find how to use these objects. The -following code conventions are used: - * class members start with a capital letter - * instance members start with a lower case letter - * private members start with an underscore - -See this blog post for more details: - http://got-ravings.blogspot.com/2008/09/vim-pr0n-prototype-based-objects.html - ------------------------------------------------------------------------------- -4.1. Key map API *NERDTreeKeymapAPI* - -NERDTreeAddKeyMap({options}) *NERDTreeAddKeyMap()* - Adds a new keymapping for all NERD tree buffers. - {options} must be a dictionary, and must contain the following keys: - "key" - the trigger key for the new mapping - "callback" - the function the new mapping will be bound to - "quickhelpText" - the text that will appear in the quickhelp (see - |NERDTree-?|) - - Example: > - call NERDTreeAddKeyMap({ - \ 'key': 'b', - \ 'callback': 'NERDTreeEchoCurrentNode', - \ 'quickhelpText': 'echo full path of current node' }) - - function! NERDTreeEchoCurrentNode() - let n = g:NERDTreeFileNode.GetSelected() - if n != {} - echomsg 'Current node: ' . n.path.str() - endif - endfunction -< - This code should sit in a file like ~/.vim/nerdtree_plugin/mymapping.vim. - It adds a (rather useless) mapping on 'b' which echos the full path to the - current node. - ------------------------------------------------------------------------------- -4.2. Menu API *NERDTreeMenuAPI* - -NERDTreeAddSubmenu({options}) *NERDTreeAddSubmenu()* - Creates and returns a new submenu. - - {options} must be a dictionary and must contain the following keys: - "text" - the text of the submenu that the user will see - "shortcut" - a shortcut key for the submenu (need not be unique) - - The following keys are optional: - "isActiveCallback" - a function that will be called to determine whether - this submenu item will be displayed or not. The callback function must return - 0 or 1. - "parent" - the parent submenu of the new submenu (returned from a previous - invocation of NERDTreeAddSubmenu()). If this key is left out then the new - submenu will sit under the top level menu. - - See below for an example. - -NERDTreeAddMenuItem({options}) *NERDTreeAddMenuItem()* - Adds a new menu item to the NERD tree menu (see |NERDTreeMenu|). - - {options} must be a dictionary and must contain the - following keys: - "text" - the text of the menu item which the user will see - "shortcut" - a shortcut key for the menu item (need not be unique) - "callback" - the function that will be called when the user activates the - menu item. - - The following keys are optional: - "isActiveCallback" - a function that will be called to determine whether - this menu item will be displayed or not. The callback function must return - 0 or 1. - "parent" - if the menu item belongs under a submenu then this key must be - specified. This value for this key will be the object that - was returned when the submenu was created with |NERDTreeAddSubmenu()|. - - See below for an example. - -NERDTreeAddMenuSeparator([{options}]) *NERDTreeAddMenuSeparator()* - Adds a menu separator (a row of dashes). - - {options} is an optional dictionary that may contain the following keys: - "isActiveCallback" - see description in |NERDTreeAddMenuItem()|. - -Below is an example of the menu API in action. > - call NERDTreeAddMenuSeparator() - - call NERDTreeAddMenuItem({ - \ 'text': 'a (t)op level menu item', - \ 'shortcut': 't', - \ 'callback': 'SomeFunction' }) - - let submenu = NERDTreeAddSubmenu({ - \ 'text': 'a (s)ub menu', - \ 'shortcut': 's' }) - - call NERDTreeAddMenuItem({ - \ 'text': '(n)ested item 1', - \ 'shortcut': 'n', - \ 'callback': 'SomeFunction', - \ 'parent': submenu }) - - call NERDTreeAddMenuItem({ - \ 'text': '(n)ested item 2', - \ 'shortcut': 'n', - \ 'callback': 'SomeFunction', - \ 'parent': submenu }) -< -This will create the following menu: > - -------------------- - a (t)op level menu item - a (s)ub menu -< -Where selecting "a (s)ub menu" will lead to a second menu: > - (n)ested item 1 - (n)ested item 2 -< -When any of the 3 concrete menu items are selected the function "SomeFunction" -will be called. - ------------------------------------------------------------------------------- -NERDTreeRender() *NERDTreeRender()* - Re-renders the NERD tree buffer. Useful if you change the state of the - tree and you want to it to be reflected in the UI. - -============================================================================== -5. About *NERDTreeAbout* - -The author of the NERD tree is a terrible terrible monster called Martyzilla -who gobbles up small children with milk and sugar for breakfast. - -He can be reached at martin.grenfell at gmail dot com. He would love to hear -from you, so feel free to send him suggestions and/or comments about this -plugin. Don't be shy --- the worst he can do is slaughter you and stuff you in -the fridge for later ;) - -The latest stable versions can be found at - http://www.vim.org/scripts/script.php?script_id=1658 - -The latest dev versions are on github - http://github.com/scrooloose/nerdtree - - -============================================================================== -6. Changelog *NERDTreeChangelog* - -4.2.0 - - Add NERDTreeDirArrows option to make the UI use pretty arrow chars - instead of the old +~| chars to define the tree structure (sickill) - - shift the syntax highlighting out into its own syntax file (gnap) - - add some mac specific options to the filesystem menu - for macvim - only (andersonfreitas) - - Add NERDTreeMinimalUI option to remove some non functional parts of the - nerdtree ui (camthompson) - - tweak the behaviour of :NERDTreeFind - see :help :NERDTreeFind for the - new behaviour (benjamingeiger) - - if no name is given to :Bookmark, make it default to the name of the - target file/dir (minyoung) - - use 'file' completion when doing copying, create, and move - operations (EvanDotPro) - - lots of misc bug fixes (paddyoloughlin, sdewald, camthompson, Vitaly - Bogdanov, AndrewRadev, mathias, scottstvnsn, kml, wycats, me RAWR!) - -4.1.0 - features: - - NERDTreeFind to reveal the node for the current buffer in the tree, - see |NERDTreeFind|. This effectively merges the FindInNERDTree plugin (by - Doug McInnes) into the script. - - make NERDTreeQuitOnOpen apply to the t/T keymaps too. Thanks to Stefan - Ritter and Rémi Prévost. - - truncate the root node if wider than the tree window. Thanks to Victor - Gonzalez. - - bugfixes: - - really fix window state restoring - - fix some win32 path escaping issues. Thanks to Stephan Baumeister, Ricky, - jfilip1024, and Chris Chambers - -4.0.0 - - add a new programmable menu system (see :help NERDTreeMenu). - - add new APIs to add menus/menu-items to the menu system as well as - custom key mappings to the NERD tree buffer (see :help NERDTreeAPI). - - removed the old API functions - - added a mapping to maximize/restore the size of nerd tree window, thanks - to Guillaume Duranceau for the patch. See :help NERDTree-A for details. - - - fix a bug where secondary nerd trees (netrw hijacked trees) and - NERDTreeQuitOnOpen didnt play nicely, thanks to Curtis Harvey. - - fix a bug where the script ignored directories whose name ended in a dot, - thanks to Aggelos Orfanakos for the patch. - - fix a bug when using the x mapping on the tree root, thanks to Bryan - Venteicher for the patch. - - fix a bug where the cursor position/window size of the nerd tree buffer - wasnt being stored on closing the window, thanks to Richard Hart. - - fix a bug where NERDTreeMirror would mirror the wrong tree - -3.1.1 - - fix a bug where a non-listed no-name buffer was getting created every - time the tree windows was created, thanks to Derek Wyatt and owen1 - - make behave the same as the 'o' mapping - - some helptag fixes in the doc, thanks strull - - fix a bug when using :set nohidden and opening a file where the previous - buf was modified. Thanks iElectric - - other minor fixes - -3.1.0 - New features: - - add mappings to open files in a vsplit, see :help NERDTree-s and :help - NERDTree-gs - - make the statusline for the nerd tree window default to something - hopefully more useful. See :help 'NERDTreeStatusline' - Bugfixes: - - make the hijack netrw functionality work when vim is started with "vim - " (thanks to Alf Mikula for the patch). - - fix a bug where the CWD wasnt being changed for some operations even when - NERDTreeChDirMode==2 (thanks to Lucas S. Buchala) - - add -bar to all the nerd tree :commands so they can chain with other - :commands (thanks to tpope) - - fix bugs when ignorecase was set (thanks to nach) - - fix a bug with the relative path code (thanks to nach) - - fix a bug where doing a :cd would cause :NERDTreeToggle to fail (thanks nach) - - -3.0.1 - Bugfixes: - - fix bugs with :NERDTreeToggle and :NERDTreeMirror when 'hidden - was not set - - fix a bug where :NERDTree would fail if was relative and - didnt start with a ./ or ../ Thanks to James Kanze. - - make the q mapping work with secondary (:e style) trees, - thanks to jamessan - - fix a bunch of small bugs with secondary trees - - More insane refactoring. - -3.0.0 - - hijack netrw so that doing an :edit will put a NERD tree in - the window rather than a netrw browser. See :help 'NERDTreeHijackNetrw' - - allow sharing of trees across tabs, see :help :NERDTreeMirror - - remove "top" and "bottom" as valid settings for NERDTreeWinPos - - change the '' mapping to 'i' - - change the 'H' mapping to 'I' - - lots of refactoring - -============================================================================== -7. Credits *NERDTreeCredits* - -Thanks to the following people for testing, bug reports, ideas etc. Without -you I probably would have got bored of the hacking the NERD tree and -just downloaded pr0n instead. - - Tim Carey-Smith (halorgium) - Vigil - Nick Brettell - Thomas Scott Urban - Terrance Cohen - Yegappan Lakshmanan - Jason Mills - Michael Geddes (frogonwheels) - Yu Jun - Michael Madsen - AOYAMA Shotaro - Zhang Weiwu - Niels Aan de Brugh - Olivier Yiptong - Zhang Shuhan - Cory Echols - Piotr Czachur - Yuan Jiang - Matan Nassau - Maxim Kim - Charlton Wang - Matt Wozniski (godlygeek) - knekk - Sean Chou - Ryan Penn - Simon Peter Nicholls - Michael Foobar - Tomasz Chomiuk - Denis Pokataev - Tim Pope (tpope) - James Kanze - James Vega (jamessan) - Frederic Chanal (nach) - Alf Mikula - Lucas S. Buchala - Curtis Harvey - Guillaume Duranceau - Richard Hart (hates) - Doug McInnes - Stefan Ritter - Rémi Prévost - Victor Gonzalez - Stephan Baumeister - Ricky - jfilip1024 - Chris Chambers - Vitaly Bogdanov - Patrick O'Loughlin (paddyoloughlin) - Cam Thompson (camthompson) - Marcin Kulik (sickill) - Steve DeWald (sdewald) - Ivan Necas (iNecas) - George Ang (gnap) - Evan Coury (EvanDotPro) - Andrew Radev (AndrewRadev) - Matt Gauger (mathias) - Scott Stevenson (scottstvnsn) - Anderson Freitas (andersonfreitas) - Kamil K. Lemański (kml) - Yehuda Katz (wycats) - Min-Young Wu (minyoung) - Benjamin Geiger (benjamingeiger) - -============================================================================== -8. License *NERDTreeLicense* - -The NERD tree is released under the wtfpl. -See http://sam.zoy.org/wtfpl/COPYING. diff --git a/doc/tags b/doc/tags deleted file mode 100644 index 05801fc..0000000 --- a/doc/tags +++ /dev/null @@ -1,87 +0,0 @@ -'NERDChristmasTree' NERD_tree.txt /*'NERDChristmasTree'* -'NERDTreeAutoCenter' NERD_tree.txt /*'NERDTreeAutoCenter'* -'NERDTreeAutoCenterThreshold' NERD_tree.txt /*'NERDTreeAutoCenterThreshold'* -'NERDTreeBookmarksFile' NERD_tree.txt /*'NERDTreeBookmarksFile'* -'NERDTreeCaseSensitiveSort' NERD_tree.txt /*'NERDTreeCaseSensitiveSort'* -'NERDTreeChDirMode' NERD_tree.txt /*'NERDTreeChDirMode'* -'NERDTreeDirArrows' NERD_tree.txt /*'NERDTreeDirArrows'* -'NERDTreeHighlightCursorline' NERD_tree.txt /*'NERDTreeHighlightCursorline'* -'NERDTreeHijackNetrw' NERD_tree.txt /*'NERDTreeHijackNetrw'* -'NERDTreeIgnore' NERD_tree.txt /*'NERDTreeIgnore'* -'NERDTreeMinimalUI' NERD_tree.txt /*'NERDTreeMinimalUI'* -'NERDTreeMouseMode' NERD_tree.txt /*'NERDTreeMouseMode'* -'NERDTreeQuitOnOpen' NERD_tree.txt /*'NERDTreeQuitOnOpen'* -'NERDTreeShowBookmarks' NERD_tree.txt /*'NERDTreeShowBookmarks'* -'NERDTreeShowFiles' NERD_tree.txt /*'NERDTreeShowFiles'* -'NERDTreeShowHidden' NERD_tree.txt /*'NERDTreeShowHidden'* -'NERDTreeShowLineNumbers' NERD_tree.txt /*'NERDTreeShowLineNumbers'* -'NERDTreeSortOrder' NERD_tree.txt /*'NERDTreeSortOrder'* -'NERDTreeStatusline' NERD_tree.txt /*'NERDTreeStatusline'* -'NERDTreeWinPos' NERD_tree.txt /*'NERDTreeWinPos'* -'NERDTreeWinSize' NERD_tree.txt /*'NERDTreeWinSize'* -'loaded_nerd_tree' NERD_tree.txt /*'loaded_nerd_tree'* -:NERDTree NERD_tree.txt /*:NERDTree* -:NERDTreeClose NERD_tree.txt /*:NERDTreeClose* -:NERDTreeFind NERD_tree.txt /*:NERDTreeFind* -:NERDTreeFromBookmark NERD_tree.txt /*:NERDTreeFromBookmark* -:NERDTreeMirror NERD_tree.txt /*:NERDTreeMirror* -:NERDTreeToggle NERD_tree.txt /*:NERDTreeToggle* -NERDTree NERD_tree.txt /*NERDTree* -NERDTree-? NERD_tree.txt /*NERDTree-?* -NERDTree-A NERD_tree.txt /*NERDTree-A* -NERDTree-B NERD_tree.txt /*NERDTree-B* -NERDTree-C NERD_tree.txt /*NERDTree-C* -NERDTree-C-J NERD_tree.txt /*NERDTree-C-J* -NERDTree-C-K NERD_tree.txt /*NERDTree-C-K* -NERDTree-D NERD_tree.txt /*NERDTree-D* -NERDTree-F NERD_tree.txt /*NERDTree-F* -NERDTree-I NERD_tree.txt /*NERDTree-I* -NERDTree-J NERD_tree.txt /*NERDTree-J* -NERDTree-K NERD_tree.txt /*NERDTree-K* -NERDTree-O NERD_tree.txt /*NERDTree-O* -NERDTree-P NERD_tree.txt /*NERDTree-P* -NERDTree-R NERD_tree.txt /*NERDTree-R* -NERDTree-T NERD_tree.txt /*NERDTree-T* -NERDTree-U NERD_tree.txt /*NERDTree-U* -NERDTree-X NERD_tree.txt /*NERDTree-X* -NERDTree-cd NERD_tree.txt /*NERDTree-cd* -NERDTree-contents NERD_tree.txt /*NERDTree-contents* -NERDTree-e NERD_tree.txt /*NERDTree-e* -NERDTree-f NERD_tree.txt /*NERDTree-f* -NERDTree-gi NERD_tree.txt /*NERDTree-gi* -NERDTree-go NERD_tree.txt /*NERDTree-go* -NERDTree-gs NERD_tree.txt /*NERDTree-gs* -NERDTree-i NERD_tree.txt /*NERDTree-i* -NERDTree-m NERD_tree.txt /*NERDTree-m* -NERDTree-o NERD_tree.txt /*NERDTree-o* -NERDTree-p NERD_tree.txt /*NERDTree-p* -NERDTree-q NERD_tree.txt /*NERDTree-q* -NERDTree-r NERD_tree.txt /*NERDTree-r* -NERDTree-s NERD_tree.txt /*NERDTree-s* -NERDTree-t NERD_tree.txt /*NERDTree-t* -NERDTree-u NERD_tree.txt /*NERDTree-u* -NERDTree-x NERD_tree.txt /*NERDTree-x* -NERDTreeAPI NERD_tree.txt /*NERDTreeAPI* -NERDTreeAbout NERD_tree.txt /*NERDTreeAbout* -NERDTreeAddKeyMap() NERD_tree.txt /*NERDTreeAddKeyMap()* -NERDTreeAddMenuItem() NERD_tree.txt /*NERDTreeAddMenuItem()* -NERDTreeAddMenuSeparator() NERD_tree.txt /*NERDTreeAddMenuSeparator()* -NERDTreeAddSubmenu() NERD_tree.txt /*NERDTreeAddSubmenu()* -NERDTreeBookmarkCommands NERD_tree.txt /*NERDTreeBookmarkCommands* -NERDTreeBookmarkTable NERD_tree.txt /*NERDTreeBookmarkTable* -NERDTreeBookmarks NERD_tree.txt /*NERDTreeBookmarks* -NERDTreeChangelog NERD_tree.txt /*NERDTreeChangelog* -NERDTreeCredits NERD_tree.txt /*NERDTreeCredits* -NERDTreeFunctionality NERD_tree.txt /*NERDTreeFunctionality* -NERDTreeGlobalCommands NERD_tree.txt /*NERDTreeGlobalCommands* -NERDTreeInvalidBookmarks NERD_tree.txt /*NERDTreeInvalidBookmarks* -NERDTreeKeymapAPI NERD_tree.txt /*NERDTreeKeymapAPI* -NERDTreeLicense NERD_tree.txt /*NERDTreeLicense* -NERDTreeMappings NERD_tree.txt /*NERDTreeMappings* -NERDTreeMenu NERD_tree.txt /*NERDTreeMenu* -NERDTreeMenuAPI NERD_tree.txt /*NERDTreeMenuAPI* -NERDTreeOptionDetails NERD_tree.txt /*NERDTreeOptionDetails* -NERDTreeOptionSummary NERD_tree.txt /*NERDTreeOptionSummary* -NERDTreeOptions NERD_tree.txt /*NERDTreeOptions* -NERDTreeRender() NERD_tree.txt /*NERDTreeRender()* -NERD_tree.txt NERD_tree.txt /*NERD_tree.txt* diff --git a/nerdtree_plugin/exec_menuitem.vim b/nerdtree_plugin/exec_menuitem.vim deleted file mode 100644 index e7a7c53..0000000 --- a/nerdtree_plugin/exec_menuitem.vim +++ /dev/null @@ -1,41 +0,0 @@ -" ============================================================================ -" File: exec_menuitem.vim -" Description: plugin for NERD Tree that provides an execute file menu item -" Maintainer: Martin Grenfell -" Last Change: 22 July, 2009 -" License: This program is free software. It comes without any warranty, -" to the extent permitted by applicable law. You can redistribute -" it and/or modify it under the terms of the Do What The Fuck You -" Want To Public License, Version 2, as published by Sam Hocevar. -" See http://sam.zoy.org/wtfpl/COPYING for more details. -" -" ============================================================================ -if exists("g:loaded_nerdtree_exec_menuitem") - finish -endif -let g:loaded_nerdtree_exec_menuitem = 1 - -call NERDTreeAddMenuItem({ - \ 'text': '(!)Execute file', - \ 'shortcut': '!', - \ 'callback': 'NERDTreeExecFile', - \ 'isActiveCallback': 'NERDTreeExecFileActive' }) - -function! NERDTreeExecFileActive() - let node = g:NERDTreeFileNode.GetSelected() - return !node.path.isDirectory && node.path.isExecutable -endfunction - -function! NERDTreeExecFile() - let treenode = g:NERDTreeFileNode.GetSelected() - echo "==========================================================\n" - echo "Complete the command to execute (add arguments etc):\n" - let cmd = treenode.path.str({'escape': 1}) - let cmd = input(':!', cmd . ' ') - - if cmd != '' - exec ':!' . cmd - else - echo "Aborted" - endif -endfunction diff --git a/nerdtree_plugin/fs_menu.vim b/nerdtree_plugin/fs_menu.vim deleted file mode 100644 index 0e2f728..0000000 --- a/nerdtree_plugin/fs_menu.vim +++ /dev/null @@ -1,224 +0,0 @@ -" ============================================================================ -" File: fs_menu.vim -" Description: plugin for the NERD Tree that provides a file system menu -" Maintainer: Martin Grenfell -" Last Change: 17 July, 2009 -" License: This program is free software. It comes without any warranty, -" to the extent permitted by applicable law. You can redistribute -" it and/or modify it under the terms of the Do What The Fuck You -" Want To Public License, Version 2, as published by Sam Hocevar. -" See http://sam.zoy.org/wtfpl/COPYING for more details. -" -" ============================================================================ -if exists("g:loaded_nerdtree_fs_menu") - finish -endif -let g:loaded_nerdtree_fs_menu = 1 - -call NERDTreeAddMenuItem({'text': '(a)dd a childnode', 'shortcut': 'a', 'callback': 'NERDTreeAddNode'}) -call NERDTreeAddMenuItem({'text': '(m)ove the current node', 'shortcut': 'm', 'callback': 'NERDTreeMoveNode'}) -call NERDTreeAddMenuItem({'text': '(d)elete the current node', 'shortcut': 'd', 'callback': 'NERDTreeDeleteNode'}) - -if has("gui_mac") || has("gui_macvim") - call NERDTreeAddMenuItem({'text': '(r)eveal in Finder the current node', 'shortcut': 'r', 'callback': 'NERDTreeRevealInFinder'}) - call NERDTreeAddMenuItem({'text': '(o)pen the current node with system editor', 'shortcut': 'o', 'callback': 'NERDTreeExecuteFile'}) - call NERDTreeAddMenuItem({'text': '(q)uicklook the current node', 'shortcut': 'q', 'callback': 'NERDTreeQuickLook'}) -endif - -if g:NERDTreePath.CopyingSupported() - call NERDTreeAddMenuItem({'text': '(c)copy the current node', 'shortcut': 'c', 'callback': 'NERDTreeCopyNode'}) -endif - -"FUNCTION: s:echo(msg){{{1 -function! s:echo(msg) - redraw - echomsg "NERDTree: " . a:msg -endfunction - -"FUNCTION: s:echoWarning(msg){{{1 -function! s:echoWarning(msg) - echohl warningmsg - call s:echo(a:msg) - echohl normal -endfunction - -"FUNCTION: s:promptToDelBuffer(bufnum, msg){{{1 -"prints out the given msg and, if the user responds by pushing 'y' then the -"buffer with the given bufnum is deleted -" -"Args: -"bufnum: the buffer that may be deleted -"msg: a message that will be echoed to the user asking them if they wish to -" del the buffer -function! s:promptToDelBuffer(bufnum, msg) - echo a:msg - if nr2char(getchar()) ==# 'y' - exec "silent bdelete! " . a:bufnum - endif -endfunction - -"FUNCTION: NERDTreeAddNode(){{{1 -function! NERDTreeAddNode() - let curDirNode = g:NERDTreeDirNode.GetSelected() - - let newNodeName = input("Add a childnode\n". - \ "==========================================================\n". - \ "Enter the dir/file name to be created. Dirs end with a '/'\n" . - \ "", curDirNode.path.str() . g:NERDTreePath.Slash(), "file") - - if newNodeName ==# '' - call s:echo("Node Creation Aborted.") - return - endif - - try - let newPath = g:NERDTreePath.Create(newNodeName) - let parentNode = b:NERDTreeRoot.findNode(newPath.getParent()) - - let newTreeNode = g:NERDTreeFileNode.New(newPath) - if parentNode.isOpen || !empty(parentNode.children) - call parentNode.addChild(newTreeNode, 1) - call NERDTreeRender() - call newTreeNode.putCursorHere(1, 0) - endif - catch /^NERDTree/ - call s:echoWarning("Node Not Created.") - endtry -endfunction - -"FUNCTION: NERDTreeMoveNode(){{{1 -function! NERDTreeMoveNode() - let curNode = g:NERDTreeFileNode.GetSelected() - let newNodePath = input("Rename the current node\n" . - \ "==========================================================\n" . - \ "Enter the new path for the node: \n" . - \ "", curNode.path.str(), "file") - - if newNodePath ==# '' - call s:echo("Node Renaming Aborted.") - return - endif - - try - let bufnum = bufnr(curNode.path.str()) - - call curNode.rename(newNodePath) - call NERDTreeRender() - - "if the node is open in a buffer, ask the user if they want to - "close that buffer - if bufnum != -1 - let prompt = "\nNode renamed.\n\nThe old file is open in buffer ". bufnum . (bufwinnr(bufnum) ==# -1 ? " (hidden)" : "") .". Delete this buffer? (yN)" - call s:promptToDelBuffer(bufnum, prompt) - endif - - call curNode.putCursorHere(1, 0) - - redraw - catch /^NERDTree/ - call s:echoWarning("Node Not Renamed.") - endtry -endfunction - -" FUNCTION: NERDTreeDeleteNode() {{{1 -function! NERDTreeDeleteNode() - let currentNode = g:NERDTreeFileNode.GetSelected() - let confirmed = 0 - - if currentNode.path.isDirectory - let choice =input("Delete the current node\n" . - \ "==========================================================\n" . - \ "STOP! To delete this entire directory, type 'yes'\n" . - \ "" . currentNode.path.str() . ": ") - let confirmed = choice ==# 'yes' - else - echo "Delete the current node\n" . - \ "==========================================================\n". - \ "Are you sure you wish to delete the node:\n" . - \ "" . currentNode.path.str() . " (yN):" - let choice = nr2char(getchar()) - let confirmed = choice ==# 'y' - endif - - - if confirmed - try - call currentNode.delete() - call NERDTreeRender() - - "if the node is open in a buffer, ask the user if they want to - "close that buffer - let bufnum = bufnr(currentNode.path.str()) - if buflisted(bufnum) - let prompt = "\nNode deleted.\n\nThe file is open in buffer ". bufnum . (bufwinnr(bufnum) ==# -1 ? " (hidden)" : "") .". Delete this buffer? (yN)" - call s:promptToDelBuffer(bufnum, prompt) - endif - - redraw - catch /^NERDTree/ - call s:echoWarning("Could not remove node") - endtry - else - call s:echo("delete aborted") - endif - -endfunction - -" FUNCTION: NERDTreeCopyNode() {{{1 -function! NERDTreeCopyNode() - let currentNode = g:NERDTreeFileNode.GetSelected() - let newNodePath = input("Copy the current node\n" . - \ "==========================================================\n" . - \ "Enter the new path to copy the node to: \n" . - \ "", currentNode.path.str(), "file") - - if newNodePath != "" - "strip trailing slash - let newNodePath = substitute(newNodePath, '\/$', '', '') - - let confirmed = 1 - if currentNode.path.copyingWillOverwrite(newNodePath) - call s:echo("Warning: copying may overwrite files! Continue? (yN)") - let choice = nr2char(getchar()) - let confirmed = choice ==# 'y' - endif - - if confirmed - try - let newNode = currentNode.copy(newNodePath) - if !empty(newNode) - call NERDTreeRender() - call newNode.putCursorHere(0, 0) - endif - catch /^NERDTree/ - call s:echoWarning("Could not copy node") - endtry - endif - else - call s:echo("Copy aborted.") - endif - redraw -endfunction - -function! NERDTreeQuickLook() - let treenode = g:NERDTreeFileNode.GetSelected() - if treenode != {} - call system("qlmanage -p 2>/dev/null '" . treenode.path.str() . "'") - endif -endfunction - -function! NERDTreeRevealInFinder() - let treenode = g:NERDTreeFileNode.GetSelected() - if treenode != {} - let x = system("open -R '" . treenode.path.str() . "'") - endif -endfunction - -function! NERDTreeExecuteFile() - let treenode = g:NERDTreeFileNode.GetSelected() - if treenode != {} - let x = system("open '" . treenode.path.str() . "'") - endif -endfunction - -" vim: set sw=4 sts=4 et fdm=marker: diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim deleted file mode 100644 index bc34775..0000000 --- a/plugin/NERD_tree.vim +++ /dev/null @@ -1,4017 +0,0 @@ -" ============================================================================ -" File: NERD_tree.vim -" Description: vim global plugin that provides a nice tree explorer -" Maintainer: Martin Grenfell -" Last Change: 28 December, 2011 -" License: This program is free software. It comes without any warranty, -" to the extent permitted by applicable law. You can redistribute -" it and/or modify it under the terms of the Do What The Fuck You -" Want To Public License, Version 2, as published by Sam Hocevar. -" See http://sam.zoy.org/wtfpl/COPYING for more details. -" -" ============================================================================ -let s:NERD_tree_version = '4.2.0' - -" SECTION: Script init stuff {{{1 -"============================================================ -if exists("loaded_nerd_tree") - finish -endif -if v:version < 700 - echoerr "NERDTree: this plugin requires vim >= 7. DOWNLOAD IT! You'll thank me later!" - finish -endif -let loaded_nerd_tree = 1 - -"for line continuation - i.e dont want C in &cpo -let s:old_cpo = &cpo -set cpo&vim - -let s:running_windows = has("win16") || has("win32") || has("win64") - -"Function: s:initVariable() function {{{2 -"This function is used to initialise a given variable to a given value. The -"variable is only initialised if it does not exist prior -" -"Args: -"var: the name of the var to be initialised -"value: the value to initialise var to -" -"Returns: -"1 if the var is set, 0 otherwise -function! s:initVariable(var, value) - if !exists(a:var) - exec 'let ' . a:var . ' = ' . "'" . substitute(a:value, "'", "''", "g") . "'" - return 1 - endif - return 0 -endfunction - -"SECTION: Init variable calls and other random constants {{{2 -call s:initVariable("g:NERDChristmasTree", 1) -call s:initVariable("g:NERDTreeAutoCenter", 1) -call s:initVariable("g:NERDTreeAutoCenterThreshold", 3) -call s:initVariable("g:NERDTreeCaseSensitiveSort", 0) -call s:initVariable("g:NERDTreeChDirMode", 0) -call s:initVariable("g:NERDTreeMinimalUI", 0) -if !exists("g:NERDTreeIgnore") - let g:NERDTreeIgnore = ['\~$'] -endif -call s:initVariable("g:NERDTreeBookmarksFile", expand('$HOME') . '/.NERDTreeBookmarks') -call s:initVariable("g:NERDTreeHighlightCursorline", 1) -call s:initVariable("g:NERDTreeHijackNetrw", 1) -call s:initVariable("g:NERDTreeMouseMode", 1) -call s:initVariable("g:NERDTreeNotificationThreshold", 100) -call s:initVariable("g:NERDTreeQuitOnOpen", 0) -call s:initVariable("g:NERDTreeShowBookmarks", 0) -call s:initVariable("g:NERDTreeShowFiles", 1) -call s:initVariable("g:NERDTreeShowHidden", 0) -call s:initVariable("g:NERDTreeShowLineNumbers", 0) -call s:initVariable("g:NERDTreeSortDirs", 1) -call s:initVariable("g:NERDTreeDirArrows", !s:running_windows) - -if !exists("g:NERDTreeSortOrder") - let g:NERDTreeSortOrder = ['\/$', '*', '\.swp$', '\.bak$', '\~$'] -else - "if there isnt a * in the sort sequence then add one - if count(g:NERDTreeSortOrder, '*') < 1 - call add(g:NERDTreeSortOrder, '*') - endif -endif - -"we need to use this number many times for sorting... so we calculate it only -"once here -let s:NERDTreeSortStarIndex = index(g:NERDTreeSortOrder, '*') - -if !exists('g:NERDTreeStatusline') - - "the exists() crap here is a hack to stop vim spazzing out when - "loading a session that was created with an open nerd tree. It spazzes - "because it doesnt store b:NERDTreeRoot (its a b: var, and its a hash) - let g:NERDTreeStatusline = "%{exists('b:NERDTreeRoot')?b:NERDTreeRoot.path.str():''}" - -endif -call s:initVariable("g:NERDTreeWinPos", "left") -call s:initVariable("g:NERDTreeWinSize", 31) - -"init the shell commands that will be used to copy nodes, and remove dir trees -" -"Note: the space after the command is important -if s:running_windows - call s:initVariable("g:NERDTreeRemoveDirCmd", 'rmdir /s /q ') -else - call s:initVariable("g:NERDTreeRemoveDirCmd", 'rm -rf ') - call s:initVariable("g:NERDTreeCopyCmd", 'cp -r ') -endif - - -"SECTION: Init variable calls for key mappings {{{2 -call s:initVariable("g:NERDTreeMapActivateNode", "o") -call s:initVariable("g:NERDTreeMapChangeRoot", "C") -call s:initVariable("g:NERDTreeMapChdir", "cd") -call s:initVariable("g:NERDTreeMapCloseChildren", "X") -call s:initVariable("g:NERDTreeMapCloseDir", "x") -call s:initVariable("g:NERDTreeMapDeleteBookmark", "D") -call s:initVariable("g:NERDTreeMapMenu", "m") -call s:initVariable("g:NERDTreeMapHelp", "?") -call s:initVariable("g:NERDTreeMapJumpFirstChild", "K") -call s:initVariable("g:NERDTreeMapJumpLastChild", "J") -call s:initVariable("g:NERDTreeMapJumpNextSibling", "") -call s:initVariable("g:NERDTreeMapJumpParent", "p") -call s:initVariable("g:NERDTreeMapJumpPrevSibling", "") -call s:initVariable("g:NERDTreeMapJumpRoot", "P") -call s:initVariable("g:NERDTreeMapOpenExpl", "e") -call s:initVariable("g:NERDTreeMapOpenInTab", "t") -call s:initVariable("g:NERDTreeMapOpenInTabSilent", "T") -call s:initVariable("g:NERDTreeMapOpenRecursively", "O") -call s:initVariable("g:NERDTreeMapOpenSplit", "i") -call s:initVariable("g:NERDTreeMapOpenVSplit", "s") -call s:initVariable("g:NERDTreeMapPreview", "g" . NERDTreeMapActivateNode) -call s:initVariable("g:NERDTreeMapPreviewSplit", "g" . NERDTreeMapOpenSplit) -call s:initVariable("g:NERDTreeMapPreviewVSplit", "g" . NERDTreeMapOpenVSplit) -call s:initVariable("g:NERDTreeMapQuit", "q") -call s:initVariable("g:NERDTreeMapRefresh", "r") -call s:initVariable("g:NERDTreeMapRefreshRoot", "R") -call s:initVariable("g:NERDTreeMapToggleBookmarks", "B") -call s:initVariable("g:NERDTreeMapToggleFiles", "F") -call s:initVariable("g:NERDTreeMapToggleFilters", "f") -call s:initVariable("g:NERDTreeMapToggleHidden", "I") -call s:initVariable("g:NERDTreeMapToggleZoom", "A") -call s:initVariable("g:NERDTreeMapUpdir", "u") -call s:initVariable("g:NERDTreeMapUpdirKeepOpen", "U") - -"SECTION: Script level variable declaration{{{2 -if s:running_windows - let s:escape_chars = " `\|\"#%&,?()\*^<>" -else - let s:escape_chars = " \\`\|\"#%&,?()\*^<>[]" -endif -let s:NERDTreeBufName = 'NERD_tree_' - -let s:tree_wid = 2 -let s:tree_markup_reg = '^[ `|]*[\-+~▾▸ ]\+' -let s:tree_up_dir_line = '.. (up a dir)' - -"the number to add to the nerd tree buffer name to make the buf name unique -let s:next_buffer_number = 1 - -" SECTION: Commands {{{1 -"============================================================ -"init the command that users start the nerd tree with -command! -n=? -complete=dir -bar NERDTree :call s:initNerdTree('') -command! -n=? -complete=dir -bar NERDTreeToggle :call s:toggle('') -command! -n=0 -bar NERDTreeClose :call s:closeTreeIfOpen() -command! -n=1 -complete=customlist,s:completeBookmarks -bar NERDTreeFromBookmark call s:initNerdTree('') -command! -n=0 -bar NERDTreeMirror call s:initNerdTreeMirror() -command! -n=0 -bar NERDTreeFind call s:findAndRevealPath() -" SECTION: Auto commands {{{1 -"============================================================ -augroup NERDTree - "Save the cursor position whenever we close the nerd tree - exec "autocmd BufWinLeave ". s:NERDTreeBufName ."* call saveScreenState()" - - "disallow insert mode in the NERDTree - exec "autocmd BufEnter ". s:NERDTreeBufName ."* stopinsert" - - "cache bookmarks when vim loads - autocmd VimEnter * call s:Bookmark.CacheBookmarks(0) - - "load all nerdtree plugins after vim starts - autocmd VimEnter * runtime! nerdtree_plugin/**/*.vim -augroup END - -if g:NERDTreeHijackNetrw - augroup NERDTreeHijackNetrw - autocmd VimEnter * silent! autocmd! FileExplorer - au BufEnter,VimEnter * call s:checkForBrowse(expand("")) - augroup END -endif - -"SECTION: Classes {{{1 -"============================================================ -"CLASS: Bookmark {{{2 -"============================================================ -let s:Bookmark = {} -" FUNCTION: Bookmark.activate() {{{3 -function! s:Bookmark.activate() - if self.path.isDirectory - call self.toRoot() - else - if self.validate() - let n = s:TreeFileNode.New(self.path) - call n.open() - call s:closeTreeIfQuitOnOpen() - endif - endif -endfunction -" FUNCTION: Bookmark.AddBookmark(name, path) {{{3 -" Class method to add a new bookmark to the list, if a previous bookmark exists -" with the same name, just update the path for that bookmark -function! s:Bookmark.AddBookmark(name, path) - for i in s:Bookmark.Bookmarks() - if i.name ==# a:name - let i.path = a:path - return - endif - endfor - call add(s:Bookmark.Bookmarks(), s:Bookmark.New(a:name, a:path)) - call s:Bookmark.Sort() -endfunction -" Function: Bookmark.Bookmarks() {{{3 -" Class method to get all bookmarks. Lazily initializes the bookmarks global -" variable -function! s:Bookmark.Bookmarks() - if !exists("g:NERDTreeBookmarks") - let g:NERDTreeBookmarks = [] - endif - return g:NERDTreeBookmarks -endfunction -" Function: Bookmark.BookmarkExistsFor(name) {{{3 -" class method that returns 1 if a bookmark with the given name is found, 0 -" otherwise -function! s:Bookmark.BookmarkExistsFor(name) - try - call s:Bookmark.BookmarkFor(a:name) - return 1 - catch /^NERDTree.BookmarkNotFoundError/ - return 0 - endtry -endfunction -" Function: Bookmark.BookmarkFor(name) {{{3 -" Class method to get the bookmark that has the given name. {} is return if no -" bookmark is found -function! s:Bookmark.BookmarkFor(name) - for i in s:Bookmark.Bookmarks() - if i.name ==# a:name - return i - endif - endfor - throw "NERDTree.BookmarkNotFoundError: no bookmark found for name: \"". a:name .'"' -endfunction -" Function: Bookmark.BookmarkNames() {{{3 -" Class method to return an array of all bookmark names -function! s:Bookmark.BookmarkNames() - let names = [] - for i in s:Bookmark.Bookmarks() - call add(names, i.name) - endfor - return names -endfunction -" FUNCTION: Bookmark.CacheBookmarks(silent) {{{3 -" Class method to read all bookmarks from the bookmarks file intialize -" bookmark objects for each one. -" -" Args: -" silent - dont echo an error msg if invalid bookmarks are found -function! s:Bookmark.CacheBookmarks(silent) - if filereadable(g:NERDTreeBookmarksFile) - let g:NERDTreeBookmarks = [] - let g:NERDTreeInvalidBookmarks = [] - let bookmarkStrings = readfile(g:NERDTreeBookmarksFile) - let invalidBookmarksFound = 0 - for i in bookmarkStrings - - "ignore blank lines - if i != '' - - let name = substitute(i, '^\(.\{-}\) .*$', '\1', '') - let path = substitute(i, '^.\{-} \(.*\)$', '\1', '') - - try - let bookmark = s:Bookmark.New(name, s:Path.New(path)) - call add(g:NERDTreeBookmarks, bookmark) - catch /^NERDTree.InvalidArgumentsError/ - call add(g:NERDTreeInvalidBookmarks, i) - let invalidBookmarksFound += 1 - endtry - endif - endfor - if invalidBookmarksFound - call s:Bookmark.Write() - if !a:silent - call s:echo(invalidBookmarksFound . " invalid bookmarks were read. See :help NERDTreeInvalidBookmarks for info.") - endif - endif - call s:Bookmark.Sort() - endif -endfunction -" FUNCTION: Bookmark.compareTo(otherbookmark) {{{3 -" Compare these two bookmarks for sorting purposes -function! s:Bookmark.compareTo(otherbookmark) - return a:otherbookmark.name < self.name -endfunction -" FUNCTION: Bookmark.ClearAll() {{{3 -" Class method to delete all bookmarks. -function! s:Bookmark.ClearAll() - for i in s:Bookmark.Bookmarks() - call i.delete() - endfor - call s:Bookmark.Write() -endfunction -" FUNCTION: Bookmark.delete() {{{3 -" Delete this bookmark. If the node for this bookmark is under the current -" root, then recache bookmarks for its Path object -function! s:Bookmark.delete() - let node = {} - try - let node = self.getNode(1) - catch /^NERDTree.BookmarkedNodeNotFoundError/ - endtry - call remove(s:Bookmark.Bookmarks(), index(s:Bookmark.Bookmarks(), self)) - if !empty(node) - call node.path.cacheDisplayString() - endif - call s:Bookmark.Write() -endfunction -" FUNCTION: Bookmark.getNode(searchFromAbsoluteRoot) {{{3 -" Gets the treenode for this bookmark -" -" Args: -" searchFromAbsoluteRoot: specifies whether we should search from the current -" tree root, or the highest cached node -function! s:Bookmark.getNode(searchFromAbsoluteRoot) - let searchRoot = a:searchFromAbsoluteRoot ? s:TreeDirNode.AbsoluteTreeRoot() : b:NERDTreeRoot - let targetNode = searchRoot.findNode(self.path) - if empty(targetNode) - throw "NERDTree.BookmarkedNodeNotFoundError: no node was found for bookmark: " . self.name - endif - return targetNode -endfunction -" FUNCTION: Bookmark.GetNodeForName(name, searchFromAbsoluteRoot) {{{3 -" Class method that finds the bookmark with the given name and returns the -" treenode for it. -function! s:Bookmark.GetNodeForName(name, searchFromAbsoluteRoot) - let bookmark = s:Bookmark.BookmarkFor(a:name) - return bookmark.getNode(a:searchFromAbsoluteRoot) -endfunction -" FUNCTION: Bookmark.GetSelected() {{{3 -" returns the Bookmark the cursor is over, or {} -function! s:Bookmark.GetSelected() - let line = getline(".") - let name = substitute(line, '^>\(.\{-}\) .\+$', '\1', '') - if name != line - try - return s:Bookmark.BookmarkFor(name) - catch /^NERDTree.BookmarkNotFoundError/ - return {} - endtry - endif - return {} -endfunction - -" Function: Bookmark.InvalidBookmarks() {{{3 -" Class method to get all invalid bookmark strings read from the bookmarks -" file -function! s:Bookmark.InvalidBookmarks() - if !exists("g:NERDTreeInvalidBookmarks") - let g:NERDTreeInvalidBookmarks = [] - endif - return g:NERDTreeInvalidBookmarks -endfunction -" FUNCTION: Bookmark.mustExist() {{{3 -function! s:Bookmark.mustExist() - if !self.path.exists() - call s:Bookmark.CacheBookmarks(1) - throw "NERDTree.BookmarkPointsToInvalidLocationError: the bookmark \"". - \ self.name ."\" points to a non existing location: \"". self.path.str() - endif -endfunction -" FUNCTION: Bookmark.New(name, path) {{{3 -" Create a new bookmark object with the given name and path object -function! s:Bookmark.New(name, path) - if a:name =~# ' ' - throw "NERDTree.IllegalBookmarkNameError: illegal name:" . a:name - endif - - let newBookmark = copy(self) - let newBookmark.name = a:name - let newBookmark.path = a:path - return newBookmark -endfunction -" FUNCTION: Bookmark.openInNewTab(options) {{{3 -" Create a new bookmark object with the given name and path object -function! s:Bookmark.openInNewTab(options) - let currentTab = tabpagenr() - if self.path.isDirectory - tabnew - call s:initNerdTree(self.name) - else - exec "tabedit " . self.path.str({'format': 'Edit'}) - endif - - if has_key(a:options, 'stayInCurrentTab') - exec "tabnext " . currentTab - endif -endfunction -" Function: Bookmark.setPath(path) {{{3 -" makes this bookmark point to the given path -function! s:Bookmark.setPath(path) - let self.path = a:path -endfunction -" Function: Bookmark.Sort() {{{3 -" Class method that sorts all bookmarks -function! s:Bookmark.Sort() - let CompareFunc = function("s:compareBookmarks") - call sort(s:Bookmark.Bookmarks(), CompareFunc) -endfunction -" Function: Bookmark.str() {{{3 -" Get the string that should be rendered in the view for this bookmark -function! s:Bookmark.str() - let pathStrMaxLen = winwidth(s:getTreeWinNum()) - 4 - len(self.name) - if &nu - let pathStrMaxLen = pathStrMaxLen - &numberwidth - endif - - let pathStr = self.path.str({'format': 'UI'}) - if len(pathStr) > pathStrMaxLen - let pathStr = '<' . strpart(pathStr, len(pathStr) - pathStrMaxLen) - endif - return '>' . self.name . ' ' . pathStr -endfunction -" FUNCTION: Bookmark.toRoot() {{{3 -" Make the node for this bookmark the new tree root -function! s:Bookmark.toRoot() - if self.validate() - try - let targetNode = self.getNode(1) - catch /^NERDTree.BookmarkedNodeNotFoundError/ - let targetNode = s:TreeFileNode.New(s:Bookmark.BookmarkFor(self.name).path) - endtry - call targetNode.makeRoot() - call s:renderView() - call targetNode.putCursorHere(0, 0) - endif -endfunction -" FUNCTION: Bookmark.ToRoot(name) {{{3 -" Make the node for this bookmark the new tree root -function! s:Bookmark.ToRoot(name) - let bookmark = s:Bookmark.BookmarkFor(a:name) - call bookmark.toRoot() -endfunction - - -"FUNCTION: Bookmark.validate() {{{3 -function! s:Bookmark.validate() - if self.path.exists() - return 1 - else - call s:Bookmark.CacheBookmarks(1) - call s:renderView() - call s:echo(self.name . "now points to an invalid location. See :help NERDTreeInvalidBookmarks for info.") - return 0 - endif -endfunction - -" Function: Bookmark.Write() {{{3 -" Class method to write all bookmarks to the bookmarks file -function! s:Bookmark.Write() - let bookmarkStrings = [] - for i in s:Bookmark.Bookmarks() - call add(bookmarkStrings, i.name . ' ' . i.path.str()) - endfor - - "add a blank line before the invalid ones - call add(bookmarkStrings, "") - - for j in s:Bookmark.InvalidBookmarks() - call add(bookmarkStrings, j) - endfor - call writefile(bookmarkStrings, g:NERDTreeBookmarksFile) -endfunction -"CLASS: KeyMap {{{2 -"============================================================ -let s:KeyMap = {} -"FUNCTION: KeyMap.All() {{{3 -function! s:KeyMap.All() - if !exists("s:keyMaps") - let s:keyMaps = [] - endif - return s:keyMaps -endfunction - -"FUNCTION: KeyMap.BindAll() {{{3 -function! s:KeyMap.BindAll() - for i in s:KeyMap.All() - call i.bind() - endfor -endfunction - -"FUNCTION: KeyMap.bind() {{{3 -function! s:KeyMap.bind() - exec "nnoremap ". self.key ." :call ". self.callback ."()" -endfunction - -"FUNCTION: KeyMap.Create(options) {{{3 -function! s:KeyMap.Create(options) - let newKeyMap = copy(self) - let newKeyMap.key = a:options['key'] - let newKeyMap.quickhelpText = a:options['quickhelpText'] - let newKeyMap.callback = a:options['callback'] - call add(s:KeyMap.All(), newKeyMap) -endfunction -"CLASS: MenuController {{{2 -"============================================================ -let s:MenuController = {} -"FUNCTION: MenuController.New(menuItems) {{{3 -"create a new menu controller that operates on the given menu items -function! s:MenuController.New(menuItems) - let newMenuController = copy(self) - if a:menuItems[0].isSeparator() - let newMenuController.menuItems = a:menuItems[1:-1] - else - let newMenuController.menuItems = a:menuItems - endif - return newMenuController -endfunction - -"FUNCTION: MenuController.showMenu() {{{3 -"start the main loop of the menu and get the user to choose/execute a menu -"item -function! s:MenuController.showMenu() - call self._saveOptions() - - try - let self.selection = 0 - - let done = 0 - while !done - redraw! - call self._echoPrompt() - let key = nr2char(getchar()) - let done = self._handleKeypress(key) - endwhile - finally - call self._restoreOptions() - endtry - - if self.selection != -1 - let m = self._current() - call m.execute() - endif -endfunction - -"FUNCTION: MenuController._echoPrompt() {{{3 -function! s:MenuController._echoPrompt() - echo "NERDTree Menu. Use j/k/enter and the shortcuts indicated" - echo "==========================================================" - - for i in range(0, len(self.menuItems)-1) - if self.selection == i - echo "> " . self.menuItems[i].text - else - echo " " . self.menuItems[i].text - endif - endfor -endfunction - -"FUNCTION: MenuController._current(key) {{{3 -"get the MenuItem that is currently selected -function! s:MenuController._current() - return self.menuItems[self.selection] -endfunction - -"FUNCTION: MenuController._handleKeypress(key) {{{3 -"change the selection (if appropriate) and return 1 if the user has made -"their choice, 0 otherwise -function! s:MenuController._handleKeypress(key) - if a:key == 'j' - call self._cursorDown() - elseif a:key == 'k' - call self._cursorUp() - elseif a:key == nr2char(27) "escape - let self.selection = -1 - return 1 - elseif a:key == "\r" || a:key == "\n" "enter and ctrl-j - return 1 - else - let index = self._nextIndexFor(a:key) - if index != -1 - let self.selection = index - if len(self._allIndexesFor(a:key)) == 1 - return 1 - endif - endif - endif - - return 0 -endfunction - -"FUNCTION: MenuController._allIndexesFor(shortcut) {{{3 -"get indexes to all menu items with the given shortcut -function! s:MenuController._allIndexesFor(shortcut) - let toReturn = [] - - for i in range(0, len(self.menuItems)-1) - if self.menuItems[i].shortcut == a:shortcut - call add(toReturn, i) - endif - endfor - - return toReturn -endfunction - -"FUNCTION: MenuController._nextIndexFor(shortcut) {{{3 -"get the index to the next menu item with the given shortcut, starts from the -"current cursor location and wraps around to the top again if need be -function! s:MenuController._nextIndexFor(shortcut) - for i in range(self.selection+1, len(self.menuItems)-1) - if self.menuItems[i].shortcut == a:shortcut - return i - endif - endfor - - for i in range(0, self.selection) - if self.menuItems[i].shortcut == a:shortcut - return i - endif - endfor - - return -1 -endfunction - -"FUNCTION: MenuController._setCmdheight() {{{3 -"sets &cmdheight to whatever is needed to display the menu -function! s:MenuController._setCmdheight() - let &cmdheight = len(self.menuItems) + 3 -endfunction - -"FUNCTION: MenuController._saveOptions() {{{3 -"set any vim options that are required to make the menu work (saving their old -"values) -function! s:MenuController._saveOptions() - let self._oldLazyredraw = &lazyredraw - let self._oldCmdheight = &cmdheight - set nolazyredraw - call self._setCmdheight() -endfunction - -"FUNCTION: MenuController._restoreOptions() {{{3 -"restore the options we saved in _saveOptions() -function! s:MenuController._restoreOptions() - let &cmdheight = self._oldCmdheight - let &lazyredraw = self._oldLazyredraw -endfunction - -"FUNCTION: MenuController._cursorDown() {{{3 -"move the cursor to the next menu item, skipping separators -function! s:MenuController._cursorDown() - let done = 0 - while !done - if self.selection < len(self.menuItems)-1 - let self.selection += 1 - else - let self.selection = 0 - endif - - if !self._current().isSeparator() - let done = 1 - endif - endwhile -endfunction - -"FUNCTION: MenuController._cursorUp() {{{3 -"move the cursor to the previous menu item, skipping separators -function! s:MenuController._cursorUp() - let done = 0 - while !done - if self.selection > 0 - let self.selection -= 1 - else - let self.selection = len(self.menuItems)-1 - endif - - if !self._current().isSeparator() - let done = 1 - endif - endwhile -endfunction - -"CLASS: MenuItem {{{2 -"============================================================ -let s:MenuItem = {} -"FUNCTION: MenuItem.All() {{{3 -"get all top level menu items -function! s:MenuItem.All() - if !exists("s:menuItems") - let s:menuItems = [] - endif - return s:menuItems -endfunction - -"FUNCTION: MenuItem.AllEnabled() {{{3 -"get all top level menu items that are currently enabled -function! s:MenuItem.AllEnabled() - let toReturn = [] - for i in s:MenuItem.All() - if i.enabled() - call add(toReturn, i) - endif - endfor - return toReturn -endfunction - -"FUNCTION: MenuItem.Create(options) {{{3 -"make a new menu item and add it to the global list -function! s:MenuItem.Create(options) - let newMenuItem = copy(self) - - let newMenuItem.text = a:options['text'] - let newMenuItem.shortcut = a:options['shortcut'] - let newMenuItem.children = [] - - let newMenuItem.isActiveCallback = -1 - if has_key(a:options, 'isActiveCallback') - let newMenuItem.isActiveCallback = a:options['isActiveCallback'] - endif - - let newMenuItem.callback = -1 - if has_key(a:options, 'callback') - let newMenuItem.callback = a:options['callback'] - endif - - if has_key(a:options, 'parent') - call add(a:options['parent'].children, newMenuItem) - else - call add(s:MenuItem.All(), newMenuItem) - endif - - return newMenuItem -endfunction - -"FUNCTION: MenuItem.CreateSeparator(options) {{{3 -"make a new separator menu item and add it to the global list -function! s:MenuItem.CreateSeparator(options) - let standard_options = { 'text': '--------------------', - \ 'shortcut': -1, - \ 'callback': -1 } - let options = extend(a:options, standard_options, "force") - - return s:MenuItem.Create(options) -endfunction - -"FUNCTION: MenuItem.CreateSubmenu(options) {{{3 -"make a new submenu and add it to global list -function! s:MenuItem.CreateSubmenu(options) - let standard_options = { 'callback': -1 } - let options = extend(a:options, standard_options, "force") - - return s:MenuItem.Create(options) -endfunction - -"FUNCTION: MenuItem.enabled() {{{3 -"return 1 if this menu item should be displayed -" -"delegates off to the isActiveCallback, and defaults to 1 if no callback was -"specified -function! s:MenuItem.enabled() - if self.isActiveCallback != -1 - return {self.isActiveCallback}() - endif - return 1 -endfunction - -"FUNCTION: MenuItem.execute() {{{3 -"perform the action behind this menu item, if this menuitem has children then -"display a new menu for them, otherwise deletegate off to the menuitem's -"callback -function! s:MenuItem.execute() - if len(self.children) - let mc = s:MenuController.New(self.children) - call mc.showMenu() - else - if self.callback != -1 - call {self.callback}() - endif - endif -endfunction - -"FUNCTION: MenuItem.isSeparator() {{{3 -"return 1 if this menuitem is a separator -function! s:MenuItem.isSeparator() - return self.callback == -1 && self.children == [] -endfunction - -"FUNCTION: MenuItem.isSubmenu() {{{3 -"return 1 if this menuitem is a submenu -function! s:MenuItem.isSubmenu() - return self.callback == -1 && !empty(self.children) -endfunction - -"CLASS: TreeFileNode {{{2 -"This class is the parent of the TreeDirNode class and constitures the -"'Component' part of the composite design pattern between the treenode -"classes. -"============================================================ -let s:TreeFileNode = {} -"FUNCTION: TreeFileNode.activate(forceKeepWinOpen) {{{3 -function! s:TreeFileNode.activate(forceKeepWinOpen) - call self.open() - if !a:forceKeepWinOpen - call s:closeTreeIfQuitOnOpen() - end -endfunction -"FUNCTION: TreeFileNode.bookmark(name) {{{3 -"bookmark this node with a:name -function! s:TreeFileNode.bookmark(name) - - "if a bookmark exists with the same name and the node is cached then save - "it so we can update its display string - let oldMarkedNode = {} - try - let oldMarkedNode = s:Bookmark.GetNodeForName(a:name, 1) - catch /^NERDTree.BookmarkNotFoundError/ - catch /^NERDTree.BookmarkedNodeNotFoundError/ - endtry - - call s:Bookmark.AddBookmark(a:name, self.path) - call self.path.cacheDisplayString() - call s:Bookmark.Write() - - if !empty(oldMarkedNode) - call oldMarkedNode.path.cacheDisplayString() - endif -endfunction -"FUNCTION: TreeFileNode.cacheParent() {{{3 -"initializes self.parent if it isnt already -function! s:TreeFileNode.cacheParent() - if empty(self.parent) - let parentPath = self.path.getParent() - if parentPath.equals(self.path) - throw "NERDTree.CannotCacheParentError: already at root" - endif - let self.parent = s:TreeFileNode.New(parentPath) - endif -endfunction -"FUNCTION: TreeFileNode.compareNodes {{{3 -"This is supposed to be a class level method but i cant figure out how to -"get func refs to work from a dict.. -" -"A class level method that compares two nodes -" -"Args: -"n1, n2: the 2 nodes to compare -function! s:compareNodes(n1, n2) - return a:n1.path.compareTo(a:n2.path) -endfunction - -"FUNCTION: TreeFileNode.clearBoomarks() {{{3 -function! s:TreeFileNode.clearBoomarks() - for i in s:Bookmark.Bookmarks() - if i.path.equals(self.path) - call i.delete() - end - endfor - call self.path.cacheDisplayString() -endfunction -"FUNCTION: TreeFileNode.copy(dest) {{{3 -function! s:TreeFileNode.copy(dest) - call self.path.copy(a:dest) - let newPath = s:Path.New(a:dest) - let parent = b:NERDTreeRoot.findNode(newPath.getParent()) - if !empty(parent) - call parent.refresh() - return parent.findNode(newPath) - else - return {} - endif -endfunction - -"FUNCTION: TreeFileNode.delete {{{3 -"Removes this node from the tree and calls the Delete method for its path obj -function! s:TreeFileNode.delete() - call self.path.delete() - call self.parent.removeChild(self) -endfunction - -"FUNCTION: TreeFileNode.displayString() {{{3 -" -"Returns a string that specifies how the node should be represented as a -"string -" -"Return: -"a string that can be used in the view to represent this node -function! s:TreeFileNode.displayString() - return self.path.displayString() -endfunction - -"FUNCTION: TreeFileNode.equals(treenode) {{{3 -" -"Compares this treenode to the input treenode and returns 1 if they are the -"same node. -" -"Use this method instead of == because sometimes when the treenodes contain -"many children, vim seg faults when doing == -" -"Args: -"treenode: the other treenode to compare to -function! s:TreeFileNode.equals(treenode) - return self.path.str() ==# a:treenode.path.str() -endfunction - -"FUNCTION: TreeFileNode.findNode(path) {{{3 -"Returns self if this node.path.Equals the given path. -"Returns {} if not equal. -" -"Args: -"path: the path object to compare against -function! s:TreeFileNode.findNode(path) - if a:path.equals(self.path) - return self - endif - return {} -endfunction -"FUNCTION: TreeFileNode.findOpenDirSiblingWithVisibleChildren(direction) {{{3 -" -"Finds the next sibling for this node in the indicated direction. This sibling -"must be a directory and may/may not have children as specified. -" -"Args: -"direction: 0 if you want to find the previous sibling, 1 for the next sibling -" -"Return: -"a treenode object or {} if no appropriate sibling could be found -function! s:TreeFileNode.findOpenDirSiblingWithVisibleChildren(direction) - "if we have no parent then we can have no siblings - if self.parent != {} - let nextSibling = self.findSibling(a:direction) - - while nextSibling != {} - if nextSibling.path.isDirectory && nextSibling.hasVisibleChildren() && nextSibling.isOpen - return nextSibling - endif - let nextSibling = nextSibling.findSibling(a:direction) - endwhile - endif - - return {} -endfunction -"FUNCTION: TreeFileNode.findSibling(direction) {{{3 -" -"Finds the next sibling for this node in the indicated direction -" -"Args: -"direction: 0 if you want to find the previous sibling, 1 for the next sibling -" -"Return: -"a treenode object or {} if no sibling could be found -function! s:TreeFileNode.findSibling(direction) - "if we have no parent then we can have no siblings - if self.parent != {} - - "get the index of this node in its parents children - let siblingIndx = self.parent.getChildIndex(self.path) - - if siblingIndx != -1 - "move a long to the next potential sibling node - let siblingIndx = a:direction ==# 1 ? siblingIndx+1 : siblingIndx-1 - - "keep moving along to the next sibling till we find one that is valid - let numSiblings = self.parent.getChildCount() - while siblingIndx >= 0 && siblingIndx < numSiblings - - "if the next node is not an ignored node (i.e. wont show up in the - "view) then return it - if self.parent.children[siblingIndx].path.ignore() ==# 0 - return self.parent.children[siblingIndx] - endif - - "go to next node - let siblingIndx = a:direction ==# 1 ? siblingIndx+1 : siblingIndx-1 - endwhile - endif - endif - - return {} -endfunction - -"FUNCTION: TreeFileNode.getLineNum(){{{3 -"returns the line number this node is rendered on, or -1 if it isnt rendered -function! s:TreeFileNode.getLineNum() - "if the node is the root then return the root line no. - if self.isRoot() - return s:TreeFileNode.GetRootLineNum() - endif - - let totalLines = line("$") - - "the path components we have matched so far - let pathcomponents = [substitute(b:NERDTreeRoot.path.str({'format': 'UI'}), '/ *$', '', '')] - "the index of the component we are searching for - let curPathComponent = 1 - - let fullpath = self.path.str({'format': 'UI'}) - - - let lnum = s:TreeFileNode.GetRootLineNum() - while lnum > 0 - let lnum = lnum + 1 - "have we reached the bottom of the tree? - if lnum ==# totalLines+1 - return -1 - endif - - let curLine = getline(lnum) - - let indent = s:indentLevelFor(curLine) - if indent ==# curPathComponent - let curLine = s:stripMarkupFromLine(curLine, 1) - - let curPath = join(pathcomponents, '/') . '/' . curLine - if stridx(fullpath, curPath, 0) ==# 0 - if fullpath ==# curPath || strpart(fullpath, len(curPath)-1,1) ==# '/' - let curLine = substitute(curLine, '/ *$', '', '') - call add(pathcomponents, curLine) - let curPathComponent = curPathComponent + 1 - - if fullpath ==# curPath - return lnum - endif - endif - endif - endif - endwhile - return -1 -endfunction - -"FUNCTION: TreeFileNode.GetRootForTab(){{{3 -"get the root node for this tab -function! s:TreeFileNode.GetRootForTab() - if s:treeExistsForTab() - return getbufvar(t:NERDTreeBufName, 'NERDTreeRoot') - end - return {} -endfunction -"FUNCTION: TreeFileNode.GetRootLineNum(){{{3 -"gets the line number of the root node -function! s:TreeFileNode.GetRootLineNum() - let rootLine = 1 - while getline(rootLine) !~# '^\(/\|<\)' - let rootLine = rootLine + 1 - endwhile - return rootLine -endfunction - -"FUNCTION: TreeFileNode.GetSelected() {{{3 -"gets the treenode that the cursor is currently over -function! s:TreeFileNode.GetSelected() - try - let path = s:getPath(line(".")) - if path ==# {} - return {} - endif - return b:NERDTreeRoot.findNode(path) - catch /NERDTree/ - return {} - endtry -endfunction -"FUNCTION: TreeFileNode.isVisible() {{{3 -"returns 1 if this node should be visible according to the tree filters and -"hidden file filters (and their on/off status) -function! s:TreeFileNode.isVisible() - return !self.path.ignore() -endfunction -"FUNCTION: TreeFileNode.isRoot() {{{3 -"returns 1 if this node is b:NERDTreeRoot -function! s:TreeFileNode.isRoot() - if !s:treeExistsForBuf() - throw "NERDTree.NoTreeError: No tree exists for the current buffer" - endif - - return self.equals(b:NERDTreeRoot) -endfunction - -"FUNCTION: TreeFileNode.makeRoot() {{{3 -"Make this node the root of the tree -function! s:TreeFileNode.makeRoot() - if self.path.isDirectory - let b:NERDTreeRoot = self - else - call self.cacheParent() - let b:NERDTreeRoot = self.parent - endif - - call b:NERDTreeRoot.open() - - "change dir to the dir of the new root if instructed to - if g:NERDTreeChDirMode ==# 2 - exec "cd " . b:NERDTreeRoot.path.str({'format': 'Edit'}) - endif -endfunction -"FUNCTION: TreeFileNode.New(path) {{{3 -"Returns a new TreeNode object with the given path and parent -" -"Args: -"path: a path object representing the full filesystem path to the file/dir that the node represents -function! s:TreeFileNode.New(path) - if a:path.isDirectory - return s:TreeDirNode.New(a:path) - else - let newTreeNode = copy(self) - let newTreeNode.path = a:path - let newTreeNode.parent = {} - return newTreeNode - endif -endfunction - -"FUNCTION: TreeFileNode.open() {{{3 -"Open the file represented by the given node in the current window, splitting -"the window if needed -" -"ARGS: -"treenode: file node to open -function! s:TreeFileNode.open() - if b:NERDTreeType ==# "secondary" - exec 'edit ' . self.path.str({'format': 'Edit'}) - return - endif - - "if the file is already open in this tab then just stick the cursor in it - let winnr = bufwinnr('^' . self.path.str() . '$') - if winnr != -1 - call s:exec(winnr . "wincmd w") - - else - if !s:isWindowUsable(winnr("#")) && s:firstUsableWindow() ==# -1 - call self.openSplit() - else - try - if !s:isWindowUsable(winnr("#")) - call s:exec(s:firstUsableWindow() . "wincmd w") - else - call s:exec('wincmd p') - endif - exec ("edit " . self.path.str({'format': 'Edit'})) - catch /^Vim\%((\a\+)\)\=:E37/ - call s:putCursorInTreeWin() - throw "NERDTree.FileAlreadyOpenAndModifiedError: ". self.path.str() ." is already open and modified." - catch /^Vim\%((\a\+)\)\=:/ - echo v:exception - endtry - endif - endif -endfunction -"FUNCTION: TreeFileNode.openSplit() {{{3 -"Open this node in a new window -function! s:TreeFileNode.openSplit() - - if b:NERDTreeType ==# "secondary" - exec "split " . self.path.str({'format': 'Edit'}) - return - endif - - " Save the user's settings for splitbelow and splitright - let savesplitbelow=&splitbelow - let savesplitright=&splitright - - " 'there' will be set to a command to move from the split window - " back to the explorer window - " - " 'back' will be set to a command to move from the explorer window - " back to the newly split window - " - " 'right' and 'below' will be set to the settings needed for - " splitbelow and splitright IF the explorer is the only window. - " - let there= g:NERDTreeWinPos ==# "left" ? "wincmd h" : "wincmd l" - let back = g:NERDTreeWinPos ==# "left" ? "wincmd l" : "wincmd h" - let right= g:NERDTreeWinPos ==# "left" - let below=0 - - " Attempt to go to adjacent window - call s:exec(back) - - let onlyOneWin = (winnr("$") ==# 1) - - " If no adjacent window, set splitright and splitbelow appropriately - if onlyOneWin - let &splitright=right - let &splitbelow=below - else - " found adjacent window - invert split direction - let &splitright=!right - let &splitbelow=!below - endif - - let splitMode = onlyOneWin ? "vertical" : "" - - " Open the new window - try - exec(splitMode." sp " . self.path.str({'format': 'Edit'})) - catch /^Vim\%((\a\+)\)\=:E37/ - call s:putCursorInTreeWin() - throw "NERDTree.FileAlreadyOpenAndModifiedError: ". self.path.str() ." is already open and modified." - catch /^Vim\%((\a\+)\)\=:/ - "do nothing - endtry - - "resize the tree window if no other window was open before - if onlyOneWin - let size = exists("b:NERDTreeOldWindowSize") ? b:NERDTreeOldWindowSize : g:NERDTreeWinSize - call s:exec(there) - exec("silent ". splitMode ." resize ". size) - call s:exec('wincmd p') - endif - - " Restore splitmode settings - let &splitbelow=savesplitbelow - let &splitright=savesplitright -endfunction -"FUNCTION: TreeFileNode.openVSplit() {{{3 -"Open this node in a new vertical window -function! s:TreeFileNode.openVSplit() - if b:NERDTreeType ==# "secondary" - exec "vnew " . self.path.str({'format': 'Edit'}) - return - endif - - let winwidth = winwidth(".") - if winnr("$")==#1 - let winwidth = g:NERDTreeWinSize - endif - - call s:exec("wincmd p") - exec "vnew " . self.path.str({'format': 'Edit'}) - - "resize the nerd tree back to the original size - call s:putCursorInTreeWin() - exec("silent vertical resize ". winwidth) - call s:exec('wincmd p') -endfunction -"FUNCTION: TreeFileNode.openInNewTab(options) {{{3 -function! s:TreeFileNode.openInNewTab(options) - let currentTab = tabpagenr() - - if !has_key(a:options, 'keepTreeOpen') - call s:closeTreeIfQuitOnOpen() - endif - - exec "tabedit " . self.path.str({'format': 'Edit'}) - - if has_key(a:options, 'stayInCurrentTab') && a:options['stayInCurrentTab'] - exec "tabnext " . currentTab - endif - -endfunction -"FUNCTION: TreeFileNode.putCursorHere(isJump, recurseUpward){{{3 -"Places the cursor on the line number this node is rendered on -" -"Args: -"isJump: 1 if this cursor movement should be counted as a jump by vim -"recurseUpward: try to put the cursor on the parent if the this node isnt -"visible -function! s:TreeFileNode.putCursorHere(isJump, recurseUpward) - let ln = self.getLineNum() - if ln != -1 - if a:isJump - mark ' - endif - call cursor(ln, col(".")) - else - if a:recurseUpward - let node = self - while node != {} && node.getLineNum() ==# -1 - let node = node.parent - call node.open() - endwhile - call s:renderView() - call node.putCursorHere(a:isJump, 0) - endif - endif -endfunction - -"FUNCTION: TreeFileNode.refresh() {{{3 -function! s:TreeFileNode.refresh() - call self.path.refresh() -endfunction -"FUNCTION: TreeFileNode.rename() {{{3 -"Calls the rename method for this nodes path obj -function! s:TreeFileNode.rename(newName) - let newName = substitute(a:newName, '\(\\\|\/\)$', '', '') - call self.path.rename(newName) - call self.parent.removeChild(self) - - let parentPath = self.path.getParent() - let newParent = b:NERDTreeRoot.findNode(parentPath) - - if newParent != {} - call newParent.createChild(self.path, 1) - call newParent.refresh() - endif -endfunction -"FUNCTION: TreeFileNode.renderToString {{{3 -"returns a string representation for this tree to be rendered in the view -function! s:TreeFileNode.renderToString() - return self._renderToString(0, 0, [], self.getChildCount() ==# 1) -endfunction - - -"Args: -"depth: the current depth in the tree for this call -"drawText: 1 if we should actually draw the line for this node (if 0 then the -"child nodes are rendered only) -"vertMap: a binary array that indicates whether a vertical bar should be draw -"for each depth in the tree -"isLastChild:true if this curNode is the last child of its parent -function! s:TreeFileNode._renderToString(depth, drawText, vertMap, isLastChild) - let output = "" - if a:drawText ==# 1 - - let treeParts = '' - - "get all the leading spaces and vertical tree parts for this line - if a:depth > 1 - for j in a:vertMap[0:-2] - if g:NERDTreeDirArrows - let treeParts = treeParts . ' ' - else - if j ==# 1 - let treeParts = treeParts . '| ' - else - let treeParts = treeParts . ' ' - endif - endif - endfor - endif - - "get the last vertical tree part for this line which will be different - "if this node is the last child of its parent - if !g:NERDTreeDirArrows - if a:isLastChild - let treeParts = treeParts . '`' - else - let treeParts = treeParts . '|' - endif - endif - - "smack the appropriate dir/file symbol on the line before the file/dir - "name itself - if self.path.isDirectory - if self.isOpen - if g:NERDTreeDirArrows - let treeParts = treeParts . '▾ ' - else - let treeParts = treeParts . '~' - endif - else - if g:NERDTreeDirArrows - let treeParts = treeParts . '▸ ' - else - let treeParts = treeParts . '+' - endif - endif - else - if g:NERDTreeDirArrows - let treeParts = treeParts . ' ' - else - let treeParts = treeParts . '-' - endif - endif - let line = treeParts . self.displayString() - - let output = output . line . "\n" - endif - - "if the node is an open dir, draw its children - if self.path.isDirectory ==# 1 && self.isOpen ==# 1 - - let childNodesToDraw = self.getVisibleChildren() - if len(childNodesToDraw) > 0 - - "draw all the nodes children except the last - let lastIndx = len(childNodesToDraw)-1 - if lastIndx > 0 - for i in childNodesToDraw[0:lastIndx-1] - let output = output . i._renderToString(a:depth + 1, 1, add(copy(a:vertMap), 1), 0) - endfor - endif - - "draw the last child, indicating that it IS the last - let output = output . childNodesToDraw[lastIndx]._renderToString(a:depth + 1, 1, add(copy(a:vertMap), 0), 1) - endif - endif - - return output -endfunction -"CLASS: TreeDirNode {{{2 -"This class is a child of the TreeFileNode class and constitutes the -"'Composite' part of the composite design pattern between the treenode -"classes. -"============================================================ -let s:TreeDirNode = copy(s:TreeFileNode) -"FUNCTION: TreeDirNode.AbsoluteTreeRoot(){{{3 -"class method that returns the highest cached ancestor of the current root -function! s:TreeDirNode.AbsoluteTreeRoot() - let currentNode = b:NERDTreeRoot - while currentNode.parent != {} - let currentNode = currentNode.parent - endwhile - return currentNode -endfunction -"FUNCTION: TreeDirNode.activate(forceKeepWinOpen) {{{3 -unlet s:TreeDirNode.activate -function! s:TreeDirNode.activate(forceKeepWinOpen) - call self.toggleOpen() - call s:renderView() - call self.putCursorHere(0, 0) -endfunction -"FUNCTION: TreeDirNode.addChild(treenode, inOrder) {{{3 -"Adds the given treenode to the list of children for this node -" -"Args: -"-treenode: the node to add -"-inOrder: 1 if the new node should be inserted in sorted order -function! s:TreeDirNode.addChild(treenode, inOrder) - call add(self.children, a:treenode) - let a:treenode.parent = self - - if a:inOrder - call self.sortChildren() - endif -endfunction - -"FUNCTION: TreeDirNode.close() {{{3 -"Closes this directory -function! s:TreeDirNode.close() - let self.isOpen = 0 -endfunction - -"FUNCTION: TreeDirNode.closeChildren() {{{3 -"Closes all the child dir nodes of this node -function! s:TreeDirNode.closeChildren() - for i in self.children - if i.path.isDirectory - call i.close() - call i.closeChildren() - endif - endfor -endfunction - -"FUNCTION: TreeDirNode.createChild(path, inOrder) {{{3 -"Instantiates a new child node for this node with the given path. The new -"nodes parent is set to this node. -" -"Args: -"path: a Path object that this node will represent/contain -"inOrder: 1 if the new node should be inserted in sorted order -" -"Returns: -"the newly created node -function! s:TreeDirNode.createChild(path, inOrder) - let newTreeNode = s:TreeFileNode.New(a:path) - call self.addChild(newTreeNode, a:inOrder) - return newTreeNode -endfunction - -"FUNCTION: TreeDirNode.findNode(path) {{{3 -"Will find one of the children (recursively) that has the given path -" -"Args: -"path: a path object -unlet s:TreeDirNode.findNode -function! s:TreeDirNode.findNode(path) - if a:path.equals(self.path) - return self - endif - if stridx(a:path.str(), self.path.str(), 0) ==# -1 - return {} - endif - - if self.path.isDirectory - for i in self.children - let retVal = i.findNode(a:path) - if retVal != {} - return retVal - endif - endfor - endif - return {} -endfunction -"FUNCTION: TreeDirNode.getChildCount() {{{3 -"Returns the number of children this node has -function! s:TreeDirNode.getChildCount() - return len(self.children) -endfunction - -"FUNCTION: TreeDirNode.getChild(path) {{{3 -"Returns child node of this node that has the given path or {} if no such node -"exists. -" -"This function doesnt not recurse into child dir nodes -" -"Args: -"path: a path object -function! s:TreeDirNode.getChild(path) - if stridx(a:path.str(), self.path.str(), 0) ==# -1 - return {} - endif - - let index = self.getChildIndex(a:path) - if index ==# -1 - return {} - else - return self.children[index] - endif - -endfunction - -"FUNCTION: TreeDirNode.getChildByIndex(indx, visible) {{{3 -"returns the child at the given index -"Args: -"indx: the index to get the child from -"visible: 1 if only the visible children array should be used, 0 if all the -"children should be searched. -function! s:TreeDirNode.getChildByIndex(indx, visible) - let array_to_search = a:visible? self.getVisibleChildren() : self.children - if a:indx > len(array_to_search) - throw "NERDTree.InvalidArgumentsError: Index is out of bounds." - endif - return array_to_search[a:indx] -endfunction - -"FUNCTION: TreeDirNode.getChildIndex(path) {{{3 -"Returns the index of the child node of this node that has the given path or -"-1 if no such node exists. -" -"This function doesnt not recurse into child dir nodes -" -"Args: -"path: a path object -function! s:TreeDirNode.getChildIndex(path) - if stridx(a:path.str(), self.path.str(), 0) ==# -1 - return -1 - endif - - "do a binary search for the child - let a = 0 - let z = self.getChildCount() - while a < z - let mid = (a+z)/2 - let diff = a:path.compareTo(self.children[mid].path) - - if diff ==# -1 - let z = mid - elseif diff ==# 1 - let a = mid+1 - else - return mid - endif - endwhile - return -1 -endfunction - -"FUNCTION: TreeDirNode.GetSelected() {{{3 -"Returns the current node if it is a dir node, or else returns the current -"nodes parent -unlet s:TreeDirNode.GetSelected -function! s:TreeDirNode.GetSelected() - let currentDir = s:TreeFileNode.GetSelected() - if currentDir != {} && !currentDir.isRoot() - if currentDir.path.isDirectory ==# 0 - let currentDir = currentDir.parent - endif - endif - return currentDir -endfunction -"FUNCTION: TreeDirNode.getVisibleChildCount() {{{3 -"Returns the number of visible children this node has -function! s:TreeDirNode.getVisibleChildCount() - return len(self.getVisibleChildren()) -endfunction - -"FUNCTION: TreeDirNode.getVisibleChildren() {{{3 -"Returns a list of children to display for this node, in the correct order -" -"Return: -"an array of treenodes -function! s:TreeDirNode.getVisibleChildren() - let toReturn = [] - for i in self.children - if i.path.ignore() ==# 0 - call add(toReturn, i) - endif - endfor - return toReturn -endfunction - -"FUNCTION: TreeDirNode.hasVisibleChildren() {{{3 -"returns 1 if this node has any childre, 0 otherwise.. -function! s:TreeDirNode.hasVisibleChildren() - return self.getVisibleChildCount() != 0 -endfunction - -"FUNCTION: TreeDirNode._initChildren() {{{3 -"Removes all childen from this node and re-reads them -" -"Args: -"silent: 1 if the function should not echo any "please wait" messages for -"large directories -" -"Return: the number of child nodes read -function! s:TreeDirNode._initChildren(silent) - "remove all the current child nodes - let self.children = [] - - "get an array of all the files in the nodes dir - let dir = self.path - let globDir = dir.str({'format': 'Glob'}) - let filesStr = globpath(globDir, '*') . "\n" . globpath(globDir, '.*') - let files = split(filesStr, "\n") - - if !a:silent && len(files) > g:NERDTreeNotificationThreshold - call s:echo("Please wait, caching a large dir ...") - endif - - let invalidFilesFound = 0 - for i in files - - "filter out the .. and . directories - "Note: we must match .. AND ../ cos sometimes the globpath returns - "../ for path with strange chars (eg $) - if i !~# '\/\.\.\/\?$' && i !~# '\/\.\/\?$' - - "put the next file in a new node and attach it - try - let path = s:Path.New(i) - call self.createChild(path, 0) - catch /^NERDTree.\(InvalidArguments\|InvalidFiletype\)Error/ - let invalidFilesFound += 1 - endtry - endif - endfor - - call self.sortChildren() - - if !a:silent && len(files) > g:NERDTreeNotificationThreshold - call s:echo("Please wait, caching a large dir ... DONE (". self.getChildCount() ." nodes cached).") - endif - - if invalidFilesFound - call s:echoWarning(invalidFilesFound . " file(s) could not be loaded into the NERD tree") - endif - return self.getChildCount() -endfunction -"FUNCTION: TreeDirNode.New(path) {{{3 -"Returns a new TreeNode object with the given path and parent -" -"Args: -"path: a path object representing the full filesystem path to the file/dir that the node represents -unlet s:TreeDirNode.New -function! s:TreeDirNode.New(path) - if a:path.isDirectory != 1 - throw "NERDTree.InvalidArgumentsError: A TreeDirNode object must be instantiated with a directory Path object." - endif - - let newTreeNode = copy(self) - let newTreeNode.path = a:path - - let newTreeNode.isOpen = 0 - let newTreeNode.children = [] - - let newTreeNode.parent = {} - - return newTreeNode -endfunction -"FUNCTION: TreeDirNode.open() {{{3 -"Reads in all this nodes children -" -"Return: the number of child nodes read -unlet s:TreeDirNode.open -function! s:TreeDirNode.open() - let self.isOpen = 1 - if self.children ==# [] - return self._initChildren(0) - else - return 0 - endif -endfunction - -" FUNCTION: TreeDirNode.openExplorer() {{{3 -" opens an explorer window for this node in the previous window (could be a -" nerd tree or a netrw) -function! s:TreeDirNode.openExplorer() - let oldwin = winnr() - call s:exec('wincmd p') - if oldwin ==# winnr() || (&modified && s:bufInWindows(winbufnr(winnr())) < 2) - call s:exec('wincmd p') - call self.openSplit() - else - exec ("silent edit " . self.path.str({'format': 'Edit'})) - endif -endfunction -"FUNCTION: TreeDirNode.openInNewTab(options) {{{3 -unlet s:TreeDirNode.openInNewTab -function! s:TreeDirNode.openInNewTab(options) - let currentTab = tabpagenr() - - if !has_key(a:options, 'keepTreeOpen') || !a:options['keepTreeOpen'] - call s:closeTreeIfQuitOnOpen() - endif - - tabnew - call s:initNerdTree(self.path.str()) - - if has_key(a:options, 'stayInCurrentTab') && a:options['stayInCurrentTab'] - exec "tabnext " . currentTab - endif -endfunction -"FUNCTION: TreeDirNode.openRecursively() {{{3 -"Opens this treenode and all of its children whose paths arent 'ignored' -"because of the file filters. -" -"This method is actually a wrapper for the OpenRecursively2 method which does -"the work. -function! s:TreeDirNode.openRecursively() - call self._openRecursively2(1) -endfunction - -"FUNCTION: TreeDirNode._openRecursively2() {{{3 -"Opens this all children of this treenode recursively if either: -" *they arent filtered by file filters -" *a:forceOpen is 1 -" -"Args: -"forceOpen: 1 if this node should be opened regardless of file filters -function! s:TreeDirNode._openRecursively2(forceOpen) - if self.path.ignore() ==# 0 || a:forceOpen - let self.isOpen = 1 - if self.children ==# [] - call self._initChildren(1) - endif - - for i in self.children - if i.path.isDirectory ==# 1 - call i._openRecursively2(0) - endif - endfor - endif -endfunction - -"FUNCTION: TreeDirNode.refresh() {{{3 -unlet s:TreeDirNode.refresh -function! s:TreeDirNode.refresh() - call self.path.refresh() - - "if this node was ever opened, refresh its children - if self.isOpen || !empty(self.children) - "go thru all the files/dirs under this node - let newChildNodes = [] - let invalidFilesFound = 0 - let dir = self.path - let globDir = dir.str({'format': 'Glob'}) - let filesStr = globpath(globDir, '*') . "\n" . globpath(globDir, '.*') - let files = split(filesStr, "\n") - for i in files - "filter out the .. and . directories - "Note: we must match .. AND ../ cos sometimes the globpath returns - "../ for path with strange chars (eg $) - if i !~# '\/\.\.\/\?$' && i !~# '\/\.\/\?$' - - try - "create a new path and see if it exists in this nodes children - let path = s:Path.New(i) - let newNode = self.getChild(path) - if newNode != {} - call newNode.refresh() - call add(newChildNodes, newNode) - - "the node doesnt exist so create it - else - let newNode = s:TreeFileNode.New(path) - let newNode.parent = self - call add(newChildNodes, newNode) - endif - - - catch /^NERDTree.InvalidArgumentsError/ - let invalidFilesFound = 1 - endtry - endif - endfor - - "swap this nodes children out for the children we just read/refreshed - let self.children = newChildNodes - call self.sortChildren() - - if invalidFilesFound - call s:echoWarning("some files could not be loaded into the NERD tree") - endif - endif -endfunction - -"FUNCTION: TreeDirNode.reveal(path) {{{3 -"reveal the given path, i.e. cache and open all treenodes needed to display it -"in the UI -function! s:TreeDirNode.reveal(path) - if !a:path.isUnder(self.path) - throw "NERDTree.InvalidArgumentsError: " . a:path.str() . " should be under " . self.path.str() - endif - - call self.open() - - if self.path.equals(a:path.getParent()) - let n = self.findNode(a:path) - call s:renderView() - call n.putCursorHere(1,0) - return - endif - - let p = a:path - while !p.getParent().equals(self.path) - let p = p.getParent() - endwhile - - let n = self.findNode(p) - call n.reveal(a:path) -endfunction -"FUNCTION: TreeDirNode.removeChild(treenode) {{{3 -" -"Removes the given treenode from this nodes set of children -" -"Args: -"treenode: the node to remove -" -"Throws a NERDTree.ChildNotFoundError if the given treenode is not found -function! s:TreeDirNode.removeChild(treenode) - for i in range(0, self.getChildCount()-1) - if self.children[i].equals(a:treenode) - call remove(self.children, i) - return - endif - endfor - - throw "NERDTree.ChildNotFoundError: child node was not found" -endfunction - -"FUNCTION: TreeDirNode.sortChildren() {{{3 -" -"Sorts the children of this node according to alphabetical order and the -"directory priority. -" -function! s:TreeDirNode.sortChildren() - let CompareFunc = function("s:compareNodes") - call sort(self.children, CompareFunc) -endfunction - -"FUNCTION: TreeDirNode.toggleOpen() {{{3 -"Opens this directory if it is closed and vice versa -function! s:TreeDirNode.toggleOpen() - if self.isOpen ==# 1 - call self.close() - else - call self.open() - endif -endfunction - -"FUNCTION: TreeDirNode.transplantChild(newNode) {{{3 -"Replaces the child of this with the given node (where the child node's full -"path matches a:newNode's fullpath). The search for the matching node is -"non-recursive -" -"Arg: -"newNode: the node to graft into the tree -function! s:TreeDirNode.transplantChild(newNode) - for i in range(0, self.getChildCount()-1) - if self.children[i].equals(a:newNode) - let self.children[i] = a:newNode - let a:newNode.parent = self - break - endif - endfor -endfunction -"============================================================ -"CLASS: Path {{{2 -"============================================================ -let s:Path = {} -"FUNCTION: Path.AbsolutePathFor(str) {{{3 -function! s:Path.AbsolutePathFor(str) - let prependCWD = 0 - if s:running_windows - let prependCWD = a:str !~# '^.:\(\\\|\/\)' - else - let prependCWD = a:str !~# '^/' - endif - - let toReturn = a:str - if prependCWD - let toReturn = getcwd() . s:Path.Slash() . a:str - endif - - return toReturn -endfunction -"FUNCTION: Path.bookmarkNames() {{{3 -function! s:Path.bookmarkNames() - if !exists("self._bookmarkNames") - call self.cacheDisplayString() - endif - return self._bookmarkNames -endfunction -"FUNCTION: Path.cacheDisplayString() {{{3 -function! s:Path.cacheDisplayString() - let self.cachedDisplayString = self.getLastPathComponent(1) - - if self.isExecutable - let self.cachedDisplayString = self.cachedDisplayString . '*' - endif - - let self._bookmarkNames = [] - for i in s:Bookmark.Bookmarks() - if i.path.equals(self) - call add(self._bookmarkNames, i.name) - endif - endfor - if !empty(self._bookmarkNames) - let self.cachedDisplayString .= ' {' . join(self._bookmarkNames) . '}' - endif - - if self.isSymLink - let self.cachedDisplayString .= ' -> ' . self.symLinkDest - endif - - if self.isReadOnly - let self.cachedDisplayString .= ' [RO]' - endif -endfunction -"FUNCTION: Path.changeToDir() {{{3 -function! s:Path.changeToDir() - let dir = self.str({'format': 'Cd'}) - if self.isDirectory ==# 0 - let dir = self.getParent().str({'format': 'Cd'}) - endif - - try - execute "cd " . dir - call s:echo("CWD is now: " . getcwd()) - catch - throw "NERDTree.PathChangeError: cannot change CWD to " . dir - endtry -endfunction - -"FUNCTION: Path.compareTo() {{{3 -" -"Compares this Path to the given path and returns 0 if they are equal, -1 if -"this Path is "less than" the given path, or 1 if it is "greater". -" -"Args: -"path: the path object to compare this to -" -"Return: -"1, -1 or 0 -function! s:Path.compareTo(path) - let thisPath = self.getLastPathComponent(1) - let thatPath = a:path.getLastPathComponent(1) - - "if the paths are the same then clearly we return 0 - if thisPath ==# thatPath - return 0 - endif - - let thisSS = self.getSortOrderIndex() - let thatSS = a:path.getSortOrderIndex() - - "compare the sort sequences, if they are different then the return - "value is easy - if thisSS < thatSS - return -1 - elseif thisSS > thatSS - return 1 - else - "if the sort sequences are the same then compare the paths - "alphabetically - let pathCompare = g:NERDTreeCaseSensitiveSort ? thisPath <# thatPath : thisPath limit - let toReturn = "<" . strpart(toReturn, len(toReturn) - limit + 1) - endif - endif - - return toReturn -endfunction - -"FUNCTION: Path._strForUI() {{{3 -function! s:Path._strForUI() - let toReturn = '/' . join(self.pathSegments, '/') - if self.isDirectory && toReturn != '/' - let toReturn = toReturn . '/' - endif - return toReturn -endfunction - -"FUNCTION: Path._strForCd() {{{3 -" -" returns a string that can be used with :cd -function! s:Path._strForCd() - return escape(self.str(), s:escape_chars) -endfunction -"FUNCTION: Path._strForEdit() {{{3 -" -"Return: the string for this path that is suitable to be used with the :edit -"command -function! s:Path._strForEdit() - let p = self.str({'format': 'UI'}) - let cwd = getcwd() - - if s:running_windows - let p = tolower(self.str()) - let cwd = tolower(getcwd()) - endif - - let p = escape(p, s:escape_chars) - - let cwd = cwd . s:Path.Slash() - - "return a relative path if we can - if stridx(p, cwd) ==# 0 - let p = strpart(p, strlen(cwd)) - endif - - if p ==# '' - let p = '.' - endif - - return p - -endfunction -"FUNCTION: Path._strForGlob() {{{3 -function! s:Path._strForGlob() - let lead = s:Path.Slash() - - "if we are running windows then slap a drive letter on the front - if s:running_windows - let lead = self.drive . '\' - endif - - let toReturn = lead . join(self.pathSegments, s:Path.Slash()) - - if !s:running_windows - let toReturn = escape(toReturn, s:escape_chars) - endif - return toReturn -endfunction -"FUNCTION: Path._str() {{{3 -" -"Gets the string path for this path object that is appropriate for the OS. -"EG, in windows c:\foo\bar -" in *nix /foo/bar -function! s:Path._str() - let lead = s:Path.Slash() - - "if we are running windows then slap a drive letter on the front - if s:running_windows - let lead = self.drive . '\' - endif - - return lead . join(self.pathSegments, s:Path.Slash()) -endfunction - -"FUNCTION: Path.strTrunk() {{{3 -"Gets the path without the last segment on the end. -function! s:Path.strTrunk() - return self.drive . '/' . join(self.pathSegments[0:-2], '/') -endfunction - -"FUNCTION: Path.WinToUnixPath(pathstr){{{3 -"Takes in a windows path and returns the unix equiv -" -"A class level method -" -"Args: -"pathstr: the windows path to convert -function! s:Path.WinToUnixPath(pathstr) - if !s:running_windows - return a:pathstr - endif - - let toReturn = a:pathstr - - "remove the x:\ of the front - let toReturn = substitute(toReturn, '^.*:\(\\\|/\)\?', '/', "") - - "convert all \ chars to / - let toReturn = substitute(toReturn, '\', '/', "g") - - return toReturn -endfunction - -" SECTION: General Functions {{{1 -"============================================================ -"FUNCTION: s:bufInWindows(bnum){{{2 -"[[STOLEN FROM VTREEEXPLORER.VIM]] -"Determine the number of windows open to this buffer number. -"Care of Yegappan Lakshman. Thanks! -" -"Args: -"bnum: the subject buffers buffer number -function! s:bufInWindows(bnum) - let cnt = 0 - let winnum = 1 - while 1 - let bufnum = winbufnr(winnum) - if bufnum < 0 - break - endif - if bufnum ==# a:bnum - let cnt = cnt + 1 - endif - let winnum = winnum + 1 - endwhile - - return cnt -endfunction " >>> -"FUNCTION: s:checkForBrowse(dir) {{{2 -"inits a secondary nerd tree in the current buffer if appropriate -function! s:checkForBrowse(dir) - if a:dir != '' && isdirectory(a:dir) - call s:initNerdTreeInPlace(a:dir) - endif -endfunction -"FUNCTION: s:compareBookmarks(first, second) {{{2 -"Compares two bookmarks -function! s:compareBookmarks(first, second) - return a:first.compareTo(a:second) -endfunction - -" FUNCTION: s:completeBookmarks(A,L,P) {{{2 -" completion function for the bookmark commands -function! s:completeBookmarks(A,L,P) - return filter(s:Bookmark.BookmarkNames(), 'v:val =~# "^' . a:A . '"') -endfunction -" FUNCTION: s:exec(cmd) {{{2 -" same as :exec cmd but eventignore=all is set for the duration -function! s:exec(cmd) - let old_ei = &ei - set ei=all - exec a:cmd - let &ei = old_ei -endfunction -" FUNCTION: s:findAndRevealPath() {{{2 -function! s:findAndRevealPath() - try - let p = s:Path.New(expand("%:p")) - catch /^NERDTree.InvalidArgumentsError/ - call s:echo("no file for the current buffer") - return - endtry - - if !s:treeExistsForTab() - try - let cwd = s:Path.New(getcwd()) - catch /^NERDTree.InvalidArgumentsError/ - call s:echo("current directory does not exist.") - let cwd = p.getParent() - endtry - - if p.isUnder(cwd) - call s:initNerdTree(cwd.str()) - else - call s:initNerdTree(p.getParent().str()) - endif - else - if !p.isUnder(s:TreeFileNode.GetRootForTab().path) - call s:initNerdTree(p.getParent().str()) - else - if !s:isTreeOpen() - call s:toggle("") - endif - endif - endif - call s:putCursorInTreeWin() - call b:NERDTreeRoot.reveal(p) -endfunction -"FUNCTION: s:initNerdTree(name) {{{2 -"Initialise the nerd tree for this tab. The tree will start in either the -"given directory, or the directory associated with the given bookmark -" -"Args: -"name: the name of a bookmark or a directory -function! s:initNerdTree(name) - let path = {} - if s:Bookmark.BookmarkExistsFor(a:name) - let path = s:Bookmark.BookmarkFor(a:name).path - else - let dir = a:name ==# '' ? getcwd() : a:name - - "hack to get an absolute path if a relative path is given - if dir =~# '^\.' - let dir = getcwd() . s:Path.Slash() . dir - endif - let dir = resolve(dir) - - try - let path = s:Path.New(dir) - catch /^NERDTree.InvalidArgumentsError/ - call s:echo("No bookmark or directory found for: " . a:name) - return - endtry - endif - if !path.isDirectory - let path = path.getParent() - endif - - "if instructed to, then change the vim CWD to the dir the NERDTree is - "inited in - if g:NERDTreeChDirMode != 0 - call path.changeToDir() - endif - - if s:treeExistsForTab() - if s:isTreeOpen() - call s:closeTree() - endif - unlet t:NERDTreeBufName - endif - - let newRoot = s:TreeDirNode.New(path) - call newRoot.open() - - call s:createTreeWin() - let b:treeShowHelp = 0 - let b:NERDTreeIgnoreEnabled = 1 - let b:NERDTreeShowFiles = g:NERDTreeShowFiles - let b:NERDTreeShowHidden = g:NERDTreeShowHidden - let b:NERDTreeShowBookmarks = g:NERDTreeShowBookmarks - let b:NERDTreeRoot = newRoot - - let b:NERDTreeType = "primary" - - call s:renderView() - call b:NERDTreeRoot.putCursorHere(0, 0) -endfunction - -"FUNCTION: s:initNerdTreeInPlace(dir) {{{2 -function! s:initNerdTreeInPlace(dir) - try - let path = s:Path.New(a:dir) - catch /^NERDTree.InvalidArgumentsError/ - call s:echo("Invalid directory name:" . a:name) - return - endtry - - "we want the directory buffer to disappear when we do the :edit below - setlocal bufhidden=wipe - - let previousBuf = expand("#") - - "we need a unique name for each secondary tree buffer to ensure they are - "all independent - exec "silent edit " . s:nextBufferName() - - let b:NERDTreePreviousBuf = bufnr(previousBuf) - - let b:NERDTreeRoot = s:TreeDirNode.New(path) - call b:NERDTreeRoot.open() - - call s:setCommonBufOptions() - let b:NERDTreeType = "secondary" - - call s:renderView() -endfunction -" FUNCTION: s:initNerdTreeMirror() {{{2 -function! s:initNerdTreeMirror() - - "get the names off all the nerd tree buffers - let treeBufNames = [] - for i in range(1, tabpagenr("$")) - let nextName = s:tabpagevar(i, 'NERDTreeBufName') - if nextName != -1 && (!exists("t:NERDTreeBufName") || nextName != t:NERDTreeBufName) - call add(treeBufNames, nextName) - endif - endfor - let treeBufNames = s:unique(treeBufNames) - - "map the option names (that the user will be prompted with) to the nerd - "tree buffer names - let options = {} - let i = 0 - while i < len(treeBufNames) - let bufName = treeBufNames[i] - let treeRoot = getbufvar(bufName, "NERDTreeRoot") - let options[i+1 . '. ' . treeRoot.path.str() . ' (buf name: ' . bufName . ')'] = bufName - let i = i + 1 - endwhile - - "work out which tree to mirror, if there is more than 1 then ask the user - let bufferName = '' - if len(keys(options)) > 1 - let choices = ["Choose a tree to mirror"] - let choices = extend(choices, sort(keys(options))) - let choice = inputlist(choices) - if choice < 1 || choice > len(options) || choice ==# '' - return - endif - - let bufferName = options[sort(keys(options))[choice-1]] - elseif len(keys(options)) ==# 1 - let bufferName = values(options)[0] - else - call s:echo("No trees to mirror") - return - endif - - if s:treeExistsForTab() && s:isTreeOpen() - call s:closeTree() - endif - - let t:NERDTreeBufName = bufferName - call s:createTreeWin() - exec 'buffer ' . bufferName - if !&hidden - call s:renderView() - endif -endfunction -" FUNCTION: s:nextBufferName() {{{2 -" returns the buffer name for the next nerd tree -function! s:nextBufferName() - let name = s:NERDTreeBufName . s:next_buffer_number - let s:next_buffer_number += 1 - return name -endfunction -" FUNCTION: s:tabpagevar(tabnr, var) {{{2 -function! s:tabpagevar(tabnr, var) - let currentTab = tabpagenr() - let old_ei = &ei - set ei=all - - exec "tabnext " . a:tabnr - let v = -1 - if exists('t:' . a:var) - exec 'let v = t:' . a:var - endif - exec "tabnext " . currentTab - - let &ei = old_ei - - return v -endfunction -" Function: s:treeExistsForBuffer() {{{2 -" Returns 1 if a nerd tree root exists in the current buffer -function! s:treeExistsForBuf() - return exists("b:NERDTreeRoot") -endfunction -" Function: s:treeExistsForTab() {{{2 -" Returns 1 if a nerd tree root exists in the current tab -function! s:treeExistsForTab() - return exists("t:NERDTreeBufName") -endfunction -" Function: s:unique(list) {{{2 -" returns a:list without duplicates -function! s:unique(list) - let uniqlist = [] - for elem in a:list - if index(uniqlist, elem) ==# -1 - let uniqlist += [elem] - endif - endfor - return uniqlist -endfunction -" SECTION: Public API {{{1 -"============================================================ -let g:NERDTreePath = s:Path -let g:NERDTreeDirNode = s:TreeDirNode -let g:NERDTreeFileNode = s:TreeFileNode -let g:NERDTreeBookmark = s:Bookmark - -function! NERDTreeAddMenuItem(options) - call s:MenuItem.Create(a:options) -endfunction - -function! NERDTreeAddMenuSeparator(...) - let opts = a:0 ? a:1 : {} - call s:MenuItem.CreateSeparator(opts) -endfunction - -function! NERDTreeAddSubmenu(options) - return s:MenuItem.Create(a:options) -endfunction - -function! NERDTreeAddKeyMap(options) - call s:KeyMap.Create(a:options) -endfunction - -function! NERDTreeRender() - call s:renderView() -endfunction - -" SECTION: View Functions {{{1 -"============================================================ -"FUNCTION: s:centerView() {{{2 -"centers the nerd tree window around the cursor (provided the nerd tree -"options permit) -function! s:centerView() - if g:NERDTreeAutoCenter - let current_line = winline() - let lines_to_top = current_line - let lines_to_bottom = winheight(s:getTreeWinNum()) - current_line - if lines_to_top < g:NERDTreeAutoCenterThreshold || lines_to_bottom < g:NERDTreeAutoCenterThreshold - normal! zz - endif - endif -endfunction -"FUNCTION: s:closeTree() {{{2 -"Closes the primary NERD tree window for this tab -function! s:closeTree() - if !s:isTreeOpen() - throw "NERDTree.NoTreeFoundError: no NERDTree is open" - endif - - if winnr("$") != 1 - if winnr() == s:getTreeWinNum() - wincmd p - let bufnr = bufnr("") - wincmd p - else - let bufnr = bufnr("") - endif - - call s:exec(s:getTreeWinNum() . " wincmd w") - close - call s:exec(bufwinnr(bufnr) . " wincmd w") - else - close - endif -endfunction - -"FUNCTION: s:closeTreeIfOpen() {{{2 -"Closes the NERD tree window if it is open -function! s:closeTreeIfOpen() - if s:isTreeOpen() - call s:closeTree() - endif -endfunction -"FUNCTION: s:closeTreeIfQuitOnOpen() {{{2 -"Closes the NERD tree window if the close on open option is set -function! s:closeTreeIfQuitOnOpen() - if g:NERDTreeQuitOnOpen && s:isTreeOpen() - call s:closeTree() - endif -endfunction -"FUNCTION: s:createTreeWin() {{{2 -"Inits the NERD tree window. ie. opens it, sizes it, sets all the local -"options etc -function! s:createTreeWin() - "create the nerd tree window - let splitLocation = g:NERDTreeWinPos ==# "left" ? "topleft " : "botright " - let splitSize = g:NERDTreeWinSize - - if !exists('t:NERDTreeBufName') - let t:NERDTreeBufName = s:nextBufferName() - silent! exec splitLocation . 'vertical ' . splitSize . ' new' - silent! exec "edit " . t:NERDTreeBufName - else - silent! exec splitLocation . 'vertical ' . splitSize . ' split' - silent! exec "buffer " . t:NERDTreeBufName - endif - - setlocal winfixwidth - call s:setCommonBufOptions() -endfunction - -"FUNCTION: s:dumpHelp {{{2 -"prints out the quick help -function! s:dumpHelp() - let old_h = @h - if b:treeShowHelp ==# 1 - let @h= "\" NERD tree (" . s:NERD_tree_version . ") quickhelp~\n" - let @h=@h."\" ============================\n" - let @h=@h."\" File node mappings~\n" - let @h=@h."\" ". (g:NERDTreeMouseMode ==# 3 ? "single" : "double") ."-click,\n" - let @h=@h."\" ,\n" - if b:NERDTreeType ==# "primary" - let @h=@h."\" ". g:NERDTreeMapActivateNode .": open in prev window\n" - else - let @h=@h."\" ". g:NERDTreeMapActivateNode .": open in current window\n" - endif - if b:NERDTreeType ==# "primary" - let @h=@h."\" ". g:NERDTreeMapPreview .": preview\n" - endif - let @h=@h."\" ". g:NERDTreeMapOpenInTab.": open in new tab\n" - let @h=@h."\" ". g:NERDTreeMapOpenInTabSilent .": open in new tab silently\n" - let @h=@h."\" middle-click,\n" - let @h=@h."\" ". g:NERDTreeMapOpenSplit .": open split\n" - let @h=@h."\" ". g:NERDTreeMapPreviewSplit .": preview split\n" - let @h=@h."\" ". g:NERDTreeMapOpenVSplit .": open vsplit\n" - let @h=@h."\" ". g:NERDTreeMapPreviewVSplit .": preview vsplit\n" - - let @h=@h."\"\n\" ----------------------------\n" - let @h=@h."\" Directory node mappings~\n" - let @h=@h."\" ". (g:NERDTreeMouseMode ==# 1 ? "double" : "single") ."-click,\n" - let @h=@h."\" ". g:NERDTreeMapActivateNode .": open & close node\n" - let @h=@h."\" ". g:NERDTreeMapOpenRecursively .": recursively open node\n" - let @h=@h."\" ". g:NERDTreeMapCloseDir .": close parent of node\n" - let @h=@h."\" ". g:NERDTreeMapCloseChildren .": close all child nodes of\n" - let @h=@h."\" current node recursively\n" - let @h=@h."\" middle-click,\n" - let @h=@h."\" ". g:NERDTreeMapOpenExpl.": explore selected dir\n" - - let @h=@h."\"\n\" ----------------------------\n" - let @h=@h."\" Bookmark table mappings~\n" - let @h=@h."\" double-click,\n" - let @h=@h."\" ". g:NERDTreeMapActivateNode .": open bookmark\n" - let @h=@h."\" ". g:NERDTreeMapOpenInTab.": open in new tab\n" - let @h=@h."\" ". g:NERDTreeMapOpenInTabSilent .": open in new tab silently\n" - let @h=@h."\" ". g:NERDTreeMapDeleteBookmark .": delete bookmark\n" - - let @h=@h."\"\n\" ----------------------------\n" - let @h=@h."\" Tree navigation mappings~\n" - let @h=@h."\" ". g:NERDTreeMapJumpRoot .": go to root\n" - let @h=@h."\" ". g:NERDTreeMapJumpParent .": go to parent\n" - let @h=@h."\" ". g:NERDTreeMapJumpFirstChild .": go to first child\n" - let @h=@h."\" ". g:NERDTreeMapJumpLastChild .": go to last child\n" - let @h=@h."\" ". g:NERDTreeMapJumpNextSibling .": go to next sibling\n" - let @h=@h."\" ". g:NERDTreeMapJumpPrevSibling .": go to prev sibling\n" - - let @h=@h."\"\n\" ----------------------------\n" - let @h=@h."\" Filesystem mappings~\n" - let @h=@h."\" ". g:NERDTreeMapChangeRoot .": change tree root to the\n" - let @h=@h."\" selected dir\n" - let @h=@h."\" ". g:NERDTreeMapUpdir .": move tree root up a dir\n" - let @h=@h."\" ". g:NERDTreeMapUpdirKeepOpen .": move tree root up a dir\n" - let @h=@h."\" but leave old root open\n" - let @h=@h."\" ". g:NERDTreeMapRefresh .": refresh cursor dir\n" - let @h=@h."\" ". g:NERDTreeMapRefreshRoot .": refresh current root\n" - let @h=@h."\" ". g:NERDTreeMapMenu .": Show menu\n" - let @h=@h."\" ". g:NERDTreeMapChdir .":change the CWD to the\n" - let @h=@h."\" selected dir\n" - - let @h=@h."\"\n\" ----------------------------\n" - let @h=@h."\" Tree filtering mappings~\n" - let @h=@h."\" ". g:NERDTreeMapToggleHidden .": hidden files (" . (b:NERDTreeShowHidden ? "on" : "off") . ")\n" - let @h=@h."\" ". g:NERDTreeMapToggleFilters .": file filters (" . (b:NERDTreeIgnoreEnabled ? "on" : "off") . ")\n" - let @h=@h."\" ". g:NERDTreeMapToggleFiles .": files (" . (b:NERDTreeShowFiles ? "on" : "off") . ")\n" - let @h=@h."\" ". g:NERDTreeMapToggleBookmarks .": bookmarks (" . (b:NERDTreeShowBookmarks ? "on" : "off") . ")\n" - - "add quickhelp entries for each custom key map - if len(s:KeyMap.All()) - let @h=@h."\"\n\" ----------------------------\n" - let @h=@h."\" Custom mappings~\n" - for i in s:KeyMap.All() - let @h=@h."\" ". i.key .": ". i.quickhelpText ."\n" - endfor - endif - - let @h=@h."\"\n\" ----------------------------\n" - let @h=@h."\" Other mappings~\n" - let @h=@h."\" ". g:NERDTreeMapQuit .": Close the NERDTree window\n" - let @h=@h."\" ". g:NERDTreeMapToggleZoom .": Zoom (maximize-minimize)\n" - let @h=@h."\" the NERDTree window\n" - let @h=@h."\" ". g:NERDTreeMapHelp .": toggle help\n" - let @h=@h."\"\n\" ----------------------------\n" - let @h=@h."\" Bookmark commands~\n" - let @h=@h."\" :Bookmark \n" - let @h=@h."\" :BookmarkToRoot \n" - let @h=@h."\" :RevealBookmark \n" - let @h=@h."\" :OpenBookmark \n" - let @h=@h."\" :ClearBookmarks []\n" - let @h=@h."\" :ClearAllBookmarks\n" - silent! put h - elseif g:NERDTreeMinimalUI == 0 - let @h="\" Press ". g:NERDTreeMapHelp ." for help\n" - silent! put h - endif - - let @h = old_h -endfunction -"FUNCTION: s:echo {{{2 -"A wrapper for :echo. Appends 'NERDTree:' on the front of all messages -" -"Args: -"msg: the message to echo -function! s:echo(msg) - redraw - echomsg "NERDTree: " . a:msg -endfunction -"FUNCTION: s:echoWarning {{{2 -"Wrapper for s:echo, sets the message type to warningmsg for this message -"Args: -"msg: the message to echo -function! s:echoWarning(msg) - echohl warningmsg - call s:echo(a:msg) - echohl normal -endfunction -"FUNCTION: s:echoError {{{2 -"Wrapper for s:echo, sets the message type to errormsg for this message -"Args: -"msg: the message to echo -function! s:echoError(msg) - echohl errormsg - call s:echo(a:msg) - echohl normal -endfunction -"FUNCTION: s:firstUsableWindow(){{{2 -"find the window number of the first normal window -function! s:firstUsableWindow() - let i = 1 - while i <= winnr("$") - let bnum = winbufnr(i) - if bnum != -1 && getbufvar(bnum, '&buftype') ==# '' - \ && !getwinvar(i, '&previewwindow') - \ && (!getbufvar(bnum, '&modified') || &hidden) - return i - endif - - let i += 1 - endwhile - return -1 -endfunction -"FUNCTION: s:getPath(ln) {{{2 -"Gets the full path to the node that is rendered on the given line number -" -"Args: -"ln: the line number to get the path for -" -"Return: -"A path if a node was selected, {} if nothing is selected. -"If the 'up a dir' line was selected then the path to the parent of the -"current root is returned -function! s:getPath(ln) - let line = getline(a:ln) - - let rootLine = s:TreeFileNode.GetRootLineNum() - - "check to see if we have the root node - if a:ln == rootLine - return b:NERDTreeRoot.path - endif - - if !g:NERDTreeDirArrows - " in case called from outside the tree - if line !~# '^ *[|`▸▾ ]' || line =~# '^$' - return {} - endif - endif - - if line ==# s:tree_up_dir_line - return b:NERDTreeRoot.path.getParent() - endif - - let indent = s:indentLevelFor(line) - - "remove the tree parts and the leading space - let curFile = s:stripMarkupFromLine(line, 0) - - let wasdir = 0 - if curFile =~# '/$' - let wasdir = 1 - let curFile = substitute(curFile, '/\?$', '/', "") - endif - - let dir = "" - let lnum = a:ln - while lnum > 0 - let lnum = lnum - 1 - let curLine = getline(lnum) - let curLineStripped = s:stripMarkupFromLine(curLine, 1) - - "have we reached the top of the tree? - if lnum == rootLine - let dir = b:NERDTreeRoot.path.str({'format': 'UI'}) . dir - break - endif - if curLineStripped =~# '/$' - let lpindent = s:indentLevelFor(curLine) - if lpindent < indent - let indent = indent - 1 - - let dir = substitute (curLineStripped,'^\\', "", "") . dir - continue - endif - endif - endwhile - let curFile = b:NERDTreeRoot.path.drive . dir . curFile - let toReturn = s:Path.New(curFile) - return toReturn -endfunction - -"FUNCTION: s:getTreeWinNum() {{{2 -"gets the nerd tree window number for this tab -function! s:getTreeWinNum() - if exists("t:NERDTreeBufName") - return bufwinnr(t:NERDTreeBufName) - else - return -1 - endif -endfunction -"FUNCTION: s:indentLevelFor(line) {{{2 -function! s:indentLevelFor(line) - let level = match(a:line, '[^ \-+~▸▾`|]') / s:tree_wid - " check if line includes arrows - if match(a:line, '[▸▾]') > -1 - " decrement level as arrow uses 3 ascii chars - let level = level - 1 - endif - return level -endfunction -"FUNCTION: s:isTreeOpen() {{{2 -function! s:isTreeOpen() - return s:getTreeWinNum() != -1 -endfunction -"FUNCTION: s:isWindowUsable(winnumber) {{{2 -"Returns 0 if opening a file from the tree in the given window requires it to -"be split, 1 otherwise -" -"Args: -"winnumber: the number of the window in question -function! s:isWindowUsable(winnumber) - "gotta split if theres only one window (i.e. the NERD tree) - if winnr("$") ==# 1 - return 0 - endif - - let oldwinnr = winnr() - call s:exec(a:winnumber . "wincmd p") - let specialWindow = getbufvar("%", '&buftype') != '' || getwinvar('%', '&previewwindow') - let modified = &modified - call s:exec(oldwinnr . "wincmd p") - - "if its a special window e.g. quickfix or another explorer plugin then we - "have to split - if specialWindow - return 0 - endif - - if &hidden - return 1 - endif - - return !modified || s:bufInWindows(winbufnr(a:winnumber)) >= 2 -endfunction - -" FUNCTION: s:jumpToChild(direction) {{{2 -" Args: -" direction: 0 if going to first child, 1 if going to last -function! s:jumpToChild(direction) - let currentNode = s:TreeFileNode.GetSelected() - if currentNode ==# {} || currentNode.isRoot() - call s:echo("cannot jump to " . (a:direction ? "last" : "first") . " child") - return - end - let dirNode = currentNode.parent - let childNodes = dirNode.getVisibleChildren() - - let targetNode = childNodes[0] - if a:direction - let targetNode = childNodes[len(childNodes) - 1] - endif - - if targetNode.equals(currentNode) - let siblingDir = currentNode.parent.findOpenDirSiblingWithVisibleChildren(a:direction) - if siblingDir != {} - let indx = a:direction ? siblingDir.getVisibleChildCount()-1 : 0 - let targetNode = siblingDir.getChildByIndex(indx, 1) - endif - endif - - call targetNode.putCursorHere(1, 0) - - call s:centerView() -endfunction - - -"FUNCTION: s:promptToDelBuffer(bufnum, msg){{{2 -"prints out the given msg and, if the user responds by pushing 'y' then the -"buffer with the given bufnum is deleted -" -"Args: -"bufnum: the buffer that may be deleted -"msg: a message that will be echoed to the user asking them if they wish to -" del the buffer -function! s:promptToDelBuffer(bufnum, msg) - echo a:msg - if nr2char(getchar()) ==# 'y' - exec "silent bdelete! " . a:bufnum - endif -endfunction - -"FUNCTION: s:putCursorOnBookmarkTable(){{{2 -"Places the cursor at the top of the bookmarks table -function! s:putCursorOnBookmarkTable() - if !b:NERDTreeShowBookmarks - throw "NERDTree.IllegalOperationError: cant find bookmark table, bookmarks arent active" - endif - - if g:NERDTreeMinimalUI - return cursor(1, 2) - endif - - let rootNodeLine = s:TreeFileNode.GetRootLineNum() - - let line = 1 - while getline(line) !~# '^>-\+Bookmarks-\+$' - let line = line + 1 - if line >= rootNodeLine - throw "NERDTree.BookmarkTableNotFoundError: didnt find the bookmarks table" - endif - endwhile - call cursor(line, 2) -endfunction - -"FUNCTION: s:putCursorInTreeWin(){{{2 -"Places the cursor in the nerd tree window -function! s:putCursorInTreeWin() - if !s:isTreeOpen() - throw "NERDTree.InvalidOperationError: cant put cursor in NERD tree window, no window exists" - endif - - call s:exec(s:getTreeWinNum() . "wincmd w") -endfunction - -"FUNCTION: s:renderBookmarks {{{2 -function! s:renderBookmarks() - - if g:NERDTreeMinimalUI == 0 - call setline(line(".")+1, ">----------Bookmarks----------") - call cursor(line(".")+1, col(".")) - endif - - for i in s:Bookmark.Bookmarks() - call setline(line(".")+1, i.str()) - call cursor(line(".")+1, col(".")) - endfor - - call setline(line(".")+1, '') - call cursor(line(".")+1, col(".")) -endfunction -"FUNCTION: s:renderView {{{2 -"The entry function for rendering the tree -function! s:renderView() - setlocal modifiable - - "remember the top line of the buffer and the current line so we can - "restore the view exactly how it was - let curLine = line(".") - let curCol = col(".") - let topLine = line("w0") - - "delete all lines in the buffer (being careful not to clobber a register) - silent 1,$delete _ - - call s:dumpHelp() - - "delete the blank line before the help and add one after it - if g:NERDTreeMinimalUI == 0 - call setline(line(".")+1, "") - call cursor(line(".")+1, col(".")) - endif - - if b:NERDTreeShowBookmarks - call s:renderBookmarks() - endif - - "add the 'up a dir' line - if !g:NERDTreeMinimalUI - call setline(line(".")+1, s:tree_up_dir_line) - call cursor(line(".")+1, col(".")) - endif - - "draw the header line - let header = b:NERDTreeRoot.path.str({'format': 'UI', 'truncateTo': winwidth(0)}) - call setline(line(".")+1, header) - call cursor(line(".")+1, col(".")) - - "draw the tree - let old_o = @o - let @o = b:NERDTreeRoot.renderToString() - silent put o - let @o = old_o - - "delete the blank line at the top of the buffer - silent 1,1delete _ - - "restore the view - let old_scrolloff=&scrolloff - let &scrolloff=0 - call cursor(topLine, 1) - normal! zt - call cursor(curLine, curCol) - let &scrolloff = old_scrolloff - - setlocal nomodifiable -endfunction - -"FUNCTION: s:renderViewSavingPosition {{{2 -"Renders the tree and ensures the cursor stays on the current node or the -"current nodes parent if it is no longer available upon re-rendering -function! s:renderViewSavingPosition() - let currentNode = s:TreeFileNode.GetSelected() - - "go up the tree till we find a node that will be visible or till we run - "out of nodes - while currentNode != {} && !currentNode.isVisible() && !currentNode.isRoot() - let currentNode = currentNode.parent - endwhile - - call s:renderView() - - if currentNode != {} - call currentNode.putCursorHere(0, 0) - endif -endfunction -"FUNCTION: s:restoreScreenState() {{{2 -" -"Sets the screen state back to what it was when s:saveScreenState was last -"called. -" -"Assumes the cursor is in the NERDTree window -function! s:restoreScreenState() - if !exists("b:NERDTreeOldTopLine") || !exists("b:NERDTreeOldPos") || !exists("b:NERDTreeOldWindowSize") - return - endif - exec("silent vertical resize ".b:NERDTreeOldWindowSize) - - let old_scrolloff=&scrolloff - let &scrolloff=0 - call cursor(b:NERDTreeOldTopLine, 0) - normal! zt - call setpos(".", b:NERDTreeOldPos) - let &scrolloff=old_scrolloff -endfunction - -"FUNCTION: s:saveScreenState() {{{2 -"Saves the current cursor position in the current buffer and the window -"scroll position -function! s:saveScreenState() - let win = winnr() - try - call s:putCursorInTreeWin() - let b:NERDTreeOldPos = getpos(".") - let b:NERDTreeOldTopLine = line("w0") - let b:NERDTreeOldWindowSize = winwidth("") - call s:exec(win . "wincmd w") - catch /^NERDTree.InvalidOperationError/ - endtry -endfunction - -"FUNCTION: s:setCommonBufOptions() {{{2 -function! s:setCommonBufOptions() - "throwaway buffer options - setlocal noswapfile - setlocal buftype=nofile - setlocal bufhidden=hide - setlocal nowrap - setlocal foldcolumn=0 - setlocal nobuflisted - setlocal nospell - if g:NERDTreeShowLineNumbers - setlocal nu - else - setlocal nonu - if v:version >= 703 - setlocal nornu - endif - endif - - iabc - - if g:NERDTreeHighlightCursorline - setlocal cursorline - endif - - call s:setupStatusline() - - - let b:treeShowHelp = 0 - let b:NERDTreeIgnoreEnabled = 1 - let b:NERDTreeShowFiles = g:NERDTreeShowFiles - let b:NERDTreeShowHidden = g:NERDTreeShowHidden - let b:NERDTreeShowBookmarks = g:NERDTreeShowBookmarks - setfiletype nerdtree - call s:bindMappings() -endfunction - -"FUNCTION: s:setupStatusline() {{{2 -function! s:setupStatusline() - if g:NERDTreeStatusline != -1 - let &l:statusline = g:NERDTreeStatusline - endif -endfunction -"FUNCTION: s:stripMarkupFromLine(line, removeLeadingSpaces){{{2 -"returns the given line with all the tree parts stripped off -" -"Args: -"line: the subject line -"removeLeadingSpaces: 1 if leading spaces are to be removed (leading spaces = -"any spaces before the actual text of the node) -function! s:stripMarkupFromLine(line, removeLeadingSpaces) - let line = a:line - "remove the tree parts and the leading space - let line = substitute (line, s:tree_markup_reg,"","") - - "strip off any read only flag - let line = substitute (line, ' \[RO\]', "","") - - "strip off any bookmark flags - let line = substitute (line, ' {[^}]*}', "","") - - "strip off any executable flags - let line = substitute (line, '*\ze\($\| \)', "","") - - let wasdir = 0 - if line =~# '/$' - let wasdir = 1 - endif - let line = substitute (line,' -> .*',"","") " remove link to - if wasdir ==# 1 - let line = substitute (line, '/\?$', '/', "") - endif - - if a:removeLeadingSpaces - let line = substitute (line, '^ *', '', '') - endif - - return line -endfunction - -"FUNCTION: s:toggle(dir) {{{2 -"Toggles the NERD tree. I.e the NERD tree is open, it is closed, if it is -"closed it is restored or initialized (if it doesnt exist) -" -"Args: -"dir: the full path for the root node (is only used if the NERD tree is being -"initialized. -function! s:toggle(dir) - if s:treeExistsForTab() - if !s:isTreeOpen() - call s:createTreeWin() - if !&hidden - call s:renderView() - endif - call s:restoreScreenState() - else - call s:closeTree() - endif - else - call s:initNerdTree(a:dir) - endif -endfunction -"SECTION: Interface bindings {{{1 -"============================================================ -"FUNCTION: s:activateNode(forceKeepWindowOpen) {{{2 -"If the current node is a file, open it in the previous window (or a new one -"if the previous is modified). If it is a directory then it is opened. -" -"args: -"forceKeepWindowOpen - dont close the window even if NERDTreeQuitOnOpen is set -function! s:activateNode(forceKeepWindowOpen) - if getline(".") ==# s:tree_up_dir_line - return s:upDir(0) - endif - - let treenode = s:TreeFileNode.GetSelected() - if treenode != {} - call treenode.activate(a:forceKeepWindowOpen) - else - let bookmark = s:Bookmark.GetSelected() - if !empty(bookmark) - call bookmark.activate() - endif - endif -endfunction - -"FUNCTION: s:bindMappings() {{{2 -function! s:bindMappings() - " set up mappings and commands for this buffer - nnoremap :call handleMiddleMouse() - nnoremap :call checkForActivate() - nnoremap <2-leftmouse> :call activateNode(0) - - exec "nnoremap ". g:NERDTreeMapActivateNode . " :call activateNode(0)" - exec "nnoremap ". g:NERDTreeMapOpenSplit ." :call openEntrySplit(0,0)" - exec "nnoremap :call activateNode(0)" - - exec "nnoremap ". g:NERDTreeMapPreview ." :call previewNode(0)" - exec "nnoremap ". g:NERDTreeMapPreviewSplit ." :call previewNode(1)" - - exec "nnoremap ". g:NERDTreeMapOpenVSplit ." :call openEntrySplit(1,0)" - exec "nnoremap ". g:NERDTreeMapPreviewVSplit ." :call previewNode(2)" - - exec "nnoremap ". g:NERDTreeMapOpenRecursively ." :call openNodeRecursively()" - - exec "nnoremap ". g:NERDTreeMapUpdirKeepOpen ." :call upDir(1)" - exec "nnoremap ". g:NERDTreeMapUpdir ." :call upDir(0)" - exec "nnoremap ". g:NERDTreeMapChangeRoot ." :call chRoot()" - - exec "nnoremap ". g:NERDTreeMapChdir ." :call chCwd()" - - exec "nnoremap ". g:NERDTreeMapQuit ." :call closeTreeWindow()" - - exec "nnoremap ". g:NERDTreeMapRefreshRoot ." :call refreshRoot()" - exec "nnoremap ". g:NERDTreeMapRefresh ." :call refreshCurrent()" - - exec "nnoremap ". g:NERDTreeMapHelp ." :call displayHelp()" - exec "nnoremap ". g:NERDTreeMapToggleZoom ." :call toggleZoom()" - exec "nnoremap ". g:NERDTreeMapToggleHidden ." :call toggleShowHidden()" - exec "nnoremap ". g:NERDTreeMapToggleFilters ." :call toggleIgnoreFilter()" - exec "nnoremap ". g:NERDTreeMapToggleFiles ." :call toggleShowFiles()" - exec "nnoremap ". g:NERDTreeMapToggleBookmarks ." :call toggleShowBookmarks()" - - exec "nnoremap ". g:NERDTreeMapCloseDir ." :call closeCurrentDir()" - exec "nnoremap ". g:NERDTreeMapCloseChildren ." :call closeChildren()" - - exec "nnoremap ". g:NERDTreeMapMenu ." :call showMenu()" - - exec "nnoremap ". g:NERDTreeMapJumpParent ." :call jumpToParent()" - exec "nnoremap ". g:NERDTreeMapJumpNextSibling ." :call jumpToSibling(1)" - exec "nnoremap ". g:NERDTreeMapJumpPrevSibling ." :call jumpToSibling(0)" - exec "nnoremap ". g:NERDTreeMapJumpFirstChild ." :call jumpToFirstChild()" - exec "nnoremap ". g:NERDTreeMapJumpLastChild ." :call jumpToLastChild()" - exec "nnoremap ". g:NERDTreeMapJumpRoot ." :call jumpToRoot()" - - exec "nnoremap ". g:NERDTreeMapOpenInTab ." :call openInNewTab(0)" - exec "nnoremap ". g:NERDTreeMapOpenInTabSilent ." :call openInNewTab(1)" - - exec "nnoremap ". g:NERDTreeMapOpenExpl ." :call openExplorer()" - - exec "nnoremap ". g:NERDTreeMapDeleteBookmark ." :call deleteBookmark()" - - "bind all the user custom maps - call s:KeyMap.BindAll() - - command! -buffer -nargs=? Bookmark :call bookmarkNode('') - command! -buffer -complete=customlist,s:completeBookmarks -nargs=1 RevealBookmark :call revealBookmark('') - command! -buffer -complete=customlist,s:completeBookmarks -nargs=1 OpenBookmark :call openBookmark('') - command! -buffer -complete=customlist,s:completeBookmarks -nargs=* ClearBookmarks call clearBookmarks('') - command! -buffer -complete=customlist,s:completeBookmarks -nargs=+ BookmarkToRoot call s:Bookmark.ToRoot('') - command! -buffer -nargs=0 ClearAllBookmarks call s:Bookmark.ClearAll() call renderView() - command! -buffer -nargs=0 ReadBookmarks call s:Bookmark.CacheBookmarks(0) call renderView() - command! -buffer -nargs=0 WriteBookmarks call s:Bookmark.Write() -endfunction - -" FUNCTION: s:bookmarkNode(name) {{{2 -" Associate the current node with the given name -function! s:bookmarkNode(...) - let currentNode = s:TreeFileNode.GetSelected() - if currentNode != {} - let name = a:1 - if empty(name) - let name = currentNode.path.getLastPathComponent(0) - endif - try - call currentNode.bookmark(name) - call s:renderView() - catch /^NERDTree.IllegalBookmarkNameError/ - call s:echo("bookmark names must not contain spaces") - endtry - else - call s:echo("select a node first") - endif -endfunction -"FUNCTION: s:checkForActivate() {{{2 -"Checks if the click should open the current node, if so then activate() is -"called (directories are automatically opened if the symbol beside them is -"clicked) -function! s:checkForActivate() - let currentNode = s:TreeFileNode.GetSelected() - if currentNode != {} - let startToCur = strpart(getline(line(".")), 0, col(".")) - - if currentNode.path.isDirectory - if startToCur =~# s:tree_markup_reg . '$' && startToCur =~# '[+~▾▸]$' - call s:activateNode(0) - return - endif - endif - - if (g:NERDTreeMouseMode ==# 2 && currentNode.path.isDirectory) || g:NERDTreeMouseMode ==# 3 - let char = strpart(startToCur, strlen(startToCur)-1, 1) - if char !~# s:tree_markup_reg - call s:activateNode(0) - return - endif - endif - endif -endfunction - -" FUNCTION: s:chCwd() {{{2 -function! s:chCwd() - let treenode = s:TreeFileNode.GetSelected() - if treenode ==# {} - call s:echo("Select a node first") - return - endif - - try - call treenode.path.changeToDir() - catch /^NERDTree.PathChangeError/ - call s:echoWarning("could not change cwd") - endtry -endfunction - -" FUNCTION: s:chRoot() {{{2 -" changes the current root to the selected one -function! s:chRoot() - let treenode = s:TreeFileNode.GetSelected() - if treenode ==# {} - call s:echo("Select a node first") - return - endif - - call treenode.makeRoot() - call s:renderView() - call b:NERDTreeRoot.putCursorHere(0, 0) -endfunction - -" FUNCTION: s:clearBookmarks(bookmarks) {{{2 -function! s:clearBookmarks(bookmarks) - if a:bookmarks ==# '' - let currentNode = s:TreeFileNode.GetSelected() - if currentNode != {} - call currentNode.clearBoomarks() - endif - else - for name in split(a:bookmarks, ' ') - let bookmark = s:Bookmark.BookmarkFor(name) - call bookmark.delete() - endfor - endif - call s:renderView() -endfunction -" FUNCTION: s:closeChildren() {{{2 -" closes all childnodes of the current node -function! s:closeChildren() - let currentNode = s:TreeDirNode.GetSelected() - if currentNode ==# {} - call s:echo("Select a node first") - return - endif - - call currentNode.closeChildren() - call s:renderView() - call currentNode.putCursorHere(0, 0) -endfunction -" FUNCTION: s:closeCurrentDir() {{{2 -" closes the parent dir of the current node -function! s:closeCurrentDir() - let treenode = s:TreeFileNode.GetSelected() - if treenode ==# {} - call s:echo("Select a node first") - return - endif - - let parent = treenode.parent - if parent ==# {} || parent.isRoot() - call s:echo("cannot close tree root") - else - call treenode.parent.close() - call s:renderView() - call treenode.parent.putCursorHere(0, 0) - endif -endfunction -" FUNCTION: s:closeTreeWindow() {{{2 -" close the tree window -function! s:closeTreeWindow() - if b:NERDTreeType ==# "secondary" && b:NERDTreePreviousBuf != -1 - exec "buffer " . b:NERDTreePreviousBuf - else - if winnr("$") > 1 - call s:closeTree() - else - call s:echo("Cannot close last window") - endif - endif -endfunction -" FUNCTION: s:deleteBookmark() {{{2 -" if the cursor is on a bookmark, prompt to delete -function! s:deleteBookmark() - let bookmark = s:Bookmark.GetSelected() - if bookmark ==# {} - call s:echo("Put the cursor on a bookmark") - return - endif - - echo "Are you sure you wish to delete the bookmark:\n\"" . bookmark.name . "\" (yN):" - - if nr2char(getchar()) ==# 'y' - try - call bookmark.delete() - call s:renderView() - redraw - catch /^NERDTree/ - call s:echoWarning("Could not remove bookmark") - endtry - else - call s:echo("delete aborted" ) - endif - -endfunction - -" FUNCTION: s:displayHelp() {{{2 -" toggles the help display -function! s:displayHelp() - let b:treeShowHelp = b:treeShowHelp ? 0 : 1 - call s:renderView() - call s:centerView() -endfunction - -" FUNCTION: s:handleMiddleMouse() {{{2 -function! s:handleMiddleMouse() - let curNode = s:TreeFileNode.GetSelected() - if curNode ==# {} - call s:echo("Put the cursor on a node first" ) - return - endif - - if curNode.path.isDirectory - call s:openExplorer() - else - call s:openEntrySplit(0,0) - endif -endfunction - - -" FUNCTION: s:jumpToFirstChild() {{{2 -" wrapper for the jump to child method -function! s:jumpToFirstChild() - call s:jumpToChild(0) -endfunction - -" FUNCTION: s:jumpToLastChild() {{{2 -" wrapper for the jump to child method -function! s:jumpToLastChild() - call s:jumpToChild(1) -endfunction - -" FUNCTION: s:jumpToParent() {{{2 -" moves the cursor to the parent of the current node -function! s:jumpToParent() - let currentNode = s:TreeFileNode.GetSelected() - if !empty(currentNode) - if !empty(currentNode.parent) - call currentNode.parent.putCursorHere(1, 0) - call s:centerView() - else - call s:echo("cannot jump to parent") - endif - else - call s:echo("put the cursor on a node first") - endif -endfunction - -" FUNCTION: s:jumpToRoot() {{{2 -" moves the cursor to the root node -function! s:jumpToRoot() - call b:NERDTreeRoot.putCursorHere(1, 0) - call s:centerView() -endfunction - -" FUNCTION: s:jumpToSibling() {{{2 -" moves the cursor to the sibling of the current node in the given direction -" -" Args: -" forward: 1 if the cursor should move to the next sibling, 0 if it should -" move back to the previous sibling -function! s:jumpToSibling(forward) - let currentNode = s:TreeFileNode.GetSelected() - if !empty(currentNode) - let sibling = currentNode.findSibling(a:forward) - - if !empty(sibling) - call sibling.putCursorHere(1, 0) - call s:centerView() - endif - else - call s:echo("put the cursor on a node first") - endif -endfunction - -" FUNCTION: s:openBookmark(name) {{{2 -" put the cursor on the given bookmark and, if its a file, open it -function! s:openBookmark(name) - try - let targetNode = s:Bookmark.GetNodeForName(a:name, 0) - call targetNode.putCursorHere(0, 1) - redraw! - catch /^NERDTree.BookmarkedNodeNotFoundError/ - call s:echo("note - target node is not cached") - let bookmark = s:Bookmark.BookmarkFor(a:name) - let targetNode = s:TreeFileNode.New(bookmark.path) - endtry - if targetNode.path.isDirectory - call targetNode.openExplorer() - else - call targetNode.open() - endif -endfunction -" FUNCTION: s:openEntrySplit(vertical, forceKeepWindowOpen) {{{2 -"Opens the currently selected file from the explorer in a -"new window -" -"args: -"forceKeepWindowOpen - dont close the window even if NERDTreeQuitOnOpen is set -function! s:openEntrySplit(vertical, forceKeepWindowOpen) - let treenode = s:TreeFileNode.GetSelected() - if treenode != {} - if a:vertical - call treenode.openVSplit() - else - call treenode.openSplit() - endif - if !a:forceKeepWindowOpen - call s:closeTreeIfQuitOnOpen() - endif - else - call s:echo("select a node first") - endif -endfunction - -" FUNCTION: s:openExplorer() {{{2 -function! s:openExplorer() - let treenode = s:TreeDirNode.GetSelected() - if treenode != {} - call treenode.openExplorer() - else - call s:echo("select a node first") - endif -endfunction - -" FUNCTION: s:openInNewTab(stayCurrentTab) {{{2 -" Opens the selected node or bookmark in a new tab -" Args: -" stayCurrentTab: if 1 then vim will stay in the current tab, if 0 then vim -" will go to the tab where the new file is opened -function! s:openInNewTab(stayCurrentTab) - let target = s:TreeFileNode.GetSelected() - if target == {} - let target = s:Bookmark.GetSelected() - endif - - if target != {} - call target.openInNewTab({'stayInCurrentTab': a:stayCurrentTab}) - endif -endfunction - -" FUNCTION: s:openNodeRecursively() {{{2 -function! s:openNodeRecursively() - let treenode = s:TreeFileNode.GetSelected() - if treenode ==# {} || treenode.path.isDirectory ==# 0 - call s:echo("Select a directory node first" ) - else - call s:echo("Recursively opening node. Please wait...") - call treenode.openRecursively() - call s:renderView() - redraw - call s:echo("Recursively opening node. Please wait... DONE") - endif - -endfunction - -"FUNCTION: s:previewNode() {{{2 -"Args: -" openNewWin: if 0, use the previous window, if 1 open in new split, if 2 -" open in a vsplit -function! s:previewNode(openNewWin) - let currentBuf = bufnr("") - if a:openNewWin > 0 - call s:openEntrySplit(a:openNewWin ==# 2,1) - else - call s:activateNode(1) - end - call s:exec(bufwinnr(currentBuf) . "wincmd w") -endfunction - -" FUNCTION: s:revealBookmark(name) {{{2 -" put the cursor on the node associate with the given name -function! s:revealBookmark(name) - try - let targetNode = s:Bookmark.GetNodeForName(a:name, 0) - call targetNode.putCursorHere(0, 1) - catch /^NERDTree.BookmarkNotFoundError/ - call s:echo("Bookmark isnt cached under the current root") - endtry -endfunction -" FUNCTION: s:refreshRoot() {{{2 -" Reloads the current root. All nodes below this will be lost and the root dir -" will be reloaded. -function! s:refreshRoot() - call s:echo("Refreshing the root node. This could take a while...") - call b:NERDTreeRoot.refresh() - call s:renderView() - redraw - call s:echo("Refreshing the root node. This could take a while... DONE") -endfunction - -" FUNCTION: s:refreshCurrent() {{{2 -" refreshes the root for the current node -function! s:refreshCurrent() - let treenode = s:TreeDirNode.GetSelected() - if treenode ==# {} - call s:echo("Refresh failed. Select a node first") - return - endif - - call s:echo("Refreshing node. This could take a while...") - call treenode.refresh() - call s:renderView() - redraw - call s:echo("Refreshing node. This could take a while... DONE") -endfunction -" FUNCTION: s:showMenu() {{{2 -function! s:showMenu() - let curNode = s:TreeFileNode.GetSelected() - if curNode ==# {} - call s:echo("Put the cursor on a node first" ) - return - endif - - let mc = s:MenuController.New(s:MenuItem.AllEnabled()) - call mc.showMenu() -endfunction - -" FUNCTION: s:toggleIgnoreFilter() {{{2 -" toggles the use of the NERDTreeIgnore option -function! s:toggleIgnoreFilter() - let b:NERDTreeIgnoreEnabled = !b:NERDTreeIgnoreEnabled - call s:renderViewSavingPosition() - call s:centerView() -endfunction - -" FUNCTION: s:toggleShowBookmarks() {{{2 -" toggles the display of bookmarks -function! s:toggleShowBookmarks() - let b:NERDTreeShowBookmarks = !b:NERDTreeShowBookmarks - if b:NERDTreeShowBookmarks - call s:renderView() - call s:putCursorOnBookmarkTable() - else - call s:renderViewSavingPosition() - endif - call s:centerView() -endfunction -" FUNCTION: s:toggleShowFiles() {{{2 -" toggles the display of hidden files -function! s:toggleShowFiles() - let b:NERDTreeShowFiles = !b:NERDTreeShowFiles - call s:renderViewSavingPosition() - call s:centerView() -endfunction - -" FUNCTION: s:toggleShowHidden() {{{2 -" toggles the display of hidden files -function! s:toggleShowHidden() - let b:NERDTreeShowHidden = !b:NERDTreeShowHidden - call s:renderViewSavingPosition() - call s:centerView() -endfunction - -" FUNCTION: s:toggleZoom() {{2 -" zoom (maximize/minimize) the NERDTree window -function! s:toggleZoom() - if exists("b:NERDTreeZoomed") && b:NERDTreeZoomed - let size = exists("b:NERDTreeOldWindowSize") ? b:NERDTreeOldWindowSize : g:NERDTreeWinSize - exec "silent vertical resize ". size - let b:NERDTreeZoomed = 0 - else - exec "vertical resize" - let b:NERDTreeZoomed = 1 - endif -endfunction - -"FUNCTION: s:upDir(keepState) {{{2 -"moves the tree up a level -" -"Args: -"keepState: 1 if the current root should be left open when the tree is -"re-rendered -function! s:upDir(keepState) - let cwd = b:NERDTreeRoot.path.str({'format': 'UI'}) - if cwd ==# "/" || cwd =~# '^[^/]..$' - call s:echo("already at top dir") - else - if !a:keepState - call b:NERDTreeRoot.close() - endif - - let oldRoot = b:NERDTreeRoot - - if empty(b:NERDTreeRoot.parent) - let path = b:NERDTreeRoot.path.getParent() - let newRoot = s:TreeDirNode.New(path) - call newRoot.open() - call newRoot.transplantChild(b:NERDTreeRoot) - let b:NERDTreeRoot = newRoot - else - let b:NERDTreeRoot = b:NERDTreeRoot.parent - endif - - if g:NERDTreeChDirMode ==# 2 - call b:NERDTreeRoot.path.changeToDir() - endif - - call s:renderView() - call oldRoot.putCursorHere(0, 0) - endif -endfunction - - -"reset &cpo back to users setting -let &cpo = s:old_cpo - -" vim: set sw=4 sts=4 et fdm=marker: diff --git a/syntax/nerdtree.vim b/syntax/nerdtree.vim deleted file mode 100644 index 636d2af..0000000 --- a/syntax/nerdtree.vim +++ /dev/null @@ -1,88 +0,0 @@ -let s:tree_up_dir_line = '.. (up a dir)' -"NERDTreeFlags are syntax items that should be invisible, but give clues as to -"how things should be highlighted -syn match NERDTreeFlag #\~# -syn match NERDTreeFlag #\[RO\]# - -"highlighting for the .. (up dir) line at the top of the tree -execute "syn match NERDTreeUp #\\V". s:tree_up_dir_line ."#" - -"highlighting for the ~/+ symbols for the directory nodes -syn match NERDTreeClosable #\~\<# -syn match NERDTreeClosable #\~\.# -syn match NERDTreeOpenable #+\<# -syn match NERDTreeOpenable #+\.#he=e-1 - -"highlighting for the tree structural parts -syn match NERDTreePart #|# -syn match NERDTreePart #`# -syn match NERDTreePartFile #[|`]-#hs=s+1 contains=NERDTreePart - -"quickhelp syntax elements -syn match NERDTreeHelpKey #" \{1,2\}[^ ]*:#hs=s+2,he=e-1 -syn match NERDTreeHelpKey #" \{1,2\}[^ ]*,#hs=s+2,he=e-1 -syn match NERDTreeHelpTitle #" .*\~#hs=s+2,he=e-1 contains=NERDTreeFlag -syn match NERDTreeToggleOn #".*(on)#hs=e-2,he=e-1 contains=NERDTreeHelpKey -syn match NERDTreeToggleOff #".*(off)#hs=e-3,he=e-1 contains=NERDTreeHelpKey -syn match NERDTreeHelpCommand #" :.\{-}\>#hs=s+3 -syn match NERDTreeHelp #^".*# contains=NERDTreeHelpKey,NERDTreeHelpTitle,NERDTreeFlag,NERDTreeToggleOff,NERDTreeToggleOn,NERDTreeHelpCommand - -"highlighting for readonly files -syn match NERDTreeRO #.*\[RO\]#hs=s+2 contains=NERDTreeFlag,NERDTreeBookmark,NERDTreePart,NERDTreePartFile - -"highlighting for sym links -syn match NERDTreeLink #[^-| `].* -> # contains=NERDTreeBookmark,NERDTreeOpenable,NERDTreeClosable,NERDTreeDirSlash - -"highlighing for directory nodes and file nodes -syn match NERDTreeDirSlash #/# -syn match NERDTreeDir #[^-| `].*/# contains=NERDTreeLink,NERDTreeDirSlash,NERDTreeOpenable,NERDTreeClosable -syn match NERDTreeExecFile #[|` ].*\*\($\| \)# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark -syn match NERDTreeFile #|-.*# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile -syn match NERDTreeFile #`-.*# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile -syn match NERDTreeCWD #^[# -syn match NERDTreeBookmarksHeader #^>-\+Bookmarks-\+$# contains=NERDTreeBookmarksLeader -syn match NERDTreeBookmarkName #^>.\{-} #he=e-1 contains=NERDTreeBookmarksLeader -syn match NERDTreeBookmark #^>.*$# contains=NERDTreeBookmarksLeader,NERDTreeBookmarkName,NERDTreeBookmarksHeader - -if exists("g:NERDChristmasTree") && g:NERDChristmasTree - hi def link NERDTreePart Special - hi def link NERDTreePartFile Type - hi def link NERDTreeFile Normal - hi def link NERDTreeExecFile Title - hi def link NERDTreeDirSlash Identifier - hi def link NERDTreeClosable Type -else - hi def link NERDTreePart Normal - hi def link NERDTreePartFile Normal - hi def link NERDTreeFile Normal - hi def link NERDTreeClosable Title -endif - -hi def link NERDTreeBookmarksHeader statement -hi def link NERDTreeBookmarksLeader ignore -hi def link NERDTreeBookmarkName Identifier -hi def link NERDTreeBookmark normal - -hi def link NERDTreeHelp String -hi def link NERDTreeHelpKey Identifier -hi def link NERDTreeHelpCommand Identifier -hi def link NERDTreeHelpTitle Macro -hi def link NERDTreeToggleOn Question -hi def link NERDTreeToggleOff WarningMsg - -hi def link NERDTreeDir Directory -hi def link NERDTreeUp Directory -hi def link NERDTreeCWD Statement -hi def link NERDTreeLink Macro -hi def link NERDTreeOpenable Title -hi def link NERDTreeFlag ignore -hi def link NERDTreeRO WarningMsg -hi def link NERDTreeBookmark Statement - -hi def link NERDTreeCurrentNode Search diff --git a/vimrc b/vimrc deleted file mode 100644 index 006d3f7..0000000 --- a/vimrc +++ /dev/null @@ -1,600 +0,0 @@ -" mReschke Personal Debian based Vimrc -" 2015-03-02 - -" All system-wide defaults are set in $VIMRUNTIME/debian.vim and sourced by -" the call to :runtime you can find below. If you wish to change any of those -" settings, you should do it in this file (/etc/vim/vimrc), since debian.vim -" will be overwritten everytime an upgrade of the vim packages is performed. -" It is recommended to make changes after sourcing debian.vim since it alters -" the value of the 'compatible' option. - -" This line should not be removed as it ensures that various options are -" properly set to work with the Vim-related packages available in Debian. -runtime! debian.vim - -" Uncomment the next line to make Vim more Vi-compatible -" NOTE: debian.vim sets 'nocompatible'. Setting 'compatible' changes numerous -" options, so any other options should be set AFTER setting 'compatible'. -"set compatible - -" Source a global configuration file if available -if filereadable("/etc/vim/vimrc.local") - source /etc/vim/vimrc.local -endif - -" Use pathogen to easily modify the runtime path to include all plugins under -" the ~/.vim/bundle directory -filetype off " force reloading *after* pathogen loaded -call pathogen#infect() -call pathogen#helptags() -filetype plugin indent on " enable detection, plugins and indenting in one step -syntax on - -" Change the mapleader from \ to , -let mapleader="," -let maplocalleader="\\" - -" Editing behaviour {{{ -set showmode " always show what mode we're currently editing in -set nowrap " don't wrap lines - -set tabstop=4 " a tab is four spaces"set softtabstop=4 -set softtabstop=4 " when hitting , pretend like a tab is removed, even if spaces -set expandtab " expand tabs by default (overloadable per file type later) -set shiftwidth=4 " number of spaces to use for autoindenting -set shiftround " use multiple of shiftwidth when indenting with '<' and '>' - -set backspace=indent,eol,start " allow backspacing over everything in insert mode -set autoindent " always set autoindenting on -set copyindent " copy the previous indentation on autoindenting -set number " always show line numbers -set showmatch " set show matching parenthesis -set ignorecase " ignore case when searching -set smartcase " ignore case if search pattern is all lowercase, - " case-sensitive otherwise -set smarttab " insert tabs on the start of a line according to - " shiftwidth, not tabstop -set scrolloff=4 " keep 4 lines off the edges of the screen when scrolling -"set virtualedit=all " allow the cursor to go in to "invalid" places -set hlsearch " highlight search terms -set incsearch " show search matches as you type -set gdefault " search/replace "globally" (on a line) by default -set listchars=tab:▸\ ,trail:·,extends:#,nbsp:· - -set nolist " don't show invisible characters by default, - " but it is enabled for some file types (see later) -set pastetoggle= " when in insert mode, press to go to - " paste mode, where you can paste mass data - " that won't be autoindented -set mouse=a " enable using the mouse if terminal emulator - " supports it (xterm does) -set fileformats="unix,dos,mac" -set formatoptions+=1 " When wrapping paragraphs, don't end lines - " with 1-letter words (looks stupid) - -set nrformats= " make and play well with - " zero-padded numbers (i.e. don't consider - " them octal or hex) - -set shortmess+=I " hide the launch screen -set clipboard=unnamed " normal OS clipboard interaction -set autoread " automatically reload files changed outside of Vim -"set autowrite " automatically save file on buffer switch - -" Toggle show/hide invisible chars -nnoremap i :set list! - -" Toggle line numbers -nnoremap N :setlocal number! - -" Thanks to Steve Losh for this liberating tip -" See http://stevelosh.com/blog/2010/09/coming-home-to-vim -nnoremap / /\v -vnoremap / /\v - -" Speed up scrolling of the viewport slightly -nnoremap 2 -nnoremap 2 -" }}} - -" Folding rules {{{ -set foldenable " enable folding -set foldcolumn=2 " add a fold column -set foldmethod=marker " detect triple-{ style fold markers -set foldlevelstart=99 " start out with everything unfolded -set foldopen=block,hor,insert,jump,mark,percent,quickfix,search,tag,undo - " which commands trigger auto-unfold -let php_folding=1 - -function! MyFoldText() - let line = getline(v:foldstart) - - let nucolwidth = &fdc + &number * &numberwidth - let windowwidth = winwidth(0) - nucolwidth - 3 - let foldedlinecount = v:foldend - v:foldstart - - " expand tabs into spaces - let onetab = strpart(' ', 0, &tabstop) - let line = substitute(line, '\t', onetab, 'g') - - let line = strpart(line, 0, windowwidth - 2 -len(foldedlinecount)) - let fillcharcount = windowwidth - len(line) - len(foldedlinecount) - 4 - return line . ' …' . repeat(" ",fillcharcount) . foldedlinecount . ' ' -endfunction -set foldtext=MyFoldText() - -" Mappings to easily toggle fold levels -nnoremap z0 :set foldlevel=0 -nnoremap z1 :set foldlevel=1 -nnoremap z2 :set foldlevel=2 -nnoremap z3 :set foldlevel=3 -nnoremap z4 :set foldlevel=4 -nnoremap z5 :set foldlevel=5 -nnoremap za -vnoremap za -" }}} - -" Editor layout {{{ -set termencoding=utf-8 -set encoding=utf-8 -set lazyredraw " don't update the display while executing macros -set laststatus=2 " tell VIM to always put a status line in, even - " if there is only one window -"set cmdheight=2 " use a status bar that is 2 rows high -" }}} - -" Vim behaviour {{{ -set hidden " hide buffers instead of closing them this - " means that the current buffer can be put - " to background without being written; and - " that marks and undo history are preserved -set switchbuf=useopen " reveal already opened files from the - " quickfix window instead of opening new - " buffers -set history=1000 " remember more commands and search history -set undolevels=1000 " use many muchos levels of undo -if v:version >= 730 - set undofile " keep a persistent backup file - set undodir=~/.vim/.undo,~/tmp,/tmp -endif -set nobackup " do not keep backup files, it's 70's style cluttering -set noswapfile " do not write annoying intermediate swap files, - " who did ever restore from swap files anyway? -set directory=~/.vim/.tmp,~/tmp,/tmp - " store swap files in one of these directories - " (in case swapfile is ever turned on) -set viminfo='20,\"80 " read/write a .viminfo file, don't store more - " than 80 lines of registers -set wildmenu " make tab completion for files/buffers act like bash -set wildmode=list:full " show a list when pressing tab and complete - " first full match -set wildignore=*.swp,*.bak,*.pyc,*.class -set title " change the terminal's title -set visualbell " don't beep -set noerrorbells " don't beep -set showcmd " show (partial) command in the last line of the screen - " this also shows visual selection info -set nomodeline " disable mode lines (security measure) -"set ttyfast " always use a fast terminal -"set cursorline " underline the current line, for quick orientation -" }}} - - -" Toggle the quickfix window {{{ -" From Steve Losh, http://learnvimscriptthehardway.stevelosh.com/chapters/38.html -nnoremap :call QuickfixToggle() - -let g:quickfix_is_open = 0 - -function! s:QuickfixToggle() - if g:quickfix_is_open - cclose - let g:quickfix_is_open = 0 - execute g:quickfix_return_to_window . "wincmd w" - else - let g:quickfix_return_to_window = winnr() - copen - let g:quickfix_is_open = 1 - endif -endfunction -" }}} - -" Toggle the foldcolumn {{{ -nnoremap f :call FoldColumnToggle() - -let g:last_fold_column_width = 4 " Pick a sane default for the foldcolumn - -function! FoldColumnToggle() - if &foldcolumn - let g:last_fold_column_width = &foldcolumn - setlocal foldcolumn=0 - else - let &l:foldcolumn = g:last_fold_column_width - endif -endfunction -" }}} - -" Highlighting {{{ -if &t_Co > 2 || has("gui_running") - syntax on " switch syntax highlighting on, when the terminal has colors -endif -" }}} - -" Shortcut mappings {{{ -" Since I never use the ; key anyway, this is a real optimization for almost -" all Vim commands, as I don't have to press the Shift key to form chords to -" enter ex mode. -nnoremap ; : -nnoremap ; ; - -" Avoid accidental hits of while aiming for -noremap! - -nnoremap Q :q " Quickly close the current window -nnoremap q :bd " Quickly close the current buffer - -" Use Q for formatting the current paragraph (or visual selection) -vnoremap Q gq -nnoremap Q gqap -" set breakindent on " keep paragraph indentation when re-wrapping text - -" Sort paragraphs -vnoremap s !sort -fgv -nnoremap s vip!sort -f - -" make p in Visual mode replace the selected text with the yank register -vnoremap p :let current_reg = @"gvdi=current_reg - -" Shortcut to make -nnoremap mk :make - -" Swap implementations of ` and ' jump to markers -" By default, ' jumps to the marked line, ` jumps to the marked line and -" column, so swap them -nnoremap ' ` -nnoremap ` ' - -" Use the damn hjkl keys -"noremap -"noremap -"noremap -"noremap - -" Remap j and k to act as expected when used on long, wrapped, lines -nnoremap j gj -nnoremap k gk - -" Easy window navigation -noremap h -noremap j -noremap k -noremap l -nnoremap w vl - -"Resize vsplit -nmap :vertical resize +5 -nmap 25 :vertical resize 40 - -"Load the current buffer in Chrome -"nmap o :!chromium - -" Complete whole filenames/lines with a quicker shortcut key in insert mode -inoremap -inoremap - -" Use ,d (or ,dd or ,dj or 20,dd) to delete a line without adding it to the -" yanked stack (also, in visual mode) -nnoremap d "_d -vnoremap d "_d - -" Quick yanking to the end of the line -nnoremap Y y$ - -" YankRing stuff -let g:yankring_history_dir = '$HOME/.vim/.tmp' -nnoremap r :YRShow - -" Edit the vimrc file -nnoremap ev :e /etc/vim/vimrc -nnoremap sv :so /etc/vim/vimrc - -" Clears the search register -nnoremap / :nohlsearch - -" Pull word under cursor into LHS of a substitute (for quick search and -" replace) -nnoremap z :%s#\<=expand("")\># - -" Keep search matches in the middle of the window and pulse the line when moving -" to them. -nnoremap n n:call PulseCursorLine() -nnoremap N N:call PulseCursorLine() - -" Quickly get out of insert mode without your fingers having to leave the -" home row (either use 'jj' or 'jk') -inoremap jj - -" Quick alignment of text -" nnoremap al :left -" nnoremap ar :right -" nnoremap ac :center - -" Sudo to write -cnoremap w!! w !sudo tee % >/dev/null - -" Ctrl+W to redraw -nnoremap :redraw! - -" Jump to matching pairs easily, with Tab -nnoremap % -vnoremap % - -" Strip all trailing whitespace from a file, using ,W -nnoremap W :%s/\s\+$//:let @/='' - -" Use The Silver Searcher over grep, iff possible -if executable('ag') - " Use ag over grep - set grepprg=ag\ --nogroup\ --nocolor - - " Use ag in CtrlP for listing files. Lightning fast and respects .gitignore - let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' - - " ag is fast enough that CtrlP doesn't need to cache - let g:ctrlp_use_caching = 0 -endif - -" grep/Ack/Ag for the word under cursor -vnoremap a y:grep! "\b"\b":cw -nnoremap a :grep! "\b\b" -nnoremap K *N:grep! "\b\b":cw - -" Allow quick additions to the spelling dict -nnoremap g :spellgood - -" Define "Ag" command -command -nargs=+ -complete=file -bar Ag silent! grep! | cwindow | redraw! - -" bind \ (backward slash) to grep shortcut -nnoremap \ :Ag - -" Creating folds for tags in HTML -"nnoremap ft Vatzf - -" Reselect text that was just pasted with ,v -nnoremap v V`] - -" Gundo.vim -nnoremap :GundoToggle -" }}} - -" NERDTree settings {{{ -nnoremap n :NERDTreeTabsToggle -"nnoremap n :NERDTree -"nnoremap m :NERDTreeClose:NERDTreeFind -"conflicts with toggle line numbers -"nnoremap N :NERDTreeClose - -" Store the bookmarks file -"let NERDTreeBookmarksFile=expand("$HOME/.vim/NERDTreeBookmarks") -let NERDTreeBookmarksFile=expand("/etc/vim/NERDTreeBookmarks") - -" Show the bookmarks table on startup -let NERDTreeShowBookmarks=1 - -" Show hidden files, too -let NERDTreeShowFiles=1 -let NERDTreeShowHidden=1 - -" Quit on opening files from the tree -let NERDTreeQuitOnOpen=1 - -" Highlight the selected entry in the tree -let NERDTreeHighlightCursorline=1 - -" Use a single click to fold/unfold directories and a double click to open -" files -let NERDTreeMouseMode=2 - -" Don't display these kinds of files -let NERDTreeIgnore=[ '\.pyc$', '\.pyo$', '\.py\$class$', '\.obj$', - \ '\.o$', '\.so$', '\.egg$', '^\.git$' ] - -" }}} - -" TagList settings {{{ -nnoremap l :TlistClose:TlistToggle -nnoremap L :TlistClose - -" quit Vim when the TagList window is the last open window -let Tlist_Exit_OnlyWindow=1 " quit when TagList is the last open window -let Tlist_GainFocus_On_ToggleOpen=1 " put focus on the TagList window when it opens -"let Tlist_Process_File_Always=1 " process files in the background, even when the TagList window isn't open -"let Tlist_Show_One_File=1 " only show tags from the current buffer, not all open buffers -let Tlist_WinWidth=40 " set the width -let Tlist_Inc_Winwidth=1 " increase window by 1 when growing - -" shorten the time it takes to highlight the current tag (default is 4 secs) -" note that this setting influences Vim's behaviour when saving swap files, -" but we have already turned off swap files (earlier) -"set updatetime=1000 - -" the default ctags in /usr/bin on the Mac is GNU ctags, so change it to the -" exuberant ctags version in /usr/local/bin -let Tlist_Ctags_Cmd = '/usr/local/bin/ctags' - -" show function/method prototypes in the list -let Tlist_Display_Prototype=1 - -" don't show scope info -let Tlist_Display_Tag_Scope=0 - -" show TagList window on the right -let Tlist_Use_Right_Window=1 - -" }}} - -" vim-flake8 default configuration -let g:flake8_show_in_gutter=1 - -" Conflict markers {{{ -" highlight conflict markers -match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$' - -" shortcut to jump to next conflict marker -nnoremap c /^\(<\\|=\\|>\)\{7\}\([^=].\+\)\?$ -" }}} - -" Restore cursor position upon reopening files {{{ -autocmd BufReadPost * - \ if line("'\"") > 0 && line("'\"") <= line("$") | - \ exe "normal! g`\"" | - \ endif -" }}} - -" Extra vi-compatibility {{{ -" set extra vi-compatible options -set cpoptions+=$ " when changing a line, don't redisplay, but put a '$' at - " the end during the change -set formatoptions-=o " don't start new lines w/ comment leader on pressing 'o' -au filetype vim set formatoptions-=o - " somehow, during vim filetype detection, this gets set - " for vim files, so explicitly unset it again -" }}} - -" Ignore common directories -let g:ctrlp_custom_ignore = { - \ 'dir': 'node_modules\|bower_components', - \ } - -" Invoke CtrlP, but CommandT style -nnoremap t :CtrlP -nnoremap b :CtrlPTag -nnoremap . :CtrlPBuffer - -if has("gui_running") - - "colorscheme molokai - "colorscheme mustang - "colorscheme badwolf - colorscheme jellybeans - - " Remove toolbar, left scrollbar and right scrollbar - set guioptions-=T - set guioptions-=l - set guioptions-=L - set guioptions-=r - set guioptions-=R -else - set background=dark - - "colorscheme molokai - "colorscheme mustang - "colorscheme badwolf - "colorscheme jellybeans - "colorscheme heroku-terminal - colorscheme benokai -endif - -" Pulse ------------------------------------------------------------------- {{{ - -function! PulseCursorLine() - let current_window = winnr() - - windo set nocursorline - execute current_window . 'wincmd w' - - setlocal cursorline - - redir => old_hi - silent execute 'hi CursorLine' - redir END - let old_hi = split(old_hi, '\n')[0] - let old_hi = substitute(old_hi, 'xxx', '', '') - - hi CursorLine guibg=#3a3a3a - redraw - sleep 20m - - hi CursorLine guibg=#4a4a4a - redraw - sleep 30m - - hi CursorLine guibg=#3a3a3a - redraw - sleep 30m - - hi CursorLine guibg=#2a2a2a - redraw - sleep 20m - - execute 'hi ' . old_hi - - windo set cursorline - execute current_window . 'wincmd w' -endfunction - -" }}} - -" Powerline configuration ------------------------------------------------- {{{ - -" Dont have powerline, too much of a pain to install, to many dependencies -"let g:Powerline_symbols = 'compatible' -"let g:Powerline_symbols = 'fancy' - -" }}} - - -" Use shift-H and shift-L for move to beginning/end -nnoremap H 0 -nnoremap L $ - -" Split previously opened file ('#') in a split window -nnoremap sh :execute "leftabove vsplit" bufname('#') -nnoremap sl :execute "rightbelow vsplit" bufname('#') - -" Abbreviations -" ------------------------------------------------------------------------- {{{ -"abbrev pv !php artisan -" }}} - - -" Laravel and PHP stuff --------------------------------------------------- {{{ -" Auto-remove trailing spaces in PHP files -autocmd BufWritePre *.php :%s/\s\+$//e - -" Laravel framework commons -"nmap lr :e app/routes.php -"nmap lca :e app/config/app.php81Gf(%O -"nmap lcd :e app/config/database.php -"nmap lc :e composer.json - -" I don't want to pull up these folders/files when calling CtrlP -set wildignore+=*/vendor/** -set wildignore+=*/node_modules/** - -"Auto change directory to match current file ,cd -nnoremap ,cd :cd %:p:h:pwd - -" Prepare a new PHP class -function! Class() - let name = input('Class name? ') - let namespace = input('Any Namespace? ') - - if strlen(namespace) - exec "normal i\" - else - exec "normal i" - endif - - " Open class - exec "normal iclass " . name . " {\}\O\" - - exec "normal i\ public function __construct()\{\\}\" -endfunction -nmap ,1 :call Class() - - -" }}} - - diff --git a/vimrc-jefferyway b/vimrc-jefferyway deleted file mode 100644 index 23457bf..0000000 --- a/vimrc-jefferyway +++ /dev/null @@ -1,190 +0,0 @@ -set nocompatible " Disable vi-compatibility -set t_Co=256 - -colorscheme xoria256 -set guifont=menlo\ for\ powerline:h16 -set guioptions-=T " Removes top toolbar -set guioptions-=r " Removes right hand scroll bar -set go-=L " Removes left hand scroll bar -set linespace=15 - -set showmode " always show what mode we're currently editing in -set nowrap " don't wrap lines -set tabstop=4 " a tab is four spaces -set smarttab -set tags=tags -set softtabstop=4 " when hitting , pretend like a tab is removed, even if spaces -set expandtab " expand tabs by default (overloadable per file type later) -set shiftwidth=4 " number of spaces to use for autoindenting -set shiftround " use multiple of shiftwidth when indenting with '<' and '>' -set backspace=indent,eol,start " allow backspacing over everything in insert mode -set autoindent " always set autoindenting on -set copyindent " copy the previous indentation on autoindenting -set number " always show line numbers -set ignorecase " ignore case when searching -set smartcase " ignore case if search pattern is all lowercase, -set timeout timeoutlen=200 ttimeoutlen=100 -set visualbell " don't beep -set noerrorbells " don't beep -set autowrite "Save on buffer switch -set mouse=a - -" With a map leader it's possible to do extra key combinations -" like w saves the current file -let mapleader = "," -let g:mapleader = "," - -" Fast saves -nmap w :w! - -" Down is really the next line -nnoremap j gj -nnoremap k gk - -"Easy escaping to normal model -imap jj - -"Auto change directory to match current file ,cd -nnoremap ,cd :cd %:p:h:pwd - -"easier window navigation - -nmap h -nmap j -nmap k -nmap l - -"Resize vsplit -nmap :vertical resize +5 -nmap 25 :vertical resize 40 -nmap 50 = -nmap 75 :vertical resize 120 - -nmap :NERDTreeToggle - -"Load the current buffer in Chrome -nmap ,c :!open -a Google\ Chrome - -"Show (partial) command in the status line -set showcmd - -" Create split below -nmap :sp :rightbelow sp - -" Quickly go forward or backward to buffer -nmap :bp :BufSurfBack -nmap :bn :BufSurfForward - -highlight Search cterm=underline - -" Swap files out of the project root -set backupdir=~/.vim/backup// -set directory=~/.vim/swap// - -" Run PHPUnit tests -map t :!phpunit % - -" Easy motion stuff -let g:EasyMotion_leader_key = '' - -" Powerline (Fancy thingy at bottom stuff) -let g:Powerline_symbols = 'fancy' -set laststatus=2 " Always show the statusline -set encoding=utf-8 " Necessary to show Unicode glyphs -set noshowmode " Hide the default mode text (e.g. -- INSERT -- below the statusline) - -autocmd cursorhold * set nohlsearch -autocmd cursormoved * set hlsearch - -" Remove search results -command! H let @/="" - -" If you prefer the Omni-Completion tip window to close when a selection is -" made, these lines close it on movement in insert mode or when leaving -" insert mode -autocmd CursorMovedI * if pumvisible() == 0|pclose|endif -autocmd InsertLeave * if pumvisible() == 0|pclose|endif - -" Abbreviations -abbrev pft PHPUnit_Framework_TestCase - -abbrev gm !php artisan generate:model -abbrev gc !php artisan generate:controller -abbrev gmig !php artisan generate:migration - -" Auto-remove trailing spaces -autocmd BufWritePre *.php :%s/\s\+$//e - -" Edit todo list for project -nmap ,todo :e todo.txt - -" Laravel framework commons -nmap lr :e app/routes.php -nmap lca :e app/config/app.php81Gf(%O -nmap lcd :e app/config/database.php -nmap lc :e composer.json - -" Concept - load underlying class for Laravel -function! FacadeLookup() - let facade = input('Facade Name: ') - let classes = { -\ 'Form': 'Html/FormBuilder.php', -\ 'Html': 'Html/HtmlBuilder.php', -\ 'File': 'Filesystem/Filesystem.php', -\ 'Eloquent': 'Database/Eloquent/Model.php' -\ } - - execute ":edit vendor/laravel/framework/src/Illuminate/" . classes[facade] -endfunction -nmap ,lf :call FacadeLookup() - -" CtrlP Stuff - -" Familiar commands for file/symbol browsing -map :CtrlP -map :CtrlPBufTag - -" I don't want to pull up these folders/files when calling CtrlP -set wildignore+=*/vendor/** -set wildignore+=*/public/forum/** - -" Open splits -nmap vs :vsplit -nmap sp :split - -" Create/edit file in the current directory -nmap :ed :edit %:p:h/ - -" Prepare a new PHP class -function! Class() - let name = input('Class name? ') - let namespace = input('Any Namespace? ') - - if strlen(namespace) - exec 'normal i - -" Add a new dependency to a PHP class -function! AddDependency() - let dependency = input('Var Name: ') - let namespace = input('Class Path: ') - - let segments = split(namespace, '\') - let typehint = segments[-1] - - exec 'normal gg/construct^M:H^Mf)i, ' . typehint . ' $' . dependency . '^[/}^>O$this->^[a' . dependency . ' = $' . dependency . ';^[?{^MkOprotected $' . dependency . ';^M^[?{^MOuse ' . namespace . ';^M^[' - - " Remove opening comma if there is only one dependency - exec 'normal :%s/(, /(/g -' -endfunction -nmap ,2 :call AddDependency() \ No newline at end of file diff --git a/vimrc-original b/vimrc-original deleted file mode 100644 index d0c0a7b..0000000 --- a/vimrc-original +++ /dev/null @@ -1,58 +0,0 @@ -" All system-wide defaults are set in $VIMRUNTIME/debian.vim and sourced by -" the call to :runtime you can find below. If you wish to change any of those -" settings, you should do it in this file (/etc/vim/vimrc), since debian.vim -" will be overwritten everytime an upgrade of the vim packages is performed. -" It is recommended to make changes after sourcing debian.vim since it alters -" the value of the 'compatible' option. - -" This line should not be removed as it ensures that various options are -" properly set to work with the Vim-related packages available in Debian. -runtime! debian.vim - -" Uncomment the next line to make Vim more Vi-compatible -" NOTE: debian.vim sets 'nocompatible'. Setting 'compatible' changes numerous -" options, so any other options should be set AFTER setting 'compatible'. -"set compatible - -" Vim5 and later versions support syntax highlighting. Uncommenting the next -" line enables syntax highlighting by default. -"syntax on - -" If using a dark background within the editing area and syntax highlighting -" turn on this option as well -"set background=dark - -" Uncomment the following to have Vim jump to the last position when -" reopening a file -"if has("autocmd") -" au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif -"endif - -" Uncomment the following to have Vim load indentation rules and plugins -" according to the detected filetype. -"if has("autocmd") -" filetype plugin indent on -"endif - -" The following are commented out as they cause vim to behave a lot -" differently from regular Vi. They are highly recommended though. -"set showcmd " Show (partial) command in status line. -"set showmatch " Show matching brackets. -"set ignorecase " Do case insensitive matching -"set smartcase " Do smart case matching -"set incsearch " Incremental search -"set autowrite " Automatically save before commands like :next and :make -"set hidden " Hide buffers when they are abandoned -"set mouse=a " Enable mouse usage (all modes) - -" Source a global configuration file if available -if filereadable("/etc/vim/vimrc.local") - source /etc/vim/vimrc.local -endif - -set tabstop=4 -set ts=4 -set sw=4 -set nowrap -syntax enable -set ignorecase diff --git a/vimrc-vincent b/vimrc-vincent deleted file mode 100644 index 57c32d3..0000000 --- a/vimrc-vincent +++ /dev/null @@ -1,854 +0,0 @@ -" -" Personal preference .vimrc file -" Maintained by Vincent Driessen -" -" My personally preferred version of vim is the one with the "big" feature -" set, in addition to the following configure options: -" -" ./configure --with-features=BIG -" --enable-pythoninterp --enable-rubyinterp -" --enable-enablemultibyte --enable-gui=no --with-x --enable-cscope -" --with-compiledby="Vincent Driessen " -" --prefix=/usr -" -" To start vim without using this .vimrc file, use: -" vim -u NORC -" -" To start vim without loading any .vimrc or plugins, use: -" vim -u NONE -" - -" Use vim settings, rather then vi settings (much better!) -" This must be first, because it changes other options as a side effect. -set nocompatible - -" Use pathogen to easily modify the runtime path to include all plugins under -" the ~/.vim/bundle directory -filetype off " force reloading *after* pathogen loaded -call pathogen#infect() -call pathogen#helptags() -filetype plugin indent on " enable detection, plugins and indenting in one step -syntax on - -" Change shell -set shell=bash " Vim expects a POSIX-compliant shell, which Fish (my default shell) is not - -" Change the mapleader from \ to , -let mapleader="," -let maplocalleader="\\" - -" Editing behaviour {{{ -set showmode " always show what mode we're currently editing in -set nowrap " don't wrap lines -set tabstop=4 " a tab is four spaces -set softtabstop=4 " when hitting , pretend like a tab is removed, even if spaces -set expandtab " expand tabs by default (overloadable per file type later) -set shiftwidth=4 " number of spaces to use for autoindenting -set shiftround " use multiple of shiftwidth when indenting with '<' and '>' -set backspace=indent,eol,start " allow backspacing over everything in insert mode -set autoindent " always set autoindenting on -set copyindent " copy the previous indentation on autoindenting -set number " always show line numbers -set showmatch " set show matching parenthesis -set ignorecase " ignore case when searching -set smartcase " ignore case if search pattern is all lowercase, - " case-sensitive otherwise -set smarttab " insert tabs on the start of a line according to - " shiftwidth, not tabstop -set scrolloff=4 " keep 4 lines off the edges of the screen when scrolling -set virtualedit=all " allow the cursor to go in to "invalid" places -set hlsearch " highlight search terms -set incsearch " show search matches as you type -set gdefault " search/replace "globally" (on a line) by default -set listchars=tab:▸\ ,trail:·,extends:#,nbsp:· - -set nolist " don't show invisible characters by default, - " but it is enabled for some file types (see later) -set pastetoggle= " when in insert mode, press to go to - " paste mode, where you can paste mass data - " that won't be autoindented -set mouse=a " enable using the mouse if terminal emulator - " supports it (xterm does) -set fileformats="unix,dos,mac" -set formatoptions+=1 " When wrapping paragraphs, don't end lines - " with 1-letter words (looks stupid) - -set nrformats= " make and play well with - " zero-padded numbers (i.e. don't consider - " them octal or hex) - -set shortmess+=I " hide the launch screen -set clipboard=unnamed " normal OS clipboard interaction -set autoread " automatically reload files changed outside of Vim - -" Toggle show/hide invisible chars -nnoremap i :set list! - -" Toggle line numbers -nnoremap N :setlocal number! - -" Thanks to Steve Losh for this liberating tip -" See http://stevelosh.com/blog/2010/09/coming-home-to-vim -nnoremap / /\v -vnoremap / /\v - -" Speed up scrolling of the viewport slightly -nnoremap 2 -nnoremap 2 -" }}} - -" Folding rules {{{ -set foldenable " enable folding -set foldcolumn=2 " add a fold column -set foldmethod=marker " detect triple-{ style fold markers -set foldlevelstart=99 " start out with everything unfolded -set foldopen=block,hor,insert,jump,mark,percent,quickfix,search,tag,undo - " which commands trigger auto-unfold -function! MyFoldText() - let line = getline(v:foldstart) - - let nucolwidth = &fdc + &number * &numberwidth - let windowwidth = winwidth(0) - nucolwidth - 3 - let foldedlinecount = v:foldend - v:foldstart - - " expand tabs into spaces - let onetab = strpart(' ', 0, &tabstop) - let line = substitute(line, '\t', onetab, 'g') - - let line = strpart(line, 0, windowwidth - 2 -len(foldedlinecount)) - let fillcharcount = windowwidth - len(line) - len(foldedlinecount) - 4 - return line . ' …' . repeat(" ",fillcharcount) . foldedlinecount . ' ' -endfunction -set foldtext=MyFoldText() - -" Mappings to easily toggle fold levels -nnoremap z0 :set foldlevel=0 -nnoremap z1 :set foldlevel=1 -nnoremap z2 :set foldlevel=2 -nnoremap z3 :set foldlevel=3 -nnoremap z4 :set foldlevel=4 -nnoremap z5 :set foldlevel=5 -" }}} - -" Editor layout {{{ -set termencoding=utf-8 -set encoding=utf-8 -set lazyredraw " don't update the display while executing macros -set laststatus=2 " tell VIM to always put a status line in, even - " if there is only one window -set cmdheight=2 " use a status bar that is 2 rows high -" }}} - -" Vim behaviour {{{ -set hidden " hide buffers instead of closing them this - " means that the current buffer can be put - " to background without being written; and - " that marks and undo history are preserved -set switchbuf=useopen " reveal already opened files from the - " quickfix window instead of opening new - " buffers -set history=1000 " remember more commands and search history -set undolevels=1000 " use many muchos levels of undo -if v:version >= 730 - set undofile " keep a persistent backup file - set undodir=~/.vim/.undo,~/tmp,/tmp -endif -set nobackup " do not keep backup files, it's 70's style cluttering -set noswapfile " do not write annoying intermediate swap files, - " who did ever restore from swap files anyway? -set directory=~/.vim/.tmp,~/tmp,/tmp - " store swap files in one of these directories - " (in case swapfile is ever turned on) -set viminfo='20,\"80 " read/write a .viminfo file, don't store more - " than 80 lines of registers -set wildmenu " make tab completion for files/buffers act like bash -set wildmode=list:full " show a list when pressing tab and complete - " first full match -set wildignore=*.swp,*.bak,*.pyc,*.class -set title " change the terminal's title -set visualbell " don't beep -set noerrorbells " don't beep -set showcmd " show (partial) command in the last line of the screen - " this also shows visual selection info -set nomodeline " disable mode lines (security measure) -"set ttyfast " always use a fast terminal -set cursorline " underline the current line, for quick orientation -" }}} - -" Toggle the quickfix window {{{ -" From Steve Losh, http://learnvimscriptthehardway.stevelosh.com/chapters/38.html -nnoremap :call QuickfixToggle() - -let g:quickfix_is_open = 0 - -function! s:QuickfixToggle() - if g:quickfix_is_open - cclose - let g:quickfix_is_open = 0 - execute g:quickfix_return_to_window . "wincmd w" - else - let g:quickfix_return_to_window = winnr() - copen - let g:quickfix_is_open = 1 - endif -endfunction -" }}} - -" Toggle the foldcolumn {{{ -nnoremap f :call FoldColumnToggle() - -let g:last_fold_column_width = 4 " Pick a sane default for the foldcolumn - -function! FoldColumnToggle() - if &foldcolumn - let g:last_fold_column_width = &foldcolumn - setlocal foldcolumn=0 - else - let &l:foldcolumn = g:last_fold_column_width - endif -endfunction -" }}} - -" Highlighting {{{ -if &t_Co > 2 || has("gui_running") - syntax on " switch syntax highlighting on, when the terminal has colors -endif -" }}} - -" Shortcut mappings {{{ -" Since I never use the ; key anyway, this is a real optimization for almost -" all Vim commands, as I don't have to press the Shift key to form chords to -" enter ex mode. -nnoremap ; : -nnoremap ; ; - -" Avoid accidental hits of while aiming for -noremap! - -nnoremap Q :q " Quickly close the current window -nnoremap q :bd " Quickly close the current buffer - -" Use Q for formatting the current paragraph (or visual selection) -vnoremap Q gq -nnoremap Q gqap -" set breakindent on " keep paragraph indentation when re-wrapping text - -" Sort paragraphs -vnoremap s !sort -fgv -nnoremap s vip!sort -f - -" make p in Visual mode replace the selected text with the yank register -vnoremap p :let current_reg = @"gvdi=current_reg - -" Shortcut to make -nnoremap mk :make - -" Swap implementations of ` and ' jump to markers -" By default, ' jumps to the marked line, ` jumps to the marked line and -" column, so swap them -nnoremap ' ` -nnoremap ` ' - -" Use the damn hjkl keys -" noremap -" noremap -" noremap -" noremap - -" Remap j and k to act as expected when used on long, wrapped, lines -nnoremap j gj -nnoremap k gk - -" Easy window navigation -noremap h -noremap j -noremap k -noremap l -nnoremap w vl - -" Complete whole filenames/lines with a quicker shortcut key in insert mode -inoremap -inoremap - -" Use ,d (or ,dd or ,dj or 20,dd) to delete a line without adding it to the -" yanked stack (also, in visual mode) -nnoremap d "_d -vnoremap d "_d - -" Quick yanking to the end of the line -nnoremap Y y$ - -" YankRing stuff -let g:yankring_history_dir = '$HOME/.vim/.tmp' -nnoremap r :YRShow - -" Edit the vimrc file -nnoremap ev :e $MYVIMRC -nnoremap sv :so $MYVIMRC - -" Clears the search register -nnoremap / :nohlsearch - -" Pull word under cursor into LHS of a substitute (for quick search and -" replace) -nnoremap z :%s#\<=expand("")\># - -" Keep search matches in the middle of the window and pulse the line when moving -" to them. -nnoremap n n:call PulseCursorLine() -nnoremap N N:call PulseCursorLine() - -" Quickly get out of insert mode without your fingers having to leave the -" home row (either use 'jj' or 'jk') -inoremap jj - -" Quick alignment of text -" nnoremap al :left -" nnoremap ar :right -" nnoremap ac :center - -" Sudo to write -cnoremap w!! w !sudo tee % >/dev/null - -" Ctrl+W to redraw -nnoremap :redraw! - -" Jump to matching pairs easily, with Tab -nnoremap % -vnoremap % - -" Folding -nnoremap za -vnoremap za - -" Strip all trailing whitespace from a file, using ,W -nnoremap W :%s/\s\+$//:let @/='' - -" Use The Silver Searcher over grep, iff possible -if executable('ag') - " Use ag over grep - set grepprg=ag\ --nogroup\ --nocolor - - " Use ag in CtrlP for listing files. Lightning fast and respects .gitignore - let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' - - " ag is fast enough that CtrlP doesn't need to cache - let g:ctrlp_use_caching = 0 -endif - -" grep/Ack/Ag for the word under cursor -vnoremap a y:grep! "\b"\b":cw -nnoremap a :grep! "\b\b" -nnoremap K *N:grep! "\b\b":cw - -" Allow quick additions to the spelling dict -nnoremap g :spellgood - -" Define "Ag" command -command -nargs=+ -complete=file -bar Ag silent! grep! | cwindow | redraw! - -" bind \ (backward slash) to grep shortcut -nnoremap \ :Ag - -" Creating folds for tags in HTML -"nnoremap ft Vatzf - -" Reselect text that was just pasted with ,v -nnoremap v V`] - -" Gundo.vim -nnoremap :GundoToggle -" }}} - -" NERDTree settings {{{ -nnoremap n :NERDTreeFocus -nnoremap m :NERDTreeClose:NERDTreeFind -nnoremap N :NERDTreeClose - -" Store the bookmarks file -let NERDTreeBookmarksFile=expand("$HOME/.vim/NERDTreeBookmarks") - -" Show the bookmarks table on startup -let NERDTreeShowBookmarks=1 - -" Show hidden files, too -let NERDTreeShowFiles=1 -let NERDTreeShowHidden=1 - -" Quit on opening files from the tree -let NERDTreeQuitOnOpen=1 - -" Highlight the selected entry in the tree -let NERDTreeHighlightCursorline=1 - -" Use a single click to fold/unfold directories and a double click to open -" files -let NERDTreeMouseMode=2 - -" Don't display these kinds of files -let NERDTreeIgnore=[ '\.pyc$', '\.pyo$', '\.py\$class$', '\.obj$', - \ '\.o$', '\.so$', '\.egg$', '^\.git$' ] - -" }}} - -" TagList settings {{{ -nnoremap l :TlistClose:TlistToggle -nnoremap L :TlistClose - -" quit Vim when the TagList window is the last open window -let Tlist_Exit_OnlyWindow=1 " quit when TagList is the last open window -let Tlist_GainFocus_On_ToggleOpen=1 " put focus on the TagList window when it opens -"let Tlist_Process_File_Always=1 " process files in the background, even when the TagList window isn't open -"let Tlist_Show_One_File=1 " only show tags from the current buffer, not all open buffers -let Tlist_WinWidth=40 " set the width -let Tlist_Inc_Winwidth=1 " increase window by 1 when growing - -" shorten the time it takes to highlight the current tag (default is 4 secs) -" note that this setting influences Vim's behaviour when saving swap files, -" but we have already turned off swap files (earlier) -"set updatetime=1000 - -" the default ctags in /usr/bin on the Mac is GNU ctags, so change it to the -" exuberant ctags version in /usr/local/bin -let Tlist_Ctags_Cmd = '/usr/local/bin/ctags' - -" show function/method prototypes in the list -let Tlist_Display_Prototype=1 - -" don't show scope info -let Tlist_Display_Tag_Scope=0 - -" show TagList window on the right -let Tlist_Use_Right_Window=1 - -" }}} - -" vim-flake8 default configuration -let g:flake8_show_in_gutter=1 - -" Conflict markers {{{ -" highlight conflict markers -match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$' - -" shortcut to jump to next conflict marker -nnoremap c /^\(<\\|=\\|>\)\{7\}\([^=].\+\)\?$ -" }}} - -" Filetype specific handling {{{ -" only do this part when compiled with support for autocommands -if has("autocmd") - augroup invisible_chars "{{{ - au! - - " Show invisible characters in all of these files - autocmd filetype vim setlocal list - autocmd filetype python,rst setlocal list - autocmd filetype ruby setlocal list - autocmd filetype javascript,css setlocal list - augroup end "}}} - - augroup vim_files "{{{ - au! - - " Bind to show the keyword under cursor - " general help can still be entered manually, with :h - autocmd filetype vim noremap :help - autocmd filetype vim noremap! :help - augroup end "}}} - - augroup html_files "{{{ - au! - - " This function detects, based on HTML content, whether this is a - " Django template, or a plain HTML file, and sets filetype accordingly - fun! s:DetectHTMLVariant() - let n = 1 - while n < 50 && n < line("$") - " check for django - if getline(n) =~ '{%\s*\(extends\|load\|block\|if\|for\|include\|trans\)\>' - set ft=htmldjango.html - return - endif - let n = n + 1 - endwhile - " go with html - set ft=html - endfun - - " Auto-tidy selection - vnoremap x :!tidy -q -i --show-errors 0 --show-body-only 1 --wrap 0 - - autocmd BufNewFile,BufRead *.html,*.htm,*.j2 call s:DetectHTMLVariant() - - " Auto-closing of HTML/XML tags - let g:closetag_default_xml=1 - autocmd filetype html,htmldjango let b:closetag_html_style=1 - autocmd filetype html,xhtml,xml source ~/.vim/scripts/closetag.vim - augroup end " }}} - - augroup python_files "{{{ - au! - - " This function detects, based on Python content, whether this is a - " Django file, which may enabling snippet completion for it - fun! s:DetectPythonVariant() - let n = 1 - while n < 50 && n < line("$") - " check for django - if getline(n) =~ 'import\s\+\' || getline(n) =~ 'from\s\+\\s\+import' - set ft=python.django - "set syntax=python - return - endif - let n = n + 1 - endwhile - " go with html - set ft=python - endfun - autocmd BufNewFile,BufRead *.py call s:DetectPythonVariant() - - " PEP8 compliance (set 1 tab = 4 chars explicitly, even if set - " earlier, as it is important) - autocmd filetype python setlocal textwidth=78 - autocmd filetype python match ErrorMsg '\%>120v.\+' - - " But disable autowrapping as it is super annoying - autocmd filetype python setlocal formatoptions-=t - - " Folding for Python (uses syntax/python.vim for fold definitions) - "autocmd filetype python,rst setlocal nofoldenable - "autocmd filetype python setlocal foldmethod=expr - - " Python runners - autocmd filetype python noremap :w:!python % - autocmd filetype python inoremap :w:!python % - autocmd filetype python noremap :w:!ipython % - autocmd filetype python inoremap :w:!ipython % - - " Toggling True/False - autocmd filetype python nnoremap mmviw:s/True\\|False/\={'True':'False','False':'True'}[submatch(0)]/`m:nohlsearch - - " Run a quick static syntax check every time we save a Python file - autocmd BufWritePost *.py call Flake8() - - " Defer to isort for sorting headers (instead of using Unix sort) - autocmd filetype python nnoremap s :Isort - augroup end " }}} - - augroup supervisord_files "{{{ - au! - - autocmd BufNewFile,BufRead supervisord.conf set ft=dosini - augroup end " }}} - - augroup markdown_files "{{{ - au! - - autocmd filetype markdown noremap p :w:!open -a Marked % - augroup end " }}} - - augroup ruby_files "{{{ - au! - - augroup end " }}} - - augroup rst_files "{{{ - au! - - " Auto-wrap text around 74 chars - autocmd filetype rst setlocal textwidth=74 - autocmd filetype rst setlocal formatoptions+=nqt - autocmd filetype rst match ErrorMsg '\%>74v.\+' - augroup end " }}} - - augroup css_files "{{{ - au! - - autocmd filetype css,less setlocal foldmethod=marker foldmarker={,} - augroup end "}}} - - augroup javascript_files "{{{ - au! - - autocmd filetype javascript setlocal expandtab - autocmd filetype javascript setlocal listchars=trail:·,extends:#,nbsp:· - autocmd filetype javascript setlocal foldmethod=marker foldmarker={,} - - " Toggling True/False - autocmd filetype javascript nnoremap mmviw:s/true\\|false/\={'true':'false','false':'true'}[submatch(0)]/`m:nohlsearch - - " Enable insertion of "debugger" statement in JS files - autocmd filetype javascript nnoremap b Odebugger; - augroup end "}}} - - augroup textile_files "{{{ - au! - - autocmd filetype textile set tw=78 wrap - - " Render YAML front matter inside Textile documents as comments - autocmd filetype textile syntax region frontmatter start=/\%^---$/ end=/^---$/ - autocmd filetype textile highlight link frontmatter Comment - augroup end "}}} -endif -" }}} - -" Skeleton processing {{{ - -if has("autocmd") - - "if !exists('*LoadTemplate') - "function LoadTemplate(file) - "" Add skeleton fillings for Python (normal and unittest) files - "if a:file =~ 'test_.*\.py$' - "execute "0r ~/.vim/skeleton/test_template.py" - "elseif a:file =~ '.*\.py$' - "execute "0r ~/.vim/skeleton/template.py" - "endif - "endfunction - "endif - - "autocmd BufNewFile * call LoadTemplate(@%) - -endif " has("autocmd") - -" }}} - -" Restore cursor position upon reopening files {{{ -autocmd BufReadPost * - \ if line("'\"") > 0 && line("'\"") <= line("$") | - \ exe "normal! g`\"" | - \ endif -" }}} - -" Common abbreviations / misspellings {{{ -source ~/.vim/autocorrect.vim -" }}} - -" Extra vi-compatibility {{{ -" set extra vi-compatible options -set cpoptions+=$ " when changing a line, don't redisplay, but put a '$' at - " the end during the change -set formatoptions-=o " don't start new lines w/ comment leader on pressing 'o' -au filetype vim set formatoptions-=o - " somehow, during vim filetype detection, this gets set - " for vim files, so explicitly unset it again -" }}} - -" Extra user or machine specific settings {{{ -source ~/.vim/user.vim -" }}} - -" Creating underline/overline headings for markup languages -" Inspired by http://sphinx.pocoo.org/rest.html#sections -nnoremap 1 yyPVr=jyypVr= -nnoremap 2 yyPVr*jyypVr* -nnoremap 3 yypVr= -nnoremap 4 yypVr- -nnoremap 5 yypVr^ -nnoremap 6 yypVr" - -iab lorem Lorem ipsum dolor sit amet, consectetur adipiscing elit -iab llorem Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam lacus ligula, accumsan id imperdiet rhoncus, dapibus vitae arcu. Nulla non quam erat, luctus consequat nisi -iab lllorem Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam lacus ligula, accumsan id imperdiet rhoncus, dapibus vitae arcu. Nulla non quam erat, luctus consequat nisi. Integer hendrerit lacus sagittis erat fermentum tincidunt. Cras vel dui neque. In sagittis commodo luctus. Mauris non metus dolor, ut suscipit dui. Aliquam mauris lacus, laoreet et consequat quis, bibendum id ipsum. Donec gravida, diam id imperdiet cursus, nunc nisl bibendum sapien, eget tempor neque elit in tortor - - "set guifont=Anonymous\ for\ Powerline:h12 linespace=2 - "set guifont=Droid\ Sans\ Mono:h14 linespace=0 - "set guifont=Mensch\ for\ Powerline:h14 linespace=0 - "set guifont=saxMono:h14 linespace=3 - "set guifont=Ubuntu\ Mono:h18 linespace=3 - set guifont=Source\ Code\ Pro\ Light:h10 linespace=0 -if has("gui_running") - - "colorscheme molokai - "colorscheme railscat - "colorscheme kellys - "colorscheme wombat256 - "colorscheme mustang - "colorscheme mustang_silent - "colorscheme badwolf - "colorscheme jellybeans - - " Remove toolbar, left scrollbar and right scrollbar - set guioptions-=T - set guioptions-=l - set guioptions-=L - set guioptions-=r - set guioptions-=R -else - set bg=dark - - "colorscheme molokai - "colorscheme railscat - "colorscheme molokai_deep - "colorscheme wombat256 - "colorscheme mustang - "colorscheme mustang_silent - "colorscheme badwolf - colorscheme jellybeans -endif - -" Pulse ------------------------------------------------------------------- {{{ - -function! PulseCursorLine() - let current_window = winnr() - - windo set nocursorline - execute current_window . 'wincmd w' - - setlocal cursorline - - redir => old_hi - silent execute 'hi CursorLine' - redir END - let old_hi = split(old_hi, '\n')[0] - let old_hi = substitute(old_hi, 'xxx', '', '') - - hi CursorLine guibg=#3a3a3a - redraw - sleep 20m - - hi CursorLine guibg=#4a4a4a - redraw - sleep 30m - - hi CursorLine guibg=#3a3a3a - redraw - sleep 30m - - hi CursorLine guibg=#2a2a2a - redraw - sleep 20m - - execute 'hi ' . old_hi - - windo set cursorline - execute current_window . 'wincmd w' -endfunction - -" }}} - -" Powerline configuration ------------------------------------------------- {{{ - -let g:Powerline_symbols = 'compatible' -"let g:Powerline_symbols = 'fancy' - -" }}} - -" Python mode configuration ----------------------------------------------- {{{ - -" Don't run pylint on every save -let g:pymode = 0 -let g:pymode_breakpoint = 0 -let g:pymode_breakpoint_bind = 'b' -let g:pymode_doc = 0 -let g:pymode_doc_bind = 'K' -let g:pymode_folding = 0 -let g:pymode_indent = 0 -let g:pymode_lint = 0 -let g:pymode_lint_checkers = ['pyflakes', 'pep8', 'mccabe'] -let g:pymode_lint_cwindow = 1 -let g:pymode_lint_ignore = '' -let g:pymode_lint_message = 1 -let g:pymode_lint_on_fly = 0 -let g:pymode_lint_on_write = 0 -let g:pymode_lint_select = '' -let g:pymode_lint_signs = 1 -let g:pymode_motion = 0 -let g:pymode_options = 0 -let g:pymode_paths = [] -let g:pymode_quickfix_maxheight = 6 -let g:pymode_quickfix_minheight = 3 -let g:pymode_rope = 0 -let g:pymode_run = 0 -let g:pymode_run_bind = 'r' -let g:pymode_trim_whitespaces = 0 - -" }}} - -" Linters configuration -------------------------------------------------- {{{ - -" Don't run linters for Python (conflicts with vim-flake8 and lint.vim plugins) -let g:linters_disabled_filetypes = ['python', 'html'] - -" To add more linters, do this: -" -" let g:linters_extra = [] - -" if executable('jshint') -" let g:linters_extra += [ -" \ ['javascript', 'jshint %s > %s', ["%f: line %l, col %c, %m"]], -" \] -" endif - -" }}} - -" Ignore common directories -let g:ctrlp_custom_ignore = { - \ 'dir': 'node_modules\|bower_components', - \ } - -" Invoke CtrlP, but CommandT style -nnoremap t :CtrlP -nnoremap . :CtrlPTag -nnoremap b :CtrlPBuffer - -" Learn Vim Script the Hard Way Exercises -"noremap - ddp -"noremap _ ddkP - -" C-U in insert/normal mode, to uppercase the word under cursor -inoremap viwUea -nnoremap viwUe - -iabbr m@@ me@nvie.com -iabbr v@@ vincent@3rdcloud.com -iabbr ssig --Vincent Driessenvincent@3rdcloud.com - -" Quote words under cursor -nnoremap " viWa"gvoi"gvo3l -nnoremap ' viWa'gvoi'gvo3l - -" Quote current selection -" TODO: This only works for selections that are created "forwardly" -vnoremap " a"gvoi"gvoll -vnoremap ' a'gvoi'gvoll - -" Use shift-H and shift-L for move to beginning/end -nnoremap H 0 -nnoremap L $ - -" Define operator-pending mappings to quickly apply commands to function names -" and/or parameter lists in the current line -onoremap inf :normal! 0f(hviw -onoremap anf :normal! 0f(hvaw -onoremap in( :normal! 0f(vi( -onoremap an( :normal! 0f(va( - -" "Next" tag -onoremap int :normal! 0f -onoremap ant :normal! 0f - -" Function argument selection (change "around argument", change "inside argument") -onoremap ia :execute "normal! ?[,(]\rwv/[),]\rh" -vnoremap ia :execute "normal! ?[,(]\rwv/[),]\rh" - -" Split previously opened file ('#') in a split window -nnoremap sh :execute "leftabove vsplit" bufname('#') -nnoremap sl :execute "rightbelow vsplit" bufname('#') - -" Grep searches -"nnoremap g :silent execute "grep! -R " . shellescape('') . " .":copen 12 -"nnoremap G :silent execute "grep! -R " . shellescape('') . " .":copen 12 - -" Run tests -inoremap w :write:!./run_tests.sh % -nnoremap w :!./run_tests.sh - -" Rope config -nnoremap A :RopeAutoImport - -" Switch from block-cursor to vertical-line-cursor when going into/out of -" insert mode -let &t_SI = "\]50;CursorShape=1\x7" -let &t_EI = "\]50;CursorShape=0\x7" diff --git a/vimrc.dpkg-old b/vimrc.dpkg-old deleted file mode 100644 index f090db1..0000000 --- a/vimrc.dpkg-old +++ /dev/null @@ -1,59 +0,0 @@ -" All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just -" /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :runtime -" you can find below. If you wish to change any of those settings, you should -" do it in this file (/etc/vim/vimrc), since debian.vim will be overwritten -" everytime an upgrade of the vim packages is performed. It is recommended to -" make changes after sourcing debian.vim since it alters the value of the -" 'compatible' option. - -" This line should not be removed as it ensures that various options are -" properly set to work with the Vim-related packages available in Debian. -runtime! debian.vim - -" Uncomment the next line to make Vim more Vi-compatible -" NOTE: debian.vim sets 'nocompatible'. Setting 'compatible' changes numerous -" options, so any other options should be set AFTER setting 'compatible'. -"set compatible - -" Vim5 and later versions support syntax highlighting. Uncommenting the next -" line enables syntax highlighting by default. -"syntax on - -" If using a dark background within the editing area and syntax highlighting -" turn on this option as well -"set background=dark - -" Uncomment the following to have Vim jump to the last position when -" reopening a file -"if has("autocmd") -" au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif -"endif - -" Uncomment the following to have Vim load indentation rules and plugins -" according to the detected filetype. -"if has("autocmd") -" filetype plugin indent on -"endif - -" The following are commented out as they cause vim to behave a lot -" differently from regular Vi. They are highly recommended though. -"set showcmd " Show (partial) command in status line. -"set showmatch " Show matching brackets. -"set ignorecase " Do case insensitive matching -"set smartcase " Do smart case matching -"set incsearch " Incremental search -"set autowrite " Automatically save before commands like :next and :make -"set hidden " Hide buffers when they are abandoned -"set mouse=a " Enable mouse usage (all modes) - -" Source a global configuration file if available -if filereadable("/etc/vim/vimrc.local") - source /etc/vim/vimrc.local -endif - -set tabstop=4 -set ts=4 -set sw=4 -set nowrap -syntax enable -set ignorecase diff --git a/vimrc.tiny b/vimrc.tiny deleted file mode 100644 index 81d774a..0000000 --- a/vimrc.tiny +++ /dev/null @@ -1,13 +0,0 @@ -" Vim configuration file, in effect when invoked as "vi". The aim of this -" configuration file is to provide a Vim environment as compatible with the -" original vi as possible. Note that ~/.vimrc configuration files as other -" configuration files in the runtimepath are still sourced. -" When Vim is invoked differently ("vim", "view", "evim", ...) this file is -" _not_ sourced; /etc/vim/vimrc and/or /etc/vim/gvimrc are. - -" Debian system-wide default configuration Vim -set runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim74,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after - -set compatible - -" vim: set ft=vim: