diff --git a/.VimballRecord b/.VimballRecord new file mode 100644 index 0000000..2804e52 --- /dev/null +++ b/.VimballRecord @@ -0,0 +1,2 @@ +command-t-0.8.1.vba: call delete('/Users/Home/.vim/ruby/command-t/controller.rb')|call delete('/Users/Home/.vim/ruby/command-t/extconf.rb')|call delete('/Users/Home/.vim/ruby/command-t/finder.rb')|call delete('/Users/Home/.vim/ruby/command-t/match_window.rb')|call delete('/Users/Home/.vim/ruby/command-t/prompt.rb')|call delete('/Users/Home/.vim/ruby/command-t/scanner.rb')|call delete('/Users/Home/.vim/ruby/command-t/settings.rb')|call delete('/Users/Home/.vim/ruby/command-t/stub.rb')|call delete('/Users/Home/.vim/ruby/command-t/vim/screen.rb')|call delete('/Users/Home/.vim/ruby/command-t/vim/window.rb')|call delete('/Users/Home/.vim/ruby/command-t/vim.rb')|call delete('/Users/Home/.vim/ruby/command-t/ext.c')|call delete('/Users/Home/.vim/ruby/command-t/match.c')|call delete('/Users/Home/.vim/ruby/command-t/matcher.c')|call delete('/Users/Home/.vim/ruby/command-t/ext.h')|call delete('/Users/Home/.vim/ruby/command-t/match.h')|call delete('/Users/Home/.vim/ruby/command-t/matcher.h')|call delete('/Users/Home/.vim/ruby/command-t/ruby_compat.h')|call delete('/Users/Home/.vim/ruby/command-t/depend')|call delete('/Users/Home/.vim/doc/command-t.txt')|call delete('/Users/Home/.vim/plugin/command-t.vim') +markdown-1.1.0.vba: call delete('/Users/Home/.vim/ftdetect/markdown.vim')|call delete('/Users/Home/.vim/snippets/markdown.snippets')|call delete('/Users/Home/.vim/syntax/markdown.vim') diff --git a/.netrwhist b/.netrwhist new file mode 100644 index 0000000..7771a52 --- /dev/null +++ b/.netrwhist @@ -0,0 +1,2 @@ +let g:netrw_dirhistmax =10 +let g:netrw_dirhist_cnt =0 diff --git a/README b/README new file mode 100644 index 0000000..860e791 --- /dev/null +++ b/README @@ -0,0 +1,4 @@ + To install this on your own system, paste the following into the Terminal. + + git clone https://github.com/daogurtsov/VimLinux.git ~/.vim; +ln -s ~/.vim/vimrc ~/.vimrc diff --git a/after/plugin/TabularMaps.vim b/after/plugin/TabularMaps.vim new file mode 100755 index 0000000..20f7141 --- /dev/null +++ b/after/plugin/TabularMaps.vim @@ -0,0 +1,48 @@ +if !exists(':Tabularize') + finish " Tabular.vim wasn't loaded +endif + +let s:save_cpo = &cpo +set cpo&vim + +AddTabularPattern! assignment /[|&+*/%<>=!~-]\@!=]=\|=\~\)\@![|&+*/%<>=!~-]*=/l1r1 +AddTabularPattern! two_spaces / /l0 + +AddTabularPipeline! multiple_spaces / / map(a:lines, "substitute(v:val, ' *', ' ', 'g')") | tabular#TabularizeStrings(a:lines, ' ', 'l0') + +AddTabularPipeline! argument_list /(.*)/ map(a:lines, 'substitute(v:val, ''\s*\([(,)]\)\s*'', ''\1'', ''g'')') + \ | tabular#TabularizeStrings(a:lines, '[(,)]', 'l0') + \ | map(a:lines, 'substitute(v:val, ''\(\s*\),'', '',\1 '', "g")') + \ | map(a:lines, 'substitute(v:val, ''\s*)'', ")", "g")') + +function! SplitCDeclarations(lines) + let rv = [] + for line in a:lines + " split the line into declaractions + let split = split(line, '\s*[,;]\s*') + " separate the type from the first declaration + let type = substitute(split[0], '\%(\%([&*]\s*\)*\)\=\k\+$', '', '') + " add the ; back on every declaration + call map(split, 'v:val . ";"') + " add the first element to the return as-is, and remove it from the list + let rv += [ remove(split, 0) ] + " transform the other elements by adding the type on at the beginning + call map(split, 'type . v:val') + " and add them all to the return + let rv += split + endfor + return rv +endfunction + +AddTabularPipeline! split_declarations /,.*;/ SplitCDeclarations(a:lines) + +AddTabularPattern! ternary_operator /^.\{-}\zs?\|:/l1 + +AddTabularPattern! cpp_io /<<\|>>/l1 + +AddTabularPattern! pascal_assign /:=/l1 + +AddTabularPattern! trailing_c_comments /\/\*\|\*\/\|\/\//l1 + +let &cpo = s:save_cpo +unlet s:save_cpo diff --git a/after/plugin/snipMate.vim b/after/plugin/snipMate.vim new file mode 100644 index 0000000..03e79ae --- /dev/null +++ b/after/plugin/snipMate.vim @@ -0,0 +1,35 @@ +" These are the mappings for snipMate.vim. Putting it here ensures that it +" will be mapped after other plugins such as supertab.vim. +if !exists('loaded_snips') || exists('s:did_snips_mappings') + finish +endif +let s:did_snips_mappings = 1 + +ino =TriggerSnippet() +snor i=TriggerSnippet() +ino =BackwardsSnippet() +snor i=BackwardsSnippet() +ino =ShowAvailableSnips() + +" The default mappings for these are annoying & sometimes break snipMate. +" You can change them back if you want, I've put them here for convenience. +snor b +snor a +snor bi +snor ' b' +snor ` b` +snor % b% +snor U bU +snor ^ b^ +snor \ b\ +snor b + +" By default load snippets in snippets_dir +if empty(snippets_dir) + finish +endif + +call GetSnippets(snippets_dir, '_') " Get global snippets + +au FileType * if &ft != 'help' | call GetSnippets(snippets_dir, &ft) | endif +" vim:noet:sw=4:ts=4:ft=vim diff --git a/autoload/acp.vim b/autoload/acp.vim new file mode 100644 index 0000000..827bbcc --- /dev/null +++ b/autoload/acp.vim @@ -0,0 +1,431 @@ +"============================================================================= +" Copyright (c) 2007-2009 Takeshi NISHIDA +" +"============================================================================= +" LOAD GUARD {{{1 + +if exists('g:loaded_autoload_acp') || v:version < 702 + finish +endif +let g:loaded_autoload_acp = 1 + +" }}}1 +"============================================================================= +" GLOBAL FUNCTIONS: {{{1 + +" +function acp#enable() + call acp#disable() + + augroup AcpGlobalAutoCommand + autocmd! + autocmd InsertEnter * unlet! s:posLast s:lastUncompletable + autocmd InsertLeave * call s:finishPopup(1) + augroup END + + if g:acp_mappingDriven + call s:mapForMappingDriven() + else + autocmd AcpGlobalAutoCommand CursorMovedI * call s:feedPopup() + endif + + nnoremap i i=feedPopup() + nnoremap a a=feedPopup() + nnoremap R R=feedPopup() +endfunction + +" +function acp#disable() + call s:unmapForMappingDriven() + augroup AcpGlobalAutoCommand + autocmd! + augroup END + nnoremap i | nunmap i + nnoremap a | nunmap a + nnoremap R | nunmap R +endfunction + +" +function acp#lock() + let s:lockCount += 1 +endfunction + +" +function acp#unlock() + let s:lockCount -= 1 + if s:lockCount < 0 + let s:lockCount = 0 + throw "AutoComplPop: not locked" + endif +endfunction + +" +function acp#meetsForSnipmate(context) + if g:acp_behaviorSnipmateLength < 0 + return 0 + endif + let matches = matchlist(a:context, '\(^\|\s\|\<\)\(\u\{' . + \ g:acp_behaviorSnipmateLength . ',}\)$') + return !empty(matches) && !empty(s:getMatchingSnipItems(matches[2])) +endfunction + +" +function acp#meetsForKeyword(context) + if g:acp_behaviorKeywordLength < 0 + return 0 + endif + let matches = matchlist(a:context, '\(\k\{' . g:acp_behaviorKeywordLength . ',}\)$') + if empty(matches) + return 0 + endif + for ignore in g:acp_behaviorKeywordIgnores + if stridx(ignore, matches[1]) == 0 + return 0 + endif + endfor + return 1 +endfunction + +" +function acp#meetsForFile(context) + if g:acp_behaviorFileLength < 0 + return 0 + endif + if has('win32') || has('win64') + let separator = '[/\\]' + else + let separator = '\/' + endif + if a:context !~ '\f' . separator . '\f\{' . g:acp_behaviorFileLength . ',}$' + return 0 + endif + return a:context !~ '[*/\\][/\\]\f*$\|[^[:print:]]\f*$' +endfunction + +" +function acp#meetsForRubyOmni(context) + if !has('ruby') + return 0 + endif + if g:acp_behaviorRubyOmniMethodLength >= 0 && + \ a:context =~ '[^. \t]\(\.\|::\)\k\{' . + \ g:acp_behaviorRubyOmniMethodLength . ',}$' + return 1 + endif + if g:acp_behaviorRubyOmniSymbolLength >= 0 && + \ a:context =~ '\(^\|[^:]\):\k\{' . + \ g:acp_behaviorRubyOmniSymbolLength . ',}$' + return 1 + endif + return 0 +endfunction + +" +function acp#meetsForPythonOmni(context) + return has('python') && g:acp_behaviorPythonOmniLength >= 0 && + \ a:context =~ '\k\.\k\{' . g:acp_behaviorPythonOmniLength . ',}$' +endfunction + +" +function acp#meetsForPerlOmni(context) + return g:acp_behaviorPerlOmniLength >= 0 && + \ a:context =~ '\w->\k\{' . g:acp_behaviorPerlOmniLength . ',}$' +endfunction + +" +function acp#meetsForXmlOmni(context) + return g:acp_behaviorXmlOmniLength >= 0 && + \ a:context =~ '\(<\|<\/\|<[^>]\+ \|<[^>]\+=\"\)\k\{' . + \ g:acp_behaviorXmlOmniLength . ',}$' +endfunction + +" +function acp#meetsForHtmlOmni(context) + return g:acp_behaviorHtmlOmniLength >= 0 && + \ a:context =~ '\(<\|<\/\|<[^>]\+ \|<[^>]\+=\"\)\k\{' . + \ g:acp_behaviorHtmlOmniLength . ',}$' +endfunction + +" +function acp#meetsForCssOmni(context) + if g:acp_behaviorCssOmniPropertyLength >= 0 && + \ a:context =~ '\(^\s\|[;{]\)\s*\k\{' . + \ g:acp_behaviorCssOmniPropertyLength . ',}$' + return 1 + endif + if g:acp_behaviorCssOmniValueLength >= 0 && + \ a:context =~ '[:@!]\s*\k\{' . + \ g:acp_behaviorCssOmniValueLength . ',}$' + return 1 + endif + return 0 +endfunction + +" +function acp#completeSnipmate(findstart, base) + if a:findstart + let s:posSnipmateCompletion = len(matchstr(s:getCurrentText(), '.*\U')) + return s:posSnipmateCompletion + endif + let lenBase = len(a:base) + let items = filter(GetSnipsInCurrentScope(), + \ 'strpart(v:key, 0, lenBase) ==? a:base') + return map(sort(items(items)), 's:makeSnipmateItem(v:val[0], v:val[1])') +endfunction + +" +function acp#onPopupCloseSnipmate() + let word = s:getCurrentText()[s:posSnipmateCompletion :] + for trigger in keys(GetSnipsInCurrentScope()) + if word ==# trigger + call feedkeys("\=TriggerSnippet()\", "n") + return 0 + endif + endfor + return 1 +endfunction + +" +function acp#onPopupPost() + " to clear = expression on command-line + echo '' + if pumvisible() + inoremap acp#onBs() + inoremap acp#onBs() + " a command to restore to original text and select the first match + return (s:behavsCurrent[s:iBehavs].command =~# "\" ? "\\" + \ : "\\") + endif + let s:iBehavs += 1 + if len(s:behavsCurrent) > s:iBehavs + call s:setCompletefunc() + return printf("\%s\=acp#onPopupPost()\", + \ s:behavsCurrent[s:iBehavs].command) + else + let s:lastUncompletable = { + \ 'word': s:getCurrentWord(), + \ 'commands': map(copy(s:behavsCurrent), 'v:val.command')[1:], + \ } + call s:finishPopup(0) + return "\" + endif +endfunction + +" +function acp#onBs() + " using "matchstr" and not "strpart" in order to handle multi-byte + " characters + if call(s:behavsCurrent[s:iBehavs].meets, + \ [matchstr(s:getCurrentText(), '.*\ze.')]) + return "\" + endif + return "\\" +endfunction + +" }}}1 +"============================================================================= +" LOCAL FUNCTIONS: {{{1 + +" +function s:mapForMappingDriven() + call s:unmapForMappingDriven() + let s:keysMappingDriven = [ + \ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', + \ 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + \ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', + \ 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + \ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + \ '-', '_', '~', '^', '.', ',', ':', '!', '#', '=', '%', '$', '@', '<', '>', '/', '\', + \ '', '', '', ] + for key in s:keysMappingDriven + execute printf('inoremap %s %s=feedPopup()', + \ key, key) + endfor +endfunction + +" +function s:unmapForMappingDriven() + if !exists('s:keysMappingDriven') + return + endif + for key in s:keysMappingDriven + execute 'iunmap ' . key + endfor + let s:keysMappingDriven = [] +endfunction + +" +function s:setTempOption(group, name, value) + call extend(s:tempOptionSet[a:group], { a:name : eval('&' . a:name) }, 'keep') + execute printf('let &%s = a:value', a:name) +endfunction + +" +function s:restoreTempOptions(group) + for [name, value] in items(s:tempOptionSet[a:group]) + execute printf('let &%s = value', name) + endfor + let s:tempOptionSet[a:group] = {} +endfunction + +" +function s:getCurrentWord() + return matchstr(s:getCurrentText(), '\k*$') +endfunction + +" +function s:getCurrentText() + return strpart(getline('.'), 0, col('.') - 1) +endfunction + +" +function s:getPostText() + return strpart(getline('.'), col('.') - 1) +endfunction + +" +function s:isModifiedSinceLastCall() + if exists('s:posLast') + let posPrev = s:posLast + let nLinesPrev = s:nLinesLast + let textPrev = s:textLast + endif + let s:posLast = getpos('.') + let s:nLinesLast = line('$') + let s:textLast = getline('.') + if !exists('posPrev') + return 1 + elseif posPrev[1] != s:posLast[1] || nLinesPrev != s:nLinesLast + return (posPrev[1] - s:posLast[1] == nLinesPrev - s:nLinesLast) + elseif textPrev ==# s:textLast + return 0 + elseif posPrev[2] > s:posLast[2] + return 1 + elseif has('gui_running') && has('multi_byte') + " NOTE: auto-popup causes a strange behavior when IME/XIM is working + return posPrev[2] + 1 == s:posLast[2] + endif + return posPrev[2] != s:posLast[2] +endfunction + +" +function s:makeCurrentBehaviorSet() + let modified = s:isModifiedSinceLastCall() + if exists('s:behavsCurrent[s:iBehavs].repeat') && s:behavsCurrent[s:iBehavs].repeat + let behavs = [ s:behavsCurrent[s:iBehavs] ] + elseif exists('s:behavsCurrent[s:iBehavs]') + return [] + elseif modified + let behavs = copy(exists('g:acp_behavior[&filetype]') + \ ? g:acp_behavior[&filetype] + \ : g:acp_behavior['*']) + else + return [] + endif + let text = s:getCurrentText() + call filter(behavs, 'call(v:val.meets, [text])') + let s:iBehavs = 0 + if exists('s:lastUncompletable') && + \ stridx(s:getCurrentWord(), s:lastUncompletable.word) == 0 && + \ map(copy(behavs), 'v:val.command') ==# s:lastUncompletable.commands + let behavs = [] + else + unlet! s:lastUncompletable + endif + return behavs +endfunction + +" +function s:feedPopup() + " NOTE: CursorMovedI is not triggered while the popup menu is visible. And + " it will be triggered when popup menu is disappeared. + if s:lockCount > 0 || pumvisible() || &paste + return '' + endif + if exists('s:behavsCurrent[s:iBehavs].onPopupClose') + if !call(s:behavsCurrent[s:iBehavs].onPopupClose, []) + call s:finishPopup(1) + return '' + endif + endif + let s:behavsCurrent = s:makeCurrentBehaviorSet() + if empty(s:behavsCurrent) + call s:finishPopup(1) + return '' + endif + " In case of dividing words by symbols (e.g. "for(int", "ab==cd") while a + " popup menu is visible, another popup is not available unless input + " or try popup once. So first completion is duplicated. + call insert(s:behavsCurrent, s:behavsCurrent[s:iBehavs]) + call s:setTempOption(s:GROUP0, 'spell', 0) + call s:setTempOption(s:GROUP0, 'completeopt', 'menuone' . (g:acp_completeoptPreview ? ',preview' : '')) + call s:setTempOption(s:GROUP0, 'complete', g:acp_completeOption) + call s:setTempOption(s:GROUP0, 'ignorecase', g:acp_ignorecaseOption) + " NOTE: With CursorMovedI driven, Set 'lazyredraw' to avoid flickering. + " With Mapping driven, set 'nolazyredraw' to make a popup menu visible. + call s:setTempOption(s:GROUP0, 'lazyredraw', !g:acp_mappingDriven) + " NOTE: 'textwidth' must be restored after . + call s:setTempOption(s:GROUP1, 'textwidth', 0) + call s:setCompletefunc() + call feedkeys(s:behavsCurrent[s:iBehavs].command . "\=acp#onPopupPost()\", 'n') + return '' " this function is called by = +endfunction + +" +function s:finishPopup(fGroup1) + inoremap | iunmap + inoremap | iunmap + let s:behavsCurrent = [] + call s:restoreTempOptions(s:GROUP0) + if a:fGroup1 + call s:restoreTempOptions(s:GROUP1) + endif +endfunction + +" +function s:setCompletefunc() + if exists('s:behavsCurrent[s:iBehavs].completefunc') + call s:setTempOption(0, 'completefunc', s:behavsCurrent[s:iBehavs].completefunc) + endif +endfunction + +" +function s:makeSnipmateItem(key, snip) + if type(a:snip) == type([]) + let descriptions = map(copy(a:snip), 'v:val[0]') + let snipFormatted = '[MULTI] ' . join(descriptions, ', ') + else + let snipFormatted = substitute(a:snip, '\(\n\|\s\)\+', ' ', 'g') + endif + return { + \ 'word': a:key, + \ 'menu': strpart(snipFormatted, 0, 80), + \ } +endfunction + +" +function s:getMatchingSnipItems(base) + let key = a:base . "\n" + if !exists('s:snipItems[key]') + let s:snipItems[key] = items(GetSnipsInCurrentScope()) + call filter(s:snipItems[key], 'strpart(v:val[0], 0, len(a:base)) ==? a:base') + call map(s:snipItems[key], 's:makeSnipmateItem(v:val[0], v:val[1])') + endif + return s:snipItems[key] +endfunction + +" }}}1 +"============================================================================= +" INITIALIZATION {{{1 + +let s:GROUP0 = 0 +let s:GROUP1 = 1 +let s:lockCount = 0 +let s:behavsCurrent = [] +let s:iBehavs = 0 +let s:tempOptionSet = [{}, {}] +let s:snipItems = {} + +" }}}1 +"============================================================================= +" vim: set fdm=marker: diff --git a/autoload/snipMate.vim b/autoload/snipMate.vim new file mode 100644 index 0000000..dcd28f6 --- /dev/null +++ b/autoload/snipMate.vim @@ -0,0 +1,433 @@ +fun! Filename(...) + let filename = expand('%:t:r') + if filename == '' | return a:0 == 2 ? a:2 : '' | endif + return !a:0 || a:1 == '' ? filename : substitute(a:1, '$1', filename, 'g') +endf + +fun s:RemoveSnippet() + unl! g:snipPos s:curPos s:snipLen s:endCol s:endLine s:prevLen + \ s:lastBuf s:oldWord + if exists('s:update') + unl s:startCol s:origWordLen s:update + if exists('s:oldVars') | unl s:oldVars s:oldEndCol | endif + endif + aug! snipMateAutocmds +endf + +fun snipMate#expandSnip(snip, col) + let lnum = line('.') | let col = a:col + + let snippet = s:ProcessSnippet(a:snip) + " Avoid error if eval evaluates to nothing + if snippet == '' | return '' | endif + + " Expand snippet onto current position with the tab stops removed + let snipLines = split(substitute(snippet, '$\d\+\|${\d\+.\{-}}', '', 'g'), "\n", 1) + + let line = getline(lnum) + let afterCursor = strpart(line, col - 1) + " Keep text after the cursor + if afterCursor != "\t" && afterCursor != ' ' + let line = strpart(line, 0, col - 1) + let snipLines[-1] .= afterCursor + else + let afterCursor = '' + " For some reason the cursor needs to move one right after this + if line != '' && col == 1 && &ve != 'all' && &ve != 'onemore' + let col += 1 + endif + endif + + call setline(lnum, line.snipLines[0]) + + " Autoindent snippet according to previous indentation + let indent = matchend(line, '^.\{-}\ze\(\S\|$\)') + 1 + call append(lnum, map(snipLines[1:], "'".strpart(line, 0, indent - 1)."'.v:val")) + + " Open any folds snippet expands into + if &fen | sil! exe lnum.','.(lnum + len(snipLines) - 1).'foldopen' | endif + + let [g:snipPos, s:snipLen] = s:BuildTabStops(snippet, lnum, col - indent, indent) + + if s:snipLen + aug snipMateAutocmds + au CursorMovedI * call s:UpdateChangedSnip(0) + au InsertEnter * call s:UpdateChangedSnip(1) + aug END + let s:lastBuf = bufnr(0) " Only expand snippet while in current buffer + let s:curPos = 0 + let s:endCol = g:snipPos[s:curPos][1] + let s:endLine = g:snipPos[s:curPos][0] + + call cursor(g:snipPos[s:curPos][0], g:snipPos[s:curPos][1]) + let s:prevLen = [line('$'), col('$')] + if g:snipPos[s:curPos][2] != -1 | return s:SelectWord() | endif + else + unl g:snipPos s:snipLen + " Place cursor at end of snippet if no tab stop is given + let newlines = len(snipLines) - 1 + call cursor(lnum + newlines, indent + len(snipLines[-1]) - len(afterCursor) + \ + (newlines ? 0: col - 1)) + endif + return '' +endf + +" Prepare snippet to be processed by s:BuildTabStops +fun s:ProcessSnippet(snip) + let snippet = a:snip + " Evaluate eval (`...`) expressions. + " Using a loop here instead of a regex fixes a bug with nested "\=". + if stridx(snippet, '`') != -1 + while match(snippet, '`.\{-}`') != -1 + let snippet = substitute(snippet, '`.\{-}`', + \ substitute(eval(matchstr(snippet, '`\zs.\{-}\ze`')), + \ "\n\\%$", '', ''), '') + endw + let snippet = substitute(snippet, "\r", "\n", 'g') + endif + + " Place all text after a colon in a tab stop after the tab stop + " (e.g. "${#:foo}" becomes "${:foo}foo"). + " This helps tell the position of the tab stops later. + let snippet = substitute(snippet, '${\d\+:\(.\{-}\)}', '&\1', 'g') + + " Update the a:snip so that all the $# become the text after + " the colon in their associated ${#}. + " (e.g. "${1:foo}" turns all "$1"'s into "foo") + let i = 1 + while stridx(snippet, '${'.i) != -1 + let s = matchstr(snippet, '${'.i.':\zs.\{-}\ze}') + if s != '' + let snippet = substitute(snippet, '$'.i, s.'&', 'g') + endif + let i += 1 + endw + + if &et " Expand tabs to spaces if 'expandtab' is set. + return substitute(snippet, '\t', repeat(' ', &sts ? &sts : &sw), 'g') + endif + return snippet +endf + +" Counts occurences of haystack in needle +fun s:Count(haystack, needle) + let counter = 0 + let index = stridx(a:haystack, a:needle) + while index != -1 + let index = stridx(a:haystack, a:needle, index+1) + let counter += 1 + endw + return counter +endf + +" Builds a list of a list of each tab stop in the snippet containing: +" 1.) The tab stop's line number. +" 2.) The tab stop's column number +" (by getting the length of the string between the last "\n" and the +" tab stop). +" 3.) The length of the text after the colon for the current tab stop +" (e.g. "${1:foo}" would return 3). If there is no text, -1 is returned. +" 4.) If the "${#:}" construct is given, another list containing all +" the matches of "$#", to be replaced with the placeholder. This list is +" composed the same way as the parent; the first item is the line number, +" and the second is the column. +fun s:BuildTabStops(snip, lnum, col, indent) + let snipPos = [] + let i = 1 + let withoutVars = substitute(a:snip, '$\d\+', '', 'g') + while stridx(a:snip, '${'.i) != -1 + let beforeTabStop = matchstr(withoutVars, '^.*\ze${'.i.'\D') + let withoutOthers = substitute(withoutVars, '${\('.i.'\D\)\@!\d\+.\{-}}', '', 'g') + + let j = i - 1 + call add(snipPos, [0, 0, -1]) + let snipPos[j][0] = a:lnum + s:Count(beforeTabStop, "\n") + let snipPos[j][1] = a:indent + len(matchstr(withoutOthers, '.*\(\n\|^\)\zs.*\ze${'.i.'\D')) + if snipPos[j][0] == a:lnum | let snipPos[j][1] += a:col | endif + + " Get all $# matches in another list, if ${#:name} is given + if stridx(withoutVars, '${'.i.':') != -1 + let snipPos[j][2] = len(matchstr(withoutVars, '${'.i.':\zs.\{-}\ze}')) + let dots = repeat('.', snipPos[j][2]) + call add(snipPos[j], []) + let withoutOthers = substitute(a:snip, '${\d\+.\{-}}\|$'.i.'\@!\d\+', '', 'g') + while match(withoutOthers, '$'.i.'\(\D\|$\)') != -1 + let beforeMark = matchstr(withoutOthers, '^.\{-}\ze'.dots.'$'.i.'\(\D\|$\)') + call add(snipPos[j][3], [0, 0]) + let snipPos[j][3][-1][0] = a:lnum + s:Count(beforeMark, "\n") + let snipPos[j][3][-1][1] = a:indent + (snipPos[j][3][-1][0] > a:lnum + \ ? len(matchstr(beforeMark, '.*\n\zs.*')) + \ : a:col + len(beforeMark)) + let withoutOthers = substitute(withoutOthers, '$'.i.'\ze\(\D\|$\)', '', '') + endw + endif + let i += 1 + endw + return [snipPos, i - 1] +endf + +fun snipMate#jumpTabStop(backwards) + let leftPlaceholder = exists('s:origWordLen') + \ && s:origWordLen != g:snipPos[s:curPos][2] + if leftPlaceholder && exists('s:oldEndCol') + let startPlaceholder = s:oldEndCol + 1 + endif + + if exists('s:update') + call s:UpdatePlaceholderTabStops() + else + call s:UpdateTabStops() + endif + + " Don't reselect placeholder if it has been modified + if leftPlaceholder && g:snipPos[s:curPos][2] != -1 + if exists('startPlaceholder') + let g:snipPos[s:curPos][1] = startPlaceholder + else + let g:snipPos[s:curPos][1] = col('.') + let g:snipPos[s:curPos][2] = 0 + endif + endif + + let s:curPos += a:backwards ? -1 : 1 + " Loop over the snippet when going backwards from the beginning + if s:curPos < 0 | let s:curPos = s:snipLen - 1 | endif + + if s:curPos == s:snipLen + let sMode = s:endCol == g:snipPos[s:curPos-1][1]+g:snipPos[s:curPos-1][2] + call s:RemoveSnippet() + return sMode ? "\" : TriggerSnippet() + endif + + call cursor(g:snipPos[s:curPos][0], g:snipPos[s:curPos][1]) + + let s:endLine = g:snipPos[s:curPos][0] + let s:endCol = g:snipPos[s:curPos][1] + let s:prevLen = [line('$'), col('$')] + + return g:snipPos[s:curPos][2] == -1 ? '' : s:SelectWord() +endf + +fun s:UpdatePlaceholderTabStops() + let changeLen = s:origWordLen - g:snipPos[s:curPos][2] + unl s:startCol s:origWordLen s:update + if !exists('s:oldVars') | return | endif + " Update tab stops in snippet if text has been added via "$#" + " (e.g., in "${1:foo}bar$1${2}"). + if changeLen != 0 + let curLine = line('.') + + for pos in g:snipPos + if pos == g:snipPos[s:curPos] | continue | endif + let changed = pos[0] == curLine && pos[1] > s:oldEndCol + let changedVars = 0 + let endPlaceholder = pos[2] - 1 + pos[1] + " Subtract changeLen from each tab stop that was after any of + " the current tab stop's placeholders. + for [lnum, col] in s:oldVars + if lnum > pos[0] | break | endif + if pos[0] == lnum + if pos[1] > col || (pos[2] == -1 && pos[1] == col) + let changed += 1 + elseif col < endPlaceholder + let changedVars += 1 + endif + endif + endfor + let pos[1] -= changeLen * changed + let pos[2] -= changeLen * changedVars " Parse variables within placeholders + " e.g., "${1:foo} ${2:$1bar}" + + if pos[2] == -1 | continue | endif + " Do the same to any placeholders in the other tab stops. + for nPos in pos[3] + let changed = nPos[0] == curLine && nPos[1] > s:oldEndCol + for [lnum, col] in s:oldVars + if lnum > nPos[0] | break | endif + if nPos[0] == lnum && nPos[1] > col + let changed += 1 + endif + endfor + let nPos[1] -= changeLen * changed + endfor + endfor + endif + unl s:endCol s:oldVars s:oldEndCol +endf + +fun s:UpdateTabStops() + let changeLine = s:endLine - g:snipPos[s:curPos][0] + let changeCol = s:endCol - g:snipPos[s:curPos][1] + if exists('s:origWordLen') + let changeCol -= s:origWordLen + unl s:origWordLen + endif + let lnum = g:snipPos[s:curPos][0] + let col = g:snipPos[s:curPos][1] + " Update the line number of all proceeding tab stops if has + " been inserted. + if changeLine != 0 + let changeLine -= 1 + for pos in g:snipPos + if pos[0] >= lnum + if pos[0] == lnum | let pos[1] += changeCol | endif + let pos[0] += changeLine + endif + if pos[2] == -1 | continue | endif + for nPos in pos[3] + if nPos[0] >= lnum + if nPos[0] == lnum | let nPos[1] += changeCol | endif + let nPos[0] += changeLine + endif + endfor + endfor + elseif changeCol != 0 + " Update the column of all proceeding tab stops if text has + " been inserted/deleted in the current line. + for pos in g:snipPos + if pos[1] >= col && pos[0] == lnum + let pos[1] += changeCol + endif + if pos[2] == -1 | continue | endif + for nPos in pos[3] + if nPos[0] > lnum | break | endif + if nPos[0] == lnum && nPos[1] >= col + let nPos[1] += changeCol + endif + endfor + endfor + endif +endf + +fun s:SelectWord() + let s:origWordLen = g:snipPos[s:curPos][2] + let s:oldWord = strpart(getline('.'), g:snipPos[s:curPos][1] - 1, + \ s:origWordLen) + let s:prevLen[1] -= s:origWordLen + if !empty(g:snipPos[s:curPos][3]) + let s:update = 1 + let s:endCol = -1 + let s:startCol = g:snipPos[s:curPos][1] - 1 + endif + if !s:origWordLen | return '' | endif + let l = col('.') != 1 ? 'l' : '' + if &sel == 'exclusive' + return "\".l.'v'.s:origWordLen."l\" + endif + return s:origWordLen == 1 ? "\".l.'gh' + \ : "\".l.'v'.(s:origWordLen - 1)."l\" +endf + +" This updates the snippet as you type when text needs to be inserted +" into multiple places (e.g. in "${1:default text}foo$1bar$1", +" "default text" would be highlighted, and if the user types something, +" UpdateChangedSnip() would be called so that the text after "foo" & "bar" +" are updated accordingly) +" +" It also automatically quits the snippet if the cursor is moved out of it +" while in insert mode. +fun s:UpdateChangedSnip(entering) + if exists('g:snipPos') && bufnr(0) != s:lastBuf + call s:RemoveSnippet() + elseif exists('s:update') " If modifying a placeholder + if !exists('s:oldVars') && s:curPos + 1 < s:snipLen + " Save the old snippet & word length before it's updated + " s:startCol must be saved too, in case text is added + " before the snippet (e.g. in "foo$1${2}bar${1:foo}"). + let s:oldEndCol = s:startCol + let s:oldVars = deepcopy(g:snipPos[s:curPos][3]) + endif + let col = col('.') - 1 + + if s:endCol != -1 + let changeLen = col('$') - s:prevLen[1] + let s:endCol += changeLen + else " When being updated the first time, after leaving select mode + if a:entering | return | endif + let s:endCol = col - 1 + endif + + " If the cursor moves outside the snippet, quit it + if line('.') != g:snipPos[s:curPos][0] || col < s:startCol || + \ col - 1 > s:endCol + unl! s:startCol s:origWordLen s:oldVars s:update + return s:RemoveSnippet() + endif + + call s:UpdateVars() + let s:prevLen[1] = col('$') + elseif exists('g:snipPos') + if !a:entering && g:snipPos[s:curPos][2] != -1 + let g:snipPos[s:curPos][2] = -2 + endif + + let col = col('.') + let lnum = line('.') + let changeLine = line('$') - s:prevLen[0] + + if lnum == s:endLine + let s:endCol += col('$') - s:prevLen[1] + let s:prevLen = [line('$'), col('$')] + endif + if changeLine != 0 + let s:endLine += changeLine + let s:endCol = col + endif + + " Delete snippet if cursor moves out of it in insert mode + if (lnum == s:endLine && (col > s:endCol || col < g:snipPos[s:curPos][1])) + \ || lnum > s:endLine || lnum < g:snipPos[s:curPos][0] + call s:RemoveSnippet() + endif + endif +endf + +" This updates the variables in a snippet when a placeholder has been edited. +" (e.g., each "$1" in "${1:foo} $1bar $1bar") +fun s:UpdateVars() + let newWordLen = s:endCol - s:startCol + 1 + let newWord = strpart(getline('.'), s:startCol, newWordLen) + if newWord == s:oldWord || empty(g:snipPos[s:curPos][3]) + return + endif + + let changeLen = g:snipPos[s:curPos][2] - newWordLen + let curLine = line('.') + let startCol = col('.') + let oldStartSnip = s:startCol + let updateTabStops = changeLen != 0 + let i = 0 + + for [lnum, col] in g:snipPos[s:curPos][3] + if updateTabStops + let start = s:startCol + if lnum == curLine && col <= start + let s:startCol -= changeLen + let s:endCol -= changeLen + endif + for nPos in g:snipPos[s:curPos][3][(i):] + " This list is in ascending order, so quit if we've gone too far. + if nPos[0] > lnum | break | endif + if nPos[0] == lnum && nPos[1] > col + let nPos[1] -= changeLen + endif + endfor + if lnum == curLine && col > start + let col -= changeLen + let g:snipPos[s:curPos][3][i][1] = col + endif + let i += 1 + endif + + " "Very nomagic" is used here to allow special characters. + call setline(lnum, substitute(getline(lnum), '\%'.col.'c\V'. + \ escape(s:oldWord, '\'), escape(newWord, '\&'), '')) + endfor + if oldStartSnip != s:startCol + call cursor(0, startCol + s:startCol - oldStartSnip) + endif + + let s:oldWord = newWord + let g:snipPos[s:curPos][2] = newWordLen +endf +" vim:noet:sw=4:ts=4:ft=vim diff --git a/autoload/tabular.vim b/autoload/tabular.vim new file mode 100755 index 0000000..9ed6033 --- /dev/null +++ b/autoload/tabular.vim @@ -0,0 +1,283 @@ +" Tabular: Align columnar data using regex-designated column boundaries +" Maintainer: Matthew Wozniski (mjw@drexel.edu) +" Date: Thu, 11 Oct 2007 00:35:34 -0400 +" Version: 0.1 + +" Stupid vimscript crap {{{1 +let s:savecpo = &cpo +set cpo&vim + +" Private Functions {{{1 + +" Return the number of bytes in a string after expanding tabs to spaces. {{{2 +" This expansion is done based on the current value of 'tabstop' +function! s:Strlen(string) + let rv = 0 + let i = 0 + + for char in split(a:string, '\zs') + if char == "\t" + let rv += &ts - i + let i = 0 + else + let rv += 1 + let i = (i + 1) % &ts + endif + endfor + + return rv +endfunction + +" Align a string within a field {{{2 +" These functions do not trim leading and trailing spaces. + +" Right align 'string' in a field of size 'fieldwidth' +function! s:Right(string, fieldwidth) + let spaces = a:fieldwidth - s:Strlen(a:string) + return matchstr(a:string, '^\s*') . repeat(" ", spaces) . substitute(a:string, '^\s*', '', '') +endfunction + +" Left align 'string' in a field of size 'fieldwidth' +function! s:Left(string, fieldwidth) + let spaces = a:fieldwidth - s:Strlen(a:string) + return a:string . repeat(" ", spaces) +endfunction + +" Center align 'string' in a field of size 'fieldwidth' +function! s:Center(string, fieldwidth) + let spaces = a:fieldwidth - s:Strlen(a:string) + let right = spaces / 2 + let left = right + (right * 2 != spaces) + return repeat(" ", left) . a:string . repeat(" ", right) +endfunction + +" Remove spaces around a string {{{2 + +" Remove all trailing spaces from a string. +function! s:StripTrailingSpaces(string) + return matchstr(a:string, '^.\{-}\ze\s*$') +endfunction + +" Remove all leading spaces from a string. +function! s:StripLeadingSpaces(string) + return matchstr(a:string, '^\s*\zs.*$') +endfunction + +" Split a string into fields and delimiters {{{2 +" Like split(), but include the delimiters as elements +" All odd numbered elements are delimiters +" All even numbered elements are non-delimiters (including zero) +function! s:SplitDelim(string, delim) + let rv = [] + let beg = 0 + let idx = 0 + + let len = len(a:string) + + while 1 + let mid = match(a:string, a:delim, beg, 1) + if mid == -1 || mid == len + break + endif + + let matchstr = matchstr(a:string, a:delim, beg, 1) + let length = strlen(matchstr) + + if beg < mid + let rv += [ a:string[beg : mid-1] ] + else + let rv += [ "" ] + endif + + let beg = mid + length + let idx = beg + + if beg == mid + " Empty match, advance "beg" by one to avoid infinite loop + let rv += [ "" ] + let beg += 1 + else " beg > mid + let rv += [ a:string[mid : beg-1] ] + endif + endwhile + + let rv += [ strpart(a:string, idx) ] + + return rv +endfunction + +" Replace lines from `start' to `start + len - 1' with the given strings. {{{2 +" If more lines are needed to show all strings, they will be added. +" If there are too few strings to fill all lines, lines will be removed. +function! s:SetLines(start, len, strings) + if a:start > line('$') + 1 || a:start < 1 + throw "Invalid start line!" + endif + + if len(a:strings) > a:len + let fensave = &fen + let view = winsaveview() + call append(a:start + a:len - 1, repeat([''], len(a:strings) - a:len)) + call winrestview(view) + let &fen = fensave + elseif len(a:strings) < a:len + let fensave = &fen + let view = winsaveview() + sil exe (a:start + len(a:strings)) . ',' . (a:start + a:len - 1) . 'd_' + call winrestview(view) + let &fen = fensave + endif + + call setline(a:start, a:strings) +endfunction + +" Runs the given commandstring argument as an expression. {{{2 +" The commandstring expression is expected to reference the a:lines argument. +" If the commandstring expression returns a list the items of that list will +" replace the items in a:lines, otherwise the expression is assumed to have +" modified a:lines itself. +function! s:FilterString(lines, commandstring) + exe 'let rv = ' . a:commandstring + + if type(rv) == type(a:lines) && rv isnot a:lines + call filter(a:lines, 0) + call extend(a:lines, rv) + endif +endfunction + +" Public API {{{1 + +if !exists("g:tabular_default_format") + let g:tabular_default_format = "l1" +endif + +let s:formatelempat = '\%([lrc]\d\+\)' + +function! tabular#ElementFormatPattern() + return s:formatelempat +endfunction + +" Given a list of strings and a delimiter, split each string on every +" occurrence of the delimiter pattern, format each element according to either +" the provided format (optional) or the default format, and join them back +" together with enough space padding to guarantee that the nth delimiter of +" each string is aligned. +function! tabular#TabularizeStrings(strings, delim, ...) + if a:0 > 1 + echoerr "TabularizeStrings accepts only 2 or 3 arguments (got ".(a:0+2).")" + return 1 + endif + + let formatstr = (a:0 ? a:1 : g:tabular_default_format) + + if formatstr !~? s:formatelempat . '\+' + echoerr "Tabular: Invalid format \"" . formatstr . "\" specified!" + return 1 + endif + + let format = split(formatstr, s:formatelempat . '\zs') + + let lines = map(a:strings, 's:SplitDelim(v:val, a:delim)') + + " Strip spaces + " - Only from non-delimiters; spaces in delimiters must have been matched + " intentionally + " - Don't strip leading spaces from the first element; we like indenting. + for line in lines + if line[0] !~ '^\s*$' + let line[0] = s:StripTrailingSpaces(line[0]) + endif + if len(line) >= 3 + for i in range(2, len(line)-1, 2) + let line[i] = s:StripLeadingSpaces(s:StripTrailingSpaces(line[i])) + endfor + endif + endfor + + " Find the max length of each field + let maxes = [] + for line in lines + for i in range(len(line)) + if i == len(maxes) + let maxes += [ s:Strlen(line[i]) ] + else + let maxes[i] = max( [ maxes[i], s:Strlen(line[i]) ] ) + endif + endfor + endfor + + let lead_blank = empty(filter(copy(lines), 'v:val[0] =~ "\\S"')) + + " Concatenate the fields, according to the format pattern. + for idx in range(len(lines)) + let line = lines[idx] + for i in range(len(line)) + let how = format[i % len(format)][0] + let pad = format[i % len(format)][1:-1] + + if how =~? 'l' + let field = s:Left(line[i], maxes[i]) + elseif how =~? 'r' + let field = s:Right(line[i], maxes[i]) + elseif how =~? 'c' + let field = s:Center(line[i], maxes[i]) + endif + + let line[i] = field . (lead_blank && i == 0 ? '' : repeat(" ", pad)) + endfor + + let lines[idx] = s:StripTrailingSpaces(join(line, '')) + endfor +endfunction + +" Apply 0 or more filters, in sequence, to selected text in the buffer {{{2 +" The lines to be filtered are determined as follows: +" If the function is called with a range containing multiple lines, then +" those lines will be used as the range. +" If the function is called with no range or with a range of 1 line, then +" if "includepat" is not specified, +" that 1 line will be filtered, +" if "includepat" is specified and that line does not match it, +" no lines will be filtered +" if "includepat" is specified and that line does match it, +" all contiguous lines above and below the specified line matching the +" pattern will be filtered. +" +" The remaining arguments must each be a filter to apply to the text. +" Each filter must either be a String evaluating to a function to be called. +function! tabular#PipeRange(includepat, ...) range + let top = a:firstline + let bot = a:lastline + + if a:includepat != '' && top == bot + if top < 0 || top > line('$') || getline(top) !~ a:includepat + return + endif + while top > 1 && getline(top-1) =~ a:includepat + let top -= 1 + endwhile + while bot < line('$') && getline(bot+1) =~ a:includepat + let bot += 1 + endwhile + endif + + let lines = map(range(top, bot), 'getline(v:val)') + + for filter in a:000 + if type(filter) != type("") + echoerr "PipeRange: Bad filter: " . string(filter) + endif + + call s:FilterString(lines, filter) + + unlet filter + endfor + + call s:SetLines(top, bot - top + 1, lines) +endfunction + +" Stupid vimscript crap, part 2 {{{1 +let &cpo = s:savecpo +unlet s:savecpo + +" vim:set sw=2 sts=2 fdm=marker: diff --git a/autoload/tcomment.vim b/autoload/tcomment.vim new file mode 100644 index 0000000..40b49ef --- /dev/null +++ b/autoload/tcomment.vim @@ -0,0 +1,886 @@ +" tcomment.vim +" @Author: Tom Link (mailto:micathom AT gmail com?subject=[vim]) +" @Website: http://www.vim.org/account/profile.php?user_id=4037 +" @License: GPL (see http://www.gnu.org/licenses/gpl.txt) +" @Created: 2007-09-17. +" @Last Change: 2010-08-28. +" @Revision: 0.0.219 + +" call tlog#Log('Load: '. expand('')) " vimtlib-sfile + + +" If true, comment blank lines too +if !exists("g:tcommentBlankLines") + let g:tcommentBlankLines = 1 +endif + +" Guess the file type based on syntax names always or for some fileformat only +if !exists("g:tcommentGuessFileType") + let g:tcommentGuessFileType = 0 +endif +" In php documents, the php part is usually marked as phpRegion. We thus +" assume that the buffers default comment style isn't php but html +if !exists("g:tcommentGuessFileType_dsl") + let g:tcommentGuessFileType_dsl = 'xml' +endif +if !exists("g:tcommentGuessFileType_php") + let g:tcommentGuessFileType_php = 'html' +endif +if !exists("g:tcommentGuessFileType_html") + let g:tcommentGuessFileType_html = 1 +endif +if !exists("g:tcommentGuessFileType_tskeleton") + let g:tcommentGuessFileType_tskeleton = 1 +endif +if !exists("g:tcommentGuessFileType_vim") + let g:tcommentGuessFileType_vim = 1 +endif + +if !exists("g:tcommentIgnoreTypes_php") + let g:tcommentIgnoreTypes_php = 'sql' +endif + +if !exists('g:tcommentSyntaxMap') "{{{2 + let g:tcommentSyntaxMap = { + \ 'vimMzSchemeRegion': 'scheme', + \ 'vimPerlRegion': 'perl', + \ 'vimPythonRegion': 'python', + \ 'vimRubyRegion': 'ruby', + \ 'vimTclRegion': 'tcl', + \ } +endif + +" If you don't define these variables, TComment will use &commentstring +" instead. We override the default values here in order to have a blank after +" the comment marker. Block comments work only if we explicitly define the +" markup. +" The format for block comments is similar to normal commentstrings with the +" exception that the format strings for blocks can contain a second line that +" defines how "middle lines" (see :h format-comments) should be displayed. + +" I personally find this style rather irritating but here is an alternative +" definition that does this left-handed bar thing +if !exists("g:tcommentBlockC") + let g:tcommentBlockC = "/*%s */\n * " +endif +if !exists("g:tcommentBlockC2") + let g:tcommentBlockC2 = "/**%s */\n * " +endif +if !exists("g:tcommentInlineC") + let g:tcommentInlineC = "/* %s */" +endif + +if !exists("g:tcommentBlockXML") + let g:tcommentBlockXML = "\n " +endif +if !exists("g:tcommentInlineXML") + let g:tcommentInlineXML = "" +endif + +let s:typesDirty = 1 + +let s:definitions = {} + +" Currently this function just sets a variable +function! tcomment#DefineType(name, commentstring) + if !has_key(s:definitions, a:name) + let cdef = a:0 >= 1 ? a:1 : {} + let cdef.commentstring = a:commentstring + let s:definitions[a:name] = cdef + endif + let s:typesDirty = 1 +endf + +" Return 1 if a comment type is defined. +function! tcomment#TypeExists(name) + return has_key(s:definitions, a:name) +endf + +call tcomment#DefineType('aap', '# %s' ) +call tcomment#DefineType('ada', '-- %s' ) +call tcomment#DefineType('apache', '# %s' ) +call tcomment#DefineType('autoit', '; %s' ) +call tcomment#DefineType('asm', '; %s' ) +call tcomment#DefineType('awk', '# %s' ) +call tcomment#DefineType('catalog', '-- %s --' ) +call tcomment#DefineType('catalog_block', "--%s--\n " ) +call tcomment#DefineType('cpp', '// %s' ) +call tcomment#DefineType('cpp_inline', g:tcommentInlineC ) +call tcomment#DefineType('cpp_block', g:tcommentBlockC ) +call tcomment#DefineType('css', '/* %s */' ) +call tcomment#DefineType('css_inline', g:tcommentInlineC ) +call tcomment#DefineType('css_block', g:tcommentBlockC ) +call tcomment#DefineType('c', '/* %s */' ) +call tcomment#DefineType('c_inline', g:tcommentInlineC ) +call tcomment#DefineType('c_block', g:tcommentBlockC ) +call tcomment#DefineType('cfg', '# %s' ) +call tcomment#DefineType('conf', '# %s' ) +call tcomment#DefineType('crontab', '# %s' ) +call tcomment#DefineType('cs', '// %s' ) +call tcomment#DefineType('cs_inline', g:tcommentInlineC ) +call tcomment#DefineType('cs_block', g:tcommentBlockC ) +call tcomment#DefineType('desktop', '# %s' ) +call tcomment#DefineType('docbk', '' ) +call tcomment#DefineType('docbk_inline', g:tcommentInlineXML) +call tcomment#DefineType('docbk_block', g:tcommentBlockXML ) +call tcomment#DefineType('dosbatch', 'rem %s' ) +call tcomment#DefineType('dosini', '; %s' ) +call tcomment#DefineType('dsl', '; %s' ) +call tcomment#DefineType('dylan', '// %s' ) +call tcomment#DefineType('eiffel', '-- %s' ) +call tcomment#DefineType('erlang', '%%%% %s' ) +call tcomment#DefineType('eruby', '<%%# %s' ) +call tcomment#DefineType('gitcommit', '# %s' ) +call tcomment#DefineType('gtkrc', '# %s' ) +call tcomment#DefineType('groovy', '// %s' ) +call tcomment#DefineType('groovy_inline', g:tcommentInlineC ) +call tcomment#DefineType('groovy_block', g:tcommentBlockC ) +call tcomment#DefineType('groovy_doc_block', g:tcommentBlockC2 ) +call tcomment#DefineType('haskell', '-- %s' ) +call tcomment#DefineType('haskell_block', "{-%s-}\n " ) +call tcomment#DefineType('haskell_inline', '{- %s -}' ) +call tcomment#DefineType('html', '' ) +call tcomment#DefineType('html_inline', g:tcommentInlineXML) +call tcomment#DefineType('html_block', g:tcommentBlockXML ) +call tcomment#DefineType('io', '// %s' ) +call tcomment#DefineType('javaScript', '// %s' ) +call tcomment#DefineType('javaScript_inline', g:tcommentInlineC ) +call tcomment#DefineType('javaScript_block', g:tcommentBlockC ) +call tcomment#DefineType('javascript', '// %s' ) +call tcomment#DefineType('javascript_inline', g:tcommentInlineC ) +call tcomment#DefineType('javascript_block', g:tcommentBlockC ) +call tcomment#DefineType('java', '/* %s */' ) +call tcomment#DefineType('java_inline', g:tcommentInlineC ) +call tcomment#DefineType('java_block', g:tcommentBlockC ) +call tcomment#DefineType('java_doc_block', g:tcommentBlockC2 ) +call tcomment#DefineType('jproperties', '# %s' ) +call tcomment#DefineType('lisp', '; %s' ) +call tcomment#DefineType('lynx', '# %s' ) +call tcomment#DefineType('m4', 'dnl %s' ) +call tcomment#DefineType('mail', '> %s' ) +call tcomment#DefineType('msidl', '// %s' ) +call tcomment#DefineType('msidl_block', g:tcommentBlockC ) +call tcomment#DefineType('nroff', '.\\" %s' ) +call tcomment#DefineType('nsis', '# %s' ) +call tcomment#DefineType('objc', '/* %s */' ) +call tcomment#DefineType('objc_inline', g:tcommentInlineC ) +call tcomment#DefineType('objc_block', g:tcommentBlockC ) +call tcomment#DefineType('ocaml', '(* %s *)' ) +call tcomment#DefineType('ocaml_inline', '(* %s *)' ) +call tcomment#DefineType('ocaml_block', "(*%s*)\n " ) +call tcomment#DefineType('pascal', '(* %s *)' ) +call tcomment#DefineType('pascal_inline', '(* %s *)' ) +call tcomment#DefineType('pascal_block', "(*%s*)\n " ) +call tcomment#DefineType('perl', '# %s' ) +call tcomment#DefineType('perl_block', "=cut%s=cut" ) +call tcomment#DefineType('php', '// %s' ) +call tcomment#DefineType('php_inline', g:tcommentInlineC ) +call tcomment#DefineType('php_block', g:tcommentBlockC ) +call tcomment#DefineType('php_2_block', g:tcommentBlockC2 ) +call tcomment#DefineType('po', '# %s' ) +call tcomment#DefineType('prolog', '%% %s' ) +call tcomment#DefineType('rc', '// %s' ) +call tcomment#DefineType('readline', '# %s' ) +call tcomment#DefineType('ruby', '# %s' ) +call tcomment#DefineType('ruby_3', '### %s' ) +call tcomment#DefineType('ruby_block', "=begin rdoc%s=end") +call tcomment#DefineType('ruby_nodoc_block', "=begin%s=end" ) +call tcomment#DefineType('r', '# %s' ) +call tcomment#DefineType('sbs', "' %s" ) +call tcomment#DefineType('scheme', '; %s' ) +call tcomment#DefineType('sed', '# %s' ) +call tcomment#DefineType('sgml', '' ) +call tcomment#DefineType('sgml_inline', g:tcommentInlineXML) +call tcomment#DefineType('sgml_block', g:tcommentBlockXML ) +call tcomment#DefineType('sh', '# %s' ) +call tcomment#DefineType('sql', '-- %s' ) +call tcomment#DefineType('spec', '# %s' ) +call tcomment#DefineType('sps', '* %s.' ) +call tcomment#DefineType('sps_block', "* %s." ) +call tcomment#DefineType('spss', '* %s.' ) +call tcomment#DefineType('spss_block', "* %s." ) +call tcomment#DefineType('tcl', '# %s' ) +call tcomment#DefineType('tex', '%% %s' ) +call tcomment#DefineType('tpl', '' ) +call tcomment#DefineType('viki', '%% %s' ) +call tcomment#DefineType('viki_3', '%%%%%% %s' ) +call tcomment#DefineType('viki_inline', '{cmt: %s}' ) +call tcomment#DefineType('vim', '" %s' ) +call tcomment#DefineType('vim_3', '""" %s' ) +call tcomment#DefineType('websec', '# %s' ) +call tcomment#DefineType('x86conf', '# %s' ) +call tcomment#DefineType('xml', '' ) +call tcomment#DefineType('xml_inline', g:tcommentInlineXML) +call tcomment#DefineType('xml_block', g:tcommentBlockXML ) +call tcomment#DefineType('xs', '// %s' ) +call tcomment#DefineType('xs_block', g:tcommentBlockC ) +call tcomment#DefineType('xslt', '' ) +call tcomment#DefineType('xslt_inline', g:tcommentInlineXML) +call tcomment#DefineType('xslt_block', g:tcommentBlockXML ) +call tcomment#DefineType('yaml', '# %s' ) + + +function! s:DefaultValue(option) + exec 'let '. a:option .' = &'. a:option + exec 'set '. a:option .'&' + exec 'let default = &'. a:option + exec 'let &'. a:option .' = '. a:option + return default +endf + +let s:defaultComments = s:DefaultValue('comments') +let s:defaultCommentString = s:DefaultValue('commentstring') +let s:nullCommentString = '%s' + +" tcomment#Comment(line1, line2, ?commentMode, ?commentAnyway, ?args...) +" args... are either: +" 1. a list of key=value pairs where known keys are: +" as=STRING ... Use a specific comment definition +" col=N ... Start the comment at column N (in block mode; must +" be smaller than |indent()|) +" count=N ... Multiply the comment markers +" mode=STRING ... See the notes below on the "commentMode" argument +" begin=STRING ... Comment prefix +" end=STRING ... Comment postfix +" 2. 1-2 values for: ?commentPrefix, ?commentPostfix +" 3. a dictionary (internal use only) +" +" commentMode: +" G ... guess the value of commentMode +" B ... block (use extra lines for the comment markers) +" i ... maybe inline, guess +" I ... inline +" R ... right (comment the line right of the cursor) +" v ... visual +" o ... operator +" By default, each line in range will be commented by adding the comment +" prefix and postfix. +function! tcomment#Comment(beg, end, ...) + let commentMode = a:0 >= 1 ? a:1 : 'G' + let commentAnyway = a:0 >= 2 ? (a:2 == '!') : 0 + " TLogVAR a:beg, a:end, a:1, commentMode, commentAnyway + " save the cursor position + let pos = getpos('.') + let s:pos_end = getpos("'>") + if commentMode =~# 'i' + let commentMode = substitute(commentMode, '\Ci', line("'<") == line("'>") ? 'I' : 'G', 'g') + endif + let [cstart, cend] = s:GetStartEnd(commentMode) + " TLogVAR commentMode, cstart, cend + " get the correct commentstring + if a:0 >= 3 && type(a:3) == 4 + let cdef = a:3 + else + let cdef = s:GetCommentDefinition(a:beg, a:end, commentMode) + let ax = 3 + if a:0 >= 3 && a:3 != '' && stridx(a:3, '=') == -1 + let ax = 4 + let cdef.begin = a:3 + if a:0 >= 4 && a:4 != '' && stridx(a:4, '=') == -1 + let ax = 5 + let cdef.end = a:4 + endif + endif + if a:0 >= ax + call extend(cdef, s:ParseArgs(a:beg, a:end, commentMode, a:000[ax - 1 : -1])) + endif + if !empty(get(cdef, 'begin', '')) || !empty(get(cdef, 'end', '')) + let cdef.commentstring = s:EncodeCommentPart(get(cdef, 'begin', '')) + \ . '%s' + \ . s:EncodeCommentPart(get(cdef, 'end', '')) + endif + let commentMode = cdef.mode + endif + if get(cdef, 'count', 1) > 1 + call s:RepeatCommentstring(cdef) + endif + " echom "DBG" string(cdef) string(a:000) + let cms0 = s:BlockGetCommentString(cdef.commentstring) + let cms0 = escape(cms0, '\') + " make whitespace optional; this conflicts with comments that require some + " whitespace + let cmtCheck = substitute(cms0, '\([ ]\)', '\1\\?', 'g') + " turn commentstring into a search pattern + let cmtCheck = s:SPrintF(cmtCheck, '\(\_.\{-}\)') + " set commentMode and indentStr + let [indentStr, uncomment] = s:CommentDef(a:beg, a:end, cmtCheck, commentMode, cstart, cend) + " TLogVAR indentStr, uncomment + let col = get(cdef, 'col', -1) + if col >= 0 + let col -= 1 + let indent = len(indentStr) + if col > indent + let cms0 = repeat(' ', col - indent) . cms0 + else + let indentStr = repeat(' ', col) + endif + endif + if commentAnyway + let uncomment = 0 + endif + " go + if commentMode =~# 'B' + " We want a comment block + call s:CommentBlock(a:beg, a:end, uncomment, cmtCheck, cdef.commentstring, indentStr) + else + " call s:CommentLines(a:beg, a:end, cstart, cend, uncomment, cmtCheck, cms0, indentStr) + " We want commented lines + " final search pattern for uncommenting + let cmtCheck = escape('\V\^\(\s\{-}\)'. cmtCheck .'\$', '"/\') + " final pattern for commenting + let cmtReplace = escape(cms0, '"/') + silent exec a:beg .','. a:end .'s/\V'. + \ s:StartRx(cstart) . indentStr .'\zs\(\.\{-}\)'. s:EndRx(cend) .'/'. + \ '\=s:ProcessedLine('. uncomment .', submatch(0), "'. cmtCheck .'", "'. cmtReplace .'")/ge' + endif + " reposition cursor + " TLogVAR commentMode + if commentMode =~ '>' + call setpos('.', s:pos_end) + else + " TLogVAR pos + call setpos('.', pos) + endif +endf + + +function! s:GetStartEnd(commentMode) "{{{3 + let commentMode = a:commentMode + if commentMode =~# 'R' || commentMode =~# 'I' + let cstart = col("'<") + if cstart == 0 + let cstart = col('.') + endif + if commentMode =~# 'R' + let commentMode = substitute(commentMode, '\CR', 'G', 'g') + let cend = 0 + else + let cend = col("'>") + if commentMode =~# 'o' + let cend += 1 + endif + endif + else + let cstart = 0 + let cend = 0 + endif + return [cstart, cend] +endf + + +function! s:RepeatCommentstring(cdef) "{{{3 + let cms_fbeg = match(a:cdef.commentstring, '\s*%\@= 1 ? a:1 : '' + let bang = a:0 >= 2 ? a:2 : '' + if !exists('w:tcommentPos') + let w:tcommentPos = getpos(".") + endif + let sel_save = &selection + let &selection = "inclusive" + let reg_save = @@ + " let pos = getpos('.') + " TLogVAR a:type + try + if a:type == 'line' + silent exe "normal! '[V']" + let commentMode1 = 'G' + elseif a:type == 'block' + silent exe "normal! `[\`]" + let commentMode1 = 'I' + else + silent exe "normal! `[v`]" + let commentMode1 = 'i' + endif + if empty(commentMode) + let commentMode = commentMode1 + endif + let beg = line("'[") + let end = line("']") + norm!  + let commentMode .= g:tcommentOpModeExtra + call tcomment#Comment(beg, end, commentMode.'o', bang) + finally + let &selection = sel_save + let @@ = reg_save + if g:tcommentOpModeExtra !~ '>' + " TLogVAR pos + " call setpos('.', pos) + call setpos('.', w:tcommentPos) + unlet! w:tcommentPos + endif + endtry +endf + + +function! tcomment#OperatorLine(type) "{{{3 + call tcomment#Operator(a:type, 'G') +endf + + +function! tcomment#OperatorAnyway(type) "{{{3 + call tcomment#Operator(a:type, '', '!') +endf + + +function! tcomment#OperatorLineAnyway(type) "{{{3 + call tcomment#Operator(a:type, 'G', '!') +endf + + +" :display: tcomment#CommentAs(beg, end, commentAnyway, filetype, ?args...) +" Where args is either: +" 1. A count NUMBER +" 2. An args list (see the notes on the "args" argument of +" |tcomment#Comment()|) +" comment text as if it were of a specific filetype +function! tcomment#CommentAs(beg, end, commentAnyway, filetype, ...) + if a:filetype =~ '_block$' + let commentMode = 'B' + let ft = substitute(a:filetype, '_block$', '', '') + elseif a:filetype =~ '_inline$' + let commentMode = 'I' + let ft = substitute(a:filetype, '_inline$', '', '') + else + let commentMode = 'G' + let ft = a:filetype + endif + if a:0 >= 1 + if type(a:1) == 0 + let cdef = {'count': a:0 >= 1 ? a:1 : 1} + else + let cdef = s:ParseArgs(a:beg, a:end, commentMode, a:000) + endif + else + let cdef = {} + endif + " echom "DBG" string(cdef) + call extend(cdef, s:GetCommentDefinitionForType(a:beg, a:end, commentMode, ft)) + keepjumps call tcomment#Comment(a:beg, a:end, commentMode, a:commentAnyway, cdef) +endf + + +" collect all known comment types +function! tcomment#CollectFileTypes() + if s:typesDirty + let s:types = keys(s:definitions) + let s:typesRx = '\V\^\('. join(s:types, '\|') .'\)\(\u\.\*\)\?\$' + let s:typesDirty = 0 + endif +endf + +call tcomment#CollectFileTypes() + + +" return a list of filetypes for which a tcomment_{&ft} is defined +function! tcomment#Complete(ArgLead, CmdLine, CursorPos) "{{{3 + call tcomment#CollectFileTypes() + let completions = copy(s:types) + if index(completions, &filetype) != -1 + " TLogVAR &filetype + call insert(completions, &filetype) + endif + if !empty(a:ArgLead) + call filter(completions, 'v:val =~ ''\V\^''.a:ArgLead') + endif + let completions += tcomment#CompleteArgs(a:ArgLead, a:CmdLine, a:CursorPos) + return completions +endf + + +function! tcomment#CompleteArgs(ArgLead, CmdLine, CursorPos) "{{{3 + let completions = ['as=', 'col=', 'count=', 'mode=', 'begin=', 'end='] + if !empty(a:ArgLead) + if a:ArgLead =~ '^as=' + call tcomment#CollectFileTypes() + let completions += map(copy(s:types), '"as=". v:val') + endif + call filter(completions, 'v:val =~ ''\V\^''.a:ArgLead') + endif + return completions +endf + + +function! s:EncodeCommentPart(string) + return substitute(a:string, '%', '%%', 'g') +endf + + +function! s:GetCommentDefinitionForType(beg, end, commentMode, filetype) "{{{3 + let cdef = s:GetCommentDefinition(a:beg, a:end, a:commentMode, a:filetype) + let cms = cdef.commentstring + let commentMode = cdef.mode + let pre = substitute(cms, '%s.*$', '', '') + let pre = substitute(pre, '%%', '%', 'g') + let post = substitute(cms, '^.\{-}%s', '', '') + let post = substitute(post, '%%', '%', 'g') + let cdef.begin = pre + let cdef.end = post + return cdef +endf + + +" s:GetCommentDefinition(beg, end, commentMode, ?filetype="") +function! s:GetCommentDefinition(beg, end, commentMode, ...) + let ft = a:0 >= 1 ? a:1 : '' + if ft != '' + let cdef = s:GetCustomCommentString(ft, a:commentMode) + else + let cdef = {'mode': a:commentMode} + endif + let cms = get(cdef, 'commentstring', '') + if empty(cms) + if exists('b:commentstring') + let cms = b:commentstring + return s:GetCustomCommentString(&filetype, a:commentMode, cms) + elseif exists('b:commentStart') && b:commentStart != '' + let cms = s:EncodeCommentPart(b:commentStart) .' %s' + if exists('b:commentEnd') && b:commentEnd != '' + let cms = cms .' '. s:EncodeCommentPart(b:commentEnd) + endif + return s:GetCustomCommentString(&filetype, a:commentMode, cms) + elseif g:tcommentGuessFileType || (exists('g:tcommentGuessFileType_'. &filetype) + \ && g:tcommentGuessFileType_{&filetype} =~ '[^0]') + if g:tcommentGuessFileType_{&filetype} == 1 + let altFiletype = '' + else + let altFiletype = g:tcommentGuessFileType_{&filetype} + endif + return s:GuessFileType(a:beg, a:end, a:commentMode, &filetype, altFiletype) + else + return s:GetCustomCommentString(&filetype, a:commentMode, s:GuessCurrentCommentString(a:commentMode)) + endif + let cdef.commentstring = cms + endif + return cdef +endf + +" s:SPrintF(formatstring, ?values ...) +" => string +function! s:SPrintF(string, ...) + let n = 1 + let r = '' + let s = a:string + while 1 + let i = match(s, '%\(.\)') + if i >= 0 + let x = s[i + 1] + let r = r . strpart(s, 0, i) + let s = strpart(s, i + 2) + if x == '%' + let r = r.'%' + else + if a:0 >= n + let v = a:{n} + let n = n + 1 + else + echoerr 'Malformed format string (too many arguments required): '. a:string + endif + if x ==# 's' + let r = r.v + elseif x ==# 'S' + let r = r.'"'.v.'"' + else + echoerr 'Malformed format string: '. a:string + endif + endif + else + return r.s + endif + endwh +endf + +function! s:StartRx(pos) + if a:pos == 0 + return '\^' + else + return '\%'. a:pos .'c' + endif +endf + +function! s:EndRx(pos) + if a:pos == 0 + return '\$' + else + return '\%'. a:pos .'c' + endif +endf + +function! s:GetIndentString(line, start) + let start = a:start > 0 ? a:start - 1 : 0 + return substitute(strpart(getline(a:line), start), '\V\^\s\*\zs\.\*\$', '', '') +endf + +function! s:CommentDef(beg, end, checkRx, commentMode, cstart, cend) + let mdrx = '\V'. s:StartRx(a:cstart) .'\s\*'. a:checkRx .'\s\*'. s:EndRx(0) + let line = getline(a:beg) + if a:cstart != 0 && a:cend != 0 + let line = strpart(line, 0, a:cend - 1) + endif + let uncomment = (line =~ mdrx) + let indentStr = s:GetIndentString(a:beg, a:cstart) + let il = indent(a:beg) + let n = a:beg + 1 + while n <= a:end + if getline(n) =~ '\S' + let jl = indent(n) + if jl < il + let indentStr = s:GetIndentString(n, a:cstart) + let il = jl + endif + if a:commentMode =~# 'G' + if !(getline(n) =~ mdrx) + let uncomment = 0 + endif + endif + endif + let n = n + 1 + endwh + if a:commentMode =~# 'B' + let t = @t + try + silent exec 'norm! '. a:beg.'G1|v'.a:end.'G$"ty' + let uncomment = (@t =~ mdrx) + finally + let @t = t + endtry + endif + return [indentStr, uncomment] +endf + +function! s:ProcessedLine(uncomment, match, checkRx, replace) + " TLogVAR a:uncomment, a:match, a:checkRx, a:replace + if !(a:match =~ '\S' || g:tcommentBlankLines) + return a:match + endif + let ml = len(a:match) + if a:uncomment + let rv = substitute(a:match, a:checkRx, '\1\2', '') + else + let rv = s:SPrintF(a:replace, a:match) + endif + " TLogVAR rv + " let md = len(rv) - ml + let s:pos_end = getpos('.') + let s:pos_end[2] += len(rv) + " TLogVAR pe, md, a:match + if v:version > 702 || (v:version == 702 && has('patch407')) + let rv = escape(rv, ' ') + else + let rv = escape(rv, '\ ') + endif + let rv = substitute(rv, '\n', '\\\n', 'g') + return rv +endf + +function! s:CommentLines(beg, end, cstart, cend, uncomment, cmtCheck, cms0, indentStr) "{{{3 + " We want commented lines + " final search pattern for uncommenting + let cmtCheck = escape('\V\^\(\s\{-}\)'. a:cmtCheck .'\$', '"/\') + " final pattern for commenting + let cmtReplace = escape(a:cms0, '"/') + silent exec a:beg .','. a:end .'s/\V'. + \ s:StartRx(a:cstart) . a:indentStr .'\zs\(\.\{-}\)'. s:EndRx(a:cend) .'/'. + \ '\=s:ProcessedLine('. a:uncomment .', submatch(0), "'. a:cmtCheck .'", "'. cmtReplace .'")/ge' +endf + +function! s:CommentBlock(beg, end, uncomment, checkRx, replace, indentStr) + let t = @t + try + silent exec 'norm! '. a:beg.'G1|v'.a:end.'G$"td' + let ms = s:BlockGetMiddleString(a:replace) + let mx = escape(ms, '\') + if a:uncomment + let @t = substitute(@t, '\V\^\s\*'. a:checkRx .'\$', '\1', '') + if ms != '' + let @t = substitute(@t, '\V\n'. a:indentStr . mx, '\n'. a:indentStr, 'g') + endif + let @t = substitute(@t, '^\n', '', '') + let @t = substitute(@t, '\n\s*$', '', '') + else + let cs = s:BlockGetCommentString(a:replace) + let cs = a:indentStr . substitute(cs, '%s', '%s'. a:indentStr, '') + if ms != '' + let ms = a:indentStr . ms + let mx = a:indentStr . mx + let @t = substitute(@t, '^'. a:indentStr, '', 'g') + let @t = ms . substitute(@t, '\n'. a:indentStr, '\n'. mx, 'g') + endif + let @t = s:SPrintF(cs, "\n". @t ."\n") + endif + silent norm! "tP + finally + let @t = t + endtry +endf + +" inspired by Meikel Brandmeyer's EnhancedCommentify.vim +" this requires that a syntax names are prefixed by the filetype name +" s:GuessFileType(beg, end, commentMode, filetype, ?fallbackFiletype) +function! s:GuessFileType(beg, end, commentMode, filetype, ...) + if a:0 >= 1 && a:1 != '' + let cdef = s:GetCustomCommentString(a:1, a:commentMode) + if empty(cdef.commentstring, '') + let cdef.commentstring = s:GuessCurrentCommentString(a:commentMode) + endif + else + let cdef = {'commentstring': s:GuessCurrentCommentString(0), 'mode': s:CommentMode(a:commentMode, 'G')} + endif + let n = a:beg + " TLogVAR n, a:beg, a:end + while n <= a:end + let m = indent(n) + 1 + let le = len(getline(n)) + " TLogVAR m, le + while m < le + let syntaxName = synIDattr(synID(n, m, 1), 'name') + " TLogVAR syntaxName, n, m + let ftypeMap = get(g:tcommentSyntaxMap, syntaxName) + if !empty(ftypeMap) + " TLogVAR ftypeMap + return s:GetCustomCommentString(ftypeMap, a:commentMode, cdef.commentstring) + elseif syntaxName =~ s:typesRx + let ft = substitute(syntaxName, s:typesRx, '\1', '') + " TLogVAR ft + if exists('g:tcommentIgnoreTypes_'. a:filetype) && g:tcommentIgnoreTypes_{a:filetype} =~ '\<'.ft.'\>' + let m += 1 + else + return s:GetCustomCommentString(ft, a:commentMode, cdef.commentstring) + endif + elseif syntaxName == '' || syntaxName == 'None' || syntaxName =~ '^\u\+$' || syntaxName =~ '^\u\U*$' + let m += 1 + else + break + endif + endwh + let n += 1 + endwh + return cdef +endf + +function! s:CommentMode(commentMode, newmode) "{{{3 + return substitute(a:commentMode, '\w\+', a:newmode, 'g') +endf + +function! s:GuessCurrentCommentString(commentMode) + let valid_cms = (stridx(&commentstring, '%s') != -1) + if &commentstring != s:defaultCommentString && valid_cms + " The &commentstring appears to have been set and to be valid + return &commentstring + endif + if &comments != s:defaultComments + " the commentstring is the default one, so we assume that it wasn't + " explicitly set; we then try to reconstruct &cms from &comments + let cms = s:ConstructFromComments(a:commentMode) + if cms != s:nullCommentString + return cms + endif + endif + if valid_cms + " Before &commentstring appeared not to be set. As we don't know + " better we return it anyway if it is valid + return &commentstring + else + " &commentstring is invalid. So we return the identity string. + return s:nullCommentString + endif +endf + +function! s:ConstructFromComments(commentMode) + exec s:ExtractCommentsPart('') + if a:commentMode =~# 'G' && line != '' + return line .' %s' + endif + exec s:ExtractCommentsPart('s') + if s != '' + exec s:ExtractCommentsPart('e') + " if a:commentMode + " exec s:ExtractCommentsPart("m") + " if m != "" + " let m = "\n". m + " endif + " return s.'%s'.e.m + " else + return s.' %s '.e + " endif + endif + if line != '' + return line .' %s' + else + return s:nullCommentString + endif +endf + +function! s:ExtractCommentsPart(key) + " let key = a:key != "" ? a:key .'[^:]*' : "" + let key = a:key . '[bnflrxO0-9-]*' + let val = substitute(&comments, '^\(.\{-},\)\{-}'. key .':\([^,]\+\).*$', '\2', '') + if val == &comments + let val = '' + else + let val = substitute(val, '%', '%%', 'g') + endif + let var = a:key == '' ? 'line' : a:key + return 'let '. var .'="'. escape(val, '"') .'"' +endf + +" s:GetCustomCommentString(ft, commentMode, ?default="") +function! s:GetCustomCommentString(ft, commentMode, ...) + let commentMode = a:commentMode + let customComment = tcomment#TypeExists(a:ft) + if commentMode =~# 'B' && tcomment#TypeExists(a:ft .'_block') + let def = s:definitions[a:ft .'_block'] + elseif commentMode =~? 'I' && tcomment#TypeExists(a:ft .'_inline') + let def = s:definitions[a:ft .'_inline'] + elseif customComment + let def = s:definitions[a:ft] + let commentMode = s:CommentMode(commentMode, 'G') + elseif a:0 >= 1 + let def = {'commentstring': a:1} + let commentMode = s:CommentMode(commentMode, 'G') + else + let def = {} + let commentMode = s:CommentMode(commentMode, 'G') + endif + let cdef = copy(def) + let cdef.mode = commentMode + return cdef +endf + +function! s:BlockGetCommentString(cms) + " return substitute(a:cms, '\n.*$', '', '') + return matchstr(a:cms, '^.\{-}\ze\(\n\|$\)') +endf + +function! s:BlockGetMiddleString(cms) + " let rv = substitute(a:cms, '^.\{-}\n\([^\n]*\)', '\1', '') + let rv = matchstr(a:cms, '\n\zs.*') + return rv == a:cms ? '' : rv +endf + + +redraw + diff --git a/colors/adaryn.vim b/colors/adaryn.vim new file mode 100755 index 0000000..1b17f22 --- /dev/null +++ b/colors/adaryn.vim @@ -0,0 +1,72 @@ +" Vim color file +" Maintainer: Glenn T. Norton +" Last Change: 2003-04-11 + +" adaryn - A color scheme named after my daughter, Adaryn. (A-da-rin) +" I like deep, sharp colors and this scheme is inspired by +" Bohdan Vlasyuk's darkblue. +" The cterm background is black since the dark blue was just too light. +" Also the cterm colors are very close to an old Borland C++ color setup. + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "adaryn" + +hi Normal guifg=#fffff0 guibg=#00003F ctermfg=white ctermbg=Black +hi ErrorMsg guifg=#ffffff guibg=#287eff ctermfg=white ctermbg=red +hi Visual guifg=#8080ff guibg=fg gui=reverse ctermfg=blue ctermbg=fg cterm=reverse + +hi VisualNOS guifg=#8080ff guibg=fg gui=reverse,underline ctermfg=lightblue ctermbg=fg cterm=reverse,underline + +hi Todo guifg=#d14a14 guibg=#1248d1 ctermfg=red ctermbg=darkblue + +hi Search guifg=#90fff0 guibg=#2050d0 ctermfg=white ctermbg=darkblue cterm=underline term=underline + +hi IncSearch guifg=#b0ffff guibg=#2050d0 ctermfg=darkblue ctermbg=gray + +hi SpecialKey guifg=cyan ctermfg=darkcyan +hi Directory guifg=cyan ctermfg=cyan +hi Title guifg=#BDD094 gui=none ctermfg=magenta cterm=bold +hi WarningMsg guifg=red ctermfg=red +hi WildMenu guifg=yellow guibg=black ctermfg=yellow ctermbg=black cterm=none term=none +hi ModeMsg guifg=#22cce2 ctermfg=lightblue +hi MoreMsg ctermfg=darkgreen ctermfg=darkgreen +hi Question guifg=green gui=none ctermfg=green cterm=none +hi NonText guifg=#0030ff ctermfg=darkblue + +hi StatusLine guifg=blue guibg=darkgray gui=none ctermfg=blue ctermbg=gray term=none cterm=none + +hi StatusLineNC guifg=black guibg=darkgray gui=none ctermfg=black ctermbg=gray term=none cterm=none + +hi VertSplit guifg=black guibg=darkgray gui=none ctermfg=black ctermbg=gray term=none cterm=none + +hi Folded guifg=#808080 guibg=#000040 ctermfg=darkgrey ctermbg=black cterm=bold term=bold + +hi FoldColumn guifg=#808080 guibg=#000040 ctermfg=darkgrey ctermbg=black cterm=bold term=bold + +hi LineNr guifg=#90f020 ctermfg=green cterm=none + +hi DiffAdd guibg=darkblue ctermbg=darkblue term=none cterm=none +hi DiffChange guibg=darkmagenta ctermbg=magenta cterm=none +hi DiffDelete ctermfg=blue ctermbg=cyan gui=bold guifg=Blue guibg=DarkCyan +hi DiffText cterm=bold ctermbg=red gui=bold guibg=Red + +hi Cursor guifg=#000020 guibg=#ffaf38 ctermfg=bg ctermbg=brown +hi lCursor guifg=#ffffff guibg=#000000 ctermfg=bg ctermbg=darkgreen + + +hi Comment guifg=yellow ctermfg=Yellow +hi Constant ctermfg=green guifg=green cterm=none +hi Special ctermfg=White guifg=#FFFFFF cterm=none gui=none +hi Identifier ctermfg=DarkRed guifg=#BDD094 cterm=none +hi Statement ctermfg=LightCyan cterm=none guifg=#A9A900 gui=none +hi PreProc ctermfg=DarkRed guifg=#ffffff gui=none cterm=none +hi type ctermfg=LightCyan guifg=LightBlue gui=none cterm=none +hi Underlined cterm=underline term=underline +hi Ignore guifg=bg ctermfg=bg + + diff --git a/colors/adrian.vim b/colors/adrian.vim new file mode 100755 index 0000000..ba830cd --- /dev/null +++ b/colors/adrian.vim @@ -0,0 +1,97 @@ +" Vim colorscheme file +" Maintainer: Adrian Nagle +" Last Change: 2001-09-25 07:48:15 Mountain Daylight Time +" URL: http://www.naglenet.org/vim/syntax/adrian.vim +" MAIN URL: http://www.naglenet.org/vim + +" This is my custom syntax file to override the defaults provided with Vim. +" This file should be located in $HOME/vimfiles/colors. + +" This file should automatically be sourced by $RUNTIMEPATH. + +" NOTE(S): +" *(1) +" The color definitions assumes and is intended for a black or dark +" background. + +" *(2) +" This file is specifically in Unix style EOL format so that I can simply +" copy this file between Windows and Unix systems. VIM can source files in +" with the UNIX EOL format (only instead of for DOS) in any +" operating system if the 'fileformats' is not empty and there is no +" just before the on the first line. See ':help :source_crnl' and +" ':help fileformats'. +" +" *(3) +" Move this file to adrian.vim for vim6.0aw. +" + + + +hi clear +set background=dark +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "adrian" + +" Normal is for the normal (unhighlighted) text and background. +" NonText is below the last line (~ lines). +highlight Normal guibg=Black guifg=Green +highlight Cursor guibg=Grey70 guifg=White +highlight NonText guibg=Grey80 +highlight StatusLine gui=bold guibg=DarkGrey guifg=Orange +highlight StatusLineNC guibg=DarkGrey guifg=Orange + +highlight Comment term=bold ctermfg=LightGrey guifg=#d1ddff +highlight Constant term=underline ctermfg=White guifg=#ffa0a0 +"highlight Number term=underline ctermfg=Yellow guifg=Yellow +highlight Identifier term=underline ctermfg=Cyan guifg=#40ffff +highlight Statement term=bold ctermfg=Yellow gui=bold guifg=#ffff60 +highlight PreProc term=underline ctermfg=Blue guifg=#ff4500 +highlight Type term=underline ctermfg=DarkGrey gui=bold guifg=#7d96ff +highlight Special term=bold ctermfg=Magenta guifg=Orange +highlight Ignore ctermfg=black guifg=bg +highlight Error ctermfg=White ctermbg=Red guifg=White guibg=Red +highlight Todo ctermfg=Blue ctermbg=Yellow guifg=Blue guibg=Yellow + +" Change the highlight of search matches (for use with :set hls). +highlight Search ctermfg=Black ctermbg=Yellow guifg=Black guibg=Yellow + +" Change the highlight of visual highlight. +highlight Visual cterm=NONE ctermfg=Black ctermbg=LightGrey gui=NONE guifg=Black guibg=Grey70 + +highlight Float ctermfg=Blue guifg=#88AAEE +highlight Exception ctermfg=Red ctermbg=White guifg=Red guibg=White +highlight Typedef ctermfg=White ctermbg=Blue gui=bold guifg=White guibg=Blue +highlight SpecialChar ctermfg=Black ctermbg=White guifg=Black guibg=White +highlight Delimiter ctermfg=White ctermbg=Black guifg=White guibg=Black +highlight SpecialComment ctermfg=Black ctermbg=Green guifg=Black guibg=Green + +" Common groups that link to default highlighting. +" You can specify other highlighting easily. +highlight link String Constant +highlight link Character Constant +highlight link Number Constant +highlight link Boolean Statement +"highlight link Float Number +highlight link Function Identifier +highlight link Conditional Type +highlight link Repeat Type +highlight link Label Type +highlight link Operator Type +highlight link Keyword Type +"highlight link Exception Type +highlight link Include PreProc +highlight link Define PreProc +highlight link Macro PreProc +highlight link PreCondit PreProc +highlight link StorageClass Type +highlight link Structure Type +"highlight link Typedef Type +"highlight link SpecialChar Special +highlight link Tag Special +"highlight link Delimiter Special +"highlight link SpecialComment Special +highlight link Debug Special + diff --git a/colors/aiseered.vim b/colors/aiseered.vim new file mode 100755 index 0000000..7e71108 --- /dev/null +++ b/colors/aiseered.vim @@ -0,0 +1,37 @@ +" gVim color file for working with files in GDL/VCG format. +" Works nice in conjunction with gdl.vim +" (see www.vim.org or www.aisee.com) +" Works fine for C/C++, too. + +" Author : Alexander A. Evstyugov-Babaev +" Version: 0.2 for gVim/Linux, +" tested with gVim 6.3.25 under Ubuntu Linux (Warty) +" by Jo Vermeulen +" Date : January 25th 2005 + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name="aiseered" + +hi Normal guifg=lightred guibg=#600000 +hi Cursor guifg=bg guibg=fg +hi ErrorMsg guibg=red ctermfg=1 +hi Search term=reverse ctermfg=darkred ctermbg=lightred guibg=lightred guifg=#060000 + +hi Comment guifg=#ffffff +hi Constant guifg=#88ddee +hi String guifg=#ffcc88 +hi Character guifg=#ffaa00 +hi Number guifg=#88ddee +hi Identifier guifg=#cfcfcf +hi Statement guifg=#eeff99 gui=bold +hi PreProc guifg=firebrick1 gui=italic +hi Type guifg=#88ffaa gui=none +hi Special guifg=#ffaa00 +hi SpecialChar guifg=#ffaa00 +hi StorageClass guifg=#ddaacc +hi Error guifg=red guibg=white diff --git a/colors/anotherdark.vim b/colors/anotherdark.vim new file mode 100755 index 0000000..72a3341 --- /dev/null +++ b/colors/anotherdark.vim @@ -0,0 +1,108 @@ +" Vim color file +" Maintainer: Hans Fugal +" Last Change: $Date: 2003/05/06 16:37:49 $ +" Last Change: $Date: 2003/06/02 19:40:21 $ +" URL: http://hans.fugal.net/vim/colors/desert.vim +" Version: $Id: desert.vim,v 1.6 2003/06/02 19:40:21 fugalh Exp $ + +" cool help screens +" :he group-name +" :he highlight-groups +" :he cterm-colors + +set background=dark +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="anotherdark" + +hi Normal guifg=White guibg=grey20 + +" highlight groups +hi Cursor guibg=khaki guifg=slategrey +"hi CursorIM +"hi Directory +"hi DiffAdd +"hi DiffChange +"hi DiffDelete +"hi DiffText +"hi ErrorMsg +hi VertSplit guibg=#c2bfa5 guifg=grey50 gui=none +hi Folded guibg=grey30 guifg=gold +hi FoldColumn guibg=grey30 guifg=tan +hi IncSearch guifg=slategrey guibg=khaki +"hi LineNr +hi ModeMsg guifg=goldenrod +hi MoreMsg guifg=SeaGreen +hi NonText guifg=LightBlue guibg=grey30 +hi Question guifg=springgreen +hi Search guibg=peru guifg=wheat +hi SpecialKey guifg=yellowgreen +hi StatusLine guibg=#c2bfa5 guifg=black gui=none +hi StatusLineNC guibg=#c2bfa5 guifg=grey50 gui=none +hi Title guifg=indianred +hi Visual gui=none guifg=khaki guibg=olivedrab +"hi VisualNOS +hi WarningMsg guifg=salmon +"hi WildMenu +"hi Menu +"hi Scrollbar +"hi Tooltip + +" syntax highlighting groups +hi Comment guifg=orange +hi Constant guifg=#ffa0a0 +hi Identifier guifg=palegreen +hi Statement guifg=khaki +hi PreProc guifg=indianred +hi Type guifg=darkkhaki +hi Special guifg=navajowhite +"hi Underlined +hi Ignore guifg=grey40 +"hi Error +hi Todo guifg=orangered guibg=yellow2 + +" color terminal definitions +hi SpecialKey ctermfg=darkgreen +hi NonText cterm=bold ctermfg=darkblue +hi Directory ctermfg=darkcyan +hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 +hi IncSearch cterm=NONE ctermfg=yellow ctermbg=green +hi Search cterm=NONE ctermfg=grey ctermbg=blue +hi MoreMsg ctermfg=darkgreen +hi ModeMsg cterm=NONE ctermfg=brown +hi LineNr ctermfg=3 +hi Question ctermfg=green +hi StatusLine cterm=bold,reverse +hi StatusLineNC cterm=reverse +hi VertSplit cterm=reverse +hi Title ctermfg=5 +hi Visual cterm=reverse +hi VisualNOS cterm=bold,underline +hi WarningMsg ctermfg=1 +hi WildMenu ctermfg=0 ctermbg=3 +hi Folded ctermfg=darkgrey ctermbg=NONE +hi FoldColumn ctermfg=darkgrey ctermbg=NONE +hi DiffAdd ctermbg=4 +hi DiffChange ctermbg=5 +hi DiffDelete cterm=bold ctermfg=4 ctermbg=6 +hi DiffText cterm=bold ctermbg=1 +hi Comment ctermfg=lightblue +hi Constant ctermfg=darkred +hi Special ctermfg=red +hi Identifier ctermfg=6 +hi Statement ctermfg=3 +hi PreProc ctermfg=5 +hi Type ctermfg=2 +hi Underlined cterm=underline ctermfg=5 +hi Ignore cterm=bold ctermfg=7 +hi Ignore ctermfg=darkgrey +hi Error cterm=bold ctermfg=7 ctermbg=1 + + +"vim: sw=4 diff --git a/colors/aqua.vim b/colors/aqua.vim new file mode 100755 index 0000000..483b6ac --- /dev/null +++ b/colors/aqua.vim @@ -0,0 +1,44 @@ +" Vim color file +" Maintainer: tranquility@portugalmail.pt +" Last Change: 6 Apr 2002 + + +" cool help screens +" :he group-name +" :he highlight-groups +" :he cterm-colors + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="aqua" + +hi Normal guibg=steelblue guifg=linen +hi Cursor guibg=lightblue3 guifg=black gui=bold +hi VertSplit guifg=white guibg=navyblue gui=none +hi Folded guibg=darkblue guifg=white +hi FoldColumn guibg=lightgray guifg=navyblue +hi ModeMsg guifg=black guibg=steelblue1 +hi MoreMsg guifg=black guibg=steelblue1 +hi NonText guifg=white guibg=steelblue4 gui=none +hi Question guifg=snow +hi Search guibg=#FFFFFF guifg=midnightblue gui=bold +hi SpecialKey guifg=navyblue +hi StatusLine guibg=skyblue3 guifg=black gui=none +hi StatusLineNC guibg=skyblue1 guifg=black gui=none +hi Title guifg=bisque3 +hi Subtitle guifg=black +hi Visual guifg=white guibg=royalblue4 gui=none +hi WarningMsg guifg=salmon4 guibg=gray60 gui=bold +hi Comment guifg=lightskyblue +hi Constant guifg=turquoise gui=bold +hi Identifier guifg=lightcyan +hi Statement guifg=royalblue4 +hi PreProc guifg=black gui=bold +hi Type guifg=lightgreen +hi Special guifg=navajowhite +hi Ignore guifg=grey29 +hi Todo guibg=black guifg=white +hi WildMenu guibg=aquamarine diff --git a/colors/astronaut.vim b/colors/astronaut.vim new file mode 100755 index 0000000..8caec73 --- /dev/null +++ b/colors/astronaut.vim @@ -0,0 +1,164 @@ +" astronaut.vim: a colorscheme +" Maintainer: Charles E. Campbell, Jr. +" Date: Feb 21, 2006 +" Version: 7 +" +" Usage: +" Put into your <.vimrc> file: +" color astronaut +" +" Optional Modifiers: +" let g:astronaut_bold=1 : term, cterm, and gui receive bold modifier +" let g:astronaut_dark=1 : dark colors used (otherwise some terminals +" make everything bold, which can be all one +" color) +" let g:astronaut_underline=1 : assume that underlining works on your terminal +" let g:astronaut_italic=1 : allows italic to be used in gui +" Examples: +" iris : let astronaut_dark=1 +" Linux xterm: no modifiers needed +" +" GetLatestVimScripts: 122 1 :AutoInstall: astronaut.vim + +set background=dark +hi clear +if exists( "syntax_on" ) + syntax reset +endif +let g:colors_name = "astronaut" +let g:loaded_astronaut = "v7" + +" --------------------------------------------------------------------- +" Default option values +if !exists("g:astronaut_bold") + " on some machines, notably SGIs, a bold qualifier means everything is + " one color (SGIs: yellow) + let g:astronaut_bold= 0 +endif +if !exists("g:astronaut_dark") + " this option, if true, means darkcolor (ex. darkred, darkmagenta, etc) + " is understood and wanted + let g:astronaut_dark= 0 +endif +if !exists("g:astronaut_underline") + let g:astronaut_underline= 1 +endif +if !exists("g:astronaut_italic") + let g:astronaut_italic= 0 +endif + +" --------------------------------------------------------------------- +" Settings based on options +if g:astronaut_bold != 0 + let s:bold=",bold" +else + let s:bold="" +endif + +if g:astronaut_italic != 0 + let s:italic= ",italic" +else + let s:italic= "" +endif + +if g:astronaut_dark != 0 + let s:black = "black" + let s:red = "darkred" + let s:green = "darkgreen" + let s:yellow = "darkyellow" + let s:blue = "darkblue" + let s:magenta = "darkmagenta" + let s:cyan = "darkcyan" + let s:white = "white" +else + let s:black = "black" + let s:red = "red" + let s:green = "green" + let s:yellow = "yellow" + let s:blue = "blue" + let s:magenta = "magenta" + let s:cyan = "cyan" + let s:white = "white" +endif + +if g:astronaut_underline != 0 + let s:underline= ",underline" + let s:ulbg = "" +else + let s:underline= "none" + if exists("g:astronaut_dark") + let s:ulbg = "ctermbg=darkmagenta guibg=magenta4" + else + let s:ulbg = "ctermbg=magenta guibg=magenta" + endif +endif + +" --------------------------------------------------------------------- +exe "hi Blue start= stop= ctermfg=".s:blue." guifg=blue guibg=navyblue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Comment start= stop= ctermfg=".s:white." guifg=white term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Conceal ctermfg=".s:blue." ctermbg=".s:black." guifg=Blue guibg=Black term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Constant start= stop= ctermfg=".s:yellow." guifg=yellow guibg=navyblue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Cursor guifg=blue guibg=green term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Cyan start= stop= ctermfg=".s:cyan." guifg=cyan guibg=navyblue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Debug start= stop= ctermfg=".s:magenta." ctermbg=".s:black." guifg=magenta guibg=black term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Delimiter start= stop= ctermfg=".s:white." guifg=white guibg=navyblue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi DiffAdd ctermfg=".s:white." ctermbg=".s:magenta." guifg=White guibg=Magenta term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi DiffChange ctermfg=".s:yellow." ctermbg=".s:blue." guifg=Yellow guibg=Blue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi DiffDelete ctermfg=".s:white." ctermbg=".s:blue." guifg=White guibg=Blue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi DiffText ctermfg=".s:white." ctermbg=".s:red." guifg=White guibg=Red term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Directory start= stop= ctermfg=".s:white." guifg=white term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Error start= stop= ctermfg=".s:white." ctermbg=".s:red." guifg=white guibg=red term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi ErrorMsg ctermfg=".s:white." ctermbg=".s:red." guifg=White guibg=Red term=standout".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi FoldColumn start= stop= ctermfg=".s:cyan." ctermbg=".s:black." guifg=Cyan guibg=Brown term=standout".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Folded start= stop= ctermfg=".s:magenta." ctermbg=".s:black." guifg=magenta guibg=black term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Function start= stop= ctermfg=".s:cyan." guifg=cyan guibg=navyblue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Green start= stop= ctermfg=".s:green." guifg=green guibg=navyblue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Identifier start= stop= ctermfg=".s:magenta." guifg=magenta guibg=navyblue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Ignore ctermfg=".s:black ." guifg=bg term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi IncSearch start= stop= ctermfg=".s:black ." ctermbg=".s:green." guifg=black guibg=green term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi LineNr ctermfg=".s:yellow." ".s:ulbg." guifg=Yellow term=none".s:underline.s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Magenta start= stop= ctermfg=".s:magenta." guifg=magenta guibg=navyblue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Menu guifg=black guibg=gray75 term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi ModeMsg ctermfg=".s:green." guifg=SeaGreen term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi MoreMsg ctermfg=".s:green." guifg=SeaGreen term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi NonText ctermfg=".s:blue." guifg=Blue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Normal start= stop= ctermfg=".s:green." guifg=green guibg=navyblue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi PreProc start= stop= ctermfg=".s:white." ctermbg=".s:blue." guifg=white guibg=blue3 term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Question start= stop= ctermfg=".s:yellow." guifg=yellow term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Red start= stop= ctermfg=".s:red." guifg=red guibg=navyblue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Scrollbar guifg=gray80 guibg=gray70 term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Search start= stop= ctermfg=".s:yellow." ctermbg=".s:blue." guifg=yellow guibg=blue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Special start= stop= ctermfg=".s:green." ctermbg=".s:blue." guifg=green guibg=blue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi SpecialKey start= stop= ctermfg=".s:black." ctermbg=".s:magenta." guifg=black guibg=magenta term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Statement start= stop= ctermfg=".s:cyan." guifg=cyan guibg=navyblue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi StatusLine start= stop= ctermfg=".s:black." ctermbg=".s:cyan." guifg=black guibg=cyan term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi StatusLineNC start= stop= ctermfg=".s:black." ctermbg=".s:green." guifg=black guibg=green term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi String start= stop= ctermfg=".s:yellow." guifg=yellow guibg=navyblue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Subtitle start= stop= ctermfg=".s:magenta." guifg=magenta guibg=navyblue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +if v:version >= 700 + exe "hi TabLine start= stop= ctermfg=".s:black." ctermbg=".s:blue." guifg=black guibg=blue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold.s:underline.s:italic + exe "hi TabLineSel start= stop= ctermfg=".s:green." ctermbg=".s:blue." guifg=green guibg=blue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold.s:underline.s:italic + exe "hi TabLineFill start= stop= ctermfg=".s:blue." ctermbg=".s:blue." guifg=blue guibg=blue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +endif +exe "hi Tags start= stop= ctermfg=".s:yellow." ctermbg=".s:blue." guifg=yellow guibg=blue3 term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Title start= stop= ctermfg=".s:white." guifg=white term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Todo start= stop= ctermfg=".s:white." ctermbg=".s:magenta." guifg=white guibg=magenta term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Type start= stop= ctermfg=".s:green." ".s:ulbg." guifg=seagreen1 term=none".s:underline.s:bold." cterm=none".s:bold.s:underline." gui=none".s:bold.s:underline +exe "hi Underlined ctermfg=".s:green." ".s:ulbg." guifg=green term=none".s:underline.s:bold." cterm=none".s:bold.s:underline." gui=none".s:bold.s:underline +exe "hi Unique start= stop= ctermfg=".s:blue." ctermbg=".s:white." guifg=blue3 guibg=white term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi AltUnique start= stop= ctermfg=".s:magenta." ctermbg=".s:white." guifg=magenta guibg=white term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi AltAltUnique start= stop= ctermfg=".s:black." ctermbg=".s:white." guifg=black guibg=white term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi VertSplit start= stop= ctermfg=".s:black." ctermbg=".s:green." guifg=black guibg=green term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Visual start= stop= ctermfg=black ctermbg=green guifg=Grey guibg=fg term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi VisualNOS ".s:ulbg." term=none".s:underline.s:bold." cterm=none".s:bold.s:underline." gui=none".s:bold.s:underline +exe "hi WarningMsg start= stop= ctermfg=".s:black." ctermbg=".s:yellow." guifg=black guibg=yellow term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi White start= stop= ctermfg=".s:white." guifg=white guibg=navyblue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi WildMenu ctermfg=".s:black." ctermbg=".s:yellow." guifg=Black guibg=Yellow term=standout".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi Yellow start= stop= ctermfg=".s:yellow." guifg=yellow guibg=navyblue term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi lCursor guifg=bg guibg=fg term=none".s:bold." cterm=none".s:bold." gui=none".s:bold +exe "hi AltConstant start= stop= ctermfg=".s:yellow." ctermbg=".s:black." guifg=yellow guibg=black term=none".s:bold." cterm=none".s:bold." gui=none".s:bold.s:italic +exe "hi AltFunction start= stop= ctermfg=".s:green." ctermbg=".s:black." guifg=green guibg=black term=none".s:bold." cterm=none".s:bold." gui=none".s:bold.s:italic +exe "hi AltType start= stop= ctermfg=".s:green." ctermbg=".s:black." guifg=seagreen1 guibg=black term=none".s:underline.s:bold." cterm=none".s:bold.s:underline." gui=none".s:bold.s:underline.s:italic +exe "hi User1 ctermfg=".s:white." ctermbg=".s:blue." guifg=white guibg=blue" +exe "hi User2 ctermfg=".s:cyan." ctermbg=".s:blue." guifg=cyan guibg=blue" +" vim: nowrap diff --git a/colors/asu1dark.vim b/colors/asu1dark.vim new file mode 100755 index 0000000..ce5f90f --- /dev/null +++ b/colors/asu1dark.vim @@ -0,0 +1,59 @@ +" Vim color file +" Maintainer: A. Sinan Unur +" Last Change: 2001/10/04 + +" Dark color scheme + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="asu1dark" + +" Console Color Scheme +hi Normal term=NONE cterm=NONE ctermfg=LightGray ctermbg=Black +hi NonText term=NONE cterm=NONE ctermfg=Brown ctermbg=Black +hi Function term=NONE cterm=NONE ctermfg=DarkCyan ctermbg=Black +hi Statement term=BOLD cterm=BOLD ctermfg=DarkBlue ctermbg=Black +hi Special term=NONE cterm=NONE ctermfg=DarkGreen ctermbg=Black +hi SpecialChar term=NONE cterm=NONE ctermfg=Cyan ctermbg=Black +hi Constant term=NONE cterm=NONE ctermfg=Blue ctermbg=Black +hi Comment term=NONE cterm=NONE ctermfg=DarkGray ctermbg=Black +hi Preproc term=NONE cterm=NONE ctermfg=DarkGreen ctermbg=Black +hi Type term=NONE cterm=NONE ctermfg=DarkMagenta ctermbg=Black +hi Identifier term=NONE cterm=NONE ctermfg=Cyan ctermbg=Black +hi StatusLine term=BOLD cterm=NONE ctermfg=Yellow ctermbg=DarkBlue +hi StatusLineNC term=NONE cterm=NONE ctermfg=Black ctermbg=Gray +hi Visual term=NONE cterm=NONE ctermfg=White ctermbg=DarkCyan +hi Search term=NONE cterm=NONE ctermbg=Yellow ctermfg=DarkBlue +hi VertSplit term=NONE cterm=NONE ctermfg=Black ctermbg=Gray +hi Directory term=NONE cterm=NONE ctermfg=Green ctermbg=Black +hi WarningMsg term=NONE cterm=NONE ctermfg=Blue ctermbg=Yellow +hi Error term=NONE cterm=NONE ctermfg=DarkRed ctermbg=Gray +hi Cursor ctermfg=Black ctermbg=Cyan +hi LineNr term=NONE cterm=NONE ctermfg=Red ctermbg=Black + +" GUI Color Scheme +hi Normal gui=NONE guifg=White guibg=#110022 +hi NonText gui=NONE guifg=#ff9999 guibg=#444444 +hi Function gui=NONE guifg=#7788ff guibg=#110022 +hi Statement gui=BOLD guifg=Yellow guibg=#110022 +hi Special gui=NONE guifg=Cyan guibg=#110022 +hi Constant gui=NONE guifg=#ff9900 guibg=#110022 +hi Comment gui=NONE guifg=#99cc99 guibg=#110022 +hi Preproc gui=NONE guifg=#33ff66 guibg=#110022 +hi Type gui=NONE guifg=#ff5577 guibg=#110022 +hi Identifier gui=NONE guifg=Cyan guibg=#110022 +hi StatusLine gui=BOLD guifg=White guibg=#336600 +hi StatusLineNC gui=NONE guifg=Black guibg=#cccccc +hi Visual gui=NONE guifg=White guibg=#00aa33 +hi Search gui=BOLD guibg=Yellow guifg=DarkBlue +hi VertSplit gui=NONE guifg=White guibg=#666666 +hi Directory gui=NONE guifg=Green guibg=#110022 +hi WarningMsg gui=STANDOUT guifg=#0000cc guibg=Yellow +hi Error gui=NONE guifg=White guibg=Red +hi Cursor guifg=White guibg=#00ff33 +hi LineNr gui=NONE guifg=#cccccc guibg=#334444 +hi ModeMsg gui=NONE guifg=Blue guibg=White +hi Question gui=NONE guifg=#66ff99 guibg=#110022 diff --git a/colors/autumn.vim b/colors/autumn.vim new file mode 100755 index 0000000..f269b35 --- /dev/null +++ b/colors/autumn.vim @@ -0,0 +1,69 @@ +" Vim color file +" Maintainer: Tiza +" Last Change: 2002/10/14 Mon 16:41. +" version: 1.0 +" This color scheme uses a light background. + +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "autumn" + +hi Normal guifg=#404040 guibg=#fff4e8 + +" Search +hi IncSearch gui=UNDERLINE guifg=#404040 guibg=#e0e040 +hi Search gui=NONE guifg=#544060 guibg=#f0c0ff + +" Messages +hi ErrorMsg gui=BOLD guifg=#f8f8f8 guibg=#4040ff +hi WarningMsg gui=BOLD guifg=#f8f8f8 guibg=#4040ff +hi ModeMsg gui=NONE guifg=#d06000 guibg=NONE +hi MoreMsg gui=NONE guifg=#0090a0 guibg=NONE +hi Question gui=NONE guifg=#8000ff guibg=NONE + +" Split area +hi StatusLine gui=BOLD guifg=#f8f8f8 guibg=#904838 +hi StatusLineNC gui=BOLD guifg=#c0b0a0 guibg=#904838 +hi VertSplit gui=NONE guifg=#f8f8f8 guibg=#904838 +hi WildMenu gui=BOLD guifg=#f8f8f8 guibg=#ff3030 + +" Diff +hi DiffText gui=NONE guifg=#2850a0 guibg=#c0d0f0 +hi DiffChange gui=NONE guifg=#208040 guibg=#c0f0d0 +hi DiffDelete gui=NONE guifg=#ff2020 guibg=#eaf2b0 +hi DiffAdd gui=NONE guifg=#ff2020 guibg=#eaf2b0 + +" Cursor +hi Cursor gui=NONE guifg=#ffffff guibg=#0080f0 +hi lCursor gui=NONE guifg=#ffffff guibg=#8040ff +hi CursorIM gui=NONE guifg=#ffffff guibg=#8040ff + +" Fold +hi Folded gui=NONE guifg=#804030 guibg=#ffc0a0 +hi FoldColumn gui=NONE guifg=#a05040 guibg=#f8d8c4 + +" Other +hi Directory gui=NONE guifg=#7050ff guibg=NONE +hi LineNr gui=NONE guifg=#e0b090 guibg=NONE +hi NonText gui=BOLD guifg=#a05040 guibg=#ffe4d4 +hi SpecialKey gui=NONE guifg=#0080ff guibg=NONE +hi Title gui=BOLD guifg=fg guibg=NONE +hi Visual gui=NONE guifg=#804020 guibg=#ffc0a0 +" hi VisualNOS gui=NONE guifg=#604040 guibg=#e8dddd + +" Syntax group +hi Comment gui=NONE guifg=#ff5050 guibg=NONE +hi Constant gui=NONE guifg=#00884c guibg=NONE +hi Error gui=BOLD guifg=#f8f8f8 guibg=#4040ff +hi Identifier gui=NONE guifg=#b07800 guibg=NONE +hi Ignore gui=NONE guifg=bg guibg=NONE +hi PreProc gui=NONE guifg=#0090a0 guibg=NONE +hi Special gui=NONE guifg=#8040f0 guibg=NONE +hi Statement gui=BOLD guifg=#80a030 guibg=NONE +hi Todo gui=BOLD,UNDERLINE guifg=#0080f0 guibg=NONE +hi Type gui=BOLD guifg=#b06c58 guibg=NONE +hi Underlined gui=UNDERLINE guifg=blue guibg=NONE diff --git a/colors/autumn2.vim b/colors/autumn2.vim new file mode 100755 index 0000000..22a5ef0 --- /dev/null +++ b/colors/autumn2.vim @@ -0,0 +1,88 @@ +" Vim colour file +" Maintainer: Antony Scriven +" Last Change: 2003-06-12 +" +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "autumn" + +hi Normal term=none cterm=none ctermfg=black ctermbg=White gui=none guifg=Black guibg=#f0f2f0 +hi Cursor term=none cterm=none ctermfg=white ctermbg=darkgrey gui=none guifg=black guibg=red +hi DiffAdd term=bold cterm=none ctermfg=white ctermbg=DarkBlue gui=none guifg=#aaeeaa guibg=#447744 +hi DiffChange term=bold cterm=none ctermfg=white ctermbg=DarkMagenta gui=none guifg=lightyellow guibg=#ddbb55 +hi DiffDelete term=bold cterm=none ctermfg=blue ctermbg=darkcyan gui=none guifg=#336633 guibg=#aaccaa +hi difftext term=reverse cterm=bold ctermfg=white ctermbg=red gui=none guifg=lightyellow guibg=#cc7733 +hi Directory term=none cterm=none ctermfg=Red ctermbg=white gui=none guifg=Red guibg=bg +hi ErrorMsg term=standout cterm=none ctermfg=white ctermbg=DarkRed gui=none guifg=white guibg=DarkRed +hi Folded term=reverse cterm=none ctermfg=darkblue ctermbg=lightgrey gui=none guifg=darkblue guibg=lightgrey +"8 col term +hi FoldColumn term=reverse cterm=none ctermfg=darkblue ctermbg=grey gui=none guifg=darkblue guibg=grey +hi IncSearch term=reverse cterm=none ctermfg=yellow ctermbg=darkgreen gui=none guifg=yellow guibg=#449944 +hi lCursor term=reverse cterm=none ctermfg=black ctermbg=cyan gui=none guifg=black guibg=Cyan +hi LineNr term=reverse cterm=none ctermfg=darkred ctermbg=grey gui=none guifg=brown guibg=lightgrey +hi ModeMsg term=bold cterm=none ctermfg=green ctermbg=darkgreen gui=none guifg=#007700 guibg=#aaccaa +hi MoreMsg term=bold cterm=none ctermfg=darkGreen ctermbg=white gui=none guifg=darkgreen guibg=bg +hi Question term=bold cterm=none ctermfg=darkGreen ctermbg=white gui=none guifg=darkgreen guibg=bg +hi Search term=reverse cterm=none ctermfg=black ctermbg=yellow gui=none guifg=black guibg=yellow +hi SpecialKey term=italic cterm=none ctermfg=lightgrey ctermbg=white gui=none guifg=lightblue guibg=bg +hi NonText term=bold cterm=none ctermfg=lightgrey ctermbg=white gui=none guifg=#c6c6c6 guibg=bg +hi StatusLine term=reverse cterm=none ctermfg=white ctermbg=black gui=none guifg=#80624d guibg=#ddd9b8 +hi Title term=bold cterm=none ctermfg=DarkMagenta ctermbg=white gui=none guifg=DarkMagenta guibg=bg +if has("gui_running") || &t_Co > 8 + hi Visual term=reverse cterm=none ctermfg=black ctermbg=lightgrey gui=none guifg=black guibg=lightgreen + hi VertSplit term=reverse cterm=none ctermfg=darkgrey ctermbg=darkgrey gui=none guifg=#c7c7c2 guibg=#d7d7d2 + hi StatusLineNC term=reverse cterm=none ctermfg=white ctermbg=darkgrey gui=none guifg=darkgrey guibg=#d7d7d2 + hi Comment term=italic cterm=none ctermfg=grey ctermbg=white gui=none guifg=#ccaaaa guibg=bg +else + hi Visual term=reverse cterm=none ctermfg=green ctermbg=darkgreen gui=none guifg=black guibg=lightgreen + hi VertSplit term=reverse cterm=none ctermfg=darkcyan ctermbg=darkblue gui=none guifg=darkgrey guibg=darkgrey + hi StatusLineNC term=reverse cterm=none ctermfg=white ctermbg=darkblue gui=none guifg=white guibg=darkgrey + hi Comment term=italic cterm=none ctermfg=darkcyan ctermbg=white gui=none guifg=#ccaaaa guibg=bg +endif +hi VisualNOS term=bold cterm=none ctermfg=grey ctermbg=black gui=none guifg=grey guibg=black +hi WarningMsg term=standout cterm=none ctermfg=Red ctermbg=white gui=none guifg=Red guibg=bg +hi WildMenu term=bold cterm=none ctermfg=darkblue ctermbg=yellow gui=none guifg=black guibg=lightyellow + +hi Constant term=underline cterm=none ctermfg=darkred ctermbg=bg gui=none guifg=#bb6666 guibg=bg +hi Special term=bold cterm=none ctermfg=darkcyan ctermbg=white gui=none guifg=darkcyan guibg=bg +hi identifier term=underline cterm=none ctermfg=darkmagenta ctermbg=white gui=none guifg=darkcyan guibg=bg +hi statement term=bold cterm=none ctermfg=darkgreen ctermbg=white gui=none guifg=#44aa44 guibg=bg +hi preproc term=underline cterm=none ctermfg=darkgrey ctermbg=white gui=none guifg=darkgrey guibg=bg +hi type term=none cterm=none ctermfg=brown ctermbg=white gui=none guifg=#bb9900 guibg=bg +hi underlined term=underline cterm=underline ctermfg=darkmagenta ctermbg=white gui=underline guifg=darkmagenta guibg=bg +hi Ignore term=italic cterm=none ctermfg=lightgrey ctermbg=white gui=none guifg=grey guibg=bg +"hi todo term=underline cterm=bold ctermfg=yellow ctermbg=brown gui=none guifg=#333333 guibg=#ddee33 +hi todo term=bold cterm=none ctermfg=yellow ctermbg=brown gui=bold guifg=#229900 guibg=#ddd9b8 +hi function term=bold cterm=none ctermfg=blue ctermbg=white gui=none guifg=#0055cc guibg=bg + +hi link String Constant +hi link Character Constant +hi link Number Constant +hi link Boolean Constant +hi link Float Number +hi link Conditional Statement +hi link Repeat Statement +hi link Label Statement +hi link Operator Statement +hi link Keyword Statement +hi link Exception Statement +hi link Include PreProc +hi link Define PreProc +hi link Macro PreProc +hi link PreCondit PreProc +hi link StorageClass Type +hi link Structure Type +hi link Typedef Type +hi link Tag Special +hi link SpecialChar Special +hi link Delimiter Special +hi link SpecialComment Special +hi link Debug Special +hi link vimfunction function + + +" vim: set ts=8 sw=8 et sts=8 tw=72 fo-=t ff=unix : diff --git a/colors/autumnleaf.vim b/colors/autumnleaf.vim new file mode 100755 index 0000000..f7af59f --- /dev/null +++ b/colors/autumnleaf.vim @@ -0,0 +1,154 @@ +" Vim color file +" Maintainer: Anders Korte +" Last Change: 17 Oct 2004 + +" AutumnLeaf color scheme 1.0 + +set background=light + +hi clear + +if exists("syntax_on") + syntax reset +endif + +let colors_name="AutumnLeaf" + + +" Colors for the User Interface. + +hi Cursor guibg=#aa7733 guifg=#ffeebb gui=bold +hi Normal guibg=#fffdfa guifg=black gui=none +hi NonText guibg=#eafaea guifg=#000099 gui=bold +hi Visual guibg=#fff8cc guifg=black gui=none +" hi VisualNOS + +hi Linenr guibg=bg guifg=#999999 gui=none + +" Uncomment these if you use Diff...?? +" hi DiffText guibg=#cc0000 guifg=white gui=none +" hi DiffAdd guibg=#0000cc guifg=white gui=none +" hi DiffChange guibg=#990099 guifg=white gui=none +" hi DiffDelete guibg=#888888 guifg=#333333 gui=none + +hi Directory guibg=bg guifg=#337700 gui=none + +hi IncSearch guibg=#c8e8ff guifg=black gui=none +hi Search guibg=#c8e8ff guifg=black gui=none +hi SpecialKey guibg=bg guifg=fg gui=none +hi Titled guibg=bg guifg=fg gui=none + +hi ErrorMsg guibg=bg guifg=#cc0000 gui=bold +hi ModeMsg guibg=bg guifg=#003399 gui=none +hi link MoreMsg ModeMsg +hi link Question ModeMsg +hi WarningMsg guibg=bg guifg=#cc0000 gui=bold + +hi StatusLine guibg=#ffeebb guifg=black gui=bold +hi StatusLineNC guibg=#aa8866 guifg=#f8e8cc gui=none +hi VertSplit guibg=#aa8866 guifg=#ffe0bb gui=none + +" hi Folded +" hi FoldColumn +" hi SignColumn + + +" Colors for Syntax Highlighting. + +hi Comment guibg=#ddeedd guifg=#002200 gui=none + +hi Constant guibg=bg guifg=#003399 gui=bold +hi String guibg=bg guifg=#003399 gui=italic +hi Character guibg=bg guifg=#003399 gui=italic +hi Number guibg=bg guifg=#003399 gui=bold +hi Boolean guibg=bg guifg=#003399 gui=bold +hi Float guibg=bg guifg=#003399 gui=bold + +hi Identifier guibg=bg guifg=#003399 gui=none +hi Function guibg=bg guifg=#0055aa gui=bold +hi Statement guibg=bg guifg=#003399 gui=none + +hi Conditional guibg=bg guifg=#aa7733 gui=bold +hi Repeat guibg=bg guifg=#aa5544 gui=bold +hi link Label Conditional +hi Operator guibg=bg guifg=#aa7733 gui=bold +hi link Keyword Statement +hi Exception guibg=bg guifg=#228877 gui=bold + +hi PreProc guibg=bg guifg=#aa7733 gui=bold +hi Include guibg=bg guifg=#558811 gui=bold +hi link Define Include +hi link Macro Include +hi link PreCondit Include + +hi Type guibg=bg guifg=#007700 gui=bold +hi link StorageClass Type +hi link Structure Type +hi Typedef guibg=bg guifg=#009900 gui=italic + +hi Special guibg=bg guifg=fg gui=none +hi SpecialChar guibg=bg guifg=fg gui=bold +hi Tag guibg=bg guifg=#003399 gui=bold +hi link Delimiter Special +hi SpecialComment guibg=#dddddd guifg=#aa0000 gui=none +hi link Debug Special + +hi Underlined guibg=bg guifg=blue gui=underline + +hi Title guibg=bg guifg=fg gui=bold +hi Ignore guibg=bg guifg=#999999 gui=none +hi Error guibg=red guifg=white gui=none +hi Todo guibg=bg guifg=#aa0000 gui=none + + + +" The same in cterm colors. +hi Cursor ctermbg=6 ctermfg=14 +hi Normal ctermbg=15 ctermfg=0 +hi NonText ctermbg=10 ctermfg=1 +hi Visual ctermbg=14 ctermfg=0 +" hi VisualNOS +hi Linenr ctermbg=bg ctermfg=7 +" hi DiffText ctermbg=4 ctermfg=15 +" hi DiffAdd ctermbg=1 ctermfg=15 +" hi DiffChange ctermbg=5 ctermfg=15 +" hi DiffDelete ctermbg=7 ctermfg=8 +hi Directory ctermbg=bg ctermfg=2 +hi IncSearch ctermbg=9 ctermfg=0 +hi Search ctermbg=9 ctermfg=0 +hi SpecialKey ctermbg=bg ctermfg=fg +hi Titled ctermbg=bg ctermfg=fg +hi ErrorMsg ctermbg=bg ctermfg=12 +hi ModeMsg ctermbg=bg ctermfg=9 +hi WarningMsg ctermbg=bg ctermfg=12 +hi StatusLine ctermbg=14 ctermfg=0 +hi StatusLineNC ctermbg=6 ctermfg=14 +hi VertSplit ctermbg=6 ctermfg=14 +" hi Folded +" hi FoldColumn +" hi SignColumn +hi Comment ctermbg=10 ctermfg=2 +hi Constant ctermbg=bg ctermfg=9 +hi String ctermbg=bg ctermfg=9 cterm=italic +hi Character ctermbg=bg ctermfg=9 cterm=italic +hi Number ctermbg=bg ctermfg=9 cterm=bold +hi Boolean ctermbg=bg ctermfg=9 cterm=bold +hi Float ctermbg=bg ctermfg=9 cterm=bold +hi Function ctermbg=bg ctermfg=9 cterm=bold +hi Statement ctermbg=bg ctermfg=9 cterm=bold +hi Conditional ctermbg=bg ctermfg=6 cterm=bold +hi Repeat ctermbg=bg ctermfg=6 cterm=bold +hi Operator ctermbg=bg ctermfg=6 cterm=bold +hi Exception ctermbg=bg ctermfg=2 cterm=bold +hi PreProc ctermbg=bg ctermfg=6 +hi Include ctermbg=bg ctermfg=2 cterm=bold +hi Type ctermbg=bg ctermfg=2 cterm=bold +hi Typedef ctermbg=bg ctermfg=2 cterm=italic +hi Special ctermbg=bg ctermfg=fg cterm=bold +hi Tag ctermbg=bg ctermfg=9 cterm=bold +hi SpecialComment ctermbg=7 ctermfg=4 +hi Underlined ctermbg=bg ctermfg=9 cterm=underline +hi Title ctermbg=bg ctermfg=fg cterm=bold +hi Ignore ctermbg=bg ctermfg=7 +hi Error ctermbg=12 ctermfg=15 +hi Todo ctermbg=bg ctermfg=15 diff --git a/colors/baycomb.vim b/colors/baycomb.vim new file mode 100755 index 0000000..1311e72 --- /dev/null +++ b/colors/baycomb.vim @@ -0,0 +1,319 @@ +" Vim color file +" baycomb v2.4 +" http://www.vim.org/scripts/script.php?script_id=1454 +" +" Maintainer: Shawn Axsom +" +" * Place :colo baycomb in your VimRC/GVimRC file +" * Also add :set background=dark or :setbackground=light +" depending on your preference. +" +" - Thanks to Desert and OceanDeep for their color scheme +" file layouts +" - Thanks to Raimon Grau and Bob Lied for their feedback + +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="baycomb" + +if &background == "dark" +hi Normal guifg=#a0b4e0 guibg=#11121a "1a1823 +hi NonText guifg=#382920 guibg=bg + +hi Folded guibg=#232235 guifg=grey +hi FoldColumn guibg=#0a0a18 guifg=#dbcaa5 +hi LineNr guibg=#101124 guifg=#206aa9 +hi StatusLine guibg=#354070 guifg=#6880ea gui=none +hi StatusLineNC guibg=#2c3054 guifg=#5c6dbe gui=none +hi VertSplit guibg=#22253c guifg=#223355 gui=none + +hi tablinesel guibg=#515a71 guifg=#50aae5 gui=none +hi tabline guibg=#4d4d5f guifg=#5b7098 gui=none +hi tablinefill guibg=#2d2d3f guifg=#aaaaaa gui=none + +"hi SpellBad +"hi SpellCap +"hi SpellLocal +"hi SpellRare + +hi MatchParen guibg=#7b5a55 guifg=#001122 + +" syntax highlighting """""""""""""""""""""""""""""""""""""""" + + +hi Comment guifg=#349d58 guibg=bg +hi Title guifg=#e5e5ca gui=none +hi Underlined guifg=#bac5ba gui=none + +hi Statement guifg=#fca8ad gui=none "a080aa +hi Type guifg=#0490e8 gui=bold +hi Constant guifg=#5c78f0 "guibg=#111a2a +hi Number guifg=#4580b4 "guibg=#111a2a +hi PreProc guifg=#ba75cf +hi Special guifg=#aaaaca +hi Ignore guifg=grey40 +hi Todo guifg=orangered guibg=yellow2 +hi Error guibg=#b03452 +hi Function guifg=#bab588 guibg=bg gui=bold +hi Identifier guifg=#5094c4 +"""""this section borrowed from OceanDeep/Midnight""""" +highlight Conditional gui=None guifg=#d0688d guibg=bg +highlight Repeat gui=None guifg=#e06070 guibg=bg +"hi Label gui=None guifg=LightGreen guibg=bg +highlight Operator gui=None guifg=#e8cdc0 guibg=bg +highlight Keyword gui=bold guifg=grey guibg=bg +highlight Exception gui=bold guifg=#d0a8ad guibg=bg +""""""""""""""""""""""""""""""""""""""""""""""""""""""" +"end syntax highlighting """"""""""""""""""""""""""""""""""""" + +" highlight groups +"hi CursorIM +hi Directory guifg=#bbd0df +hi DiffText guibg=#004335 +hi DiffChange guibg=#685b5c +hi DiffAdd guibg=#0a4b8c +hi DiffDelete guifg=#300845 guibg=#200845 +hi ErrorMsg guibg=#ff4545 + +hi Cursor guibg=#cad5c0 guifg=#0000aa + + +hi Search guibg=darkyellow guifg=black +hi IncSearch guifg=#babeaa guibg=#3a4520 + +hi ModeMsg guifg=#00AACC +hi MoreMsg guifg=SeaGreen +hi Question guifg=#AABBCC +hi SpecialKey guifg=#90dcb0 +hi Visual guifg=#102030 guibg=#80a0f0 +hi VisualNOS guifg=#201a30 guibg=#a3a5FF +hi WarningMsg guifg=salmon +"hi WildMenu +"hi Menu +"hi Scrollbar guibg=grey30 guifg=tan +"hi Tooltip + + +" new Vim 7.0 items +hi Pmenu guibg=#3a6595 guifg=#9aadd5 +hi PmenuSel guibg=#4a85ba guifg=#b0d0f0 + + + + + +" color terminal definitions +hi Cursor ctermfg=black ctermbg=white +hi Normal ctermfg=grey ctermbg=black +hi Number ctermfg=darkgreen +highlight Operator ctermfg=yellow +highlight Conditional ctermfg=darkred +highlight Repeat ctermfg=darkred +hi Exception ctermfg=darkred +hi SpecialKey ctermfg=darkgreen +hi NonText cterm=bold ctermfg=darkgrey +hi Directory ctermfg=darkcyan +hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 +hi IncSearch ctermfg=yellow ctermbg=darkyellow cterm=NONE +hi Search ctermfg=black ctermbg=darkyellow cterm=NONE +hi MoreMsg ctermfg=darkgreen +hi ModeMsg cterm=NONE ctermfg=brown +hi LineNr ctermfg=darkcyan ctermbg=black +hi Question ctermfg=green +hi StatusLine ctermfg=yellow ctermbg=darkblue cterm=NONE +hi StatusLineNC ctermfg=grey ctermbg=darkblue cterm=NONE +hi VertSplit ctermfg=black ctermbg=darkgrey cterm=NONE +hi Title ctermfg=yellow cterm=NONE +hi Visual ctermbg=grey ctermfg=blue cterm=NONE +hi VisualNOS ctermbg=grey ctermfg=blue cterm=NONE +hi WarningMsg ctermfg=1 +hi WildMenu ctermfg=0 ctermbg=3 +hi Folded ctermfg=darkgreen ctermbg=darkblue cterm=NONE +hi FoldColumn ctermfg=yellow ctermbg=black +hi DiffAdd ctermbg=4 +hi DiffChange ctermbg=5 +hi DiffDelete cterm=bold ctermfg=4 ctermbg=6 +hi DiffText cterm=bold ctermbg=1 +hi Comment ctermfg=darkgreen ctermbg=black +hi Identifier ctermfg=cyan + +"set comments to grey on non-Windows OS's to make sure +"it is readable +if &term == "builtin_gui" || &term == "win32" + hi function ctermfg=grey + hi Type ctermfg=darkyellow ctermbg=darkblue + hi IncSearch ctermfg=black ctermbg=grey cterm=NONE + hi Search ctermfg=black ctermbg=darkgrey cterm=NONE +else + hi function ctermfg=white + hi Type ctermfg=grey + hi IncSearch ctermfg=yellow ctermbg=darkyellow cterm=NONE + hi Search ctermfg=black ctermbg=darkyellow cterm=NONE +endif +"""""""""""""""""""""""""""""""""""""""""""""""""""""" + +hi Constant ctermfg=darkcyan +hi Special ctermfg=white +hi Statement ctermfg=yellow +hi PreProc ctermfg=darkred +hi Underlined ctermfg=cyan cterm=NONE +hi Ignore cterm=bold ctermfg=7 +hi Ignore ctermfg=darkgrey +hi Error cterm=bold ctermfg=7 ctermbg=1 + +" new Vim 7.0 items +hi Pmenu ctermbg=darkblue ctermfg=lightgrey +hi PmenuSel ctermbg=lightblue ctermfg=white + +hi tablinesel ctermfg=cyan ctermbg=blue +hi tabline ctermfg=black ctermbg=blue +hi tablinefill ctermfg=green ctermbg=darkblue +"vim: sw=4 +" +hi MatchParen ctermfg=black ctermbg=green + + +elseif &background == "light" + +hi Normal guifg=#003255 guibg=#e8ebf0 "greyish blue2 +hi NonText guifg=#382920 guibg=#152555 + +" syntax highlighting """""""""""""""""""""""""""""""""""""""" + +"set comments to grey on non-Windows OS's to make sure +"it is readable +if &term == "builtin_gui" || &term == "win32" + hi Comment guifg=#daddb8 guibg=#308ae5 +else + hi Comment guifg=darkyellow guibg=#207ada +endif +"""""""""""""""""""""""""""""""""""""""""""""""""""""" + +hi Title guifg=#857540 gui=none +hi Underlined guifg=#8a758a + +hi Statement guifg=#da302a gui=none +hi Type guifg=#307aca gui=none +hi Constant guifg=#3a40aa gui=none +hi PreProc guifg=#9570b5 +hi Identifier guifg=#856075 "gui=bold +hi Special guifg=#652a7a +hi Ignore guifg=grey40 +hi Todo guifg=orangered guibg=yellow2 +hi Error guibg=#b03452 +"""""this section borrowed from OceanDeep/Midnight""""" +hi Number guifg=#006bcd +hi Function gui=None guifg=#d06d50 "or green 50b3b0 +highlight Conditional gui=None guifg=#a50a4a +highlight Repeat gui=None guifg=#700d8a +"hi Label gui=None guifg=LightGreen guibg=bg +highlight Operator gui=None guifg=#e0b045 +highlight Keyword gui=bold guifg=grey guibg=bg +highlight Exception gui=none guifg=#ea5460 +""""""""""""""""""""""""""""""""""""""""""""""""""""""" +"end syntax highlighting """"""""""""""""""""""""""""""""""""" + +" highlight groups +"hi CursorIM +hi Directory guifg=#bbd0df +"hi DiffAdd +"hi DiffChange +"hi DiffDelete +"hi DiffText +hi ErrorMsg guibg=#ff4545 + +hi Cursor guibg=#cadaca guifg=#05293d + +hi FoldColumn guibg=#409ae0 guifg=darkgrey +"hi FoldColumn guibg=#83a5cd guifg=#70459F +hi LineNr guibg=#409ae0 guifg=darkblue gui=bold +"hi LineNr guibg=#081c30 guifg=#80a0dA +hi StatusLine guibg=#20b5fd guifg=#0a150d gui=none +hi StatusLineNC guibg=#0580da guifg=#302d34 gui=none + +hi Search guibg=#babdad guifg=#3a4520 +hi IncSearch guifg=#dadeca guibg=#3a4520 + +hi VertSplit guibg=#525f95 guifg=grey50 gui=none +hi Folded guibg=#252f5d guifg=#BBDDCC +hi ModeMsg guifg=#00AACC +hi MoreMsg guifg=SeaGreen +hi Question guifg=#AABBCC +hi SpecialKey guifg=#308c70 +hi Visual guifg=#008FBF guibg=#33DFEF +"hi VisualNOS +hi WarningMsg guifg=salmon +"hi WildMenu +"hi Menu +"hi Scrollbar guibg=grey30 guifg=tan +"hi Tooltip + + +" new Vim 7.0 items +hi Pmenu guibg=#3a6595 guifg=#9aadd5 +hi PmenuSel guibg=#4a85ba guifg=#b0d0f0 + + + + + +" color terminal definitions +hi Normal ctermfg=black ctermbg=white +hi Number ctermfg=blue +highlight Operator ctermfg=yellow +highlight Conditional ctermfg=magenta +highlight Repeat ctermfg=magenta +hi Exception ctermfg=red +hi function ctermfg=darkyellow +hi SpecialKey ctermfg=darkgreen +hi NonText cterm=bold ctermfg=darkgrey ctermbg=grey +hi Directory ctermfg=darkcyan +hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 +hi IncSearch ctermfg=yellow ctermbg=darkyellow cterm=NONE +hi Search ctermfg=white ctermbg=darkyellow cterm=NONE +hi MoreMsg ctermfg=darkgreen +hi ModeMsg cterm=NONE ctermfg=brown +hi LineNr ctermfg=black ctermbg=blue +hi Question ctermfg=green +hi StatusLine ctermfg=cyan ctermbg=blue cterm=NONE +hi StatusLineNC ctermfg=grey ctermbg=darkblue cterm=NONE +hi VertSplit ctermfg=black ctermbg=black cterm=NONE +hi Title ctermfg=darkyellow ctermbg=white +hi Visual ctermbg=darkcyan ctermfg=cyan cterm=NONE +hi VisualNOS ctermbg=darkcyan ctermfg=white cterm=NONE +hi WarningMsg ctermfg=1 +hi WildMenu ctermfg=0 ctermbg=3 +hi Folded ctermfg=black ctermbg=white cterm=NONE +hi FoldColumn ctermfg=green ctermbg=blue +hi DiffAdd ctermbg=4 +hi DiffChange ctermbg=5 +hi DiffDelete cterm=bold ctermfg=4 ctermbg=6 +hi DiffText cterm=bold ctermbg=1 + +hi Comment ctermfg=grey ctermbg=blue + +hi Constant ctermfg=darkblue +hi Special ctermfg=darkmagenta +hi Identifier ctermfg=darkyellow cterm=NONE +hi Statement ctermfg=red +hi PreProc ctermfg=magenta +hi Type ctermfg=darkcyan "or darkcyan +hi Underlined ctermfg=black ctermbg=white +hi Ignore cterm=bold ctermfg=7 +hi Ignore ctermfg=darkgrey +hi Error cterm=bold ctermfg=7 ctermbg=1 + +" new Vim 7.0 items +hi Pmenu ctermbg=darkblue ctermfg=lightgrey +hi PmenuSel ctermbg=lightblue ctermfg=white + +"vim: sw=4 + +endif diff --git a/colors/bclear.vim b/colors/bclear.vim new file mode 100755 index 0000000..60a9cac --- /dev/null +++ b/colors/bclear.vim @@ -0,0 +1,67 @@ +" Vim colorscheme +" Name: bclear +" Maintainer: Ricky Cintron 'borosai' [borosai at gmail dot com] +" Last Change: 2009-08-04 + +hi clear +set background=light +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "bclear" + +"---GUI settings +hi SpecialKey guifg=#000000 guibg=#ffcde6 +hi NonText guifg=#969696 guibg=#f0f0f0 gui=none +hi Directory guifg=#78681a +hi ErrorMsg guifg=#ffffff guibg=#a01010 +hi IncSearch guifg=#ffffff guibg=#ff8000 gui=none +hi Search guifg=#000000 guibg=#ffd073 +hi MoreMsg guifg=#ffffff guibg=#3c960f gui=none +hi ModeMsg guifg=#323232 gui=none +hi LineNr guifg=#969696 guibg=#f0f0f0 +hi Question guifg=#000000 guibg=#ffde37 gui=none +hi StatusLine guifg=#ffffff guibg=#323232 gui=none +hi StatusLineNC guifg=#f0f0f0 guibg=#646464 gui=none +hi VertSplit guifg=#f0f0f0 guibg=#646464 gui=none +hi Title guifg=#323232 gui=none +hi Visual guifg=#ffffff guibg=#1994d1 +hi VisualNOS guifg=#000000 guibg=#1994d1 gui=none +hi WarningMsg guifg=#c8c8c8 guibg=#a01010 +hi WildMenu guifg=#ffffff guibg=#1994d1 +hi Folded guifg=#969696 guibg=#f0f0f0 +hi FoldColumn guifg=#969696 guibg=#f0f0f0 +hi DiffAdd guibg=#deffcd +hi DiffChange guibg=#dad7ff +hi DiffDelete guifg=#c8c8c8 guibg=#ffffff gui=none +hi DiffText guifg=#ffffff guibg=#767396 gui=none +hi SignColumn guifg=#969696 guibg=#f0f0f0 +hi SpellBad guifg=#000000 guibg=#fff5c3 guisp=#f01818 gui=undercurl +hi SpellCap guifg=#000000 guibg=#fff5c3 guisp=#14b9c8 gui=undercurl +hi SpellRare guifg=#000000 guibg=#fff5c3 guisp=#4cbe13 gui=undercurl +hi SpellLocal guifg=#000000 guibg=#fff5c3 guisp=#000000 gui=undercurl +hi Pmenu guifg=#ffffff guibg=#323232 +hi PmenuSel guifg=#ffffff guibg=#1994d1 +hi PmenuSbar guifg=#323232 guibg=#323232 +hi PmenuThumb guifg=#646464 guibg=#646464 gui=none +hi TabLine guifg=#f0f0f0 guibg=#646464 gui=none +hi TabLineSel guifg=#ffffff guibg=#323232 gui=none +hi TabLineFill guifg=#646464 guibg=#646464 gui=none +hi CursorColumn guibg=#e1f5ff +hi CursorLine guibg=#e1f5ff gui=none +hi Cursor guifg=#ffffff guibg=#323232 +hi lCursor guifg=#ffffff guibg=#004364 +hi MatchParen guifg=#ffffff guibg=#f00078 +hi Normal guifg=#323232 guibg=#ffffff +hi Comment guifg=#969696 +hi Constant guifg=#1094a0 +hi Special guifg=#dc6816 +hi Identifier guifg=#3c960f +hi Statement guifg=#3b6ac8 gui=none +hi PreProc guifg=#294a8c +hi Type guifg=#a00050 gui=none +hi Underlined guifg=#323232 gui=underline +hi Ignore guifg=#c8c8c8 +hi Error guifg=#ffffff guibg=#c81414 +hi Todo guifg=#c81414 guibg=#ffffff + diff --git a/colors/biogoo.vim b/colors/biogoo.vim new file mode 100755 index 0000000..e99dd14 --- /dev/null +++ b/colors/biogoo.vim @@ -0,0 +1,115 @@ +" Vim color File +" Name: biogoo +" Maintainer: Benjamin Esham +" Last Change: 2006-11-20 +" Version: 1.5 +" +" Colorful text on a light gray background. It's pretty easy on the eyes in +" my opinion. Any feedback is greatly appreciated! +" +" Installation: +" Copy to ~/.vim/colors; do :color biogoo +" +" Customization Options: +" Use a 'normal' cursor color: +" let g:biogoo_normal_cursor = 1 +" +" Props: +" Jani Nurminen's zenburn.vim as an example file. +" Scott F. and Matt F. for feature suggestions. +" Bill McCarthy for his Vim mailing list post about Vim 7 support. +" +" Version History: +" 1.5: should fully support Vim 7 now +" 1.4: more support for Vim 7: added the `MatchParen' group for ()[]{} matching +" 1.3: added support for Vim 7: added groups for the new spellchecking, and +" added a conditional to display Visual mode correctly in any version. +" 1.2: added `SpellErrors' group for use with vimspell. +" 1.1: added `IncSearch' group for improved visibility in incremental searches. +" 1.0: minor tweaks +" 0.95: initial release +" +" TODO: Add new groups as needed. E-mail me with any suggestions! + +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "biogoo" + +hi Comment guifg=#0000c3 +hi Constant guifg=#0000ff +hi CursorColumn guibg=#ffffff +hi CursorLine guibg=#ffffff +hi Delimiter guifg=#00007f +hi DiffAdd guifg=#007f00 guibg=#e5e5e5 +hi DiffChange guifg=#00007f guibg=#e5e5e5 +hi DiffDelete guifg=#7f0000 guibg=#e5e5e5 +hi DiffText guifg=#ee0000 guibg=#e5e5e5 +hi Directory guifg=#b85d00 +hi Error guifg=#d6d6d6 guibg=#7f0000 +hi ErrorMsg guifg=#ffffff guibg=#ff0000 gui=bold +hi Float guifg=#b85d00 +hi FoldColumn guifg=#00007f guibg=#e5e5e5 +hi Folded guifg=#00007f guibg=#e5e5e5 +hi Function guifg=#7f0000 +hi Identifier guifg=#004000 +hi Include guifg=#295498 gui=bold +hi IncSearch guifg=#ffffff guibg=#0000ff gui=bold +hi LineNr guifg=#303030 guibg=#e5e5e5 gui=underline +hi Keyword guifg=#00007f +hi Macro guifg=#295498 +hi MatchParen guifg=#ffffff guibg=#00a000 +hi ModeMsg guifg=#00007f +hi MoreMsg guifg=#00007f +hi NonText guifg=#007f00 +hi Normal guifg=#000000 guibg=#d6d6d6 +hi Number guifg=#b85d00 +hi Operator guifg=#00007f +hi Pmenu guifg=#000000 guibg=#cc9999 +hi PmenuSel guifg=#ffffff guibg=#993333 +hi PmenuSbar guibg=#99cc99 +hi PmenuThumb guifg=#339933 +hi PreCondit guifg=#295498 gui=bold +hi PreProc guifg=#0c3b6b gui=bold +hi Question guifg=#00007f +hi Search guibg=#ffff00 +hi Special guifg=#007f00 +hi SpecialKey guifg=#00007f +hi SpellBad guifg=#ffffff guibg=#7f0000 gui=undercurl guisp=#d6d6d6 +hi SpellCap guifg=#ffffff guibg=#7f007f gui=undercurl guisp=#d6d6d6 +hi SpellLocal guifg=#ffffff guibg=#007f7f gui=undercurl guisp=#d6d6d6 +hi SpellRare guifg=#ffffff guibg=#b85d00 gui=undercurl guisp=#d6d6d6 +hi Statement guifg=#00007f gui=none +hi StatusLine guifg=#00007f guibg=#ffffff +hi StatusLineNC guifg=#676767 guibg=#ffffff +hi String guifg=#d10000 +hi TabLine guifg=#222222 guibg=#d6d6d6 +hi TabLineFill guifg=#d6d6d6 +hi TabLineSel guifg=#00007f guibg=#eeeeee gui=bold +hi Title guifg=#404040 gui=bold +hi Todo guifg=#00007f guibg=#e5e5e5 gui=underline +hi Type guifg=#540054 gui=bold +hi Underlined guifg=#b85d00 +hi VertSplit guifg=#676767 guibg=#ffffff +if version < 700 + hi Visual guifg=#7f7f7f guibg=#ffffff +else + hi Visual guifg=#ffffff guibg=#7f7f7f +endif +hi VisualNOS guifg=#007f00 guibg=#e5e5e5 +hi WarningMsg guifg=#500000 +hi WildMenu guifg=#540054 + +" Non-standard highlighting (e.g. for plugins) + +" vimspell +hi SpellErrors guifg=#ffffff guibg=#7f0000 gui=undercurl guisp=#d6d6d6 + +if !exists("g:biogoo_normal_cursor") + " use a gray-on-blue cursor + hi Cursor guifg=#ffffff guibg=#00007f +endif + +" vim:noet:ts=4 sw=4 diff --git a/colors/blacksea.vim b/colors/blacksea.vim new file mode 100755 index 0000000..a98b7ca --- /dev/null +++ b/colors/blacksea.vim @@ -0,0 +1,37 @@ +" Vim color file +" Maintainer: Gerald S. Williams +" Last Change: 2007 Jun 13 + +" This is a dark version/opposite of "seashell". The cterm version of this is +" very similar to "evening". +" +" Only values that differ from defaults are specified. + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "BlackSea" + +hi Normal guibg=Black guifg=seashell ctermfg=White +hi NonText guifg=LavenderBlush ctermfg=LightMagenta +hi DiffDelete guibg=DarkRed guifg=Black ctermbg=DarkRed ctermfg=White +hi DiffAdd guibg=DarkGreen ctermbg=DarkGreen ctermfg=White +hi DiffChange guibg=Gray30 ctermbg=DarkCyan ctermfg=White +hi DiffText gui=NONE guibg=DarkCyan ctermbg=DarkCyan ctermfg=Yellow +hi Comment guifg=LightBlue +hi PreProc ctermfg=Magenta +hi StatusLine guibg=#1f001f guifg=DarkSeaGreen cterm=NONE ctermfg=White ctermbg=DarkGreen +hi StatusLineNC guifg=Gray +hi VertSplit guifg=Gray +hi Type gui=NONE +hi Identifier guifg=Cyan +hi Statement guifg=brown3 ctermfg=DarkRed +hi Search guibg=Gold3 ctermfg=White +hi Folded guibg=gray20 +hi FoldColumn guibg=gray10 + +" Original values: +"hi Constant guifg=DeepPink +"hi PreProc guifg=Magenta ctermfg=Magenta diff --git a/colors/bluegreen.vim b/colors/bluegreen.vim new file mode 100755 index 0000000..fd32bfe --- /dev/null +++ b/colors/bluegreen.vim @@ -0,0 +1,50 @@ +" Vim color file +" Maintainer: +" Last Change: +" URL: + + +" cool help screens +" :he group-name +" :he highlight-groups +" :he cterm-colors + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="mine" + +hi Normal guifg=White guibg=#061A3E + +" highlight groups +hi Cursor guibg=#D74141 guifg=#e3e3e3 +hi VertSplit guibg=#C0FFFF guifg=#075554 gui=none +hi Folded guibg=#FFC0C0 guifg=black +hi FoldColumn guibg=#800080 guifg=tan +"hi IncSearch cterm=none ctermbg=blue ctermfg=grey guifg=slategrey guibg=khaki +hi ModeMsg guifg=#404040 guibg=#C0C0C0 +hi MoreMsg guifg=darkturquoise guibg=#188F90 +hi NonText guibg=#334C75 guifg=#9FADC5 +hi Question guifg=#F4BB7E +hi Search guibg=fg guifg=bg +hi SpecialKey guifg=#BF9261 +hi StatusLine guibg=#004443 guifg=#c0ffff gui=none +hi StatusLineNC guibg=#067C7B guifg=#004443 gui=bold +hi Title guifg=#8DB8C3 +hi Visual gui=bold guifg=black guibg=#C0FFC0 +hi WarningMsg guifg=#F60000 gui=underline + +" syntax highlighting groups +hi Comment guifg=#DABEA2 +hi Constant guifg=#72A5E4 gui=bold +hi Identifier guifg=#ADCBF1 +hi Statement guifg=#7E75B5 +hi PreProc guifg=#14F07C +hi Type guifg=#A9EE8A +hi Special guifg=#EEBABA +hi Ignore guifg=grey60 +hi Todo guibg=#9C8C84 guifg=#244C0A + +"vim: ts=4 diff --git a/colors/borland.vim b/colors/borland.vim new file mode 100755 index 0000000..c39c101 --- /dev/null +++ b/colors/borland.vim @@ -0,0 +1,60 @@ +" Vim color file +" Maintainer: Yegappan Lakshmanan +" Last Change: 2001 Sep 9 + +" Color settings similar to that used in Borland IDE's. + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="borland" + +hi Normal term=NONE cterm=NONE ctermfg=Yellow ctermbg=DarkBlue +hi Normal gui=NONE guifg=Yellow guibg=DarkBlue +hi NonText term=NONE cterm=NONE ctermfg=White ctermbg=DarkBlue +hi NonText gui=NONE guifg=White guibg=DarkBlue + +hi Statement term=NONE cterm=NONE ctermfg=White ctermbg=DarkBlue +hi Statement gui=NONE guifg=White guibg=DarkBlue +hi Special term=NONE cterm=NONE ctermfg=Cyan ctermbg=DarkBlue +hi Special gui=NONE guifg=Cyan guibg=DarkBlue +hi Constant term=NONE cterm=NONE ctermfg=Magenta ctermbg=DarkBlue +hi Constant gui=NONE guifg=Magenta guibg=DarkBlue +hi Comment term=NONE cterm=NONE ctermfg=Gray ctermbg=DarkBlue +hi Comment gui=NONE guifg=Gray guibg=DarkBlue +hi Preproc term=NONE cterm=NONE ctermfg=Green ctermbg=DarkBlue +hi Preproc gui=NONE guifg=Green guibg=DarkBlue +hi Type term=NONE cterm=NONE ctermfg=White ctermbg=DarkBlue +hi Type gui=NONE guifg=White guibg=DarkBlue +hi Identifier term=NONE cterm=NONE ctermfg=White ctermbg=DarkBlue +hi Identifier gui=NONE guifg=White guibg=DarkBlue + +hi StatusLine term=bold cterm=bold ctermfg=Black ctermbg=White +hi StatusLine gui=bold guifg=Black guibg=White + +hi StatusLineNC term=NONE cterm=NONE ctermfg=Black ctermbg=White +hi StatusLineNC gui=NONE guifg=Black guibg=White + +hi Visual term=NONE cterm=NONE ctermfg=Black ctermbg=DarkCyan +hi Visual gui=NONE guifg=Black guibg=DarkCyan + +hi Search term=NONE cterm=NONE ctermbg=Gray +hi Search gui=NONE guibg=Gray + +hi VertSplit term=NONE cterm=NONE ctermfg=Black ctermbg=White +hi VertSplit gui=NONE guifg=Black guibg=White + +hi Directory term=NONE cterm=NONE ctermfg=Green ctermbg=DarkBlue +hi Directory gui=NONE guifg=Green guibg=DarkBlue + +hi WarningMsg term=standout cterm=NONE ctermfg=Red ctermbg=DarkBlue +hi WarningMsg gui=standout guifg=Red guibg=DarkBlue + +hi Error term=NONE cterm=NONE ctermfg=White ctermbg=Red +hi Error gui=NONE guifg=White guibg=Red + +hi Cursor ctermfg=Black ctermbg=Yellow +hi Cursor guifg=Black guibg=Yellow + diff --git a/colors/breeze.vim b/colors/breeze.vim new file mode 100755 index 0000000..21cf417 --- /dev/null +++ b/colors/breeze.vim @@ -0,0 +1,70 @@ +" Vim color file +" Maintainer: Tiza +" Last Change: 2002/10/30 Wed 00:08. +" version: 1.0 +" This color scheme uses a dark background. + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "breeze" + +hi Normal guifg=#ffffff guibg=#005c70 + +" Search +hi IncSearch gui=UNDERLINE guifg=#60ffff guibg=#6060ff +hi Search gui=NONE guifg=#ffffff guibg=#6060ff + +" Messages +hi ErrorMsg gui=BOLD guifg=#ffffff guibg=#ff40a0 +hi WarningMsg gui=BOLD guifg=#ffffff guibg=#ff40a0 +hi ModeMsg gui=NONE guifg=#60ffff guibg=NONE +hi MoreMsg gui=NONE guifg=#ffc0ff guibg=NONE +hi Question gui=NONE guifg=#ffff60 guibg=NONE + +" Split area +hi StatusLine gui=NONE guifg=#000000 guibg=#d0d0e0 +hi StatusLineNC gui=NONE guifg=#606080 guibg=#d0d0e0 +hi VertSplit gui=NONE guifg=#606080 guibg=#d0d0e0 +hi WildMenu gui=NONE guifg=#000000 guibg=#00c8f0 + +" Diff +hi DiffText gui=UNDERLINE guifg=#ffff00 guibg=#000000 +hi DiffChange gui=NONE guifg=#ffffff guibg=#000000 +hi DiffDelete gui=NONE guifg=#60ff60 guibg=#000000 +hi DiffAdd gui=NONE guifg=#60ff60 guibg=#000000 + +" Cursor +hi Cursor gui=NONE guifg=#ffffff guibg=#d86020 +hi lCursor gui=NONE guifg=#ffffff guibg=#e000b0 +hi CursorIM gui=NONE guifg=#ffffff guibg=#e000b0 + +" Fold +hi Folded gui=NONE guifg=#ffffff guibg=#0088c0 +" hi Folded gui=NONE guifg=#ffffff guibg=#2080d0 +hi FoldColumn gui=NONE guifg=#60e0e0 guibg=#006c7f + +" Other +hi Directory gui=NONE guifg=#00e0ff guibg=NONE +hi LineNr gui=NONE guifg=#60a8bc guibg=NONE +hi NonText gui=BOLD guifg=#00c0c0 guibg=#006276 +hi SpecialKey gui=NONE guifg=#e0a0ff guibg=NONE +hi Title gui=BOLD guifg=#ffffff guibg=NONE +hi Visual gui=NONE guifg=#ffffff guibg=#6060d0 +" hi VisualNOS gui=NONE guifg=#ffffff guibg=#6060d0 + +" Syntax group +hi Comment gui=NONE guifg=#c8d0d0 guibg=NONE +hi Constant gui=NONE guifg=#60ffff guibg=NONE +hi Error gui=BOLD guifg=#ffffff guibg=#ff40a0 +hi Identifier gui=NONE guifg=#cacaff guibg=NONE +hi Ignore gui=NONE guifg=#006074 guibg=NONE +hi PreProc gui=NONE guifg=#ffc0ff guibg=NONE +hi Special gui=NONE guifg=#ffd074 guibg=NONE +hi Statement gui=NONE guifg=#ffff80 guibg=NONE +hi Todo gui=BOLD,UNDERLINE guifg=#ffb0b0 guibg=NONE +hi Type gui=NONE guifg=#80ffa0 guibg=NONE +hi Underlined gui=UNDERLINE guifg=#ffffff guibg=NONE diff --git a/colors/brookstream.vim b/colors/brookstream.vim new file mode 100755 index 0000000..ee907c6 --- /dev/null +++ b/colors/brookstream.vim @@ -0,0 +1,83 @@ +"-------------------------------------------------------------------- +" Name Of File: brookstream.vim. +" Description: Gvim colorscheme, works best with version 6.1 GUI . +" Maintainer: Peter Bckstrm. +" Creator: Peter Bckstrm. +" URL: http://www.brookstream.org (Swedish). +" Credits: Inspiration from the darkdot scheme. +" Last Change: Friday, April 13, 2003. +" Installation: Drop this file in your $VIMRUNTIME/colors/ directory. +"-------------------------------------------------------------------- + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="brookstream" + +"-------------------------------------------------------------------- + +hi Normal gui=none guibg=#000000 guifg=#bbbbbb +hi Cursor guibg=#44ff44 guifg=#000000 +hi Directory guifg=#44ffff +hi DiffAdd guibg=#080808 guifg=#ffff00 +hi DiffDelete guibg=#080808 guifg=#444444 +hi DiffChange guibg=#080808 guifg=#ffffff +hi DiffText guibg=#080808 guifg=#bb0000 +hi ErrorMsg guibg=#880000 guifg=#ffffff +hi Folded guifg=#000088 +hi IncSearch guibg=#000000 guifg=#bbcccc +hi LineNr guibg=#050505 guifg=#4682b4 +hi ModeMsg guifg=#ffffff +hi MoreMsg guifg=#44ff44 +hi NonText guifg=#4444ff +hi Question guifg=#ffff00 +hi SpecialKey guifg=#4444ff +hi StatusLine gui=none guibg=#2f4f4f guifg=#ffffff +hi StatusLineNC gui=none guibg=#bbbbbb guifg=#000000 +hi Title guifg=#ffffff +hi Visual gui=none guibg=#bbbbbb guifg=#000000 +hi WarningMsg guifg=#ffff00 + +" syntax highlighting groups ---------------------------------------- + +hi Comment guifg=#696969 +hi Constant guifg=#00aaaa +hi Identifier guifg=#00e5ee +hi Statement guifg=#00ffff +hi PreProc guifg=#8470ff +hi Type guifg=#ffffff +hi Special gui=none guifg=#87cefa +hi Underlined gui=bold guifg=#4444ff +hi Ignore guifg=#444444 +hi Error guibg=#000000 guifg=#bb0000 +hi Todo guibg=#aa0006 guifg=#fff300 +hi Operator gui=none guifg=#00bfff +hi Function guifg=#1e90ff +hi String gui=None guifg=#4682b4 +hi Boolean guifg=#9bcd9b + +"hi link Character Constant +"hi link Number Constant +"hi link Boolean Constant +"hi link Float Number +"hi link Conditional Statement +"hi link Label Statement +"hi link Keyword Statement +"hi link Exception Statement +"hi link Repeat Statement +"hi link Include PreProc +"hi link Define PreProc +"hi link Macro PreProc +"hi link PreCondit PreProc +"hi link StorageClass Type +"hi link Structure Type +"hi link Typedef Type +"hi link Tag Special +"hi link Delimiter Special +"hi link SpecialComment Special +"hi link Debug Special +"hi link FoldColumn Folded + +"- end of colorscheme ----------------------------------------------- diff --git a/colors/buttercream.vim b/colors/buttercream.vim new file mode 100755 index 0000000..05931f8 --- /dev/null +++ b/colors/buttercream.vim @@ -0,0 +1,59 @@ +" Vim color file +" vim: tw=0 ts=8 sw=4 +" Scriptname: buttercream +" Maintainer: Hkan Wikstrm +" Version: 1.1 +" Last Change: 20060413 +" As of now only gui is supported +" Based on the theme fog theme by Thomas R. Kimpton + +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif +let colors_name = "buttercream" + +" Highlight Foreground Background Extras + +hi Normal guifg=#213a58 guibg=#ffffde +hi NonText guifg=LightBlue guibg=#eee9bf gui=bold +hi Comment guifg=#2f8e99 +hi Constant guifg=#7070a0 +hi Statement guifg=DarkGreen gui=bold +hi identifier guifg=DarkGreen +hi preproc guifg=#408040 +hi type guifg=DarkBlue +hi label guifg=#c06000 +hi operator guifg=DarkGreen gui=bold +hi StorageClass guifg=#a02060 gui=bold +hi Number guifg=Blue +hi Special guifg=#aa8822 +hi Cursor guifg=LightGrey guibg=#880088 +hi lCursor guifg=Black guibg=Cyan +hi ErrorMsg guifg=White guibg=DarkRed +hi DiffText guibg=DarkRed gui=bold +hi Directory guifg=DarkGrey gui=underline +hi LineNr guifg=#ccaa22 +hi MoreMsg guifg=SeaGreen gui=bold +hi Question guifg=DarkGreen gui=bold +hi Search guifg=Black guibg=#887722 +hi SpecialKey guifg=Blue +hi SpecialChar guifg=DarkGrey gui=bold +hi Title guifg=DarkMagenta gui=underline +hi WarningMsg guifg=DarkBlue guibg=#9999cc +hi WildMenu guifg=Black guibg=Yellow gui=underline +hi Folded guifg=DarkBlue guibg=LightGrey +hi FoldColumn guifg=DarkBLue guibg=Grey +hi DiffAdd guibg=DarkBlue +hi DiffChange guibg=DarkMagenta +hi DiffDelete guifg=Blue guibg=DarkCyan gui=bold +hi Ignore guifg=grey90 +hi IncSearch gui=reverse +hi ModeMsg gui=bold +hi StatusLine gui=reverse,bold +hi StatusLineNC gui=reverse +hi VertSplit gui=reverse +hi Visual guifg=LightGrey gui=reverse +hi VisualNOS gui=underline,bold +hi Todo guibg=#ccaa22 gui=bold,underline diff --git a/colors/calmar256-dark.vim b/colors/calmar256-dark.vim new file mode 100755 index 0000000..7c823fb --- /dev/null +++ b/colors/calmar256-dark.vim @@ -0,0 +1,247 @@ +" Vim color file: calmar256-dark.vim +" Last Change: 21. Aug 2007 +" License: public domain +" Maintainer:: calmar +" +" for a 256 color capable terminal like xterm-256color, ... or gvim as well +" "{{{ +" it only works in such a terminal and when you have: +" set t_Co=256 +" in your vimrc"}}} + +" {{{ t_Co=256 is set - check +if &t_Co != 256 && ! has("gui_running") + echomsg "" + echomsg "write 'set t_Co=256' in your .vimrc or this file won't load" + echomsg "" + finish +endif +" }}} +" {{{ reset colors and set colors_name and store cpo setting +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = "calmar256-dark" + +let s:save_cpo = &cpo +set cpo&vim +" }}} + +" FORMAT:"{{{ +" +" \ ["color-group", "term-style", "foreground-color", "background-color", "gui-style", "under-curl-color" ], +" +" 'term-style'/'gui-style' can be: +" bold, underline, undercurl, reverse, inverse, italic, standout, NONE +" +" if gui-style is empty, the term-style value is used for the gui +" +" (Note: not everything is supported by a terminal nor the gui) +" +" besides empty values defaults to 'NONE" +" +" may also check: :help highlight-groups +" :help hl- " +" +" for the Color numbers (0-255) for the foreground/background and under-curl-colors: +" http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html + +"}}} +"============================================================ +" EDIT/ADD your style/colors below +"------------------------------------------------------------ + +" Format: \ ["color-group", +" "term-style", +" "foreground-color", +" "background-color", +" "gui-style", +" "under-curl-color" ], + +let s:colors256 = [ + \ ["Normal", "", "41", "232", "", "" ], + \ ["Cursor", "", "255", "33", "", "" ], + \ ["CursorLine", "", "", "233", "", "" ], + \ ["CursorColumn", "", "", "223", "", "" ], + \ ["Incsearch", "bold", "195", "124", "", "" ], + \ ["Search", "", "", "52", "", "" ], + \ ["ErrorMsg", "bold", "16", "202", "", "" ], + \ ["WarningMsg", "bold", "16", "190", "", "" ], + \ ["ModeMsg", "bold", "226", "18", "", "" ], + \ ["MoreMsg", "bold", "16", "154", "", "" ], + \ ["Question", "bold", "70", "", "", "" ], + \ ["StatusLine", "", "190", "22", "", "" ], + \ ["StatusLineNC", "", "84", "234", "", "" ], + \ ["User1", "bold", "28", "", "", "" ], + \ ["User2", "bold", "39", "", "", "" ], + \ ["VertSplit", "", "84", "22", "", "" ], + \ ["WildMenu", "bold", "87", "35", "", "" ], + \ ["DiffText", "", "16", "190", "", "" ], + \ ["DiffChange", "", "18", "83", "", "" ], + \ ["DiffDelete", "", "79", "124", "", "" ], + \ ["DiffAdd", "", "79", "21", "", "" ], + \ ["Folded", "bold", "38", "234", "", "" ], + \ ["FoldedColumn", "", "39", "190", "", "" ], + \ ["FoldColumn", "", "38", "234", "", "" ], + \ ["Directory", "", "28", "", "", "" ], + \ ["LineNr", "", "28", "16", "", "" ], + \ ["NonText", "", "244", "16", "", "" ], + \ ["SpecialKey", "", "190", "", "", "" ], + \ ["Title", "bold", "98", "", "", "" ], + \ ["Visual", "", "", "238", "", "" ], + \ ["Comment", "", "37", "", "", "" ], + \ ["Costant", "", "73", "", "", "" ], + \ ["String", "", "190", "", "", "" ], + \ ["Error", "", "69", "", "", "" ], + \ ["Identifier", "", "81", "", "", "" ], + \ ["Ignore", "", "", "", "", "" ], + \ ["Number", "bold", "50", "", "", "" ], + \ ["PreProc", "", "178", "", "", "" ], + \ ["Special", "", "15", "234", "", "" ], + \ ["SpecialChar", "", "155", "", "", "" ], + \ ["Statement", "", "36", "", "", "" ], + \ ["Todo", "bold", "16", "148", "", "" ], + \ ["Type", "", "71", "", "", "" ], + \ ["Underlined", "bold", "77", "", "", "" ], + \ ["TaglistTagName","bold", "48", "124", "", "" ]] + +let s:colorvim7 = [ + \ ["Pmenu", "", "228", "236", "", "" ], + \ ["PmenuSel", "bold", "226", "232", "", "" ], + \ ["PmenuSbar", "", "119", "16", "", "" ], + \ ["PmenuThumb", "", "11", "16", "", "" ], + \ ["SpellBad", "underline", "","", "undercurl","160"], + \ ["SpellRare", "", "82", "233", "", "" ], + \ ["SpellLocal", "", "227", "234", "", "" ], + \ ["SpellCap", "", "46", "236", "", "" ], + \ ["MatchParen", "bold", "15", "22", "", "" ], + \ ["TabLine", "", "253", "30", "", "" ], + \ ["TabLineSel", "bold", "247", "16", "", "" ], + \ ["TabLineFill", "", "247", "16", "", "" ]] + +"============================================================ +" * NO NEED * to edit below (unless bugfixing) +"============================================================ +" +" {{{ change empty fields to "NONE" + +for s:col in s:colors256 + for i in [1, 2, 3, 4, 5] + if s:col[i] == "" + let s:col[i] = "NONE" + endif + endfor +endfor + +for s:col in s:colorvim7 + for i in [1, 2, 3, 4, 5] + if s:col[i] == "" + let s:col[i] = "NONE" + endif + endfor +endfor +" }}} +" {{{ check args helper function +function! s:checkargs(arg) + if a:arg+0 == 0 && a:arg != "0" "its a string + return a:arg + else + return s:cmap[a:arg+0] "get rgb color based on the number + endif +endfunction +" }}} +" {{{ guisetcolor helper function +" +function! s:guisetcolor(colarg) + " if gui-style is empty use (c)term-style also for gui + if a:colarg[4] == "" + let guival = a:colarg[1] + else + let guival = a:colarg[4] + endif + + let fg = s:checkargs(a:colarg[2]) + let bg = s:checkargs(a:colarg[3]) + let sp = s:checkargs(a:colarg[5]) + + exec "hi ".a:colarg[0]." gui=".guival." guifg=".fg." guibg=".bg." guisp=".sp +endfunction +" }}} +" {{{ color setup for terminal +if ! has("gui_running") + for s:col in s:colors256 + exec "hi ".s:col[0]." cterm=".s:col[1]." ctermfg=".s:col[2]." ctermbg=".s:col[3] + endfor + if v:version >= 700 + for s:col in s:colorvim7 + exec "hi ".s:col[0]." cterm=".s:col[1]." ctermfg=".s:col[2]." ctermbg=".s:col[3] + endfor + endif +else +" }}} + " color-mapping array {{{ + " number of vim colors and #html colors equivalent for gui + let s:cmap = [ + \ "#000000", "#800000", "#008000", "#808000", + \ "#000080", "#800080", "#008080", "#c0c0c0", + \ "#808080", "#ff0000", "#00ff00", "#ffff00", + \ "#0000ff", "#ff00ff", "#00ffff", "#ffffff", + \ + \ "#000000", "#00005f", "#000087", "#0000af", "#0000d7", "#0000ff", + \ "#005f00", "#005f5f", "#005f87", "#005faf", "#005fd7", "#005fff", + \ "#008700", "#00875f", "#008787", "#0087af", "#0087d7", "#0087ff", + \ "#00af00", "#00af5f", "#00af87", "#00afaf", "#00afd7", "#00afff", + \ "#00d700", "#00d75f", "#00d787", "#00d7af", "#00d7d7", "#00d7ff", + \ "#00ff00", "#00ff5f", "#00ff87", "#00ffaf", "#00ffd7", "#00ffff", + \ "#5f0000", "#5f005f", "#5f0087", "#5f00af", "#5f00d7", "#5f00ff", + \ "#5f5f00", "#5f5f5f", "#5f5f87", "#5f5faf", "#5f5fd7", "#5f5fff", + \ "#5f8700", "#5f875f", "#5f8787", "#5f87af", "#5f87d7", "#5f87ff", + \ "#5faf00", "#5faf5f", "#5faf87", "#5fafaf", "#5fafd7", "#5fafff", + \ "#5fd700", "#5fd75f", "#5fd787", "#5fd7af", "#5fd7d7", "#5fd7ff", + \ "#5fff00", "#5fff5f", "#5fff87", "#5fffaf", "#5fffd7", "#5fffff", + \ "#870000", "#87005f", "#870087", "#8700af", "#8700d7", "#8700ff", + \ "#875f00", "#875f5f", "#875f87", "#875faf", "#875fd7", "#875fff", + \ "#878700", "#87875f", "#878787", "#8787af", "#8787d7", "#8787ff", + \ "#87af00", "#87af5f", "#87af87", "#87afaf", "#87afd7", "#87afff", + \ "#87d700", "#87d75f", "#87d787", "#87d7af", "#87d7d7", "#87d7ff", + \ "#87ff00", "#87ff5f", "#87ff87", "#87ffaf", "#87ffd7", "#87ffff", + \ "#af0000", "#af005f", "#af0087", "#af00af", "#af00d7", "#af00ff", + \ "#af5f00", "#af5f5f", "#af5f87", "#af5faf", "#af5fd7", "#af5fff", + \ "#af8700", "#af875f", "#af8787", "#af87af", "#af87d7", "#af87ff", + \ "#afaf00", "#afaf5f", "#afaf87", "#afafaf", "#afafd7", "#afafff", + \ "#afd700", "#afd75f", "#afd787", "#afd7af", "#afd7d7", "#afd7ff", + \ "#afff00", "#afff5f", "#afff87", "#afffaf", "#afffd7", "#afffff", + \ "#d70000", "#d7005f", "#d70087", "#d700af", "#d700d7", "#d700ff", + \ "#d75f00", "#d75f5f", "#d75f87", "#d75faf", "#d75fd7", "#d75fff", + \ "#d78700", "#d7875f", "#d78787", "#d787af", "#d787d7", "#d787ff", + \ "#d7af00", "#d7af5f", "#d7af87", "#d7afaf", "#d7afd7", "#d7afff", + \ "#d7d700", "#d7d75f", "#d7d787", "#d7d7af", "#d7d7d7", "#d7d7ff", + \ "#d7ff00", "#d7ff5f", "#d7ff87", "#d7ffaf", "#d7ffd7", "#d7ffff", + \ "#ff0000", "#ff005f", "#ff0087", "#ff00af", "#ff00d7", "#ff00ff", + \ "#ff5f00", "#ff5f5f", "#ff5f87", "#ff5faf", "#ff5fd7", "#ff5fff", + \ "#ff8700", "#ff875f", "#ff8787", "#ff87af", "#ff87d7", "#ff87ff", + \ "#ffaf00", "#ffaf5f", "#ffaf87", "#ffafaf", "#ffafd7", "#ffafff", + \ "#ffd700", "#ffd75f", "#ffd787", "#ffd7af", "#ffd7d7", "#ffd7ff", + \ "#ffff00", "#ffff5f", "#ffff87", "#ffffaf", "#ffffd7", "#ffffff", + \ + \ "#080808", "#121212", "#1c1c1c", "#262626", "#303030", "#3a3a3a", + \ "#444444", "#4e4e4e", "#585858", "#606060", "#666666", "#767676", + \ "#808080", "#8a8a8a", "#949494", "#9e9e9e", "#a8a8a8", "#b2b2b2", + \ "#bcbcbc", "#c6c6c6", "#d0d0d0", "#dadada", "#e4e4e4", "#eeeeee" ] + " }}} +" {{{ color setup for gvim + for s:col in s:colors256 + call s:guisetcolor(s:col) + endfor + if v:version >= 700 + for s:col in s:colorvim7 + call s:guisetcolor(s:col) + endfor + endif +endif +" }}} +let &cpo = s:save_cpo " restoring &cpo value +" vim: set fdm=marker fileformat=unix: diff --git a/colors/calmar256-light.vim b/colors/calmar256-light.vim new file mode 100755 index 0000000..941f8ea --- /dev/null +++ b/colors/calmar256-light.vim @@ -0,0 +1,247 @@ +" Vim color file: calmar256-dark.vim +" Last Change: 21. Aug 2007 +" License: public domain +" Maintainer:: calmar +" +" for a 256 color capable terminal like xterm-256color, ... or gvim as well +" "{{{ +" it only works in such a terminal and when you have: +" set t_Co=256 +" in your vimrc"}}} + +" {{{ t_Co=256 is set - check +if &t_Co != 256 && ! has("gui_running") + echomsg "" + echomsg "write 'set t_Co=256' in your .vimrc or this file won't load" + echomsg "" + finish +endif +" }}} +" {{{ reset colors and set colors_name and store cpo setting +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = "calmar256-light" + +let s:save_cpo = &cpo +set cpo&vim +" }}} + +" FORMAT:"{{{ +" +" \ ["color-group", "term-style", "foreground-color", "background-color", "gui-style", "under-curl-color" ], +" +" 'term-style'/'gui-style' can be: +" bold, underline, undercurl, reverse, inverse, italic, standout, NONE +" +" if gui-style is empty, the term-style value is used for the gui +" +" (Note: not everything is supported by a terminal nor the gui) +" +" besides empty values defaults to 'NONE" +" +" may also check: :help highlight-groups +" :help hl- " +" +" for the Color numbers (0-255) for the foreground/background and under-curl-colors: +" http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html + +"}}} +"============================================================ +" EDIT/ADD your style/colors below +"------------------------------------------------------------ + +" Format: \ ["color-group", +" "term-style", +" "foreground-color", +" "background-color", +" "gui-style", +" "under-curl-color" ], + +let s:colors256 = [ + \ ["Normal", "", "17", "230", "", "" ], + \ ["Cursor", "", "", "226", "", "" ], + \ ["CursorLine", "", "", "222", "", "" ], + \ ["CursorColumn", "", "", "223", "", "" ], + \ ["Incsearch", "bold", "195", "28", "", "" ], + \ ["Search", "", "", "119", "", "" ], + \ ["ErrorMsg", "bold", "16", "202", "", "" ], + \ ["WarningMsg", "bold", "16", "190", "", "" ], + \ ["ModeMsg", "bold", "16", "51", "", "" ], + \ ["MoreMsg", "bold", "16", "154", "", "" ], + \ ["Question", "bold", "27", "", "", "" ], + \ ["StatusLine", "", "231", "30", "", "" ], + \ ["StatusLineNC", "", "20", "250", "", "" ], + \ ["User1", "bold", "28", "", "", "" ], + \ ["User2", "bold", "39", "", "", "" ], + \ ["VertSplit", "", "84", "22", "", "" ], + \ ["WildMenu", "bold", "87", "35", "", "" ], + \ ["DiffText", "", "16", "190", "", "" ], + \ ["DiffChange", "", "16", "83", "", "" ], + \ ["DiffDelete", "", "79", "124", "", "" ], + \ ["DiffAdd", "", "79", "21", "", "" ], + \ ["Folded", "bold", "19", "115", "", "" ], + \ ["FoldedColumn", "", "39", "190", "", "" ], + \ ["FoldColumn", "", "19", "115", "", "" ], + \ ["Directory", "", "28", "", "", "" ], + \ ["LineNr", "", "63", "228", "", "" ], + \ ["NonText", "", "243", "229", "", "" ], + \ ["SpecialKey", "", "190", "", "", "" ], + \ ["Title", "bold", "18", "", "", "" ], + \ ["Visual", "", "", "220", "", "" ], + \ ["Comment", "", "21", "255", "", "" ], + \ ["Costant", "", "58", "", "", "" ], + \ ["String", "", "160", "", "", "" ], + \ ["Error", "", "130", "", "", "" ], + \ ["Identifier", "", "31", "", "", "" ], + \ ["Ignore", "", "", "", "", "" ], + \ ["Number", "bold", "23", "", "", "" ], + \ ["PreProc", "", "26", "255", "", "" ], + \ ["Special", "", "", "229", "", "" ], + \ ["SpecialChar", "", "22", "", "", "" ], + \ ["Statement", "", "36", "", "", "" ], + \ ["Todo", "", "", "229", "", "" ], + \ ["Type", "", "20", "", "", "" ], + \ ["Underlined", "bold", "25", "", "", "" ], + \ ["TaglistTagName","bold", "29", "118", "", "" ]] + +let s:colorvim7 = [ + \ ["Pmenu", "", "229", "29", "", "" ], + \ ["PmenuSel", "bold", "232", "226", "", "" ], + \ ["PmenuSbar", "", "16", "119", "", "" ], + \ ["PmenuThumb", "", "16", "11", "", "" ], + \ ["SpellBad", "undercurl", "","", "undercurl","160" ], + \ ["SpellRare", "", "", "228", "", "" ], + \ ["SpellLocal", "", "", "224", "", "" ], + \ ["SpellCap", "", "", "247", "", "" ], + \ ["MatchParen", "bold", "15", "22", "", "" ], + \ ["TabLine", "", "252", "22", "", "" ], + \ ["TabLineSel", "bold", "253", "30", "", "" ], + \ ["TabLineFill", "", "247", "16", "", "" ]] + +"============================================================ +" * NO NEED * to edit below (unless bugfixing) +"============================================================ +" +" {{{ change empty fields to "NONE" + +for s:col in s:colors256 + for i in [1, 2, 3, 4, 5] + if s:col[i] == "" + let s:col[i] = "NONE" + endif + endfor +endfor + +for s:col in s:colorvim7 + for i in [1, 2, 3, 4, 5] + if s:col[i] == "" + let s:col[i] = "NONE" + endif + endfor +endfor +" }}} +" {{{ check args helper function +function! s:checkargs(arg) + if a:arg+0 == 0 && a:arg != "0" "its a string + return a:arg + else + return s:cmap[a:arg+0] "get rgb color based on the number + endif +endfunction +" }}} +" {{{ guisetcolor helper function +" +function! s:guisetcolor(colarg) + " if gui-style is empty use (c)term-style also for gui + if a:colarg[4] == "" + let guival = a:colarg[1] + else + let guival = a:colarg[4] + endif + + let fg = s:checkargs(a:colarg[2]) + let bg = s:checkargs(a:colarg[3]) + let sp = s:checkargs(a:colarg[5]) + + exec "hi ".a:colarg[0]." gui=".guival." guifg=".fg." guibg=".bg." guisp=".sp +endfunction +" }}} +" {{{ color setup for terminal +if ! has("gui_running") + for s:col in s:colors256 + exec "hi ".s:col[0]." cterm=".s:col[1]." ctermfg=".s:col[2]." ctermbg=".s:col[3] + endfor + if v:version >= 700 + for s:col in s:colorvim7 + exec "hi ".s:col[0]." cterm=".s:col[1]." ctermfg=".s:col[2]." ctermbg=".s:col[3] + endfor + endif +else +" }}} + " color-mapping array {{{ + " number of vim colors and #html colors equivalent for gui + let s:cmap = [ + \ "#000000", "#800000", "#008000", "#808000", + \ "#000080", "#800080", "#008080", "#c0c0c0", + \ "#808080", "#ff0000", "#00ff00", "#ffff00", + \ "#0000ff", "#ff00ff", "#00ffff", "#ffffff", + \ + \ "#000000", "#00005f", "#000087", "#0000af", "#0000d7", "#0000ff", + \ "#005f00", "#005f5f", "#005f87", "#005faf", "#005fd7", "#005fff", + \ "#008700", "#00875f", "#008787", "#0087af", "#0087d7", "#0087ff", + \ "#00af00", "#00af5f", "#00af87", "#00afaf", "#00afd7", "#00afff", + \ "#00d700", "#00d75f", "#00d787", "#00d7af", "#00d7d7", "#00d7ff", + \ "#00ff00", "#00ff5f", "#00ff87", "#00ffaf", "#00ffd7", "#00ffff", + \ "#5f0000", "#5f005f", "#5f0087", "#5f00af", "#5f00d7", "#5f00ff", + \ "#5f5f00", "#5f5f5f", "#5f5f87", "#5f5faf", "#5f5fd7", "#5f5fff", + \ "#5f8700", "#5f875f", "#5f8787", "#5f87af", "#5f87d7", "#5f87ff", + \ "#5faf00", "#5faf5f", "#5faf87", "#5fafaf", "#5fafd7", "#5fafff", + \ "#5fd700", "#5fd75f", "#5fd787", "#5fd7af", "#5fd7d7", "#5fd7ff", + \ "#5fff00", "#5fff5f", "#5fff87", "#5fffaf", "#5fffd7", "#5fffff", + \ "#870000", "#87005f", "#870087", "#8700af", "#8700d7", "#8700ff", + \ "#875f00", "#875f5f", "#875f87", "#875faf", "#875fd7", "#875fff", + \ "#878700", "#87875f", "#878787", "#8787af", "#8787d7", "#8787ff", + \ "#87af00", "#87af5f", "#87af87", "#87afaf", "#87afd7", "#87afff", + \ "#87d700", "#87d75f", "#87d787", "#87d7af", "#87d7d7", "#87d7ff", + \ "#87ff00", "#87ff5f", "#87ff87", "#87ffaf", "#87ffd7", "#87ffff", + \ "#af0000", "#af005f", "#af0087", "#af00af", "#af00d7", "#af00ff", + \ "#af5f00", "#af5f5f", "#af5f87", "#af5faf", "#af5fd7", "#af5fff", + \ "#af8700", "#af875f", "#af8787", "#af87af", "#af87d7", "#af87ff", + \ "#afaf00", "#afaf5f", "#afaf87", "#afafaf", "#afafd7", "#afafff", + \ "#afd700", "#afd75f", "#afd787", "#afd7af", "#afd7d7", "#afd7ff", + \ "#afff00", "#afff5f", "#afff87", "#afffaf", "#afffd7", "#afffff", + \ "#d70000", "#d7005f", "#d70087", "#d700af", "#d700d7", "#d700ff", + \ "#d75f00", "#d75f5f", "#d75f87", "#d75faf", "#d75fd7", "#d75fff", + \ "#d78700", "#d7875f", "#d78787", "#d787af", "#d787d7", "#d787ff", + \ "#d7af00", "#d7af5f", "#d7af87", "#d7afaf", "#d7afd7", "#d7afff", + \ "#d7d700", "#d7d75f", "#d7d787", "#d7d7af", "#d7d7d7", "#d7d7ff", + \ "#d7ff00", "#d7ff5f", "#d7ff87", "#d7ffaf", "#d7ffd7", "#d7ffff", + \ "#ff0000", "#ff005f", "#ff0087", "#ff00af", "#ff00d7", "#ff00ff", + \ "#ff5f00", "#ff5f5f", "#ff5f87", "#ff5faf", "#ff5fd7", "#ff5fff", + \ "#ff8700", "#ff875f", "#ff8787", "#ff87af", "#ff87d7", "#ff87ff", + \ "#ffaf00", "#ffaf5f", "#ffaf87", "#ffafaf", "#ffafd7", "#ffafff", + \ "#ffd700", "#ffd75f", "#ffd787", "#ffd7af", "#ffd7d7", "#ffd7ff", + \ "#ffff00", "#ffff5f", "#ffff87", "#ffffaf", "#ffffd7", "#ffffff", + \ + \ "#080808", "#121212", "#1c1c1c", "#262626", "#303030", "#3a3a3a", + \ "#444444", "#4e4e4e", "#585858", "#606060", "#666666", "#767676", + \ "#808080", "#8a8a8a", "#949494", "#9e9e9e", "#a8a8a8", "#b2b2b2", + \ "#bcbcbc", "#c6c6c6", "#d0d0d0", "#dadada", "#e4e4e4", "#eeeeee" ] + " }}} +" {{{ color setup for gvim + for s:col in s:colors256 + call s:guisetcolor(s:col) + endfor + if v:version >= 700 + for s:col in s:colorvim7 + call s:guisetcolor(s:col) + endfor + endif +endif +" }}} +let &cpo = s:save_cpo " restoring &cpo value +" vim: set fdm=marker fileformat=unix: diff --git a/colors/camo.vim b/colors/camo.vim new file mode 100755 index 0000000..059af42 --- /dev/null +++ b/colors/camo.vim @@ -0,0 +1,76 @@ +" Vim color file +" Maintainer: Tim Aldrich +" Last Change: 19 January 2002 + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="camo" +hi Normal guifg=bisque guibg=grey15 +hi Cursor guifg=snow guibg=bisque3 +hi CursorIM guifg=OliveDrab4 guibg=bisque +hi Directory guifg=OliveDrab4 guibg=grey15 +hi DiffAdd guifg=DarkOliveGreen1 guibg=grey15 +hi DiffChange guifg=PaleGreen guibg=grey15 +hi DiffDelete guifg=red guibg=grey15 +hi DiffText guifg=grey15 guibg=red +hi ErrorMsg guifg=snow guibg=red +hi VertSplit guifg=bisque4 guibg=DarkOliveGreen1 +hi Folded guifg=DarkOliveGreen2 guibg=grey30 +hi FoldColumn guifg=DarkOliveGreen2 guibg=grey30 +hi IncSearch guifg=bisque guibg=red +hi LineNr guifg=OliveDrab4 guibg=grey15 +hi ModeMsg guifg=khaki3 guibg=grey15 +hi MoreMsg guifg=khaki3 guibg=grey15 +hi NonText guifg=DarkSalmon guibg=grey10 +hi Question guifg=IndianRed guibg=grey10 +hi Search guifg=DarkSalmon guibg=grey15 +hi SpecialKey guifg=yellow guibg=grey15 +hi StatusLine guifg=bisque4 guibg=DarkOliveGreen1 +hi StatusLineNC guifg=bisque4 guibg=DarkOliveGreen3 +hi Title guifg=IndianRed guibg=grey15 +hi Visual guifg=OliveDrab4 guibg=bisque1 +hi WarningMsg guifg=bisque guibg=red +hi WildMenu guifg=LightBlue guibg=DarkViolet + + +"Syntax hilight groups + +hi Comment guifg=tan +hi Constant guifg=khaki +hi String guifg=moccasin +hi Character guifg=chocolate +hi Number guifg=chocolate +hi Boolean guifg=OliveDrab3 +hi Float guifg=chocolate +hi Identifier guifg=khaki4 +hi Function guifg=OliveDrab4 +hi Statement guifg=khaki +hi Conditional guifg=khaki +hi Repeat guifg=khaki +hi Label guifg=khaki +hi Operator guifg=DarkKhaki +hi Keyword guifg=DarkKhaki +hi Exception guifg=khaki +hi PreProc guifg=khaki4 +hi Include guifg=khaki4 +hi Define guifg=khaki1 +hi Macro guifg=khaki2 +hi PreCondit guifg=khaki3 +hi Type guifg=khaki3 +hi StorageClass guifg=tan +hi Structure guifg=DarkGoldenrod +hi Typedef guifg=khaki3 +hi Special guifg=IndianRed +hi SpecialChar guifg=DarkGoldenrod +hi Tag guifg=DarkKhaki +hi Delimiter guifg=DarkGoldenrod +hi SpecialComment guifg=cornsilk +hi Debug guifg=brown +hi Underlined guifg=IndianRed +hi Ignore guifg=grey30 +hi Error guifg=bisque guibg=red +hi Todo guifg=red guibg=bisque + diff --git a/colors/candy.vim b/colors/candy.vim new file mode 100755 index 0000000..545ff7c --- /dev/null +++ b/colors/candy.vim @@ -0,0 +1,78 @@ +" Vim color file +" Maintainer: Tiza +" Last Change: 2002/04/28 Sun 19:35. +" version: 1.0 +" This color scheme uses a dark background. + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "candy" + +hi Normal guifg=#f0f0f8 guibg=#000000 + +" Search +hi IncSearch gui=UNDERLINE guifg=#80ffff guibg=#0060c0 +hi Search gui=NONE guifg=#f0f0f8 guibg=#0060c0 + +" Messages +hi ErrorMsg gui=BOLD guifg=#ffa0ff guibg=NONE +hi WarningMsg gui=BOLD guifg=#ffa0ff guibg=NONE +hi ModeMsg gui=BOLD guifg=#40f0d0 guibg=NONE +hi MoreMsg gui=BOLD guifg=#00ffff guibg=#008070 +hi Question gui=BOLD guifg=#e8e800 guibg=NONE + +" Split area +hi StatusLine gui=NONE guifg=#000000 guibg=#c8c8d8 +hi StatusLineNC gui=NONE guifg=#707080 guibg=#c8c8d8 +hi VertSplit gui=NONE guifg=#606080 guibg=#c8c8d8 +hi WildMenu gui=NONE guifg=#000000 guibg=#a0a0ff + +" Diff +hi DiffText gui=NONE guifg=#ff78f0 guibg=#a02860 +hi DiffChange gui=NONE guifg=#e03870 guibg=#601830 +hi DiffDelete gui=NONE guifg=#a0d0ff guibg=#0020a0 +hi DiffAdd gui=NONE guifg=#a0d0ff guibg=#0020a0 + +" Cursor +hi Cursor gui=NONE guifg=#00ffff guibg=#008070 +hi lCursor gui=NONE guifg=#ffffff guibg=#8800ff +hi CursorIM gui=NONE guifg=#ffffff guibg=#8800ff + +" Fold +hi Folded gui=NONE guifg=#40f0f0 guibg=#005080 +hi FoldColumn gui=NONE guifg=#40c0ff guibg=#00305c + +" Other +hi Directory gui=NONE guifg=#40f0d0 guibg=NONE +hi LineNr gui=NONE guifg=#9090a0 guibg=NONE +hi NonText gui=BOLD guifg=#4080ff guibg=NONE +hi SpecialKey gui=BOLD guifg=#8080ff guibg=NONE +hi Title gui=BOLD guifg=#f0f0f8 guibg=NONE +hi Visual gui=NONE guifg=#e0e0f0 guibg=#707080 + +" Syntax group +hi Comment gui=NONE guifg=#c0c0d0 guibg=NONE +hi Constant gui=NONE guifg=#90d0ff guibg=NONE +hi Error gui=BOLD guifg=#ffffff guibg=#ff0088 +hi Identifier gui=NONE guifg=#40f0f0 guibg=NONE +hi Ignore gui=NONE guifg=#000000 guibg=NONE +hi PreProc gui=NONE guifg=#40f0a0 guibg=NONE +hi Special gui=NONE guifg=#e0e080 guibg=NONE +hi Statement gui=NONE guifg=#ffa0ff guibg=NONE +hi Todo gui=BOLD,UNDERLINE guifg=#ffa0a0 guibg=NONE +hi Type gui=NONE guifg=#ffc864 guibg=NONE +hi Underlined gui=UNDERLINE guifg=#f0f0f8 guibg=NONE + +" HTML +hi htmlLink gui=UNDERLINE +hi htmlBold gui=BOLD +hi htmlBoldItalic gui=BOLD,ITALIC +hi htmlBoldUnderline gui=BOLD,UNDERLINE +hi htmlBoldUnderlineItalic gui=BOLD,UNDERLINE,ITALIC +hi htmlItalic gui=ITALIC +hi htmlUnderline gui=UNDERLINE +hi htmlUnderlineItalic gui=UNDERLINE,ITALIC diff --git a/colors/candycode.vim b/colors/candycode.vim new file mode 100755 index 0000000..3800d9d --- /dev/null +++ b/colors/candycode.vim @@ -0,0 +1,174 @@ +" Vim color file -- candycode +" Maintainer: Justin Constantino +" Last Change: 2006 Aug 12 + +set background=dark +highlight clear +let g:colors_name="candycode" + +let save_cpo = &cpo +set cpo&vim + +" basic highlight groups (:help highlight-groups) {{{ + +" text {{{ + +hi Normal guifg=#ffffff guibg=#050505 gui=NONE + \ ctermfg=white ctermbg=black cterm=NONE + +hi Folded guifg=#c2bfa5 guibg=#050505 gui=underline + \ ctermfg=lightgray ctermbg=black cterm=underline + +hi LineNr guifg=#928c75 guibg=NONE gui=NONE + \ ctermfg=darkgray ctermbg=NONE cterm=NONE + +hi Directory guifg=#00bbdd guibg=NONE gui=NONE + \ ctermfg=cyan ctermbg=NONE cterm=NONE +hi NonText guifg=#77ff22 guibg=NONE gui=bold + \ ctermfg=yellow ctermbg=NONE cterm=NONE +hi SpecialKey guifg=#559933 guibg=NONE gui=NONE + \ ctermfg=green ctermbg=NONE cterm=NONE + +hi SpellBad guifg=NONE guibg=NONE gui=undercurl + \ ctermfg=white ctermbg=darkred guisp=#ff0011 +hi SpellCap guifg=NONE guibg=NONE gui=undercurl + \ ctermfg=white ctermbg=darkblue guisp=#0044ff +hi SpellLocal guifg=NONE guibg=NONE gui=undercurl + \ ctermfg=black ctermbg=cyan guisp=#00dd99 +hi SpellRare guifg=NONE guibg=NONE gui=undercurl + \ ctermfg=white ctermbg=darkmagenta guisp=#ff22ee + +hi DiffAdd guifg=#ffffff guibg=#126493 gui=NONE + \ ctermfg=white ctermbg=darkblue cterm=NONE +hi DiffChange guifg=#000000 guibg=#976398 gui=NONE + \ ctermfg=black ctermbg=darkmagenta cterm=NONE +hi DiffDelete guifg=#000000 guibg=#be1923 gui=bold + \ ctermfg=black ctermbg=red cterm=bold +hi DiffText guifg=#ffffff guibg=#976398 gui=bold + \ ctermfg=white ctermbg=green cterm=bold + +" }}} +" borders / separators / menus {{{ + +hi FoldColumn guifg=#c8bcb9 guibg=#786d65 gui=bold + \ ctermfg=lightgray ctermbg=darkgray cterm=NONE +hi SignColumn guifg=#c8bcb9 guibg=#786d65 gui=bold + \ ctermfg=lightgray ctermbg=darkgray cterm=NONE + +hi Pmenu guifg=#000000 guibg=#a6a190 gui=NONE + \ ctermfg=white ctermbg=darkgray cterm=NONE +hi PmenuSel guifg=#ffffff guibg=#133293 gui=NONE + \ ctermfg=white ctermbg=lightblue cterm=NONE +hi PmenuSbar guifg=NONE guibg=#555555 gui=NONE + \ ctermfg=black ctermbg=black cterm=NONE +hi PmenuThumb guifg=NONE guibg=#cccccc gui=NONE + \ ctermfg=gray ctermbg=gray cterm=NONE + +hi StatusLine guifg=#000000 guibg=#c2bfa5 gui=bold + \ ctermfg=black ctermbg=white cterm=bold +hi StatusLineNC guifg=#444444 guibg=#c2bfa5 gui=NONE + \ ctermfg=darkgray ctermbg=white cterm=NONE +hi WildMenu guifg=#ffffff guibg=#133293 gui=bold + \ ctermfg=white ctermbg=darkblue cterm=bold +hi VertSplit guifg=#c2bfa5 guibg=#c2bfa5 gui=NONE + \ ctermfg=white ctermbg=white cterm=NONE + +hi TabLine guifg=#000000 guibg=#c2bfa5 gui=NONE + \ ctermfg=black ctermbg=white cterm=NONE +hi TabLineFill guifg=#000000 guibg=#c2bfa5 gui=NONE + \ ctermfg=black ctermbg=white cterm=NONE +hi TabLineSel guifg=#ffffff guibg=#133293 gui=NONE + \ ctermfg=white ctermbg=black cterm=NONE + +"hi Menu +"hi Scrollbar +"hi Tooltip + +" }}} +" cursor / dynamic / other {{{ + +hi Cursor guifg=#000000 guibg=#ffff99 gui=NONE + \ ctermfg=black ctermbg=white cterm=NONE +hi CursorIM guifg=#000000 guibg=#aaccff gui=NONE + \ ctermfg=black ctermbg=white cterm=reverse +hi CursorLine guifg=NONE guibg=#1b1b1b gui=NONE + \ ctermfg=NONE ctermbg=NONE cterm=NONE +hi CursorColumn guifg=NONE guibg=#1b1b1b gui=NONE + \ ctermfg=NONE ctermbg=NONE cterm=NONE + +hi Visual guifg=#ffffff guibg=#606070 gui=NONE + \ ctermfg=white ctermbg=lightblue cterm=NONE + +hi IncSearch guifg=#000000 guibg=#eedd33 gui=bold + \ ctermfg=white ctermbg=yellow cterm=NONE +hi Search guifg=#efefd0 guibg=#937340 gui=NONE + \ ctermfg=white ctermbg=darkgreen cterm=NONE + +hi MatchParen guifg=NONE guibg=#3377aa gui=NONE + \ ctermfg=white ctermbg=blue cterm=NONE + +"hi VisualNOS + +" }}} +" listings / messages {{{ + +hi ModeMsg guifg=#eecc18 guibg=NONE gui=NONE + \ ctermfg=yellow ctermbg=NONE cterm=NONE +hi Title guifg=#dd4452 guibg=NONE gui=bold + \ ctermfg=red ctermbg=NONE cterm=bold +hi Question guifg=#66d077 guibg=NONE gui=NONE + \ ctermfg=green ctermbg=NONE cterm=NONE +hi MoreMsg guifg=#39d049 guibg=NONE gui=NONE + \ ctermfg=green ctermbg=NONE cterm=NONE + +hi ErrorMsg guifg=#ffffff guibg=#ff0000 gui=bold + \ ctermfg=white ctermbg=red cterm=bold +hi WarningMsg guifg=#ccae22 guibg=NONE gui=bold + \ ctermfg=yellow ctermbg=NONE cterm=bold + +" }}} + +" }}} +" syntax highlighting groups (:help group-name) {{{ + +hi Comment guifg=#ff9922 guibg=NONE gui=NONE + \ ctermfg=brown ctermbg=NONE cterm=NONE + +hi Constant guifg=#ff6050 guibg=NONE gui=NONE + \ ctermfg=red ctermbg=NONE cterm=NONE +hi Boolean guifg=#ff6050 guibg=NONE gui=bold + \ ctermfg=red ctermbg=NONE cterm=bold + +hi Identifier guifg=#eecc44 guibg=NONE gui=NONE + \ ctermfg=yellow ctermbg=NONE cterm=NONE + +hi Statement guifg=#66d077 guibg=NONE gui=bold + \ ctermfg=green ctermbg=NONE cterm=bold + +hi PreProc guifg=#bb88dd guibg=NONE gui=NONE + \ ctermfg=darkmagenta ctermbg=NONE cterm=NONE + +hi Type guifg=#4093cc guibg=NONE gui=bold + \ ctermfg=lightblue ctermbg=NONE cterm=bold + +hi Special guifg=#9999aa guibg=NONE gui=bold + \ ctermfg=lightgray ctermbg=NONE cterm=bold + +hi Underlined guifg=#80a0ff guibg=NONE gui=underline + \ ctermfg=NONE ctermbg=NONE cterm=underline + \ term=underline + +hi Ignore guifg=#888888 guibg=NONE gui=NONE + \ ctermfg=darkgray ctermbg=NONE cterm=NONE + +hi Error guifg=#ffffff guibg=#ff0000 gui=NONE + \ ctermfg=white ctermbg=red cterm=NONE + +hi Todo guifg=#ffffff guibg=#ee7700 gui=bold + \ ctermfg=black ctermbg=yellow cterm=bold + +" }}} + +let &cpo = save_cpo + +" vim: fdm=marker fdl=0 diff --git a/colors/chela_light.vim b/colors/chela_light.vim new file mode 100755 index 0000000..3cde34d --- /dev/null +++ b/colors/chela_light.vim @@ -0,0 +1,110 @@ +" Vim color file +" +" Maintainer: Stefan Karlsson +" Last Change: 8 August 2006 + + +set background=light + +hi clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name="chela_light" + + +"Syntax Groups ============================================= + +hi comment guibg=#fafafa guifg=#339900 gui=none + +hi constant guibg=#fafafa guifg=#cc2222 gui=none + +hi identifier guibg=#fafafa guifg=#2222ff gui=none + +hi statement guibg=#fafafa guifg=#2222ff gui=none + +hi preproc guibg=#fafafa guifg=#2222ff gui=none +hi precondit guibg=#fafafa guifg=#cc00cc gui=none + +hi type guibg=#fafafa guifg=#2222ff gui=none + +hi special guibg=#fafafa guifg=#cc00cc gui=none +hi specialchar guibg=#fafafa guifg=#cc2222 gui=underline + +hi underlined guibg=#fafafa guifg=#2222ff gui=underline + +hi error guibg=#ff2222 guifg=#ffffff gui=none + +hi todo guibg=#339933 guifg=#ffffff gui=none + + +"General Groups ============================================ + +hi cursor guibg=#000000 guifg=#ffffff gui=none +" cursorim? +hi cursorcolumn guibg=#eeeeee gui=none +hi cursorline guibg=#eeeeee gui=none + +hi directory guibg=#fafafa guifg=#2222ff gui=none + +hi diffadd guibg=#66ff66 guifg=#000000 gui=none +hi diffchange guibg=#ffff00 guifg=#cccc99 gui=none +hi diffdelete guibg=#ff6666 guifg=#ff6666 gui=none +hi difftext guibg=#ffff00 guifg=#000000 gui=none + +hi errormsg guibg=#ff2222 guifg=#ffffff gui=none + +hi vertsplit guibg=#2222ff guifg=#2222ff gui=none + +hi folded guibg=#eeeeee guifg=#2222ff gui=none +hi foldcolumn guibg=#eeeeee guifg=#999999 gui=none + +" signcolumn? + +hi incsearch guibg=#ffbb00 guifg=#000000 gui=none + +hi linenr guibg=#fafafa guifg=#cccccc gui=none + +hi matchparen guibg=#cccccc gui=none + +hi modemsg guibg=#fafafa guifg=#999999 gui=none + +hi moremsg guibg=#339900 guifg=#ffffff gui=none + +hi nontext guibg=#fafafa guifg=#999999 gui=none + +hi normal guibg=#fafafa guifg=#222222 gui=none + +hi pmenu guibg=#cccccc guifg=#222222 gui=none +hi pmenusel guibg=#2222ff guifg=#ffffff gui=none +" pmenusbar? +" pmenuthumb? + +hi question guibg=#339900 guifg=#ffffff gui=none + +hi search guibg=#ffff00 guifg=#000000 gui=none + +hi specialkey guibg=#fafafa guifg=#cc00cc gui=none + +hi spellbad gui=undercurl guisp=#ff2222 +hi spellcap gui=undercurl guisp=#ff2222 +hi spelllocal gui=undercurl guisp=#cc2222 +hi spellrare gui=undercurl guisp=#22cc22 + +hi statusline guibg=#2222ff guifg=#ffffff gui=none +hi statuslinenc guibg=#2222ff guifg=#999999 gui=none + +hi tabline guibg=#cccccc guifg=#222222 gui=none +hi tablinesel guibg=#2222ff guifg=#ffffff gui=none +hi tablinefill guibg=#aaaaaa guifg=#aaaaaa gui=none + +hi title guibg=#fafafa guifg=#6666ff gui=none + +hi visual guibg=#cccccc guifg=#333333 gui=none +" visualnos? + +hi warningmsg guibg=#fafafa guifg=#ff0000 gui=none + +hi wildmenu guibg=#339900 guifg=#ffffff gui=none + diff --git a/colors/chocolateliquor.vim b/colors/chocolateliquor.vim new file mode 100755 index 0000000..9dfa712 --- /dev/null +++ b/colors/chocolateliquor.vim @@ -0,0 +1,36 @@ +" Vim color file +" Maintainer: Gerald S. Williams +" Last Change: 2007 Jun 13 + +" This started as a dark version (perhaps opposite is a better term) of +" PapayaWhip, but took on a life of its own. Easy on the eyes, but still has +" good contrast. Not bad on a color terminal, either (especially if yours +" default to PapayaWhip text on a ChocolateLiquor/#3f1f1f background). +" +" Only values that differ from defaults are specified. + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "ChocolateLiquor" + +hi Normal guibg=#3f1f1f guifg=PapayaWhip ctermfg=White +hi NonText guibg=#1f0f0f guifg=Brown2 ctermfg=Brown ctermbg=Black +hi LineNr guibg=#1f0f0f guifg=Brown2 +hi DiffDelete guibg=DarkRed guifg=White ctermbg=DarkRed ctermfg=White +hi DiffAdd guibg=DarkGreen guifg=White ctermbg=DarkGreen ctermfg=White +hi DiffText gui=NONE guibg=DarkCyan guifg=Yellow ctermbg=DarkCyan ctermfg=Yellow +hi DiffChange guibg=DarkCyan guifg=White ctermbg=DarkCyan ctermfg=White +hi Constant ctermfg=Red +hi Comment guifg=LightBlue3 +hi PreProc guifg=Plum ctermfg=Magenta +hi StatusLine guibg=White guifg=Sienna4 cterm=NONE ctermfg=Black ctermbg=Brown +hi StatusLineNC gui=NONE guifg=Black guibg=Gray ctermbg=Black ctermfg=Gray +hi VertSplit guifg=Gray +hi Search guibg=Gold3 ctermfg=Blue +hi Type gui=NONE guifg=DarkSeaGreen2 +hi Statement gui=NONE guifg=Gold3 +hi FoldColumn guibg=#1f0f0f ctermfg=Cyan ctermbg=Black +hi Folded guibg=grey20 ctermfg=Cyan ctermbg=Black diff --git a/colors/clarity.vim b/colors/clarity.vim new file mode 100755 index 0000000..3440ba3 --- /dev/null +++ b/colors/clarity.vim @@ -0,0 +1,52 @@ +" Vim color - Clarity +" + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="clarity" + +highlight Normal gui=NONE guifg=LightBlue2 guibg=#1F3055 +highlight Comment gui=NONE guifg=Grey62 guibg=bg +highlight PreProc gui=NONE guifg=Salmon guibg=bg +highlight Precondit gui=NONE guifg=Khaki3 guibg=bg +highlight Identifier gui=NONE guifg=Khaki3 guibg=bg +highlight Type gui=BOLD guifg=Orange guibg=bg +highlight StorageClass gui=BOLD guifg=Cornsilk2 guibg=bg +highlight Todo gui=BOLD guifg=#1F3055 guibg=White +highlight NonText gui=NONE guifg=#334C51 guibg=SteelBlue4 +highlight LineNr gui=NONE guifg=HoneyDew2 guibg=Grey25 +highlight StatusLineNC gui=NONE guifg=Grey80 guibg=LightBlue4 +highlight StatusLine gui=NONE guifg=DarkBlue guibg=#FFFFCA +highlight IncSearch gui=NONE guifg=Black guibg=#FFE568 +highlight Search gui=UNDERLINE,BOLD guifg=#FFE568 guibg=bg +highlight Cursor gui=NONE guifg=Grey50 guibg=#FFE568 +highlight CursorIM gui=NONE guifg=Grey50 guibg=#FFE568 +highlight Title gui=BOLD guifg=OliveDrab3 guibg=bg +highlight WarningMsg gui=BOLD guifg=White guibg=Red4 +highlight String gui=NONE guifg=Grey80 guibg=bg +highlight Number gui=NONE guifg=OliveDrab2 guibg=bg +highlight Constant gui=NONE guifg=#ACEDAB guibg=bg +highlight Visual gui=BOLD guifg=White guibg=bg +highlight Directory gui=NONE guifg=PeachPuff guibg=bg +highlight DiffAdd gui=NONE guifg=white guibg=SeaGreen +highlight DiffChange gui=BOLD guifg=white guibg=Blue +highlight DiffDelete gui=NONE guifg=Grey40 guibg=Grey20 +highlight DiffText gui=BOLD guifg=HoneyDew1 guibg=FireBrick +highlight Typedef gui=NONE guifg=Cornsilk guibg=bg +highlight Define gui=NONE guifg=White guibg=bg +highlight Tag gui=NONE guifg=LightBlue2 guibg=bg +highlight Debug gui=BOLD guifg=Green guibg=bg +highlight Special gui=NONE guifg=NavajoWhite guibg=bg +highlight SpecialChar gui=NONE guifg=NavajoWhite guibg=bg +highlight Delimiter gui=NONE guifg=NavajoWhite guibg=bg +highlight SpecialComment gui=NONE guifg=NavajoWhite3 guibg=bg +highlight Conditional gui=BOLD guifg=Wheat2 guibg=bg +highlight Statement gui=BOLD guifg=Pink3 guibg=bg +highlight WildMenu gui=NONE guifg=White guibg=FireBrick +highlight browseSuffixes gui=NONE guifg=Cornsilk3 guibg=bg + + + diff --git a/colors/cleanphp.vim b/colors/cleanphp.vim new file mode 100755 index 0000000..c0af691 --- /dev/null +++ b/colors/cleanphp.vim @@ -0,0 +1,81 @@ +" Vim color file +" Maintainer: Billy McIntosh +" Last Change: June 24, 2003 +" Licence: Public Domain + +" This package offers a eye-catching color scheme for PHP syntax + +" First remove all existing highlighting. +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "cleanphp" + +hi Normal guifg=#008000 guibg=#d3e4f8 + +hi ErrorMsg guibg=#d3e4f8 guifg=Red +hi IncSearch gui=reverse +hi ModeMsg gui=bold +hi StatusLine gui=reverse,bold +hi StatusLineNC gui=reverse +hi VertSplit gui=reverse +hi Visual gui=reverse guifg=#c0c0c0 guibg=fg +hi VisualNOS gui=underline,bold +hi DiffText gui=bold guibg=Red +hi Cursor guibg=Black guifg=NONE +hi lCursor guibg=Black guifg=NONE +hi Directory guifg=#ff8040 +hi LineNr guifg=#008000 +hi MoreMsg gui=bold guifg=SeaGreen +hi NonText gui=bold guifg=#ff8040 guibg=#d3e4f8 +hi Question gui=bold guifg=Black +hi Search guibg=#008000 guifg=NONE +hi SpecialKey guifg=#ff8040 +hi Title gui=bold guifg=Magenta +hi WarningMsg guifg=Red +hi WildMenu guibg=Cyan guifg=#d3e4f8 +hi Folded guibg=White guifg=Darkblue +hi FoldColumn guibg=#c0c0c0 guifg=Darkblue +hi DiffAdd guibg=Lightblue +hi DiffChange guibg=LightMagenta +hi DiffDelete gui=bold guifg=#ff8040 guibg=LightCyan + +hi Comment guifg=#ff8040 guibg=#d3e4f8 +hi Constant guifg=#BB0000 guibg=#d3e4f8 +hi PreProc guifg=#008080 guibg=#d3e4f8 +hi Statement gui=NONE guifg=#008000 guibg=#d3e4f8 +hi Special guifg=#008080 guibg=#d3e4f8 +hi Ignore guifg=#c0c0c0 +hi Identifier guifg=#000080 guibg=#d3e4f8 +hi Type guifg=#00BB00 guibg=#d3e4f8 + +hi link IncSearch Visual +hi link String Constant +hi link Character Constant +hi link Number Constant +hi link Boolean Constant +hi link Float Number +hi link Function Identifier +hi link Conditional Statement +hi link Repeat Statement +hi link Label Statement +hi link Operator Statement +hi link Keyword Statement +hi link Exception Statement +hi link Include PreProc +hi link Define PreProc +hi link Macro PreProc +hi link PreCondit PreProc +hi link StorageClass Type +hi link Structure Type +hi link Typedef Type +hi link Tag Special +hi link SpecialChar Special +hi link Delimiter Special +hi link SpecialComment Special +hi link Debug Special + +" vim: sw=2 \ No newline at end of file diff --git a/colors/colorer.vim b/colors/colorer.vim new file mode 100755 index 0000000..30e1277 --- /dev/null +++ b/colors/colorer.vim @@ -0,0 +1,79 @@ +" local syntax file - set colors on a per-machine basis: +" vim: tw=0 ts=4 sw=4 +" Vim color file +" Maintainer: Sergey V. Beduev +" Last Change: Sun Mar 28 11:19:38 EEST 2004 + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = "colorer" + +hi Normal ctermfg=Gray guifg=DarkGray guibg=black +hi Visual ctermfg=DarkCyan guibg=black guifg=DarkCyan +hi Comment ctermfg=Brown guifg=#B46918 gui=NONE +hi PerlPOD ctermfg=Brown guifg=#B86A18 gui=NONE +hi Constant ctermfg=White guifg=White gui=NONE +hi Charachter ctermfg=Yellow guifg=Yellow gui=NONE +hi String ctermfg=Yellow guifg=Yellow gui=NONE +hi Number ctermfg=White guifg=White gui=NONE +hi Boolean ctermfg=Cyan guifg=DarkGray gui=NONE +hi Special ctermfg=DarkMagenta guifg=Red gui=NONE +hi Define ctermfg=LightMagenta guifg=Magenta gui=NONE +hi Identifier ctermfg=Green guifg=Green gui=NONE +hi Exception ctermfg=White guifg=White gui=NONE +hi Statement ctermfg=White guifg=White gui=NONE +hi Label ctermfg=White guifg=White gui=NONE +hi Keyword ctermfg=White guifg=White gui=NONE +hi PreProc ctermfg=Green guifg=Green gui=NONE +hi Type ctermfg=LightGreen guifg=Green gui=NONE +hi Function ctermfg=White guifg=White gui=NONE +hi Repeat ctermfg=White guifg=White gui=NONE +hi Operator ctermfg=White guifg=White gui=NONE +hi Ignore ctermfg=black guifg=bg +hi Folded ctermbg=LightBlue ctermfg=Gray guibg=DarkBlue guifg=DarkGray gui=NONE +hi Error term=reverse ctermbg=Red ctermfg=White guibg=darkRed guifg=White gui=NONE +hi Todo term=standout ctermbg=Yellow ctermfg=Black guifg=Black guibg=#AD5500 gui=NONE +hi Done term=standout ctermbg=Gray ctermfg=White guifg=White guibg=Gray gui=NONE + +hi SpellErrors ctermfg=DarkRed guifg=Black gui=NONE + +hi MailQ ctermfg=darkcyan guibg=black gui=NONE +hi MailQu ctermfg=darkgreen guibg=black gui=NONE +hi MyDiffNew ctermfg=magenta guifg=red gui=NONE +hi MyDiffCommLine ctermfg=white ctermbg=red guifg=white guibg=darkred gui=NONE +hi MyDiffRemoved ctermfg=LightRed guifg=red gui=NONE +hi MyDiffSubName ctermfg=DarkCyan guifg=Cyan gui=NONE +hi MyDiffNormal ctermbg=White ctermfg=black guibg=White guifg=black gui=NONE +hi MoreMsg gui=NONE +hi ModeMsg gui=NONE +hi Title gui=NONE +hi NonText gui=NONE +hi DiffDelete gui=NONE +hi DiffText gui=NONE +hi StatusLine guifg=black guibg=gray gui=NONE +hi Question gui=NONE +" Common groups that link to default highlighting. +" You can specify other highlighting easily. +"hi link String Constant +"hi link Character Constant +"hi link Number Constant +"hi link Boolean Constant +hi link Float Number +hi link Conditional Repeat +hi link Include PreProc +hi link Structure Define +hi link Macro PreProc +hi link PreCondit PreProc +hi link StorageClass Type +hi link Structure Type +hi link Typedef Type +hi link Tag Special +hi link SpecialChar Special +hi link Delimiter Normal +hi link SpecialComment Special +hi link Debug Special + diff --git a/colors/dante.vim b/colors/dante.vim new file mode 100755 index 0000000..f584889 --- /dev/null +++ b/colors/dante.vim @@ -0,0 +1,83 @@ +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" File: "/home/caciano/.vim/dante.vim" +" Created: "Thu, 23 May 2002 00:12:20 -0300 (caciano)" +" Updated: "Sat, 24 Aug 2002 14:04:21 -0300 (caciano)" +" Copyright (C) 2002, Caciano Machado +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Colorscheme Option: +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +hi clear +if exists("syntax on") + syntax reset +endif +let g:colors_name = "dante" + +" General colors +hi Normal ctermfg=gray guifg=peachpuff3 guibg=black +hi Directory term=bold ctermfg=blue guifg=royalblue +hi ErrorMsg term=standout ctermfg=white ctermbg=red guifg=white guibg=red3 +hi NonText term=bold ctermfg=darkgray guibg=gray3 guifg=gray20 +hi SpecialKey term=bold ctermfg=darkgray guifg=gray30 +hi LineNr term=underline ctermfg=darkgray guifg=ivory4 guibg=gray4 +hi IncSearch term=reverse cterm=reverse gui=reverse,bold guifg=darkgoldenrod2 +hi Search term=reverse ctermfg=black ctermbg=yellow guifg=gray10 guibg=gold2 +hi Visual term=bold,reverse cterm=bold,reverse ctermfg=gray ctermbg=black gui=bold,reverse guifg=gray40 guibg=black +hi VisualNOS term=bold,underline cterm=bold,underline gui=bold,underline +hi MoreMsg term=bold ctermfg=green gui=bold guifg=olivedrab1 +hi ModeMsg term=bold cterm=bold gui=bold +hi Question term=standout ctermfg=green gui=bold guifg=olivedrab1 +hi WarningMsg term=standout ctermfg=red gui=bold guifg=red3 +hi WildMenu term=standout ctermfg=black ctermbg=yellow guifg=black guibg=gold2 +hi Folded term=standout ctermfg=blue ctermbg=white guifg=royalblue1 guibg=white +hi FoldColumn term=standout ctermfg=blue ctermbg=white guifg=royalblue3 guibg=white +hi DiffAdd term=bold ctermbg=blue guibg=royalblue2 +hi DiffChange term=bold ctermbg=darkmagenta guibg=maroon +hi DiffDelete term=bold cterm=bold ctermfg=lightblue ctermbg=cyan gui=bold guifg=lightblue guibg=cyan4 +hi DiffText term=reverse cterm=bold ctermbg=red gui=bold guibg=red3 +hi Cursor guifg=bg guibg=fg +hi lCursor guifg=bg guibg=fg +hi StatusLine term=reverse cterm=reverse gui=reverse guifg=gray60 +hi StatusLineNC term=reverse cterm=reverse gui=reverse guifg=gray40 +hi VertSplit term=reverse cterm=reverse gui=bold,reverse guifg=gray40 +hi Title term=bold ctermfg=magenta gui=bold guifg=aquamarine + +" syntax hi colors +hi Comment term=bold ctermfg=darkcyan guifg=cyan4 +hi PreProc term=underline ctermfg=darkblue guifg=dodgerblue4 +hi Constant term=underline ctermfg=darkred guifg=firebrick3 +hi Type term=underline ctermfg=darkgreen gui=none guifg=chartreuse3 +hi Statement term=bold ctermfg=darkyellow gui=none guifg=gold3 +hi Identifier term=underline ctermfg=darkgreen guifg=darkolivegreen4 +hi Ignore term=bold ctermfg=darkgray guifg=gray45 +hi Special term=underline ctermfg=brown guifg=sienna +hi Error term=reverse ctermfg=gray ctermbg=red guifg=gray guibg=red3 +hi Todo term=standout ctermfg=black ctermbg=yellow gui=bold guifg=gray10 guibg=yellow4 +hi Underlined term=underline cterm=underline ctermfg=darkblue gui=underline guifg=slateblue +hi Number term=underline ctermfg=darkred guifg=red2 +" syntax hi links +hi link String Constant +hi link Character Constant +hi link Number Constant +hi link Boolean Constant +hi link Float Number +hi link Function Identifier +hi link Number Constant +hi link Conditional Statement +hi link Repeat Statement +hi link Label Statement +hi link Keyword Statement +hi link Exception Statement +hi link Operator Statement +hi link Include PreProc +hi link Define PreProc +hi link Macro PreProc +hi link PreCondit PreProc +hi link StorageClass Type +hi link Structure Type +hi link Typedef Type +hi link Tag Special +hi link SpecialChar Special +hi link Delimiter Special +hi link SpecialComment Special +hi link Debug Special +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/colors/darkZ.vim b/colors/darkZ.vim new file mode 100755 index 0000000..246f69a --- /dev/null +++ b/colors/darkZ.vim @@ -0,0 +1,91 @@ +" Vim color file +" Create by Andy +" QQ24375048 + +set background=dark +if version > 580 + hi clear + if exists("syntax_on") + syntax reset + endif +endif +let g:colors_name="darkZ" + +hi Normal guifg=#DFD6C1 guibg=gray14 gui=none + +" highlight groups +hi Cursor guifg=black guibg=yellow gui=none +hi ErrorMsg guifg=white guibg=red gui=none +hi VertSplit guifg=gray40 guibg=gray40 gui=none +hi Folded guifg=DarkSlateGray3 guibg=grey30 gui=none +hi FoldColumn guifg=tan guibg=grey30 gui=none +hi IncSearch guifg=#b0ffff guibg=#2050d0 +hi LineNr guifg=burlywood3 gui=none +hi ModeMsg guifg=SkyBlue gui=none +hi MoreMsg guifg=SeaGreen gui=none +hi NonText guifg=cyan gui=none +hi Question guifg=springgreen gui=none +hi Search guifg=gray80 guibg=#445599 gui=none +hi SpecialKey guifg=cyan gui=none +hi StatusLine guifg=black guibg=Pink gui=bold +hi StatusLineNC guifg=grey guibg=gray40 gui=none +hi Title guifg=#ff4400 gui=none gui=bold +hi Visual guifg=gray17 guibg=tan1 gui=none +hi WarningMsg guifg=salmon gui=none +hi Pmenu guifg=white guibg=#445599 gui=none +hi PmenuSel guifg=#445599 guibg=gray +hi WildMenu guifg=gray guibg=gray17 gui=none +hi MatchParen guifg=cyan guibg=#6C6C6C gui=bold +hi DiffAdd guifg=black guibg=wheat1 +hi DiffChange guifg=black guibg=skyblue1 +hi DiffText guifg=black guibg=hotpink1 gui=none +hi DiffDelete guibg=gray45 guifg=black gui=none + +" syntax highlighting groups +hi Comment guifg=gray50 gui=italic +hi Constant guifg=#FF77FF gui=none +hi Identifier guifg=#6FDEF8 gui=none +hi Function guifg=#82EF2A gui=none +hi Statement guifg=#FCFC63 gui=none +hi PreProc guifg=#82EF2A gui=none +hi Type guifg=#33AFF3 gui=none +hi Special guifg=orange gui=none +hi Ignore guifg=red gui=none +hi Todo guifg=red guibg=yellow2 gui=none + +" color terminal definitions +hi SpecialKey ctermfg=red +hi NonText cterm=bold ctermfg=darkblue +hi Directory ctermfg=darkcyan +hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 +hi IncSearch cterm=NONE ctermfg=yellow ctermbg=green +hi Search cterm=NONE ctermfg=white ctermbg=grey +hi MoreMsg ctermfg=darkgreen +hi ModeMsg cterm=NONE ctermfg=brown +hi LineNr ctermfg=3 +hi Question ctermfg=green +hi StatusLine cterm=bold,reverse +hi StatusLineNC cterm=reverse +hi VertSplit cterm=reverse +hi Title ctermfg=5 +hi Visual cterm=reverse +hi VisualNOS cterm=bold,underline +hi WarningMsg ctermfg=1 +hi WildMenu ctermfg=0 ctermbg=3 +hi Folded ctermfg=darkgrey ctermbg=NONE +hi FoldColumn ctermfg=darkgrey ctermbg=NONE +hi DiffAdd ctermbg=4 +hi DiffChange ctermbg=5 +hi DiffDelete cterm=bold ctermfg=4 ctermbg=6 +hi DiffText cterm=bold ctermbg=1 +hi Comment ctermfg=darkcyan +hi Constant ctermfg=brown +hi Special ctermfg=5 +hi Identifier ctermfg=6 +hi Statement ctermfg=3 +hi PreProc ctermfg=5 +hi Type ctermfg=2 +hi Underlined cterm=underline ctermfg=5 +hi Ignore ctermfg=darkgrey +hi Error cterm=bold ctermfg=7 ctermbg=1 + diff --git a/colors/darkblue2.vim b/colors/darkblue2.vim new file mode 100755 index 0000000..eee2cc7 --- /dev/null +++ b/colors/darkblue2.vim @@ -0,0 +1,105 @@ +" Vim color file +" Maintainer: Datila Carvalho +" Last Change: May, 19, 2005 +" Version: 0.2 + +" This is a VIM's version of the emacs color theme +" _Dark Blue2_ created by Chris McMahan. + +""" Init stuff + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = "darkblue2" + + +""" Colors + +" GUI colors +hi Cursor guifg=#233b5a guibg=Yellow +hi CursorIM guifg=NONE guibg=Yellow +hi Directory gui=bold guifg=cyan +"hi DiffAdd +"hi DiffChange +"hi DiffDelete +hi DiffText guibg=grey50 +hi ErrorMsg gui=bold guifg=White guibg=gray85 +hi VertSplit gui=bold guifg=NONE guibg=gray80 +"hi Folded +"hi FoldColumn +"hi IncSearch +hi LineNr gui=bold guifg=lightsteelblue guibg=#132b4a +hi ModeMsg gui=bold +"hi MoreMsg +"hi NonText +hi Normal guibg=#233b5a guifg=#fff8dc +"hi Question +hi Search gui=bold guifg=#233b5a guibg=lightgoldenrod +"hi SpecialKey +hi StatusLine guifg=steelblue4 guibg=lightgray +hi StatusLineNC guifg=royalblue4 guibg=lightsteelblue +"hi Title +hi Visual guifg=steelblue guibg=fg +hi VisualNOS gui=bold guifg=steelblue guibg=fg +hi WarningMsg guifg=White guibg=Tomato +"hi WildMenu + +hi User2 guifg=lightskyblue guibg=#021a39 gui=bold + +" If using Motif/Athena +hi Menu guibg=#233b5a guifg=#fff8dc +hi Scrollbar guibg=bg + +" Colors for syntax highlighting +hi Comment gui=italic guifg=mediumaquamarine + +hi Constant gui=bold guifg=lightgoldenrod1 + hi String guifg=aquamarine + hi Character guifg=aquamarine + hi Number gui=bold guifg=lightgoldenrod1 + hi Boolean gui=bold guifg=lightgoldenrod1 + hi Float gui=bold guifg=lightgoldenrod1 + +hi Identifier gui=bold guifg=palegreen + hi Function guifg=lightskyblue + +hi Statement gui=bold guifg=cyan + hi Conditional gui=bold guifg=cyan + hi Repeat gui=bold guifg=cyan + hi Label guifg=cyan + hi Operator guifg=cyan + "hi Keyword + "hi Exception + +hi PreProc guifg=lightsteelblue + hi Include gui=bold guifg=lightsteelblue + hi Define guifg=lightsteelblue + hi Macro guifg=lightsteelblue + hi PreCondit guifg=lightsteelblue + +hi Type gui=bold guifg=palegreen + hi StorageClass gui=bold guifg=lightgoldenrod1 + hi Structure gui=bold guifg=lightgoldenrod1 + hi Typedef gui=bold guifg=lightgoldenrod1 + +"hi Special + ""Underline Character + "hi SpecialChar + "hi Tag + ""Statement + "hi Delimiter + ""Bold comment (in Java at least) + "hi SpecialComment + "hi Debug + +hi Underlined gui=underline + +hi Ignore guifg=bg + +hi Error gui=bold guifg=White guibg=Red + +"hi Todo diff --git a/colors/darkbone.vim b/colors/darkbone.vim new file mode 100755 index 0000000..a97c8fe --- /dev/null +++ b/colors/darkbone.vim @@ -0,0 +1,102 @@ +" Name: darkbone.vim +" Maintainer: Kojo Sugita +" Last Change: 2008-11-22 +" Revision: 1.1 + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name = 'darkbone' + +"default colors +hi Normal guifg=#a0a0c0 guibg=#000000 +hi NonText guifg=#606080 guibg=#101020 gui=none +hi SpecialKey guifg=#404060 +hi Cursor guifg=#000000 guibg=#a0a0c0 +hi CursorLine guibg=#303050 +hi CursorColumn guibg=#303050 +hi lCursor guifg=#000000 guibg=#a0a0c0 +hi CursorIM guifg=#000000 guibg=#a0a0c0 + +" Directory +hi Directory guifg=#e0e0ff guibg=#000000 gui=bold + +" Diff +hi DiffAdd guifg=#8090f0 guibg=#000000 gui=none +hi DiffChange guifg=#8090f0 guibg=#000000 gui=none +hi DiffDelete guifg=#8090f0 guibg=#000000 gui=none +hi DiffText guifg=#8090f0 guibg=#000000 gui=bold + +" Message +hi ModeMsg guifg=#a0a0c0 guibg=#000000 +hi MoreMsg guifg=#a0a0c0 guibg=#000000 +hi ErrorMsg guifg=#ee1111 guibg=#000000 +hi WarningMsg guifg=#ee1111 guibg=#000000 + +hi VertSplit guifg=#606080 guibg=#606080 + +" Folds +hi Folded guifg=#a0a0c0 guibg=#000000 +hi FoldColumn guifg=#a0a0c0 guibg=#102010 + +" Search +hi Search guifg=#000000 guibg=#c0c0ff gui=none +hi IncSearch guifg=#000000 guibg=#c0c0ff gui=none + +hi LineNr guifg=#606080 guibg=#000000 gui=none +hi Question guifg=#a0a0c0 guibg=#000000 + +"\n, \0, %d, %s, etc... +" hi Special guifg=#d0e080 guibg=#000000 gui=none +hi Special guifg=#808080 guibg=#000000 gui=none + +" status line +hi StatusLine guifg=#c0c0ff guibg=#000000 gui=bold,underline +hi StatusLineNC guifg=#606080 guibg=#000000 gui=bold,underline +hi WildMenu guifg=#000000 guibg=#c0c0ff + +hi Title guifg=#c0c0ff guibg=#000000 gui=bold +hi Visual guifg=#000000 guibg=#707090 gui=none +hi VisualNOS guifg=#a0a0c0 guibg=#000000 + +hi Number guifg=#d0e080 guibg=#000000 +hi Char guifg=#d0e080 guibg=#000000 +hi String guifg=#d0e080 guibg=#000000 + +hi Boolean guifg=#d0e080 guibg=#000000 +hi Comment guifg=#606080 +hi Constant guifg=#f0a0b0 guibg=#000000 gui=none +hi Identifier guifg=#8090f0 +hi Statement guifg=#8090f0 gui=none + +"Procedure name +hi Function guifg=#f0b040 + +"Define, def +" hi PreProc guifg=#f0a0b0 gui=none +hi PreProc guifg=#e0e0ff gui=none + +hi Type guifg=#e0e0ff gui=none +hi Underlined guifg=#a0a0c0 gui=underline +hi Error guifg=#ee1111 guibg=#000000 +hi Todo guifg=#8090f0 guibg=#000000 gui=none +hi SignColumn guibg=#000000 + +" Matches +hi MatchParen guifg=#a0a0c0 guibg=#404080 gui=none + +if version >= 700 + " Pmenu + hi Pmenu guibg=#202040 + hi PmenuSel guibg=#404080 guifg=#a0a0c0 + hi PmenuSbar guibg=#202040 + + " Tab + hi TabLine guifg=#606080 guibg=black gui=underline + hi TabLineFill guifg=#a0a0c0 guibg=black gui=none + hi TabLineSel guifg=#c0c0ff guibg=#606080 gui=bold +endif + +" vim:set ts=8 sts=2 sw=2 tw=0: diff --git a/colors/darkslategray.vim b/colors/darkslategray.vim new file mode 100755 index 0000000..b36aef0 --- /dev/null +++ b/colors/darkslategray.vim @@ -0,0 +1,117 @@ +" vim: set tw=0 sw=4 sts=4 et: + +" Vim color file +" Maintainer: Tuomas Susi +" Last Change: 2004 October 05 +" Version: 1.7 + +" Emacs in RedHat Linux used to have (still does?) a kind of 'Wheat on +" DarkSlateGray' color scheme by default. This color scheme is created in the +" same spirit. +" +" Darkslategray is intended to be nice to your eyes (low contrast) and to take +" advantage of syntax hilighting as much as possible. +" +" This color scheme is for the GUI only, I'm happy with default console colors. +" Needs at least vim 6.0. + + +" Init stuff + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = "darkslategray" + + +" GUI colors + +hi Cursor guifg=fg guibg=#da70d6 +hi CursorIM guifg=NONE guibg=#ff83fa +hi Directory guifg=#e0ffff +hi DiffAdd guibg=#528b8b +hi DiffChange guibg=#8b636c +hi DiffDelete gui=bold guifg=fg guibg=#000000 +hi DiffText gui=bold guibg=#6959cd +hi ErrorMsg gui=bold guifg=#ffffff guibg=#ff0000 +hi VertSplit gui=bold guifg=#bdb76b guibg=#000000 +hi Folded guifg=#000000 guibg=#bdb76b +hi FoldColumn guifg=#000000 guibg=#bdb76b +hi SignColumn gui=bold guifg=#bdb76b guibg=#20b2aa +hi IncSearch gui=bold guifg=#000000 guibg=#ffffff +hi LineNr gui=bold guifg=#bdb76b guibg=#528b8b +hi ModeMsg gui=bold +hi MoreMsg gui=bold guifg=#20b2aa +hi NonText gui=bold guifg=#ffffff +hi Normal guibg=#2f4f4f guifg=#f5deb3 +hi Question gui=bold guifg=#ff6347 +hi Search gui=bold guifg=#000000 guibg=#ffd700 +hi SpecialKey guifg=#00ffff +hi StatusLine gui=bold guifg=#f0e68c guibg=#000000 +hi StatusLineNC guibg=#bdb76b guifg=#404040 +hi Title gui=bold guifg=#ff6347 +hi Visual guifg=#000000 guibg=fg +hi VisualNOS gui=bold guifg=#000000 guibg=fg +hi WarningMsg guifg=#ffffff guibg=#ff6347 +hi WildMenu gui=bold guifg=#000000 guibg=#ffff00 + + +" I use GTK and don't wanna change these +"hi Menu foobar +"hi Scrollbar foobar +"hi Tooltip foobar + + +" Colors for syntax highlighting +hi Comment guifg=#da70d6 + +hi Constant guifg=#cdcd00 + hi String guifg=#7fffd4 + hi Character guifg=#7fffd4 + hi Number guifg=#ff6347 + hi Boolean guifg=#cdcd00 + hi Float guifg=#ff6347 + +hi Identifier guifg=#afeeee + hi Function guifg=#ffffff + +hi Statement gui=bold guifg=#4682b4 + hi Conditional gui=bold guifg=#4682b4 + hi Repeat gui=bold guifg=#4682b4 + hi Label gui=bold guifg=#4682b4 + hi Operator gui=bold guifg=#4682b4 + hi Keyword gui=bold guifg=#4682b4 + hi Exception gui=bold guifg=#4682b4 + +hi PreProc guifg=#cdcd00 + hi Include guifg=#ffff00 + hi Define guifg=#cdcd00 + hi Macro guifg=#cdcd00 + hi PreCondit guifg=#cdcd00 + +hi Type gui=bold guifg=#98fb98 + hi StorageClass guifg=#00ff00 + hi Structure guifg=#20b2aa + hi Typedef guifg=#00ff7f + +hi Special guifg=#ff6347 + "Underline Character + hi SpecialChar gui=underline guifg=#7fffd4 + hi Tag guifg=#ff6347 + "Statement + hi Delimiter gui=bold guifg=#b0c4de + "Bold comment (in Java at least) + hi SpecialComment gui=bold guifg=#da70d6 + hi Debug gui=bold guifg=#ff0000 + +hi Underlined gui=underline + +hi Ignore guifg=bg + +hi Error gui=bold guifg=#ffffff guibg=#ff0000 + +hi Todo gui=bold guifg=#000000 guibg=#ff83fa + diff --git a/colors/darkspectrum.vim b/colors/darkspectrum.vim new file mode 100755 index 0000000..26ed7f3 --- /dev/null +++ b/colors/darkspectrum.vim @@ -0,0 +1,130 @@ +" Vim color file +" +" Author: Brian Mock +" +" Note: Based on Oblivion color scheme for gedit (gtk-source-view) +" +" cool help screens +" :he group-name +" :he highlight-groups +" :he cterm-colors + +hi clear + +set background=dark +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="darkspectrum" + +hi Normal guifg=#efefef guibg=#2A2A2A + +" highlight groups +hi Cursor guibg=#ffffff guifg=#000000 +hi CursorLine guibg=#000000 +"hi CursorLine guibg=#3e4446 +hi CursorColumn guibg=#464646 + +"hi DiffText guibg=#4e9a06 guifg=#FFFFFF gui=bold +"hi DiffChange guibg=#4e9a06 guifg=#FFFFFF gui=bold +"hi DiffAdd guibg=#204a87 guifg=#FFFFFF gui=bold +"hi DiffDelete guibg=#5c3566 guifg=#FFFFFF gui=bold + +hi DiffAdd guifg=#ffcc7f guibg=#a67429 gui=none +hi DiffChange guifg=#7fbdff guibg=#425c78 gui=none +hi DiffText guifg=#8ae234 guibg=#4e9a06 gui=none +"hi DiffDelete guifg=#252723 guibg=#000000 gui=none +hi DiffDelete guifg=#000000 guibg=#000000 gui=none +"hi ErrorMsg + +hi Number guifg=#fce94f + +hi Folded guibg=#000000 guifg=#FFFFFF gui=bold +hi vimFold guibg=#000000 guifg=#FFFFFF gui=bold +hi FoldColumn guibg=#000000 guifg=#FFFFFF gui=bold + +hi LineNr guifg=#535353 guibg=#202020 +hi NonText guifg=#535353 guibg=#202020 +hi Folded guifg=#535353 guibg=#202020 gui=bold +hi FoldeColumn guifg=#535353 guibg=#202020 gui=bold +"hi VertSplit guibg=#ffffff guifg=#ffffff gui=none + +hi VertSplit guibg=#3C3C3C guifg=#3C3C3C gui=none +hi StatusLine guifg=#FFFFFF guibg=#3C3C3C gui=none +hi StatusLineNC guifg=#808080 guibg=#3C3C3C gui=none + +hi ModeMsg guifg=#fce94f +hi MoreMsg guifg=#fce94f +hi Visual guifg=#FFFFFF guibg=#3465a4 gui=none +hi VisualNOS guifg=#FFFFFF guibg=#204a87 gui=none +hi IncSearch guibg=#FFFFFF guifg=#ef5939 +hi Search guibg=#ad7fa8 guifg=#FFFFFF +hi SpecialKey guifg=#8ae234 + +hi Title guifg=#ef5939 +hi WarningMsg guifg=#ef5939 +hi Number guifg=#fcaf3e + +hi MatchParen guibg=#ad7fa8 guifg=#FFFFFF +hi Comment guifg=#8a8a8a +hi Constant guifg=#ef5939 gui=none +hi String guifg=#fce94f +hi Identifier guifg=#729fcf +hi Statement guifg=#ffffff gui=bold +hi PreProc guifg=#ffffff gui=bold +hi Type guifg=#8ae234 gui=bold +hi Special guifg=#e9b96e +hi Underlined guifg=#ad7fa8 gui=underline +hi Directory guifg=#729fcf +hi Ignore guifg=#555753 +hi Todo guifg=#FFFFFF guibg=#ef5939 gui=bold +hi Function guifg=#ad7fa8 + +"hi WildMenu guibg=#2e3436 guifg=#ffffff gui=bold +"hi WildMenu guifg=#7fbdff guibg=#425c78 gui=none +hi WildMenu guifg=#ffffff guibg=#3465a4 gui=none + +hi Pmenu guibg=#000000 guifg=#c0c0c0 +hi PmenuSel guibg=#3465a4 guifg=#ffffff +hi PmenuSbar guibg=#444444 guifg=#444444 +hi PmenuThumb guibg=#888888 guifg=#888888 + +hi cppSTLType guifg=#729fcf gui=bold + +hi spellBad guisp=#fcaf3e +hi spellCap guisp=#73d216 +hi spellRare guisp=#ad7fa8 +hi spellLocal guisp=#729fcf + +hi link cppSTL Function +hi link Error Todo +hi link Character Number +hi link rubySymbol Number +hi link htmlTag htmlEndTag +"hi link htmlTagName htmlTag +hi link htmlLink Underlined +hi link pythonFunction Identifier +hi link Question Type +hi link CursorIM Cursor +hi link VisualNOS Visual +hi link xmlTag Identifier +hi link xmlTagName Identifier +hi link shDeref Identifier +hi link shVariable Function +hi link rubySharpBang Special +hi link perlSharpBang Special +hi link schemeFunc Statement +"hi link shSpecialVariables Constant +"hi link bashSpecialVariables Constant + +" tabs (non gui) +hi TabLine guifg=#A3A3A3 guibg=#202020 gui=none +hi TabLineFill guifg=#535353 guibg=#202020 gui=none +hi TabLineSel guifg=#FFFFFF gui=bold +"hi TabLineSel guifg=#FFFFFF guibg=#000000 gui=bold +" vim: sw=4 ts=4 diff --git a/colors/dawn.vim b/colors/dawn.vim new file mode 100755 index 0000000..a97c5ad --- /dev/null +++ b/colors/dawn.vim @@ -0,0 +1,78 @@ +" Vim color file +" Maintainer: Ajit J. Thakkar (ajit AT unb DOT ca) +" Last Change: 2005 Nov. 24 +" Version: 1.5 +" URL: http://www.unb.ca/chem/ajit/vim.htm + +" This GUI-only color scheme has a light grey background, and is a softer +" variant of the default and morning color schemes. + +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "dawn" + +hi Normal guifg=Black guibg=grey90 +"hi Normal guifg=Black guibg=grey80 + +" Groups used in the 'highlight' and 'guicursor' options default value. +hi ErrorMsg gui=NONE guifg=Red guibg=Linen +hi IncSearch gui=NONE guifg=fg guibg=LightGreen +hi ModeMsg gui=NONE guifg=fg guibg=bg +hi StatusLine gui=NONE guifg=DarkBlue guibg=grey70 +hi StatusLineNC gui=NONE guifg=grey90 guibg=grey70 +hi VertSplit gui=NONE guifg=grey70 guibg=grey70 +hi Visual gui=reverse guifg=Grey guibg=fg +hi VisualNOS gui=underline,bold guifg=fg guibg=bg +hi DiffText gui=NONE guifg=Blue guibg=LightYellow +"hi DiffText gui=NONE guifg=Blue guibg=MistyRose2 +hi Cursor guifg=NONE guibg=Green +hi lCursor guifg=NONE guibg=Cyan +hi Directory guifg=Blue guibg=bg +hi LineNr guifg=Brown guibg=grey80 +hi MoreMsg gui=NONE guifg=SeaGreen guibg=bg +hi NonText gui=NONE guifg=Blue guibg=grey80 +hi Question gui=NONE guifg=SeaGreen guibg=bg +hi Search guifg=fg guibg=PeachPuff +hi SpecialKey guifg=Blue guibg=bg +hi Title gui=NONE guifg=Magenta guibg=bg +hi WarningMsg guifg=Red guibg=bg +hi WildMenu guifg=fg guibg=PeachPuff +hi Folded guifg=Grey40 guibg=bg " guifg=DarkBlue guibg=LightGrey +hi FoldColumn guifg=DarkBlue guibg=Grey +hi DiffAdd gui=NONE guifg=Blue guibg=LightCyan +hi DiffChange gui=NONE guifg=fg guibg=MistyRose2 +hi DiffDelete gui=NONE guifg=LightBlue guibg=LightCyan + +" Colors for syntax highlighting +hi Constant gui=NONE guifg=azure4 guibg=bg +"hi Constant gui=NONE guifg=DeepSkyBlue4 guibg=bg +hi String gui=NONE guifg=DarkOliveGreen4 guibg=bg +hi Special gui=NONE guifg=Cyan4 guibg=bg +hi Statement gui=NONE guifg=SlateBlue4 guibg=bg +hi Operator gui=NONE guifg=Purple guibg=bg +hi Ignore gui=NONE guifg=bg guibg=bg +if v:version >= 700 + hi SpellBad gui=undercurl guisp=DeepPink1 guifg=fg guibg=bg + hi SpellCap gui=undercurl guisp=Blue guifg=fg guibg=bg + hi SpellRare gui=undercurl guisp=Black guifg=fg guibg=bg + hi SpellLocal gui=undercurl guisp=SeaGreen guifg=fg guibg=bg +endif +hi ToDo gui=NONE guifg=DeepPink1 guibg=bg +hi Error gui=NONE guifg=Red guibg=Linen +hi Comment gui=NONE guifg=RoyalBlue guibg=NONE +hi Identifier gui=NONE guifg=DodgerBlue3 guibg=NONE +"hi Identifier gui=NONE guifg=SteelBlue4 guibg=NONE +hi PreProc gui=NONE guifg=Magenta4 guibg=NONE +hi Type gui=NONE guifg=Brown guibg=NONE +hi Underlined gui=underline guifg=SlateBlue guibg=bg +"if exists("g:minimal_colors") +" hi Statement gui=NONE guifg=fg guibg=bg +" hi Identifier gui=NONE guifg=fg guibg=bg +" hi Type gui=NONE guifg=fg guibg=bg +"endif + +" vim: sw=2 diff --git a/colors/denim.vim b/colors/denim.vim new file mode 100755 index 0000000..c41af9f --- /dev/null +++ b/colors/denim.vim @@ -0,0 +1,141 @@ +" Maintainer: Tim Aldrich +" Last Change: 19 November 2001 + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="denim" +" GUI colors {{{ +hi Normal guifg=#FFFFFF guibg=#000038 +hi Cursor guifg=#000038 guibg=#FFFFFF +hi CursorIM guifg=#6699CC guibg=#99CCCC +hi Directory guifg=#33CCFF guibg=#6699CC +hi DiffAdd guifg=#FFFFCC guibg=#000038 +hi DiffChange guifg=#FF9900 guibg=#000038 +hi DiffDelete guifg=#999999 guibg=#000038 +hi DiffText guifg=#FFFFFF guibg=#000038 +hi ErrorMsg guifg=#FFFFFF guibg=#FF0000 +hi VertSplit guifg=#FFFFFF guibg=#000038 +hi Folded guifg=#999999 guibg=#003366 +hi FoldColumn guifg=#0000EE guibg=#6699CC +hi IncSearch guifg=#FFFF00 guibg=#000038 +hi LineNr guifg=#FFFFEE guibg=#000038 +hi ModeMsg guifg=#FFFFFF guibg=#000038 +hi MoreMsg guifg=#FFFFFF guibg=#000038 +hi NonText guifg=#FFFFFF guibg=#00003D +hi Question guifg=#FFFFFF guibg=#0000EE +hi Search guifg=#993300 guibg=#6699CC +hi SpecialKey guifg=#FFFF00 guibg=#000038 +hi StatusLine guifg=#FFFFFF guibg=#000038 +hi StatusLineNC guifg=#CCCCCC guibg=#000038 +hi Title guifg=#FFFFFF guibg=#FF9900 +hi Visual guifg=#003366 guibg=#6699FF +hi WarningMsg guifg=#FF0000 guibg=#FFFFFF +hi WildMenu guifg=#000038 guibg=#999999 +" }}} + +" cterm colors {{{ +hi Normal ctermfg=white ctermbg=darkblue +hi Cursor ctermfg=darkblue ctermbg=white +hi CursorIM ctermfg=lightcyan ctermbg=lightcyan +hi Directory ctermfg=lightblue ctermbg=lightcyan +hi DiffAdd ctermfg=LightYellow ctermbg=darkblue +hi DiffChange ctermfg=darkred ctermbg=darkblue +hi DiffDelete ctermfg=grey ctermbg=darkblue +hi DiffText ctermfg=white ctermbg=darkblue +hi ErrorMsg ctermfg=red ctermbg=lightcyan +hi VertSplit ctermfg=white ctermbg=darkblue +hi Folded ctermfg=grey ctermbg=darkblue +hi FoldColumn ctermfg=darkred ctermbg=lightcyan +hi IncSearch ctermfg=yellow ctermbg=darkblue +hi LineNr ctermfg=lightyellow ctermbg=darkblue +hi ModeMsg ctermfg=white ctermbg=darkblue +hi MoreMsg ctermfg=white ctermbg=darkblue +hi NonText ctermfg=white ctermbg=lightblue +hi Question ctermfg=white ctermbg=darkblue +hi Search ctermfg=darkred ctermbg=lightcyan +hi SpecialKey ctermfg=yellow ctermbg=darkblue +hi StatusLine ctermfg=white ctermbg=darkblue +hi StatusLineNC ctermfg=lightgrey ctermbg=darkblue +hi Title ctermfg=white ctermbg=yellow +hi Visual ctermfg=lightblue ctermbg=cyan +hi WarningMsg ctermfg=red ctermbg=white +hi WildMenu ctermfg=darkblue ctermbg=grey +" }}} + +" GUI hilight groups {{{ + +hi Comment guifg=#999999 +hi Constant guifg=#33FF33 +hi String guifg=#CCCC99 +hi Character guifg=#33FF33 +hi Number guifg=#33FF33 +hi Boolean guifg=#33FF33 +hi Float guifg=#33FF33 +hi Identifier guifg=#33FFFF +hi Function guifg=#33FFFF +hi Statement guifg=#FFFFCC +hi Conditional guifg=#FFFFCC +hi Repeat guifg=#FFFFCC +hi Label guifg=#33FF99 +hi Operator guifg=#FFFF00 +hi Keyword guifg=#FFFF00 +hi Exception guifg=#FFFFAA +hi PreProc guifg=#66CCFF +hi Include guifg=#66CCFF +hi Define guifg=#66CCFF +hi Macro guifg=#66CCFF +hi PreCondit guifg=#66CCFF +hi Type guifg=#33FF99 +hi StorageClass guifg=#33FF99 +hi Structure guifg=#33FF99 +hi Typedef guifg=#33FF99 +hi Special guifg=#00FF00 +hi SpecialChar guifg=#00FF00 +hi Tag guifg=#CCCCFF +hi Delimiter guifg=#CCCCFF +hi SpecialComment guifg=#FFFFCC +hi Debug guifg=#CC3300 +hi Ignore guifg=#0066AA +hi Error guifg=#FF0000 guibg=#FFFFFF +hi Todo guifg=#999999 guibg=#FFFFFF +" }}} + +" cterm hilight groups {{{ +hi Comment ctermfg=grey +hi Constant ctermfg=lightgreen +hi String ctermfg=brown +hi Character ctermfg=lightgreen +hi Number ctermfg=lightgreen +hi Boolean ctermfg=lightgreen +hi Float ctermfg=lightgreen +hi Identifier ctermfg=lightcyan +hi Function ctermfg=lightcyan +hi Statement ctermfg=lightyellow +hi Conditional ctermfg=lightyellow +hi Repeat ctermfg=lightyellow +hi Label ctermfg=lightcyan +hi Operator ctermfg=yellow +hi Keyword ctermfg=yellow +hi Exception ctermfg=yellow +hi PreProc ctermfg=darkcyan +hi Include ctermfg=darkcyan +hi Define ctermfg=darkcyan +hi Macro ctermfg=darkcyan +hi PreCondit ctermfg=darkcyan +hi Type ctermfg=lightcyan +hi StorageClass ctermfg=lightcyan +hi Structure ctermfg=lightcyan +hi Typedef ctermfg=lightcyan +hi Special ctermfg=green +hi SpecialChar ctermfg=green +hi Tag ctermfg=brown +hi Delimiter ctermfg=brown +hi SpecialComment ctermfg=lightyellow +hi Debug ctermfg=magenta +hi Ignore ctermfg=lightblue +hi Error ctermfg=red ctermbg=white +hi Todo ctermfg=grey ctermbg=white +" }}} diff --git a/colors/desert256.vim b/colors/desert256.vim new file mode 100755 index 0000000..7a97742 --- /dev/null +++ b/colors/desert256.vim @@ -0,0 +1,338 @@ +" Vim color file +" Maintainer: Henry So, Jr. + +" These are the colors of the "desert" theme by Hans Fugal with a few small +" modifications (namely that I lowered the intensity of the normal white and +" made the normal and nontext backgrounds black), modified to work with 88- +" and 256-color xterms. +" +" The original "desert" theme is available as part of the vim distribution or +" at http://hans.fugal.net/vim/colors/. +" +" The real feature of this color scheme, with a wink to the "inkpot" theme, is +" the programmatic approximation of the gui colors to the palettes of 88- and +" 256- color xterms. The functions that do this (folded away, for +" readability) are calibrated to the colors used for Thomas E. Dickey's xterm +" (version 200), which is available at http://dickey.his.com/xterm/xterm.html. +" +" I struggled with trying to parse the rgb.txt file to avoid the necessity of +" converting color names to #rrggbb form, but decided it was just not worth +" the effort. Maybe someone seeing this may decide otherwise... + +set background=dark +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="desert256" + +if has("gui_running") || &t_Co == 88 || &t_Co == 256 + " functions {{{ + " 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_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 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 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 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 color(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 color + 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_color(l:gx) + else + " use the color + return rgb_color(l:x, l:y, l:z) + endif + else + " only one possibility + return rgb_color(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 color(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 + " }}} + + call X("Normal", "cccccc", "000000", "") + + " highlight groups + call X("Cursor", "708090", "f0e68c", "") + "CursorIM + "Directory + "DiffAdd + "DiffChange + "DiffDelete + "DiffText + "ErrorMsg + call X("VertSplit", "c2bfa5", "7f7f7f", "reverse") + call X("Folded", "ffd700", "4d4d4d", "") + call X("FoldColumn", "d2b48c", "4d4d4d", "") + call X("IncSearch", "708090", "f0e68c", "") + "LineNr + call X("ModeMsg", "daa520", "", "") + call X("MoreMsg", "2e8b57", "", "") + call X("NonText", "addbe7", "000000", "bold") + call X("Question", "00ff7f", "", "") + call X("Search", "f5deb3", "cd853f", "") + call X("SpecialKey", "9acd32", "", "") + call X("StatusLine", "c2bfa5", "000000", "reverse") + call X("StatusLineNC", "c2bfa5", "7f7f7f", "reverse") + call X("Title", "cd5c5c", "", "") + call X("Visual", "6b8e23", "f0e68c", "reverse") + "VisualNOS + call X("WarningMsg", "fa8072", "", "") + "WildMenu + "Menu + "Scrollbar + "Tooltip + + " syntax highlighting groups + call X("Comment", "87ceeb", "", "") + call X("Constant", "ffa0a0", "", "") + call X("Identifier", "98fb98", "", "none") + call X("Statement", "f0e68c", "", "bold") + call X("PreProc", "cd5c5c", "", "") + call X("Type", "bdb76b", "", "bold") + call X("Special", "ffdead", "", "") + "Underlined + call X("Ignore", "666666", "", "") + "Error + call X("Todo", "ff4500", "eeee00", "") + + " delete functions {{{ + delf X + delf rgb + delf color + delf rgb_color + delf rgb_level + delf rgb_number + delf grey_color + delf grey_level + delf grey_number + " }}} +else + " color terminal definitions + hi SpecialKey ctermfg=darkgreen + hi NonText cterm=bold ctermfg=darkblue + hi Directory ctermfg=darkcyan + hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 + hi IncSearch cterm=NONE ctermfg=yellow ctermbg=green + hi Search cterm=NONE ctermfg=grey ctermbg=blue + hi MoreMsg ctermfg=darkgreen + hi ModeMsg cterm=NONE ctermfg=brown + hi LineNr ctermfg=3 + hi Question ctermfg=green + hi StatusLine cterm=bold,reverse + hi StatusLineNC cterm=reverse + hi VertSplit cterm=reverse + hi Title ctermfg=5 + hi Visual cterm=reverse + hi VisualNOS cterm=bold,underline + hi WarningMsg ctermfg=1 + hi WildMenu ctermfg=0 ctermbg=3 + hi Folded ctermfg=darkgrey ctermbg=NONE + hi FoldColumn ctermfg=darkgrey ctermbg=NONE + hi DiffAdd ctermbg=4 + hi DiffChange ctermbg=5 + hi DiffDelete cterm=bold ctermfg=4 ctermbg=6 + hi DiffText cterm=bold ctermbg=1 + hi Comment ctermfg=darkcyan + hi Constant ctermfg=brown + hi Special ctermfg=5 + hi Identifier ctermfg=6 + hi Statement ctermfg=3 + hi PreProc ctermfg=5 + hi Type ctermfg=2 + hi Underlined cterm=underline ctermfg=5 + hi Ignore ctermfg=darkgrey + hi Error cterm=bold ctermfg=7 ctermbg=1 +endif + +" vim: set fdl=0 fdm=marker: diff --git a/colors/desertEx.vim b/colors/desertEx.vim new file mode 100755 index 0000000..08ef878 --- /dev/null +++ b/colors/desertEx.vim @@ -0,0 +1,98 @@ +" Vim color file +" Maintainer: Mingbai +" Last Change: 2006-12-24 20:09:09 + +set background=dark +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="desertEx" + +hi Normal guifg=gray guibg=grey17 gui=none + +" AlignCtrl default +" AlignCtrl =P0 guifg guibg gui +" Align + +" highlight groups +hi Cursor guifg=black guibg=yellow gui=none +hi ErrorMsg guifg=white guibg=red gui=none +hi VertSplit guifg=gray40 guibg=gray40 gui=none +hi Folded guifg=DarkSlateGray3 guibg=grey30 gui=none +hi FoldColumn guifg=tan guibg=grey30 gui=none +hi IncSearch guifg=#b0ffff guibg=#2050d0 +hi LineNr guifg=burlywood3 gui=none +hi ModeMsg guifg=SkyBlue gui=none +hi MoreMsg guifg=SeaGreen gui=none +hi NonText guifg=cyan gui=none +hi Question guifg=springgreen gui=none +hi Search guifg=gray80 guibg=#445599 gui=none +hi SpecialKey guifg=cyan gui=none +hi StatusLine guifg=black guibg=#c2bfa5 gui=bold +hi StatusLineNC guifg=grey guibg=gray40 gui=none +hi Title guifg=indianred gui=none +hi Visual guifg=gray17 guibg=tan1 gui=none +hi WarningMsg guifg=salmon gui=none +hi Pmenu guifg=white guibg=#445599 gui=none +hi PmenuSel guifg=#445599 guibg=gray +hi WildMenu guifg=gray guibg=gray17 gui=none +hi MatchParen guifg=cyan guibg=NONE gui=bold +hi DiffAdd guifg=black guibg=wheat1 +hi DiffChange guifg=black guibg=skyblue1 +hi DiffText guifg=black guibg=hotpink1 gui=none +hi DiffDelete guibg=gray45 guifg=black gui=none + + + +" syntax highlighting groups +hi Comment guifg=PaleGreen3 gui=italic +hi Constant guifg=salmon gui=none +hi Identifier guifg=Skyblue gui=none +hi Function guifg=Skyblue gui=none +hi Statement guifg=lightgoldenrod2 gui=none +hi PreProc guifg=PaleVioletRed2 gui=none +hi Type guifg=tan1 gui=none +hi Special guifg=aquamarine2 gui=none +hi Ignore guifg=grey40 gui=none +hi Todo guifg=orangered guibg=yellow2 gui=none + +" color terminal definitions +hi SpecialKey ctermfg=darkgreen +hi NonText cterm=bold ctermfg=darkblue +hi Directory ctermfg=darkcyan +hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 +hi IncSearch cterm=NONE ctermfg=yellow ctermbg=green +hi Search cterm=NONE ctermfg=grey ctermbg=blue +hi MoreMsg ctermfg=darkgreen +hi ModeMsg cterm=NONE ctermfg=brown +hi LineNr ctermfg=3 +hi Question ctermfg=green +hi StatusLine cterm=bold,reverse +hi StatusLineNC cterm=reverse +hi VertSplit cterm=reverse +hi Title ctermfg=5 +hi Visual cterm=reverse +hi VisualNOS cterm=bold,underline +hi WarningMsg ctermfg=1 +hi WildMenu ctermfg=0 ctermbg=3 +hi Folded ctermfg=darkgrey ctermbg=NONE +hi FoldColumn ctermfg=darkgrey ctermbg=NONE +hi DiffAdd ctermbg=4 +hi DiffChange ctermbg=5 +hi DiffDelete cterm=bold ctermfg=4 ctermbg=6 +hi DiffText cterm=bold ctermbg=1 +hi Comment ctermfg=darkcyan +hi Constant ctermfg=brown +hi Special ctermfg=5 +hi Identifier ctermfg=6 +hi Statement ctermfg=3 +hi PreProc ctermfg=5 +hi Type ctermfg=2 +hi Underlined cterm=underline ctermfg=5 +hi Ignore ctermfg=darkgrey +hi Error cterm=bold ctermfg=7 ctermbg=1 diff --git a/colors/dusk.vim b/colors/dusk.vim new file mode 100755 index 0000000..8feddd7 --- /dev/null +++ b/colors/dusk.vim @@ -0,0 +1,71 @@ +" Vim color file +" Maintainer: Ajit J. Thakkar (ajit AT unb DOT ca) +" Last Change: 2005 Nov. 21 +" Version: 1.1 +" URL: http://www.unb.ca/chem/ajit/vim.htm + +" This GUI-only color scheme has a blue-black background + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "dusk" + +hi Normal guifg=ivory guibg=#1f3048 + +" Groups used in the 'highlight' and 'guicursor' options default value. +hi ErrorMsg gui=NONE guifg=Red guibg=Linen +hi IncSearch gui=NONE guibg=LightGreen guifg=Black +hi ModeMsg gui=NONE guifg=fg guibg=bg +hi StatusLine gui=NONE guifg=DarkBlue guibg=Grey +hi StatusLineNC gui=NONE guifg=Grey50 guibg=Grey +hi VertSplit gui=NONE guifg=Grey guibg=Grey +hi Visual gui=reverse guifg=fg guibg=LightSkyBlue4 +hi VisualNOS gui=underline guifg=fg guibg=bg +hi DiffText gui=NONE guifg=Yellow guibg=LightSkyBlue4 +hi Cursor guibg=Green guifg=Black +hi lCursor guibg=Cyan guifg=Black +hi Directory guifg=LightGreen guibg=bg +hi LineNr guifg=MistyRose3 guibg=bg +hi MoreMsg gui=NONE guifg=SeaGreen guibg=bg +hi NonText gui=NONE guifg=Cyan4 guibg=#102848 +hi Question gui=NONE guifg=LimeGreen guibg=bg +hi Search gui=NONE guifg=SkyBlue4 guibg=Bisque +hi SpecialKey guifg=Cyan guibg=bg +hi Title gui=NONE guifg=Yellow2 guibg=bg +hi WarningMsg guifg=Tomato3 guibg=Linen +hi WildMenu gui=NONE guifg=SkyBlue4 guibg=Bisque +"hi Folded guifg=MistyRose2 guibg=bg +hi Folded guifg=MistyRose2 guibg=#102848 +hi FoldColumn guifg=DarkBlue guibg=Grey +hi DiffAdd gui=NONE guifg=Blue guibg=LightCyan +hi DiffChange gui=NONE guifg=white guibg=LightCyan4 +hi DiffDelete gui=NONE guifg=LightBlue guibg=LightCyan + +" Colors for syntax highlighting +hi Constant gui=NONE guifg=MistyRose3 guibg=bg +hi String gui=NONE guifg=LightBlue3 guibg=bg +hi Special gui=NONE guifg=GoldenRod guibg=bg +hi Statement gui=NONE guifg=khaki guibg=bg +"hi Statement gui=NONE guifg=#d7cd7b guibg=bg +hi Operator gui=NONE guifg=Chartreuse guibg=bg +hi Ignore gui=NONE guifg=bg guibg=bg +if v:version >= 700 + hi SpellBad gui=undercurl guisp=Red guifg=fg guibg=bg + hi SpellCap gui=undercurl guisp=GoldenRod guifg=fg guibg=bg + hi SpellRare gui=undercurl guisp=Ivory guifg=fg guibg=bg + hi SpellLocal gui=undercurl guisp=SeaGreen guifg=fg guibg=bg +endif +hi ToDo gui=NONE guifg=DodgerBlue guibg=bg +hi Error gui=NONE guifg=Red guibg=Linen +hi Comment gui=NONE guifg=SlateGrey guibg=bg +"hi Comment gui=NONE guifg=Lavender guibg=bg +hi Identifier gui=NONE guifg=BlanchedAlmond guibg=bg +hi PreProc gui=NONE guifg=#ffa0a0 guibg=bg +hi Type gui=NONE guifg=NavajoWhite guibg=bg +hi Underlined gui=underline guifg=fg guibg=bg + +" vim: sw=2 diff --git a/colors/dw_blue.vim b/colors/dw_blue.vim new file mode 100755 index 0000000..bba8c2f --- /dev/null +++ b/colors/dw_blue.vim @@ -0,0 +1,66 @@ +"-------------------------------------------------------------------- +" Name Of File: dw_blue.vim. +" Description: Gvim colorscheme, designed against VIM 7.0 GUI +" By: Steve Cadwallader +" Contact: demwiz@gmail.com +" Credits: Inspiration from the brookstream and redblack schemes. +" Last Change: Saturday, September 17, 2006. +" Installation: Drop this file in your $VIMRUNTIME/colors/ directory. +"-------------------------------------------------------------------- + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="dw_blue" + +"-------------------------------------------------------------------- + +hi Boolean guifg=#0000ff +hi cDefine guifg=#0000ff +hi cInclude guifg=#ffffff +hi Comment guifg=#696969 +hi Constant guifg=#0000ff +hi Cursor guibg=#444444 guifg=#ffffff +hi CursorColumn guibg=#000011 +hi CursorLine guibg=#000018 +hi DiffAdd guibg=#333333 guifg=#0000ff +hi DiffChange guibg=#333333 guifg=#0000ff +hi DiffDelete guibg=#333333 guifg=#0000ff +hi DiffText guibg=#333333 guifg=#ffffff +hi Directory guibg=#000000 guifg=#0000ff +hi ErrorMsg guibg=#ffffff guifg=#000000 +hi FoldColumn guibg=#222222 guifg=#ff0000 +hi Folded guibg=#222222 guifg=#ff0000 +hi Function guibg=#000000 guifg=#0000ff +hi Identifier guibg=#000000 guifg=#0000cc +hi IncSearch gui=none guibg=#0000bb guifg=#000000 +hi LineNr guibg=#000000 guifg=#000088 +hi MatchParen gui=none guibg=#222222 guifg=#0000ff +hi ModeMsg guibg=#000000 guifg=#0000ff +hi MoreMsg guibg=#000000 guifg=#0000ff +hi NonText guibg=#000000 guifg=#ffffff +hi Normal gui=none guibg=#000000 guifg=#c0c0c0 +hi Operator gui=none guifg=#696969 +hi PreProc gui=none guifg=#ffffff +hi Question guifg=#0000ff +hi Search gui=none guibg=#0000ff guifg=#000000 +hi SignColumn guibg=#111111 guifg=#ffffff +hi Special gui=none guibg=#000000 guifg=#ffffff +hi SpecialKey guibg=#000000 guifg=#0000ff +hi Statement gui=bold guifg=#0000ff +hi StatusLine gui=none guibg=#0000ff guifg=#000000 +hi StatusLineNC gui=none guibg=#444444 guifg=#000000 +hi String gui=none guifg=#0000bb +hi TabLine gui=none guibg=#444444 guifg=#000000 +hi TabLineFill gui=underline guibg=#000000 guifg=#ffffff +hi TabLineSel gui=none guibg=#0000aa guifg=#000000 +hi Title gui=none guifg=#0000ff +hi Todo gui=none guibg=#000000 guifg=#ff0000 +hi Type gui=none guifg=#ffffff +hi VertSplit gui=none guibg=#000000 guifg=#ffffff +hi Visual guibg=#0000dd guifg=#000000 +hi WarningMsg guibg=#888888 guifg=#000000 + +"- end of colorscheme ----------------------------------------------- diff --git a/colors/dw_cyan.vim b/colors/dw_cyan.vim new file mode 100755 index 0000000..158d578 --- /dev/null +++ b/colors/dw_cyan.vim @@ -0,0 +1,66 @@ +"-------------------------------------------------------------------- +" Name Of File: dw_cyan.vim. +" Description: Gvim colorscheme, designed against VIM 7.0 GUI +" By: Steve Cadwallader +" Contact: demwiz@gmail.com +" Credits: Inspiration from the brookstream and redblack schemes. +" Last Change: Saturday, September 17, 2006. +" Installation: Drop this file in your $VIMRUNTIME/colors/ directory. +"-------------------------------------------------------------------- + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="dw_cyan" + +"-------------------------------------------------------------------- + +hi Boolean guifg=#00ffff +hi cDefine guifg=#00ffff +hi cInclude guifg=#ffffff +hi Comment guifg=#696969 +hi Constant guifg=#00ffff +hi Cursor guibg=#444444 guifg=#ffffff +hi CursorColumn guibg=#001111 +hi CursorLine guibg=#001818 +hi DiffAdd guibg=#333333 guifg=#00ffff +hi DiffChange guibg=#333333 guifg=#00ffff +hi DiffDelete guibg=#333333 guifg=#00ffff +hi DiffText guibg=#333333 guifg=#ffffff +hi Directory guibg=#000000 guifg=#00ffff +hi ErrorMsg guibg=#ffffff guifg=#000000 +hi FoldColumn guibg=#222222 guifg=#ff0000 +hi Folded guibg=#222222 guifg=#ff0000 +hi Function guibg=#000000 guifg=#00ffff +hi Identifier guibg=#000000 guifg=#00cccc +hi IncSearch gui=none guibg=#00bbbb guifg=#000000 +hi LineNr guibg=#000000 guifg=#008888 +hi MatchParen gui=none guibg=#222222 guifg=#00ffff +hi ModeMsg guibg=#000000 guifg=#00ffff +hi MoreMsg guibg=#000000 guifg=#00ffff +hi NonText guibg=#000000 guifg=#ffffff +hi Normal gui=none guibg=#000000 guifg=#c0c0c0 +hi Operator gui=none guifg=#696969 +hi PreProc gui=none guifg=#ffffff +hi Question guifg=#00ffff +hi Search gui=none guibg=#00ffff guifg=#000000 +hi SignColumn guibg=#111111 guifg=#ffffff +hi Special gui=none guibg=#000000 guifg=#ffffff +hi SpecialKey guibg=#000000 guifg=#00ffff +hi Statement gui=bold guifg=#00ffff +hi StatusLine gui=none guibg=#00ffff guifg=#000000 +hi StatusLineNC gui=none guibg=#444444 guifg=#000000 +hi String gui=none guifg=#00bbbb +hi TabLine gui=none guibg=#444444 guifg=#000000 +hi TabLineFill gui=underline guibg=#000000 guifg=#ffffff +hi TabLineSel gui=none guibg=#00aaaa guifg=#000000 +hi Title gui=none guifg=#00ffff +hi Todo gui=none guibg=#000000 guifg=#ff0000 +hi Type gui=none guifg=#ffffff +hi VertSplit gui=none guibg=#000000 guifg=#ffffff +hi Visual guibg=#00dddd guifg=#000000 +hi WarningMsg guibg=#888888 guifg=#000000 + +"- end of colorscheme ----------------------------------------------- diff --git a/colors/dw_green.vim b/colors/dw_green.vim new file mode 100755 index 0000000..de742f9 --- /dev/null +++ b/colors/dw_green.vim @@ -0,0 +1,66 @@ +"-------------------------------------------------------------------- +" Name Of File: dw_green.vim. +" Description: Gvim colorscheme, designed against VIM 7.0 GUI +" By: Steve Cadwallader +" Contact: demwiz@gmail.com +" Credits: Inspiration from the brookstream and redblack schemes. +" Last Change: Saturday, September 17, 2006. +" Installation: Drop this file in your $VIMRUNTIME/colors/ directory. +"-------------------------------------------------------------------- + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="dw_green" + +"-------------------------------------------------------------------- + +hi Boolean guifg=#00ff00 +hi cDefine guifg=#00ff00 +hi cInclude guifg=#ffffff +hi Comment guifg=#696969 +hi Constant guifg=#00ff00 +hi Cursor guibg=#444444 guifg=#ffffff +hi CursorColumn guibg=#001100 +hi CursorLine guibg=#001800 +hi DiffAdd guibg=#333333 guifg=#00ff00 +hi DiffChange guibg=#333333 guifg=#00ff00 +hi DiffDelete guibg=#333333 guifg=#00ff00 +hi DiffText guibg=#333333 guifg=#ffffff +hi Directory guibg=#000000 guifg=#00ff00 +hi ErrorMsg guibg=#ffffff guifg=#000000 +hi FoldColumn guibg=#222222 guifg=#ff0000 +hi Folded guibg=#222222 guifg=#ff0000 +hi Function guibg=#000000 guifg=#00ff00 +hi Identifier guibg=#000000 guifg=#00bb00 +hi IncSearch gui=none guibg=#00bb00 guifg=#000000 +hi LineNr guibg=#000000 guifg=#008800 +hi MatchParen gui=none guibg=#222222 guifg=#00ff00 +hi ModeMsg guibg=#000000 guifg=#00ff00 +hi MoreMsg guibg=#000000 guifg=#00ff00 +hi NonText guibg=#000000 guifg=#ffffff +hi Normal gui=none guibg=#000000 guifg=#c0c0c0 +hi Operator gui=none guifg=#696969 +hi PreProc gui=none guifg=#ffffff +hi Question guifg=#00ff00 +hi Search gui=none guibg=#00ff00 guifg=#000000 +hi SignColumn guibg=#111111 guifg=#ffffff +hi Special gui=none guibg=#000000 guifg=#ffffff +hi SpecialKey guibg=#000000 guifg=#00ff00 +hi Statement gui=bold guifg=#00ff00 +hi StatusLine gui=none guibg=#008800 guifg=#000000 +hi StatusLineNC gui=none guibg=#444444 guifg=#000000 +hi String gui=none guifg=#00bb00 +hi TabLine gui=none guibg=#444444 guifg=#000000 +hi TabLineFill gui=underline guibg=#000000 guifg=#ffffff +hi TabLineSel gui=none guibg=#00aa00 guifg=#000000 +hi Title gui=none guifg=#00ff00 +hi Todo gui=none guibg=#000000 guifg=#ff0000 +hi Type gui=none guifg=#ffffff +hi VertSplit gui=none guibg=#000000 guifg=#ffffff +hi Visual guibg=#00dd00 guifg=#000000 +hi WarningMsg guibg=#888888 guifg=#000000 + +"- end of colorscheme ----------------------------------------------- diff --git a/colors/dw_orange.vim b/colors/dw_orange.vim new file mode 100755 index 0000000..b36b312 --- /dev/null +++ b/colors/dw_orange.vim @@ -0,0 +1,66 @@ +"-------------------------------------------------------------------- +" Name Of File: dw_orange.vim. +" Description: Gvim colorscheme, designed against VIM 7.0 GUI +" By: Steve Cadwallader +" Contact: demwiz@gmail.com +" Credits: Inspiration from the brookstream and redblack schemes. +" Last Change: Saturday, September 17, 2006. +" Installation: Drop this file in your $VIMRUNTIME/colors/ directory. +"-------------------------------------------------------------------- + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="dw_orange" + +"-------------------------------------------------------------------- + +hi Boolean guifg=#ffff00 +hi cDefine guifg=#ffff00 +hi cInclude guifg=#ffffff +hi Comment guifg=#696969 +hi Constant guifg=#ffff00 +hi Cursor guibg=#555555 guifg=#000000 +hi CursorColumn guibg=#140500 +hi CursorLine guibg=#260a00 +hi DiffAdd guibg=#333333 guifg=#ffff00 +hi DiffChange guibg=#333333 guifg=#ffff00 +hi DiffDelete guibg=#333333 guifg=#ffff00 +hi DiffText guibg=#333333 guifg=#ffffff +hi Directory guibg=#000000 guifg=#ffffff +hi ErrorMsg guibg=#ffffff guifg=#000000 +hi FoldColumn guibg=#222222 guifg=#ff0000 +hi Folded guibg=#222222 guifg=#ff0000 +hi Function guifg=#ffff00 +hi Identifier guibg=#000000 guifg=#d13800 +hi IncSearch gui=none guibg=#bf3300 guifg=#000000 +hi LineNr guibg=#000000 guifg=#de3b00 +hi MatchParen gui=none guibg=#000000 guifg=#ffff00 +hi ModeMsg guibg=#000000 guifg=#ff4400 +hi MoreMsg guibg=#000000 guifg=#ffff00 +hi NonText guibg=#000000 guifg=#ffffff +hi Normal gui=none guibg=#000000 guifg=#c0c0c0 +hi Operator gui=none guifg=#696969 +hi PreProc gui=none guifg=#ffffff +hi Question guifg=#ffff00 +hi Search gui=none guibg=#ff4400 guifg=#000000 +hi SignColumn guibg=#111111 guifg=#ffffff +hi Special gui=none guibg=#000000 guifg=#ffa600 +hi SpecialKey guibg=#000000 guifg=#ff4400 +hi Statement gui=bold guifg=#ff4400 +hi StatusLine gui=none guibg=#ff3200 guifg=#000000 +hi StatusLineNC gui=none guibg=#444444 guifg=#000000 +hi String gui=none guifg=#d13800 +hi TabLine gui=none guibg=#555555 guifg=#000000 +hi TabLineFill gui=underline guibg=#000000 guifg=#ffffff +hi TabLineSel gui=none guibg=#ff4400 guifg=#000000 +hi Title gui=none guifg=#ffffff +hi Todo gui=none guibg=#000000 guifg=#ff0000 +hi Type gui=none guifg=#ffffff +hi VertSplit gui=none guibg=#000000 guifg=#ffffff +hi Visual guibg=#d13800 guifg=#000000 +hi WarningMsg guibg=#888888 guifg=#000000 + +"- end of colorscheme ----------------------------------------------- diff --git a/colors/dw_purple.vim b/colors/dw_purple.vim new file mode 100755 index 0000000..59dc8dd --- /dev/null +++ b/colors/dw_purple.vim @@ -0,0 +1,66 @@ +"-------------------------------------------------------------------- +" Name Of File: dw_purple.vim. +" Description: Gvim colorscheme, designed against VIM 7.0 GUI +" By: Steve Cadwallader +" Contact: demwiz@gmail.com +" Credits: Inspiration from the brookstream and redblack schemes. +" Last Change: Saturday, September 17, 2006. +" Installation: Drop this file in your $VIMRUNTIME/colors/ directory. +"-------------------------------------------------------------------- + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="dw_purple" + +"-------------------------------------------------------------------- + +hi Boolean guifg=#ff00ff +hi cDefine guifg=#ff00ff +hi cInclude guifg=#ffffff +hi Comment guifg=#696969 +hi Constant guifg=#ff00ff +hi Cursor guibg=#444444 guifg=#ffffff +hi CursorColumn guibg=#110011 +hi CursorLine guibg=#180018 +hi DiffAdd guibg=#333333 guifg=#ff00ff +hi DiffChange guibg=#333333 guifg=#ff00ff +hi DiffDelete guibg=#333333 guifg=#ff00ff +hi DiffText guibg=#333333 guifg=#ffffff +hi Directory guibg=#000000 guifg=#ff00ff +hi ErrorMsg guibg=#ffffff guifg=#000000 +hi FoldColumn guibg=#222222 guifg=#ff0000 +hi Folded guibg=#222222 guifg=#ff0000 +hi Function guibg=#000000 guifg=#ff00ff +hi Identifier guibg=#000000 guifg=#cc00cc +hi IncSearch gui=none guibg=#bb00bb guifg=#000000 +hi LineNr guibg=#000000 guifg=#880088 +hi MatchParen gui=none guibg=#222222 guifg=#ff00ff +hi ModeMsg guibg=#000000 guifg=#ff00ff +hi MoreMsg guibg=#000000 guifg=#ff00ff +hi NonText guibg=#000000 guifg=#ffffff +hi Normal gui=none guibg=#000000 guifg=#c0c0c0 +hi Operator gui=none guifg=#696969 +hi PreProc gui=none guifg=#ffffff +hi Question guifg=#ff00ff +hi Search gui=none guibg=#ff00ff guifg=#000000 +hi SignColumn guibg=#111111 guifg=#ffffff +hi Special gui=none guibg=#000000 guifg=#ffffff +hi SpecialKey guibg=#000000 guifg=#ff00ff +hi Statement gui=bold guifg=#ff00ff +hi StatusLine gui=none guibg=#ff00ff guifg=#000000 +hi StatusLineNC gui=none guibg=#444444 guifg=#000000 +hi String gui=none guifg=#bb00bb +hi TabLine gui=none guibg=#444444 guifg=#000000 +hi TabLineFill gui=underline guibg=#000000 guifg=#ffffff +hi TabLineSel gui=none guibg=#aa00aa guifg=#000000 +hi Title gui=none guifg=#ff00ff +hi Todo gui=none guibg=#000000 guifg=#ff0000 +hi Type gui=none guifg=#ffffff +hi VertSplit gui=none guibg=#000000 guifg=#ffffff +hi Visual guibg=#dd00dd guifg=#000000 +hi WarningMsg guibg=#888888 guifg=#000000 + +"- end of colorscheme ----------------------------------------------- diff --git a/colors/dw_red.vim b/colors/dw_red.vim new file mode 100755 index 0000000..c8a2c80 --- /dev/null +++ b/colors/dw_red.vim @@ -0,0 +1,66 @@ +"-------------------------------------------------------------------- +" Name Of File: dw_red.vim. +" Description: Gvim colorscheme, designed against VIM 7.0 GUI +" By: Steve Cadwallader +" Contact: demwiz@gmail.com +" Credits: Inspiration from the brookstream and redblack schemes. +" Last Change: Saturday, September 17, 2006. +" Installation: Drop this file in your $VIMRUNTIME/colors/ directory. +"-------------------------------------------------------------------- + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="dw_red" + +"-------------------------------------------------------------------- + +hi Boolean guifg=#ff0000 +hi cDefine guifg=#ff0000 +hi cInclude guifg=#ffffff +hi Comment guifg=#696969 +hi Constant guifg=#ff0000 +hi Cursor guibg=#444444 guifg=#ffffff +hi CursorColumn guibg=#110000 +hi CursorLine guibg=#180000 +hi DiffAdd guibg=#333333 guifg=#ff0000 +hi DiffChange guibg=#333333 guifg=#ff0000 +hi DiffDelete guibg=#333333 guifg=#ff0000 +hi DiffText guibg=#333333 guifg=#ffffff +hi Directory guibg=#000000 guifg=#ff0000 +hi ErrorMsg guibg=#ffffff guifg=#000000 +hi FoldColumn guibg=#222222 guifg=#ff0000 +hi Folded guibg=#222222 guifg=#ff0000 +hi Function guibg=#000000 guifg=#ff0000 +hi Identifier guibg=#000000 guifg=#cc0000 +hi IncSearch gui=none guibg=#bb0000 guifg=#000000 +hi LineNr guibg=#000000 guifg=#880000 +hi MatchParen gui=none guibg=#222222 guifg=#ff0000 +hi ModeMsg guibg=#000000 guifg=#ff0000 +hi MoreMsg guibg=#000000 guifg=#ff0000 +hi NonText guibg=#000000 guifg=#ffffff +hi Normal gui=none guibg=#000000 guifg=#c0c0c0 +hi Operator gui=none guifg=#696969 +hi PreProc gui=none guifg=#ffffff +hi Question guifg=#ff0000 +hi Search gui=none guibg=#ff0000 guifg=#000000 +hi SignColumn guibg=#111111 guifg=#ffffff +hi Special gui=none guibg=#000000 guifg=#ffffff +hi SpecialKey guibg=#000000 guifg=#ff0000 +hi Statement gui=bold guifg=#ff0000 +hi StatusLine gui=none guibg=#ff0000 guifg=#000000 +hi StatusLineNC gui=none guibg=#444444 guifg=#000000 +hi String gui=none guifg=#bb0000 +hi TabLine gui=none guibg=#444444 guifg=#000000 +hi TabLineFill gui=underline guibg=#000000 guifg=#ffffff +hi TabLineSel gui=none guibg=#aa0000 guifg=#000000 +hi Title gui=none guifg=#ff0000 +hi Todo gui=none guibg=#000000 guifg=#ff0000 +hi Type gui=none guifg=#ffffff +hi VertSplit gui=none guibg=#000000 guifg=#ffffff +hi Visual guibg=#dd0000 guifg=#000000 +hi WarningMsg guibg=#888888 guifg=#000000 + +"- end of colorscheme ----------------------------------------------- diff --git a/colors/dw_yellow.vim b/colors/dw_yellow.vim new file mode 100755 index 0000000..011b092 --- /dev/null +++ b/colors/dw_yellow.vim @@ -0,0 +1,66 @@ +"-------------------------------------------------------------------- +" Name Of File: dw_yellow.vim. +" Description: Gvim colorscheme, designed against VIM 7.0 GUI +" By: Steve Cadwallader +" Contact: demwiz@gmail.com +" Credits: Inspiration from the brookstream and redblack schemes. +" Last Change: Saturday, September 17, 2006. +" Installation: Drop this file in your $VIMRUNTIME/colors/ directory. +"-------------------------------------------------------------------- + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="dw_yellow" + +"-------------------------------------------------------------------- + +hi Boolean guifg=#ffff00 +hi cDefine guifg=#ffff00 +hi cInclude guifg=#ffffff +hi Comment guifg=#696969 +hi Constant guifg=#ffff00 +hi Cursor guibg=#444444 guifg=#ffffff +hi CursorColumn guibg=#111100 +hi CursorLine guibg=#181800 +hi DiffAdd guibg=#333333 guifg=#ffff00 +hi DiffChange guibg=#333333 guifg=#ffff00 +hi DiffDelete guibg=#333333 guifg=#ffff00 +hi DiffText guibg=#333333 guifg=#ffffff +hi Directory guibg=#000000 guifg=#ffff00 +hi ErrorMsg guibg=#ffffff guifg=#000000 +hi FoldColumn guibg=#222222 guifg=#ff0000 +hi Folded guibg=#222222 guifg=#ff0000 +hi Function guibg=#000000 guifg=#ffff00 +hi Identifier guibg=#000000 guifg=#cccc00 +hi IncSearch gui=none guibg=#bbbb00 guifg=#000000 +hi LineNr guibg=#000000 guifg=#888800 +hi MatchParen gui=none guibg=#222222 guifg=#ffff00 +hi ModeMsg guibg=#000000 guifg=#ffff00 +hi MoreMsg guibg=#000000 guifg=#ffff00 +hi NonText guibg=#000000 guifg=#ffffff +hi Normal gui=none guibg=#000000 guifg=#c0c0c0 +hi Operator gui=none guifg=#696969 +hi PreProc gui=none guifg=#ffffff +hi Question guifg=#ffff00 +hi Search gui=none guibg=#ffff00 guifg=#000000 +hi SignColumn guibg=#111111 guifg=#ffffff +hi Special gui=none guibg=#000000 guifg=#ffffff +hi SpecialKey guibg=#000000 guifg=#ffff00 +hi Statement gui=bold guifg=#ffff00 +hi StatusLine gui=none guibg=#ffff00 guifg=#000000 +hi StatusLineNC gui=none guibg=#444444 guifg=#000000 +hi String gui=none guifg=#bbbb00 +hi TabLine gui=none guibg=#444444 guifg=#000000 +hi TabLineFill gui=underline guibg=#000000 guifg=#ffffff +hi TabLineSel gui=none guibg=#aaaa00 guifg=#000000 +hi Title gui=none guifg=#ffff00 +hi Todo gui=none guibg=#000000 guifg=#ff0000 +hi Type gui=none guifg=#ffffff +hi VertSplit gui=none guibg=#000000 guifg=#ffffff +hi Visual guibg=#dddd00 guifg=#000000 +hi WarningMsg guibg=#888888 guifg=#000000 + +"- end of colorscheme ----------------------------------------------- diff --git a/colors/earendel.vim b/colors/earendel.vim new file mode 100755 index 0000000..52aa178 --- /dev/null +++ b/colors/earendel.vim @@ -0,0 +1,159 @@ +hi clear + +if exists("syntax_on") + syntax reset +endif + +let colors_name = "earendel" + +execute "command! -nargs=1 Colo set background=" + +if &background == "light" + hi Normal ctermbg=15 ctermfg=0 guibg=#ffffff guifg=#000000 gui=none + + hi Cursor guibg=#000000 guifg=#ffffff gui=none + hi CursorColumn ctermbg=7 ctermfg=fg guibg=#dfdfdf gui=none + hi CursorLine ctermbg=7 ctermfg=fg guibg=#dfdfdf gui=none + hi DiffAdd guibg=#bae981 guifg=fg gui=none + hi DiffChange guibg=#8495e6 guifg=fg gui=none + hi DiffDelete guibg=#ff95a5 guifg=fg gui=none + hi DiffText guibg=#b9c2f0 guifg=fg gui=bold + hi Directory guibg=bg guifg=#272fc2 gui=none + hi ErrorMsg guibg=#ca001f guifg=#ffffff gui=bold + hi FoldColumn ctermbg=bg guibg=bg guifg=#656565 gui=none + hi Folded guibg=#cacaca guifg=#324263 gui=bold + hi IncSearch guibg=#f7b69d gui=none + hi LineNr guibg=bg guifg=#656565 gui=none + hi ModeMsg ctermbg=bg ctermfg=fg guibg=bg guifg=fg gui=bold + hi MoreMsg guibg=bg guifg=#4a4a4a gui=bold + hi NonText ctermfg=8 guibg=bg guifg=#656565 gui=bold + hi Pmenu guibg=#aab8d5 guifg=fg gui=none + hi PmenuSbar guibg=#6a83b5 guifg=fg gui=none + hi PmenuSel guibg=#fee06b guifg=fg gui=none + hi PmenuThumb guibg=#c7cfe2 guifg=fg gui=none + hi Question guibg=bg guifg=#4a4a4a gui=bold + hi Search guibg=#fee481 gui=none + hi SignColumn ctermbg=bg guibg=bg guifg=#656565 gui=none + hi SpecialKey guibg=bg guifg=#844631 gui=none + hi StatusLine ctermbg=0 ctermfg=15 guibg=#96aad3 guifg=fg gui=bold + hi StatusLineNC ctermbg=7 ctermfg=fg guibg=#bcc7de guifg=#384547 gui=none + if has("spell") + hi SpellBad guisp=#ca001f gui=undercurl + hi SpellCap guisp=#272fc2 gui=undercurl + hi SpellLocal guisp=#0f8674 gui=undercurl + hi SpellRare guisp=#d16c7a gui=undercurl + endif + hi TabLine guibg=#d4d4d4 guifg=fg gui=underline + hi TabLineFill guibg=#d4d4d4 guifg=fg gui=underline + hi TabLineSel guibg=bg guifg=fg gui=bold + hi Title guifg=fg gui=bold + hi VertSplit ctermbg=7 ctermfg=fg guibg=#bcc7de guifg=#384547 gui=none + if version >= 700 + hi Visual ctermbg=7 ctermfg=fg guibg=#b5c5e6 gui=none + else + hi Visual ctermbg=7 ctermfg=fg guibg=#b5c5e6 guifg=fg gui=none + endif + hi VisualNOS ctermbg=8 ctermfg=fg guibg=bg guifg=#4069bf gui=bold,underline + hi WarningMsg guibg=bg guifg=#ca001f gui=bold + hi WildMenu guibg=#fedc56 guifg=fg gui=bold + + hi Comment guibg=bg guifg=#558817 gui=none + hi Constant guibg=bg guifg=#a8660d gui=none + hi Error guibg=bg guifg=#bf001d gui=none + hi Identifier guibg=bg guifg=#0e7c6b gui=none + hi Ignore guibg=bg guifg=bg gui=none + hi lCursor guibg=#79bf21 guifg=#ffffff gui=none + hi MatchParen guibg=#0f8674 guifg=#ffffff gui=none + hi PreProc guibg=bg guifg=#a33243 gui=none + hi Special guibg=bg guifg=#844631 gui=none + hi Statement guibg=bg guifg=#2239a8 gui=bold + hi Todo guibg=#fedc56 guifg=#512b1e gui=bold + hi Type guibg=bg guifg=#1d318d gui=bold + hi Underlined ctermbg=bg ctermfg=fg guibg=bg guifg=#272fc2 gui=underline + + hi htmlBold ctermbg=bg ctermfg=fg guibg=bg guifg=fg gui=bold + hi htmlBoldItalic ctermbg=bg ctermfg=fg guibg=bg guifg=fg gui=bold,italic + hi htmlBoldUnderline ctermbg=bg ctermfg=fg guibg=bg guifg=fg gui=bold,underline + hi htmlBoldUnderlineItalic ctermbg=bg ctermfg=fg guibg=bg guifg=fg gui=bold,underline,italic + hi htmlItalic ctermbg=bg ctermfg=fg guibg=bg guifg=fg gui=italic + hi htmlUnderline ctermbg=bg ctermfg=fg guibg=bg guifg=fg gui=underline + hi htmlUnderlineItalic ctermbg=bg ctermfg=fg guibg=bg guifg=fg gui=underline,italic +else + hi Normal ctermbg=0 ctermfg=7 guibg=#181818 guifg=#cacaca gui=none + + hi Cursor guibg=#e5e5e5 guifg=#000000 gui=none + hi CursorColumn ctermbg=8 ctermfg=15 guibg=#404040 gui=none + hi CursorLine ctermbg=8 ctermfg=15 guibg=#404040 gui=none + hi DiffAdd guibg=#558817 guifg=#dadada gui=none + hi DiffChange guibg=#1b2e85 guifg=#dadada gui=none + hi DiffDelete guibg=#9f0018 guifg=#dadada gui=none + hi DiffText guibg=#2540ba guifg=#dadada gui=bold + hi Directory guibg=bg guifg=#8c91e8 gui=none + hi ErrorMsg guibg=#ca001f guifg=#e5e5e5 gui=bold + hi FoldColumn ctermbg=bg guibg=bg guifg=#9a9a9a gui=none + hi Folded guibg=#555555 guifg=#bfcadf gui=bold + hi IncSearch guibg=#a7380e guifg=#dadada gui=none + hi LineNr guibg=bg guifg=#9a9a9a gui=none + hi ModeMsg ctermbg=bg ctermfg=fg guibg=bg guifg=fg gui=bold + hi MoreMsg guibg=bg guifg=#b5b5b5 gui=bold + hi NonText ctermfg=8 guibg=bg guifg=#9a9a9a gui=bold + hi Pmenu guibg=#3d5078 guifg=#dadada gui=none + hi PmenuSbar guibg=#324263 guifg=#dadada gui=none + hi PmenuSel guibg=#f3c201 guifg=#000000 gui=none + hi PmenuThumb guibg=#5c77ad guifg=#dadada gui=none + hi Question guibg=bg guifg=#b5b5b5 gui=bold + hi Search guibg=#947601 guifg=#dadada gui=none + hi SignColumn ctermbg=bg guibg=bg guifg=#9a9a9a gui=none + hi SpecialKey guibg=bg guifg=#d3a901 gui=none + hi StatusLine ctermbg=7 ctermfg=0 guibg=#41609e guifg=#e5e5e5 gui=bold + hi StatusLineNC ctermbg=7 ctermfg=0 guibg=#35466a guifg=#afbacf gui=none + if has("spell") + hi SpellBad guisp=#ea0023 gui=undercurl + hi SpellCap guisp=#8c91e8 gui=undercurl + hi SpellLocal guisp=#16c9ae gui=undercurl + hi SpellRare guisp=#e09ea8 gui=undercurl + endif + hi TabLine guibg=#4a4a4a guifg=#e5e5e5 gui=underline + hi TabLineFill guibg=#4a4a4a guifg=#e5e5e5 gui=underline + hi TabLineSel guibg=bg guifg=#e5e5e5 gui=bold + hi Title ctermbg=bg ctermfg=15 guifg=#e5e5e5 gui=bold + hi VertSplit ctermbg=7 ctermfg=0 guibg=#35466a guifg=#afbacf gui=none + if version >= 700 + hi Visual ctermbg=7 ctermfg=0 guibg=#274278 gui=none + else + hi Visual ctermbg=7 ctermfg=0 guibg=#274278 guifg=fg gui=none + endif + hi VisualNOS ctermbg=8 ctermfg=0 guibg=bg guifg=#5c77ad gui=bold,underline + hi WarningMsg guibg=bg guifg=#ea0023 gui=bold + hi WildMenu guibg=#fbca01 guifg=#000000 gui=bold + + hi Comment guibg=bg guifg=#77be21 gui=none + hi Constant guibg=bg guifg=#dc8511 gui=none + hi Error guibg=bg guifg=#ea0023 gui=none + hi Identifier guibg=bg guifg=#16c9ae gui=none + hi Ignore guibg=bg guifg=bg gui=none + hi lCursor guibg=#c4ec93 guifg=#000000 gui=none + hi MatchParen guibg=#17d2b7 guifg=#000000 gui=none + hi PreProc guibg=bg guifg=#e09ea8 gui=none + hi Special guibg=bg guifg=#d3a901 gui=none + hi Statement guibg=bg guifg=#a7b4ed gui=bold + hi Todo guibg=#fedc56 guifg=#512b1e gui=bold + hi Type guibg=bg guifg=#95a4ea gui=bold + hi Underlined ctermbg=bg ctermfg=15 guibg=bg guifg=#8c91e8 gui=underline + + hi htmlBold ctermbg=bg ctermfg=15 guibg=bg guifg=fg gui=bold + hi htmlBoldItalic ctermbg=bg ctermfg=15 guibg=bg guifg=fg gui=bold,italic + hi htmlBoldUnderline ctermbg=bg ctermfg=15 guibg=bg guifg=fg gui=bold,underline + hi htmlBoldUnderlineItalic ctermbg=bg ctermfg=15 guibg=bg guifg=fg gui=bold,underline,italic + hi htmlItalic ctermbg=bg ctermfg=15 guibg=bg guifg=fg gui=italic + hi htmlUnderline ctermbg=bg ctermfg=15 guibg=bg guifg=fg gui=underline + hi htmlUnderlineItalic ctermbg=bg ctermfg=15 guibg=bg guifg=fg gui=underline,italic +endif + +hi! default link bbcodeBold htmlBold +hi! default link bbcodeBoldItalic htmlBoldItalic +hi! default link bbcodeBoldItalicUnderline htmlBoldUnderlineItalic +hi! default link bbcodeBoldUnderline htmlBoldUnderline +hi! default link bbcodeItalic htmlItalic +hi! default link bbcodeItalicUnderline htmlUnderlineItalic +hi! default link bbcodeUnderline htmlUnderline diff --git a/colors/eclipse.vim b/colors/eclipse.vim new file mode 100755 index 0000000..0d7d36a --- /dev/null +++ b/colors/eclipse.vim @@ -0,0 +1,92 @@ +" Vim color file +" Maintainer: Juan frias +" Last Change: 2007 Feb 25 +" Version: 1.0.1 +" URL: http://www.axisym3.net/jdany/vim-the-editor/#eclipse +set background=light +highlight clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = "eclipse" + +highlight Normal gui=none guifg=#000000 guibg=#ffffff ctermfg=Gray + +" Search +highlight IncSearch gui=underline guifg=#404040 guibg=#e0e040 +highlight Search gui=none guifg=#544060 guibg=#f0c0ff ctermbg=1 + +" Messages +highlight ErrorMsg gui=none guifg=#f8f8f8 guibg=#4040ff +highlight WarningMsg gui=none guifg=#f8f8f8 guibg=#4040ff +highlight ModeMsg gui=none guifg=#d06000 guibg=bg +highlight MoreMsg gui=none guifg=#0090a0 guibg=bg +highlight Question gui=none guifg=#8000ff guibg=bg + +" Split area +highlight StatusLine gui=none guifg=#ffffff guibg=#4570aa cterm=bold ctermbg=blue ctermfg=white +highlight StatusLineNC gui=none guifg=#ffffff guibg=#75a0da cterm=none ctermfg=darkgrey ctermbg=blue +highlight VertSplit gui=none guifg=#f8f8f8 guibg=#904838 ctermfg=darkgrey cterm=none ctermbg=blue +highlight WildMenu gui=none guifg=#f8f8f8 guibg=#ff3030 + +" Diff +highlight DiffText gui=none guifg=red guibg=#ffd0d0 cterm=bold ctermbg=5 ctermfg=3 +highlight DiffChange gui=none guifg=black guibg=#ffe7e7 cterm=none ctermbg=5 ctermfg=7 +highlight DiffDelete gui=none guifg=bg guibg=#e7e7ff ctermbg=black +highlight DiffAdd gui=none guifg=blue guibg=#e7e7ff ctermbg=green cterm=bold + +" Cursor +highlight Cursor gui=none guifg=#ffffff guibg=#0080f0 +highlight lCursor gui=none guifg=#ffffff guibg=#8040ff +highlight CursorIM gui=none guifg=#ffffff guibg=#8040ff + +" Fold +highlight Folded gui=none guifg=#804030 guibg=#fff0d0 ctermbg=black ctermfg=black cterm=bold +highlight FoldColumn gui=none guifg=#6b6b6b guibg=#e7e7e7 ctermfg=black ctermbg=white + +" Popup Menu +highlight PMenu ctermbg=green ctermfg=white +highlight PMenuSel ctermbg=white ctermfg=black +highlight PMenuSBar ctermbg=red ctermfg=white +highlight PMenuThumb ctermbg=white ctermfg=red + +" Other +highlight Directory gui=none guifg=#7050ff guibg=bg +highlight LineNr gui=none guifg=#6b6b6b guibg=#eeeeee +highlight NonText gui=none guifg=#707070 guibg=#e7e7e7 +highlight SpecialKey gui=none guifg=#c0c0c0 guibg=bg cterm=none ctermfg=4 +highlight Title gui=bold guifg=#0033cc guibg=bg +highlight Visual gui=none guifg=#804020 guibg=#ffc0a0 ctermfg=DarkCyan + +" Syntax group +highlight Comment gui=none guifg=#236e25 guibg=bg ctermfg=2 +highlight Constant gui=none guifg=#00884c guibg=bg ctermfg=White +highlight Error gui=none guifg=#f8f8f8 guibg=#4040ff term=reverse ctermbg=Red ctermfg=White +highlight Identifier gui=none guifg=#b07800 guibg=bg ctermfg=Green +highlight Ignore gui=none guifg=bg guibg=bg ctermfg=black +highlight PreProc gui=none guifg=#683821 guibg=bg ctermfg=Green +highlight Special gui=none guifg=#8040f0 guibg=bg ctermfg=DarkMagenta +highlight Statement gui=none guifg=#b64f90 guibg=bg ctermfg=White +highlight Todo gui=none guifg=#ff5050 guibg=white term=standout ctermbg=Yellow ctermfg=Black +highlight Type gui=bold guifg=#7f0055 guibg=bg ctermfg=LightGreen +highlight Underlined gui=none guifg=blue guibg=bg +highlight String gui=none guifg=#8010a0 guibg=bg ctermfg=Yellow +highlight Number gui=none guifg=#0000ff guibg=bg ctermfg=White + +if !has("gui_running") + hi link Float Number + hi link Conditional Repeat + hi link Include PreProc + hi link Macro PreProc + hi link PreCondit PreProc + hi link StorageClass Type + hi link Structure Type + hi link Typedef Type + hi link Tag Special + hi link Delimiter Normal + hi link SpecialComment Special + hi link Debug Special +endif + +" vim:ff=unix: diff --git a/colors/ekvoli.vim b/colors/ekvoli.vim new file mode 100755 index 0000000..3362968 --- /dev/null +++ b/colors/ekvoli.vim @@ -0,0 +1,105 @@ +" Vim color file +" Maintainer: Preben Randhol +" Last Change: 2008 Feb 24 +" License: GNU Public License (GPL) v2 +" +" Version 1.6: Added colours for TVO and changed folding colour + + +highlight clear Normal +set background& + +" Remove all existing highlighting and set the defaults. +highlight clear + +" Load the syntax highlighting defaults, if it's enabled. +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = "ekvoli" + +hi Cursor guifg=white gui=reverse,bold +hi iCursor guifg=white gui=reverse,bold +hi rCursor guifg=white gui=reverse,bold +hi vCursor guifg=white gui=reverse,bold +hi lCursor guifg=white gui=reverse,bold +hi nCursor guifg=white gui=reverse,bold +hi CursorLine guibg=#05456f gui=none +hi CursorColumn guibg=#05456f gui=none + + +hi Normal guifg=white guibg=#001535 +hi Error guibg=#6000a0 gui=bold,italic,undercurl guisp=white +hi ErrorMsg guifg=white guibg=#287eff gui=bold,italic +hi Visual guibg=#2080c0 guifg=white gui=bold +hi VisualNOS guibg=#6080a0 guifg=white gui=bold +hi Todo guibg=#00a0d0 guifg=white gui=underline + +hi NonText guifg=#6590f0 + +hi Search guibg=#667799 guifg=white gui=bold +hi IncSearch guibg=#667799 guifg=white gui=bold + +hi SpecialKey guifg=#00c0e0 +hi Directory guifg=#00c0e0 +hi Title guifg=#00a0f0 gui=none +hi WarningMsg guifg=lightblue +hi WildMenu guifg=white guibg=#0080c0 +hi Pmenu guifg=white guibg=#005090 +hi PmenuSel guifg=white guibg=#3070c0 +hi ModeMsg guifg=#22cce2 +hi MoreMsg guifg=#22cce2 gui=bold +hi Question guifg=#22cce2 gui=none + +hi MatchParen guifg=white guibg=#3070c0 gui=bold + +hi StatusLine guifg=white guibg=#104075 gui=bold +hi StatusLineNC guifg=#65a0f0 guibg=#104075 gui=none +hi VertSplit guifg=#305885 guibg=#305885 gui=none +hi Folded guifg=#65b0f6 guibg=#122555 gui=italic +hi FoldColumn guifg=white guibg=#103366 gui=none +hi LineNr guifg=#5080b0 gui=bold + +hi DiffAdd guibg=#2080a0 guifg=white gui=bold +hi DiffChange guibg=#2080a0 guifg=white gui=bold +hi DiffDelete guibg=#306080 guifg=white gui=none +hi DiffText guibg=#8070a0 guifg=white gui=bold + +hi SpellBad gui=undercurl,italic guisp=#76daff +hi SpellCap gui=undercurl guisp=#7ba2ba +hi SpellRare gui=undercurl guisp=#8080f0 +hi SpellLocal gui=undercurl guisp=#c0c0e0 + +hi Comment guifg=#9590d5 gui=italic + + +hi Constant guifg=#87c6f0 gui=italic +hi Special guifg=#50a0e0 gui=bold +hi Identifier guifg=#7fe9ff +hi Statement guifg=white gui=bold +hi PreProc guifg=#3f8fff gui=none + +hi type guifg=#90bfd0 gui=none +hi Ignore guifg=bg +hi Underlined gui=underline cterm=underline term=underline + + +" TVO - The Vim Outliner +hi otlTab0 gui=bold,underline guifg=#eeeeff +hi otlTab1 gui=bold,underline guifg=#3377ee +hi otlTab2 gui=bold,underline guifg=#22cae2 +hi otlTab3 gui=bold,underline guifg=#9966ff +hi otlTab5 gui=bold,underline guifg=#22aae2 +hi otlTab4 gui=bold,underline guifg=#92caf2 +hi otlTab7 gui=bold,underline guifg=#22bae2 +hi otlTab6 gui=bold,underline guifg=#8866ee +hi otlTab8 gui=bold,underline guifg=#1166ee +hi otlTab9 gui=bold,underline guifg=#99ddee +hi otlTodo gui=bold,underline guifg=white guibg=#00a0d0 +hi otlTagRef guifg=white guibg=#8070a0 +hi otlTagDef guifg=white guibg=#005090 + + + + diff --git a/colors/fine_blue.vim b/colors/fine_blue.vim new file mode 100755 index 0000000..89c280c --- /dev/null +++ b/colors/fine_blue.vim @@ -0,0 +1,71 @@ +" Vim color file +" Maintainer: Tiza +" Last Change: 2002/10/30 Wed 00:12. +" version: 1.7 +" This color scheme uses a light background. + +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "fine_blue" + +hi Normal guifg=#404048 guibg=#f8f8f8 + +" Search +hi IncSearch gui=UNDERLINE guifg=#404054 guibg=#40ffff +hi Search gui=NONE guifg=#404054 guibg=#ffffa0 + +" Messages +hi ErrorMsg gui=NONE guifg=#ff0070 guibg=#ffe0f4 +hi WarningMsg gui=NONE guifg=#ff0070 guibg=#ffe0f4 +hi ModeMsg gui=NONE guifg=#0070ff guibg=NONE +hi MoreMsg gui=NONE guifg=#a800ff guibg=NONE +hi Question gui=NONE guifg=#008050 guibg=NONE + +" Split area +hi StatusLine gui=BOLD guifg=#f8f8f8 guibg=#404054 +hi StatusLineNC gui=NONE guifg=#b8b8c0 guibg=#404054 +hi VertSplit gui=NONE guifg=#f8f8f8 guibg=#404054 +hi WildMenu gui=BOLD guifg=#f8f8f8 guibg=#00aacc + +" Diff +hi DiffText gui=NONE guifg=#4040ff guibg=#c0c0ff +hi DiffChange gui=NONE guifg=#5050ff guibg=#e0e0ff +hi DiffDelete gui=NONE guifg=#4040ff guibg=#c8f2ea +hi DiffAdd gui=NONE guifg=#4040ff guibg=#c8f2ea + +" Cursor +hi Cursor gui=NONE guifg=#0000ff guibg=#00e0ff +hi lCursor gui=NONE guifg=#f8f8f8 guibg=#8000ff +hi CursorIM gui=NONE guifg=#f8f8f8 guibg=#8000ff + +" Fold +hi Folded gui=NONE guifg=#7820ff guibg=#e0d8ff +hi FoldColumn gui=NONE guifg=#aa60ff guibg=#f0f0f4 +" hi Folded gui=NONE guifg=#58587c guibg=#e0e0e8 +" hi FoldColumn gui=NONE guifg=#9090b0 guibg=#f0f0f4 + +" Other +hi Directory gui=NONE guifg=#0070b8 guibg=NONE +hi LineNr gui=NONE guifg=#a0a0b0 guibg=NONE +hi NonText gui=BOLD guifg=#4000ff guibg=#ececf0 +hi SpecialKey gui=NONE guifg=#d87000 guibg=NONE +hi Title gui=NONE guifg=#004060 guibg=#c8f0f8 +hi Visual gui=NONE guifg=#404060 guibg=#dddde8 +" hi VisualNOS gui=NONE guifg=#404060 guibg=#dddde8 + +" Syntax group +hi Comment gui=NONE guifg=#ff00c0 guibg=NONE +hi Constant gui=NONE guifg=#2020ff guibg=#e8e8ff +hi Error gui=BOLD guifg=#ffffff guibg=#ff4080 +hi Identifier gui=NONE guifg=#c800ff guibg=NONE +hi Ignore gui=NONE guifg=#f8f8f8 guibg=NONE +hi PreProc gui=NONE guifg=#0070e6 guibg=NONE +hi Special gui=NONE guifg=#005858 guibg=#ccf7ee +hi Statement gui=NONE guifg=#008858 guibg=NONE +hi Todo gui=NONE guifg=#ff0070 guibg=#ffe0f4 +hi Type gui=NONE guifg=#7040ff guibg=NONE +hi Underlined gui=UNDERLINE guifg=#0000ff guibg=NONE diff --git a/colors/fine_blue2.vim b/colors/fine_blue2.vim new file mode 100755 index 0000000..89c280c --- /dev/null +++ b/colors/fine_blue2.vim @@ -0,0 +1,71 @@ +" Vim color file +" Maintainer: Tiza +" Last Change: 2002/10/30 Wed 00:12. +" version: 1.7 +" This color scheme uses a light background. + +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "fine_blue" + +hi Normal guifg=#404048 guibg=#f8f8f8 + +" Search +hi IncSearch gui=UNDERLINE guifg=#404054 guibg=#40ffff +hi Search gui=NONE guifg=#404054 guibg=#ffffa0 + +" Messages +hi ErrorMsg gui=NONE guifg=#ff0070 guibg=#ffe0f4 +hi WarningMsg gui=NONE guifg=#ff0070 guibg=#ffe0f4 +hi ModeMsg gui=NONE guifg=#0070ff guibg=NONE +hi MoreMsg gui=NONE guifg=#a800ff guibg=NONE +hi Question gui=NONE guifg=#008050 guibg=NONE + +" Split area +hi StatusLine gui=BOLD guifg=#f8f8f8 guibg=#404054 +hi StatusLineNC gui=NONE guifg=#b8b8c0 guibg=#404054 +hi VertSplit gui=NONE guifg=#f8f8f8 guibg=#404054 +hi WildMenu gui=BOLD guifg=#f8f8f8 guibg=#00aacc + +" Diff +hi DiffText gui=NONE guifg=#4040ff guibg=#c0c0ff +hi DiffChange gui=NONE guifg=#5050ff guibg=#e0e0ff +hi DiffDelete gui=NONE guifg=#4040ff guibg=#c8f2ea +hi DiffAdd gui=NONE guifg=#4040ff guibg=#c8f2ea + +" Cursor +hi Cursor gui=NONE guifg=#0000ff guibg=#00e0ff +hi lCursor gui=NONE guifg=#f8f8f8 guibg=#8000ff +hi CursorIM gui=NONE guifg=#f8f8f8 guibg=#8000ff + +" Fold +hi Folded gui=NONE guifg=#7820ff guibg=#e0d8ff +hi FoldColumn gui=NONE guifg=#aa60ff guibg=#f0f0f4 +" hi Folded gui=NONE guifg=#58587c guibg=#e0e0e8 +" hi FoldColumn gui=NONE guifg=#9090b0 guibg=#f0f0f4 + +" Other +hi Directory gui=NONE guifg=#0070b8 guibg=NONE +hi LineNr gui=NONE guifg=#a0a0b0 guibg=NONE +hi NonText gui=BOLD guifg=#4000ff guibg=#ececf0 +hi SpecialKey gui=NONE guifg=#d87000 guibg=NONE +hi Title gui=NONE guifg=#004060 guibg=#c8f0f8 +hi Visual gui=NONE guifg=#404060 guibg=#dddde8 +" hi VisualNOS gui=NONE guifg=#404060 guibg=#dddde8 + +" Syntax group +hi Comment gui=NONE guifg=#ff00c0 guibg=NONE +hi Constant gui=NONE guifg=#2020ff guibg=#e8e8ff +hi Error gui=BOLD guifg=#ffffff guibg=#ff4080 +hi Identifier gui=NONE guifg=#c800ff guibg=NONE +hi Ignore gui=NONE guifg=#f8f8f8 guibg=NONE +hi PreProc gui=NONE guifg=#0070e6 guibg=NONE +hi Special gui=NONE guifg=#005858 guibg=#ccf7ee +hi Statement gui=NONE guifg=#008858 guibg=NONE +hi Todo gui=NONE guifg=#ff0070 guibg=#ffe0f4 +hi Type gui=NONE guifg=#7040ff guibg=NONE +hi Underlined gui=UNDERLINE guifg=#0000ff guibg=NONE diff --git a/colors/fnaqevan.vim b/colors/fnaqevan.vim new file mode 100755 index 0000000..d936cee --- /dev/null +++ b/colors/fnaqevan.vim @@ -0,0 +1,67 @@ +" Vim color file +" Maintainer: Rafal Sulejman +" Last Change: 2002.06.18 +" +" This color scheme uses a black (dark) background. + +" First remove all existing highlighting. +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "fnaqevan" + +hi Normal guibg=#000000 guifg=#C0C0C0 gui=NONE + +" Main colors +hi Constant guibg=#000000 guifg=#00B8E0 gui=NONE +hi Identifier guibg=#000000 guifg=#FFA850 gui=NONE +hi Special guibg=#000000 guifg=#B899C8 gui=NONE +hi Statement guibg=#000000 guifg=#EEE840 gui=NONE +hi Preproc guibg=#000000 guifg=#00B098 gui=NONE +hi Type guibg=#000000 guifg=#40D040 gui=NONE + +" Secondary colors +hi Comment guibg=#000000 guifg=#006699 gui=NONE +hi Visual guibg=#005900 guifg=#40C940 gui=NONE +hi VisualNOS guibg=#005900 guifg=#40C940 gui=NONE +hi Search guibg=#707000 guifg=#FFFF00 gui=NONE +hi IncSearch guibg=#D05000 guifg=#FFE000 gui=NONE + +" Special colors +hi WarningMsg guibg=#707000 guifg=#FFFF00 gui=NONE +hi MoreMsg guibg=#000070 guifg=#00B8E0 gui=NONE +hi ErrorMsg guibg=#CC0000 guifg=#FFEE00 gui=NONE +hi ModeMsg guibg=#000000 guifg=#E8E8E8 gui=NONE +hi WildMenu guibg=#5f5f5f guifg=#FFEE60 gui=NONE +hi StatusLine guibg=#1f1f1f guifg=#F0F0F0 gui=NONE +hi StatusLineNC guibg=#0f0f0f guifg=#eaea3a gui=NONE +hi VertSplit guibg=#1f1f1f guifg=#F0F0F0 gui=NONE +hi Error guibg=#EE0000 guifg=#FFDD60 gui=NONE +hi Todo guibg=#EEE000 guifg=#000000 gui=NONE +hi Title guibg=#000000 guifg=#ffffff gui=NONE +hi Question guibg=#005900 guifg=#40E840 gui=NONE +hi LineNr guibg=#000000 guifg=#F0B0E0 gui=NONE +hi Directory guibg=#000000 guifg=#D0D0D0 gui=NONE +hi NonText guibg=#000000 guifg=#FFDDAA gui=NONE +hi SpecialKey guibg=#000000 guifg=#FFFFFF gui=NONE + +" Diff colors +hi DiffAdd guibg=#505050 guifg=#D0D0D0 gui=NONE +hi DiffChange guibg=#505050 guifg=#D0D0D0 gui=NONE +hi DiffDelete guibg=#505050 guifg=#D0D0D0 gui=NONE +hi DiffText guibg=#707070 guifg=#F0F0F0 gui=NONE + +" Folding colors +hi Folded guibg=#703070 guifg=#DDB8DD gui=NONE +hi FoldColumn guibg=#C4153B guifg=#F0F0F0 gui=NONE + +" Cursor colors +hi Cursor guibg=#FFFFFF guifg=#000000 gui=NONE +hi icursor guibg=#FFEE00 guifg=#000000 gui=NONE +hi ncursor guibg=#FFFFFF guifg=#000000 gui=NONE +hi rcursor guibg=#00CCFF guifg=#000000 gui=NONE +hi lcursor guibg=#40D040 guifg=#000000 gui=NONE + diff --git a/colors/fog.vim b/colors/fog.vim new file mode 100755 index 0000000..ab263ab --- /dev/null +++ b/colors/fog.vim @@ -0,0 +1,170 @@ +" Vim color file +" vim: tw=0 ts=4 sw=4 +" Maintainer: Thomas R. Kimpton +" Last Change: 2001 Nov 8 +" This color scheme is meant for the person that spends hours +" and hours and hours and... in vim and wants some contrast to +" help pick things out in the files they edit, but doesn't want +" **C**O**N**T**R**A**S**T**! + +set background=light + +hi clear + +if exists("syntax_on") + syntax reset +endif + +let colors_name = "fog" + +hi Normal ctermbg=White ctermfg=Black +" 660066 = darkish purple +hi Normal guifg=#660066 guibg=grey80 + +hi NonText term=bold +hi NonText ctermfg=LightBlue +hi NonText gui=bold guifg=LightBlue guibg=grey80 + +hi Comment ctermfg=DarkGrey ctermbg=White +" 444499 = darkish blue grey +hi Comment guifg=#444499 + +hi Constant term=underline +hi Constant ctermfg=Magenta +hi Constant guifg=#7070a0 + +hi Statement term=bold +hi Statement cterm=bold ctermfg=DarkGreen ctermbg=White +hi Statement guifg=DarkGreen gui=bold + +hi identifier ctermfg=DarkGreen +hi identifier guifg=DarkGreen + +hi preproc ctermfg=DarkGreen +hi preproc guifg=#408040 + +hi type ctermfg=DarkBlue +hi type guifg=DarkBlue + +hi label ctermfg=yellow +hi label guifg=#c06000 + +hi operator ctermfg=darkYellow +hi operator guifg=DarkGreen gui=bold + +hi StorageClass ctermfg=DarkRed ctermbg=White +hi StorageClass guifg=#a02060 gui=bold + +hi Number ctermfg=Blue ctermbg=White +hi Number guifg=Blue + +hi Special term=bold +hi Special ctermfg=LightRed +hi Special guifg=#aa8822 + +hi Cursor ctermbg=DarkMagenta +hi Cursor guibg=#880088 guifg=LightGrey + +hi lCursor guibg=Cyan guifg=Black + +hi ErrorMsg term=standout +hi ErrorMsg ctermbg=DarkRed ctermfg=White +hi ErrorMsg guibg=DarkRed guifg=White + +hi DiffText term=reverse +hi DiffText cterm=bold ctermbg=DarkRed +hi DiffText gui=bold guibg=DarkRed + +hi Directory term=bold +hi Directory ctermfg=LightRed +hi Directory guifg=Red gui=underline + +hi LineNr term=underline +hi LineNr ctermfg=Yellow +hi LineNr guifg=#ccaa22 + +hi MoreMsg term=bold +hi MoreMsg ctermfg=LightGreen +hi MoreMsg gui=bold guifg=SeaGreen + +hi Question term=standout +hi Question ctermfg=LightGreen +hi Question gui=bold guifg=DarkGreen + +hi Search term=reverse +hi Search ctermbg=DarkYellow ctermfg=Black +hi Search guibg=#887722 guifg=Black + +hi SpecialKey term=bold +hi SpecialKey ctermfg=LightBlue +hi SpecialKey guifg=Blue + +hi SpecialChar ctermfg=DarkGrey ctermbg=White +hi SpecialChar guifg=DarkGrey gui=bold + +hi Title term=bold +hi Title ctermfg=LightMagenta +hi Title gui=underline guifg=DarkMagenta + +hi WarningMsg term=standout +hi WarningMsg ctermfg=LightRed +hi WarningMsg guifg=DarkBlue guibg=#9999cc + +hi WildMenu term=standout +hi WildMenu ctermbg=Yellow ctermfg=Black +hi WildMenu guibg=Yellow guifg=Black gui=underline + +hi Folded term=standout +hi Folded ctermbg=LightGrey ctermfg=DarkBlue +hi Folded guibg=LightGrey guifg=DarkBlue + +hi FoldColumn term=standout +hi FoldColumn ctermbg=LightGrey ctermfg=DarkBlue +hi FoldColumn guibg=Grey guifg=DarkBlue + +hi DiffAdd term=bold +hi DiffAdd ctermbg=DarkBlue +hi DiffAdd guibg=DarkBlue + +hi DiffChange term=bold +hi DiffChange ctermbg=DarkMagenta +hi DiffChange guibg=DarkMagenta + +hi DiffDelete term=bold +hi DiffDelete ctermfg=Blue ctermbg=DarkCyan +hi DiffDelete gui=bold guifg=Blue guibg=DarkCyan + +hi Ignore ctermfg=LightGrey +hi Ignore guifg=grey90 + +hi IncSearch term=reverse +hi IncSearch cterm=reverse +hi IncSearch gui=reverse + +hi ModeMsg term=bold +hi ModeMsg cterm=bold +hi ModeMsg gui=bold + +hi StatusLine term=reverse,bold +hi StatusLine cterm=reverse,bold +hi StatusLine gui=reverse,bold + +hi StatusLineNC term=reverse +hi StatusLineNC cterm=reverse +hi StatusLineNC gui=reverse + +hi VertSplit term=reverse +hi VertSplit cterm=reverse +hi VertSplit gui=reverse + +hi Visual term=reverse +hi Visual cterm=reverse +hi Visual gui=reverse guifg=DarkGrey guibg=fg + +hi VisualNOS term=underline,bold +hi VisualNOS cterm=underline,bold +hi VisualNOS gui=underline,bold + +hi Todo gui=reverse + +" vim: sw=2 diff --git a/colors/freya.vim b/colors/freya.vim new file mode 100755 index 0000000..a8adbd4 --- /dev/null +++ b/colors/freya.vim @@ -0,0 +1,79 @@ +set background=dark + +hi clear + +if exists("syntax_on") + syntax reset +endif + +let colors_name = "freya" + +hi Normal ctermbg=0 ctermfg=7 cterm=none guibg=#2a2a2a guifg=#dcdccc gui=none + +hi Cursor guibg=fg guifg=bg gui=none +hi CursorColumn guibg=#3f3f3f gui=none +hi CursorLine guibg=#3f3f3f gui=none +hi DiffAdd guibg=#008b00 guifg=fg gui=none +hi DiffChange guibg=#00008b guifg=fg gui=none +hi DiffDelete guibg=#8b0000 guifg=fg gui=none +hi DiffText guibg=#0000cd guifg=fg gui=bold +hi Directory guibg=bg guifg=#d4b064 gui=none +hi ErrorMsg guibg=bg guifg=#f07070 gui=bold +hi FoldColumn ctermbg=bg guibg=bg guifg=#c2b680 gui=none +hi Folded guibg=#101010 guifg=#c2b680 gui=none +hi IncSearch guibg=#866a4f guifg=fg gui=none +hi LineNr guibg=bg guifg=#9f8f80 gui=none +hi ModeMsg guibg=bg guifg=fg gui=bold +hi MoreMsg guibg=bg guifg=#dabfa5 gui=bold +hi NonText ctermfg=8 guibg=bg guifg=#9f8f80 gui=bold +hi Pmenu guibg=#a78869 guifg=#000000 gui=none +hi PmenuSbar guibg=#B99F86 guifg=fg gui=none +hi PmenuSel guibg=#c0aa94 guifg=bg gui=none +hi PmenuThumb guibg=#f7f7f1 guifg=bg gui=none +hi Question guibg=bg guifg=#dabfa5 gui=bold +hi Search guibg=#c0aa94 guifg=bg gui=none +hi SignColumn ctermbg=bg guibg=bg guifg=#c2b680 gui=none +hi SpecialKey guibg=bg guifg=#d4b064 gui=none +if has("spell") + hi SpellBad guisp=#f07070 gui=undercurl + hi SpellCap guisp=#7070f0 gui=undercurl + hi SpellLocal guisp=#70f0f0 gui=undercurl + hi SpellRare guisp=#f070f0 gui=undercurl +endif +hi StatusLine ctermbg=7 ctermfg=0 guibg=#736559 guifg=#f7f7f1 gui=bold +hi StatusLineNC ctermbg=8 ctermfg=0 guibg=#564d43 guifg=#f7f7f1 gui=none +hi TabLine guibg=#564d43 guifg=#f7f7f1 gui=underline +hi TabLineFill guibg=#564d43 guifg=#f7f7f1 gui=underline +hi TabLineSel guibg=bg guifg=#f7f7f1 gui=bold +hi Title ctermbg=0 ctermfg=15 guifg=#f7f7f1 gui=bold +hi VertSplit ctermbg=7 ctermfg=0 guibg=#564d43 guifg=#f7f7f1 gui=none +if version >= 700 + hi Visual ctermbg=7 ctermfg=0 guibg=#5f5f5f gui=none +else + hi Visual ctermbg=7 ctermfg=0 guibg=#5f5f5f guifg=fg gui=none +endif +hi VisualNOS guibg=bg guifg=#c0aa94 gui=bold,underline +hi WarningMsg guibg=bg guifg=#f07070 gui=none +hi WildMenu guibg=#c0aa94 guifg=bg gui=bold + +hi Comment guibg=bg guifg=#c2b680 gui=none +hi Constant guibg=bg guifg=#afe091 gui=none +hi Error guibg=bg guifg=#f07070 gui=none +hi Identifier guibg=bg guifg=#dabfa5 gui=none +hi Ignore guibg=bg guifg=bg gui=none +hi lCursor guibg=#c0aa94 guifg=bg gui=none +hi MatchParen guibg=#008b8b gui=none +hi PreProc guibg=bg guifg=#c2aed0 gui=none +hi Special guibg=bg guifg=#d4b064 gui=none +hi Statement guibg=bg guifg=#e0af91 gui=bold +hi Todo guibg=#aed0ae guifg=bg gui=none +hi Type guibg=bg guifg=#dabfa5 gui=bold +hi Underlined guibg=bg guifg=#d4b064 gui=underline + +hi htmlBold ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=bold +hi htmlItalic ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=italic +hi htmlUnderline ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=underline +hi htmlBoldItalic ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=bold,italic +hi htmlBoldUnderline ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=bold,underline +hi htmlBoldUnderlineItalic ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=bold,underline,italic +hi htmlUnderlineItalic ctermbg=0 ctermfg=15 guibg=bg guifg=fg gui=underline,italic diff --git a/colors/fruit.vim b/colors/fruit.vim new file mode 100755 index 0000000..624b90f --- /dev/null +++ b/colors/fruit.vim @@ -0,0 +1,69 @@ +" Vim color file +" Maintainer: Tiza +" Last Change: 2002/08/28 Wed 00:28. +" version: 1.3 +" This color scheme uses a light background. + +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "fruit" + +hi Normal guifg=#404040 guibg=#f8f8f8 + +" Search +hi IncSearch gui=UNDERLINE guifg=#404040 guibg=#40ffff +hi Search gui=NONE guifg=#404040 guibg=#ffff60 + +" Messages +hi ErrorMsg gui=NONE guifg=#ff0000 guibg=#ffe4e4 +hi WarningMsg gui=NONE guifg=#ff0000 guibg=#ffe4e4 +hi ModeMsg gui=NONE guifg=#ff4080 guibg=NONE +hi MoreMsg gui=NONE guifg=#009070 guibg=NONE +hi Question gui=NONE guifg=#f030d0 guibg=NONE + +" Split area +hi StatusLine gui=BOLD guifg=#f8f8f8 guibg=#404040 +hi StatusLineNC gui=NONE guifg=#a4a4a4 guibg=#404040 +hi VertSplit gui=NONE guifg=#f8f8f8 guibg=#404040 +hi WildMenu gui=BOLD guifg=#f8f8f8 guibg=#ff4080 + +" Diff +hi DiffText gui=NONE guifg=#e04040 guibg=#ffd8d8 +hi DiffChange gui=NONE guifg=#408040 guibg=#d0f0d0 +hi DiffDelete gui=NONE guifg=#4848ff guibg=#ffd0ff +hi DiffAdd gui=NONE guifg=#4848ff guibg=#ffd0ff + +" Cursor +hi Cursor gui=NONE guifg=#0000ff guibg=#00e0ff +hi lCursor gui=NONE guifg=#f8f8f8 guibg=#8000ff +hi CursorIM gui=NONE guifg=#f8f8f8 guibg=#8000ff + +" Fold +hi Folded gui=NONE guifg=#20605c guibg=#b8e8dc +hi FoldColumn gui=NONE guifg=#40a098 guibg=#f0f0f0 + +" Other +hi Directory gui=NONE guifg=#0070b8 guibg=NONE +hi LineNr gui=NONE guifg=#acacac guibg=NONE +hi NonText gui=BOLD guifg=#00a0c0 guibg=#ececec +hi SpecialKey gui=NONE guifg=#4040ff guibg=NONE +hi Title gui=NONE guifg=#0050a0 guibg=#c0e8ff +hi Visual gui=NONE guifg=#484848 guibg=#e0e0e0 +" hi VisualNOS gui=NONE guifg=#484848 guibg=#e0e0e0 + +" Syntax group +hi Comment gui=NONE guifg=#ff4080 guibg=NONE +hi Constant gui=NONE guifg=#8016ff guibg=NONE +hi Error gui=BOLD guifg=#ffffff guibg=#ff4080 +hi Identifier gui=NONE guifg=#008888 guibg=NONE +hi Ignore gui=NONE guifg=#f8f8f8 guibg=NONE +hi PreProc gui=NONE guifg=#e06800 guibg=NONE +hi Special gui=NONE guifg=#4a9400 guibg=NONE +hi Statement gui=NONE guifg=#f030d0 guibg=NONE +hi Todo gui=UNDERLINE guifg=#ff0070 guibg=#ffe0f4 +hi Type gui=NONE guifg=#0070e6 guibg=NONE +hi Underlined gui=UNDERLINE guifg=fg guibg=NONE diff --git a/colors/fruity.vim b/colors/fruity.vim new file mode 100755 index 0000000..3c9a7df --- /dev/null +++ b/colors/fruity.vim @@ -0,0 +1,147 @@ +" +" Fruity Color Scheme +" =================== +" +" Author: Armin Ronacher +" Version: 0.2 +" +set background=dark + +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "fruity" + +" Default Colors +hi Normal guifg=#ffffff guibg=#111111 +hi NonText guifg=#444444 guibg=#000000 +hi Cursor guibg=#aaaaaa +hi lCursor guibg=#aaaaaa + +" Search +hi Search guifg=#800000 guibg=#ffae00 +hi IncSearch guifg=#800000 guibg=#ffae00 + +" Window Elements +hi StatusLine guifg=#ffffff guibg=#8090a0 gui=bold +hi StatusLineNC guifg=#506070 guibg=#a0b0c0 +hi VertSplit guifg=#a0b0c0 guibg=#a0b0c0 +hi Folded guifg=#111111 guibg=#8090a0 +hi IncSearch guifg=#708090 guibg=#f0e68c +hi Pmenu guifg=#ffffff guibg=#cb2f27 +hi SignColumn guibg=#111111 +hi CursorLine guibg=#181818 +hi LineNr guifg=#aaaaaa guibg=#222222 + +" Specials +hi Todo guifg=#e50808 guibg=#520000 gui=bold +hi Title guifg=#ffffff gui=bold +hi Special guifg=#fd8900 + +" Syntax Elements +hi String guifg=#0086d2 +hi Constant guifg=#0086d2 +hi Number guifg=#0086f7 gui=bold +hi Statement guifg=#fb660a gui=bold +hi Function guifg=#ff0086 gui=bold +hi PreProc guifg=#ff0007 gui=bold +hi Comment guifg=#00d2ff guibg=#0f140f gui=italic +hi Type guifg=#cdcaa9 gui=bold +hi Error guifg=#ffffff guibg=#ab0000 +hi Identifier guifg=#ff0086 gui=bold +hi Label guifg=#ff0086 + +" Python Highlighting for python.vim +hi pythonCoding guifg=#ff0086 +hi pythonRun guifg=#ff0086 +hi pythonBuiltinObj guifg=#2b6ba2 gui=bold +hi pythonBuiltinFunc guifg=#2b6ba2 gui=bold +hi pythonException guifg=#ee0000 gui=bold +hi pythonExClass guifg=#66cd66 gui=bold +hi pythonSpaceError guibg=#270000 +hi pythonDocTest guifg=#2f5f49 +hi pythonDocTest2 guifg=#3b916a +hi pythonFunction guifg=#ee0000 gui=bold +hi pythonClass guifg=#ff0086 gui=bold + +" JavaScript Highlighting +hi javaScript guifg=#ffffff +hi javaScriptRegexpString guifg=#aa6600 +hi javaScriptDocComment guifg=#aaaaaa +hi javaScriptCssStyles guifg=#dd7700 +hi javaScriptDomElemFuncs guifg=#66cd66 +hi javaScriptHtmlElemFuncs guifg=#dd7700 +hi javaScriptLabel guifg=#00bdec gui=italic +hi javaScriptPrototype guifg=#00bdec +hi javaScriptConditional guifg=#ff0007 gui=bold +hi javaScriptRepeat guifg=#ff0007 gui=bold +hi javaScriptFunction guifg=#ff0086 gui=bold + +" CSS Highlighting +hi cssIdentifier guifg=#66cd66 gui=bold +hi cssBraces guifg=#00bdec gui=bold + +" Ruby Highlighting +hi rubyFunction guifg=#0066bb gui=bold +hi rubyClass guifg=#ff0086 gui=bold +hi rubyModule guifg=#ff0086 gui=bold,underline +hi rubyKeyword guifg=#008800 gui=bold +hi rubySymbol guifg=#aa6600 +hi rubyIndentifier guifg=#008aff +hi rubyGlobalVariable guifg=#dd7700 +hi rubyConstant guifg=#5894d2 gui=bold +hi rubyBlockParameter guifg=#66cd66 +hi rubyPredefinedIdentifier guifg=#555555 gui=bold +hi rubyString guifg=#0086d2 +hi rubyStringDelimiter guifg=#dd7700 +hi rubySpaceError guibg=#270000 +hi rubyDocumentation guifg=#aaaaaa +hi rubyData guifg=#555555 + +" XML Highlighting +hi xmlTag guifg=#00bdec +hi xmlTagName guifg=#00bdec +hi xmlEndTag guifg=#00bdec +hi xmlNamespace guifg=#00bdec gui=underline +hi xmlAttribPunct guifg=#cccaa9 gui=bold +hi xmlEqual guifg=#cccaa9 gui=bold +hi xmlCdata guifg=#bf0945 gui=bold +hi xmlCdataCdata guifg=#ac1446 guibg=#23010c gui=none +hi xmlCdataStart guifg=#bf0945 gui=bold +hi xmlCdataEnd guifg=#bf0945 gui=bold + +" HTML Highlighting +hi htmlTag guifg=#00bdec gui=bold +hi htmlEndTag guifg=#00bdec gui=bold +hi htmlSpecialTagName guifg=#66cd66 +hi htmlTagName guifg=#66cd66 +hi htmlTagN guifg=#66cd66 +hi htmlEvent guifg=#ffffff + +" Django Highlighting +hi djangoTagBlock guifg=#ff0007 guibg=#200000 gui=bold +hi djangoVarBlock guifg=#ff0007 guibg=#200000 +hi djangoArgument guifg=#0086d2 guibg=#200000 +hi djangoStatement guifg=#fb660a guibg=#200000 gui=bold +hi djangoComment guifg=#008800 guibg=#002300 gui=italic +hi djangoFilter guifg=#ff0086 guibg=#200000 gui=italic + +" Jinja Highlighting +hi jinjaTagBlock guifg=#ff0007 guibg=#200000 gui=bold +hi jinjaVarBlock guifg=#ff0007 guibg=#200000 +hi jinjaString guifg=#0086d2 guibg=#200000 +hi jinjaNumber guifg=#bf0945 guibg=#200000 gui=bold +hi jinjaStatement guifg=#fb660a guibg=#200000 gui=bold +hi jinjaComment guifg=#008800 guibg=#002300 gui=italic +hi jinjaFilter guifg=#ff0086 guibg=#200000 +hi jinjaRaw guifg=#aaaaaa guibg=#200000 +hi jinjaOperator guifg=#ffffff guibg=#200000 +hi jinjaVariable guifg=#92cd35 guibg=#200000 +hi jinjaAttribute guifg=#dd7700 guibg=#200000 +hi jinjaSpecial guifg=#008ffd guibg=#200000 + +" ERuby Highlighting (for my eruby.vim) +hi erubyRubyDelim guifg=#2c8a16 gui=bold +hi erubyComment guifg=#4d9b3a gui=italic diff --git a/colors/golden.vim b/colors/golden.vim new file mode 100755 index 0000000..8cceaf7 --- /dev/null +++ b/colors/golden.vim @@ -0,0 +1,70 @@ +" vim: tw=0 ts=4 sw=4 +" Vim color file +" +" Creator: Ryan Phillips +" Credits: This color scheme originated from the idea of +" Jeffrey Bakker, the creator of webcpp (http://webcpp.sourceforge.net/). +" URL: http://www.trolocsis.com/vim/golden.vim +" + +hi clear +set background=dark +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "golden" +hi Normal ctermfg=yellow guifg=#ddbb00 guibg=black +hi Scrollbar ctermfg=Yellow guifg=#ddbb00 guibg=black +hi Menu ctermfg=darkyellow guifg=#ffddaa guibg=black +hi SpecialKey ctermfg=yellow term=bold cterm=bold guifg=#ffddaa +hi NonText ctermfg=LightBlue term=bold cterm=bold gui=bold guifg=#DBCA98 +hi Directory ctermfg=DarkYellow term=bold cterm=bold guifg=#ffddaa +hi ErrorMsg term=standout cterm=bold ctermfg=White ctermbg=Red guifg=White guibg=Red +hi Search term=reverse ctermfg=white ctermbg=red guifg=white guibg=Red +hi MoreMsg term=bold cterm=bold ctermfg=Yellow gui=bold guifg=#ddbb00 +hi ModeMsg term=bold ctermfg=DarkYellow cterm=bold gui=bold guifg=Black guibg=#ddbb00 +hi LineNr term=underline ctermfg=Brown cterm=bold guifg=#978345 +hi Question term=standout cterm=bold ctermfg=Brown gui=bold guifg=#ffddaa +hi StatusLine term=bold,reverse cterm=bold ctermfg=Black ctermbg=DarkGrey gui=bold guifg=#978345 guibg=#2E2E2E +hi StatusLineNC term=reverse ctermfg=white ctermbg=black guifg=grey guibg=#3E3E3E +hi Title term=bold cterm=bold ctermfg=brown gui=bold guifg=#DBCA98 +hi Visual term=reverse cterm=reverse gui=reverse +hi WarningMsg term=standout cterm=bold ctermfg=darkblue guifg=Red +hi Cursor guifg=bg guibg=#FF5E06 ctermbg=Brown +hi Comment term=bold cterm=bold ctermfg=brown guifg=#978345 +hi Constant term=underline cterm=bold ctermfg=red guifg=Red +hi Special term=bold cterm=bold ctermfg=red guifg=Orange +hi Identifier term=underline ctermfg=lightgray guifg=#DBCA98 +hi Statement term=bold cterm=bold ctermfg=lightgreen gui=bold guifg=#ffff60 +hi PreProc term=underline ctermfg=brown guifg=#ffddaa +hi Type term=underline cterm=bold ctermfg=lightgreen gui=bold guifg=#FFE13F +hi Error term=reverse ctermfg=darkcyan ctermbg=black guifg=Red guibg=Black +hi Todo term=standout ctermfg=black ctermbg=yellow guifg=#FFE13F guibg=#2E2E2E +hi VertSplit guifg=#2E2E2E guibg=#978345 ctermfg=black ctermbg=darkgrey +hi Folded guifg=orange guibg=#2E2E2E ctermfg=yellow + +hi link IncSearch Visual +hi link String Constant +hi link Character Constant +hi link Number Constant +hi link Boolean Constant +hi link Float Number +hi link Function Identifier +hi link Conditional Statement +hi link Repeat Statement +hi link Label Statement +hi link Operator Statement +hi link Keyword Statement +hi link Exception Statement +hi link Include PreProc +hi link Define PreProc +hi link Macro PreProc +hi link PreCondit PreProc +hi link StorageClass Type +hi link Structure Type +hi link Typedef Type +hi link Tag Special +hi link SpecialChar Special +hi link Delimiter Special +hi link SpecialComment Special +hi link Debug Special diff --git a/colors/guardian.vim b/colors/guardian.vim new file mode 100755 index 0000000..5bba649 --- /dev/null +++ b/colors/guardian.vim @@ -0,0 +1,103 @@ +" Vim color file +" Maintainer: Anders Korte +" Last Change: 6 Apr 2005 + +" Guardian color scheme 1.2 + +" Rich-syntax colors for source editing and other vimming. + +set background=dark +hi clear +syntax reset + +" Colors for the User Interface. + +hi Cursor guibg=#cc4455 guifg=white gui=bold ctermbg=4 ctermfg=15 +hi link CursorIM Cursor +hi Normal guibg=#332211 guifg=white gui=none ctermbg=0 ctermfg=15 +hi NonText guibg=#445566 guifg=#ffeecc gui=bold ctermbg=8 ctermfg=14 +hi Visual guibg=#557799 guifg=white gui=none ctermbg=9 ctermfg=15 + +hi Linenr guibg=bg guifg=#aaaaaa gui=none ctermbg=bg ctermfg=7 + +hi Directory guibg=bg guifg=#337700 gui=none ctermbg=bg ctermfg=10 + +hi IncSearch guibg=#0066cc guifg=white gui=none ctermbg=1 ctermfg=15 +hi link Seach IncSearch + +hi SpecialKey guibg=bg guifg=fg gui=none ctermbg=bg ctermfg=fg +hi Titled guibg=bg guifg=fg gui=none ctermbg=bg ctermfg=fg + +hi ErrorMsg guibg=bg guifg=#ff0000 gui=bold ctermbg=bg ctermfg=12 +hi ModeMsg guibg=bg guifg=#ffeecc gui=none ctermbg=bg ctermfg=14 +hi link MoreMsg ModeMsg +hi Question guibg=bg guifg=#ccffcc gui=bold ctermbg=bg ctermfg=10 +hi link WarningMsg ErrorMsg + +hi StatusLine guibg=#ffeecc guifg=black gui=bold ctermbg=14 ctermfg=0 +hi StatusLineNC guibg=#cc4455 guifg=white gui=none ctermbg=4 ctermfg=11 +hi VertSplit guibg=#cc4455 guifg=white gui=none ctermbg=4 ctermfg=11 + +hi DiffAdd guibg=#446688 guifg=fg gui=none ctermbg=1 ctermfg=fg +hi DiffChange guibg=#558855 guifg=fg gui=none ctermbg=2 ctermfg=fg +hi DiffDelete guibg=#884444 guifg=fg gui=none ctermbg=4 ctermfg=fg +hi DiffText guibg=#884444 guifg=fg gui=bold ctermbg=4 ctermfg=fg + +" Colors for Syntax Highlighting. + +hi Comment guibg=#334455 guifg=#dddddd gui=none ctermbg=8 ctermfg=7 + +hi Constant guibg=bg guifg=white gui=bold ctermbg=8 ctermfg=15 +hi String guibg=bg guifg=#ffffcc gui=italic ctermbg=bg ctermfg=14 +hi Character guibg=bg guifg=#ffffcc gui=bold ctermbg=bg ctermfg=14 +hi Number guibg=bg guifg=#bbddff gui=bold ctermbg=1 ctermfg=15 +hi Boolean guibg=bg guifg=#bbddff gui=none ctermbg=1 ctermfg=15 +hi Float guibg=bg guifg=#bbddff gui=bold ctermbg=1 ctermfg=15 + +hi Identifier guibg=bg guifg=#ffddaa gui=bold ctermbg=bg ctermfg=12 +hi Function guibg=bg guifg=#ffddaa gui=bold ctermbg=bg ctermfg=12 +hi Statement guibg=bg guifg=#ffffcc gui=bold ctermbg=bg ctermfg=14 + +hi Conditional guibg=bg guifg=#ff6666 gui=bold ctermbg=bg ctermfg=12 +hi Repeat guibg=bg guifg=#ff9900 gui=bold ctermbg=4 ctermfg=14 +hi Label guibg=bg guifg=#ffccff gui=bold ctermbg=bg ctermfg=13 +hi Operator guibg=bg guifg=#cc9966 gui=bold ctermbg=6 ctermfg=15 +hi Keyword guibg=bg guifg=#66ffcc gui=bold ctermbg=bg ctermfg=10 +hi Exception guibg=bg guifg=#66ffcc gui=bold ctermbg=bg ctermfg=10 + +hi PreProc guibg=bg guifg=#ffcc99 gui=bold ctermbg=4 ctermfg=14 +hi Include guibg=bg guifg=#99cc99 gui=bold ctermbg=bg ctermfg=10 +hi link Define Include +hi link Macro Include +hi link PreCondit Include + +hi Type guibg=bg guifg=#ff7788 gui=bold ctermbg=bg ctermfg=12 +hi StorageClass guibg=bg guifg=#99cc99 gui=bold ctermbg=bg ctermfg=10 +hi Structure guibg=bg guifg=#99ff99 gui=bold ctermbg=bg ctermfg=10 +hi Typedef guibg=bg guifg=#99cc99 gui=italic ctermbg=bg ctermfg=10 + +hi Special guibg=bg guifg=#bbddff gui=bold ctermbg=1 ctermfg=15 +hi SpecialChar guibg=bg guifg=#bbddff gui=bold ctermbg=1 ctermfg=15 +hi Tag guibg=bg guifg=#bbddff gui=bold ctermbg=1 ctermfg=15 +hi Delimiter guibg=bg guifg=fg gui=bold ctermbg=1 ctermfg=fg +hi SpecialComment guibg=#334455 guifg=#dddddd gui=italic ctermbg=1 ctermfg=15 +hi Debug guibg=bg guifg=#ff9999 gui=none ctermbg=8 ctermfg=12 + +hi Underlined guibg=bg guifg=#99ccff gui=underline ctermbg=bg ctermfg=9 cterm=underline + +hi Title guibg=#445566 guifg=white gui=bold ctermbg=1 ctermfg=15 +hi Ignore guibg=bg guifg=#cccccc gui=italic ctermbg=bg ctermfg=8 +hi Error guibg=#ff0000 guifg=white gui=bold ctermbg=12 ctermfg=15 +hi Todo guibg=#556677 guifg=#ff0000 gui=bold ctermbg=1 ctermfg=12 + +hi htmlH2 guibg=bg guifg=fg gui=bold ctermbg=8 ctermfg=fg +hi link htmlH3 htmlH2 +hi link htmlH4 htmlH3 +hi link htmlH5 htmlH4 +hi link htmlH6 htmlH5 + +" And finally. + +let g:colors_name = "Guardian" +let colors_name = "Guardian" + diff --git a/colors/habilight.vim b/colors/habilight.vim new file mode 100755 index 0000000..ea294f5 --- /dev/null +++ b/colors/habilight.vim @@ -0,0 +1,138 @@ +" Vim color file +" A version of nuvola.vim colorscheme, original by Dr. J. Pfefferl +" I changed some colors and added some highlights for C and Vim 7 + +" vim: tw=0 ts=4 sw=4 +" Maintainer: Christian Habermann +" Email: christian( at )habermann-net( point )de +" Version: 1.2 +" History: 1.2: nicer colors for paren matching +" 1.1: Vim 7 support added (completion, spell checker, paren, tabs) +" 1.0: initial version +" +" Intro {{{1 +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "habiLight" + +" Normal {{{1 +hi Normal ctermfg=black ctermbg=NONE guifg=black guibg=#F9F5F9 + +" Search {{{1 +hi IncSearch cterm=UNDERLINE ctermfg=Black ctermbg=brown gui=UNDERLINE guifg=Black guibg=#FFE568 +hi Search term=reverse cterm=UNDERLINE ctermfg=Black ctermbg=brown gui=NONE guifg=Black guibg=#FFE568 + +" Messages {{{1 +hi ErrorMsg gui=BOLD guifg=#EB1513 guibg=NONE +hi! link WarningMsg ErrorMsg +hi ModeMsg gui=BOLD guifg=#0070ff guibg=NONE +hi MoreMsg guibg=NONE guifg=seagreen +hi! link Question MoreMsg + +" Split area {{{1 +hi StatusLine term=BOLD,reverse cterm=NONE ctermfg=Yellow ctermbg=DarkGray gui=BOLD guibg=#56A0EE guifg=white +hi StatusLineNC gui=NONE guibg=#56A0EE guifg=#E9E9F4 +hi! link VertSplit StatusLineNC +hi WildMenu gui=UNDERLINE guifg=#56A0EE guibg=#E9E9F4 + +" Diff {{{1 +hi DiffText gui=NONE guifg=#f83010 guibg=#ffeae0 +hi DiffChange gui=NONE guifg=#006800 guibg=#d0ffd0 +hi DiffDelete gui=NONE guifg=#2020ff guibg=#c8f2ea +hi! link DiffAdd DiffDelete + +" Cursor {{{1 +hi Cursor gui=none guifg=black guibg=orange +"hi lCursor gui=NONE guifg=#f8f8f8 guibg=#8000ff +hi CursorIM gui=NONE guifg=#f8f8f8 guibg=#8000ff + +" Fold {{{1 +hi Folded gui=NONE guibg=#B5EEB5 guifg=black +"hi FoldColumn gui=NONE guibg=#9FD29F guifg=black +hi! link FoldColumn Folded + +" Other {{{1 +hi Directory gui=NONE guifg=#0000ff guibg=NONE +hi LineNr gui=NONE guifg=#8080a0 guibg=NONE +hi NonText gui=BOLD guifg=#4000ff guibg=#EFEFF7 +"hi SpecialKey gui=NONE guifg=#A35B00 guibg=NONE +hi Title gui=BOLD guifg=#1014AD guibg=NONE +hi Visual term=reverse ctermfg=yellow ctermbg=black gui=NONE guifg=Black guibg=#BDDFFF +hi VisualNOS term=reverse ctermfg=yellow ctermbg=black gui=UNDERLINE guifg=Black guibg=#BDDFFF + +" Syntax group {{{1 +hi Comment term=BOLD ctermfg=darkgray guifg=darkcyan +hi Constant term=UNDERLINE ctermfg=red guifg=#B91F49 +hi Error term=REVERSE ctermfg=15 ctermbg=9 guibg=Red guifg=White +hi Identifier term=UNDERLINE ctermfg=Blue guifg=Blue +hi Number term=UNDERLINE ctermfg=red gui=NONE guifg=#00C226 +hi PreProc term=UNDERLINE ctermfg=darkblue guifg=#1071CE +hi Special term=BOLD ctermfg=darkmagenta guifg=red2 +hi Statement term=BOLD ctermfg=DarkRed gui=NONE guifg=#F06F00 +hi Tag term=BOLD ctermfg=DarkGreen guifg=DarkGreen +hi Todo term=STANDOUT ctermbg=Yellow ctermfg=blue guifg=Blue guibg=Yellow +hi Type term=UNDERLINE ctermfg=Blue gui=NONE guifg=Blue +hi! link String Constant +hi! link Character Constant +hi! link Boolean Constant +hi! link Float Number +hi! link Function Identifier +hi! link Conditional Statement +hi! link Repeat Statement +hi! link Label Statement +hi! link Operator Statement +hi! link Keyword Statement +hi! link Exception Statement +hi! link Include PreProc +hi! link Define PreProc +hi! link Macro PreProc +hi! link PreCondit PreProc +hi! link StorageClass Type +hi! link Structure Type +hi! link Typedef Type +hi! link SpecialChar Special +hi! link Delimiter Special +hi! link SpecialComment Special +hi! link Debug Special + +" HTML {{{1 +hi htmlLink gui=UNDERLINE guifg=#0000ff guibg=NONE +hi htmlBold gui=BOLD +hi htmlBoldItalic gui=BOLD,ITALIC +hi htmlBoldUnderline gui=BOLD,UNDERLINE +hi htmlBoldUnderlineItalic gui=BOLD,UNDERLINE,ITALIC +hi htmlItalic gui=ITALIC +hi htmlUnderline gui=UNDERLINE +hi htmlUnderlineItalic gui=UNDERLINE,ITALIC + +" Tabs {{{1 +highlight TabLine term=underline cterm=underline ctermfg=0 ctermbg=7 gui=underline guibg=LightGrey +highlight TabLineFill term=reverse cterm=reverse gui=reverse +highlight TabLineSel term=bold cterm=bold gui=bold + +" Spell Checker {{{1 +if v:version >= 700 + highlight SpellBad term=reverse ctermbg=12 gui=undercurl guisp=Red + highlight SpellCap term=reverse ctermbg=9 gui=undercurl guisp=Blue + highlight SpellRare term=reverse ctermbg=13 gui=undercurl guisp=Magenta + highlight SpellLocale term=underline ctermbg=11 gui=undercurl guisp=DarkCyan +endif + +" Completion {{{1 +highlight Pmenu ctermbg=13 guifg=Black guibg=#BDDFFF +highlight PmenuSel ctermbg=7 guifg=Black guibg=Orange +highlight PmenuSbar ctermbg=7 guifg=#CCCCCC guibg=#CCCCCC +highlight PmenuThumb cterm=reverse gui=reverse guifg=Black guibg=#AAAAAA + +" Misc {{{1 +highlight KDE guifg=magenta gui=NONE +highlight mySpecialSymbols guifg=magenta gui=NONE + + +highlight MatchParen term=reverse ctermbg=11 gui=bold guibg=#B5EEB5 guifg=black + + +" vim600:foldmethod=marker diff --git a/colors/herald.vim b/colors/herald.vim new file mode 100755 index 0000000..23bab56 --- /dev/null +++ b/colors/herald.vim @@ -0,0 +1,385 @@ +" Vim color file +" Name: herald.vim +" Author: Fabio Cevasco +" Version: 0.2.0 +" Notes: Supports 8, 16, 256 and 16,777,216 (RGB) color modes + +hi clear + +if exists("syntax_on") + syntax reset +endif + +let colors_name = "herald" + +set background=dark + +" Set some syntax-related variables +let ruby_operators = 1 + +if has("gui_running") + + " -> Text; Miscellaneous + hi Normal guibg=#1F1F1F guifg=#D0D0D0 gui=none + hi SpecialKey guibg=#1F1F1F guifg=#E783E9 gui=none + hi VertSplit guibg=#1F1F1F guifg=#FFEE68 gui=none + hi SignColumn guibg=#1F1F1F guifg=#BF81FA gui=none + hi NonText guibg=#1F1F1F guifg=#FC6984 gui=none + hi Directory guibg=#1F1F1F guifg=#FFEE68 gui=none + hi Title guibg=#1F1F1F guifg=#6DF584 gui=bold + + " -> Cursor + hi Cursor guibg=#FFEE68 guifg=#1F1F1F gui=none + hi CursorIM guibg=#FFEE68 guifg=#1F1F1F gui=none + hi CursorColumn guibg=#000000 gui=none + hi CursorLine guibg=#000000 gui=none + + " -> Folding + hi FoldColumn guibg=#001336 guifg=#003DAD gui=none + hi Folded guibg=#001336 guifg=#003DAD gui=none + + " -> Line info + hi LineNr guibg=#000000 guifg=#696567 gui=none + hi StatusLine guibg=#000000 guifg=#696567 gui=none + hi StatusLineNC guibg=#25365a guifg=#696567 gui=none + + " -> Messages + hi ErrorMsg guibg=#A32024 guifg=#D0D0D0 gui=none + hi Question guibg=#1F1F1F guifg=#FFA500 gui=none + hi WarningMsg guibg=#FFA500 guifg=#000000 gui=none + hi MoreMsg guibg=#1F1F1F guifg=#FFA500 gui=none + hi ModeMsg guibg=#1F1F1F guifg=#FFA500 gui=none + + " -> Search + hi Search guibg=#696567 guifg=#FFEE68 gui=none + hi IncSearch guibg=#696567 guifg=#FFEE68 gui=none + + " -> Diff + hi DiffAdd guibg=#006124 guifg=#ED9000 gui=none + hi DiffChange guibg=#0B294A guifg=#A36000 gui=none + hi DiffDelete guibg=#081F38 guifg=#ED9000 gui=none + hi DiffText guibg=#12457D guifg=#ED9000 gui=underline + + " -> Menu + hi Pmenu guibg=#140100 guifg=#660300 gui=none + hi PmenuSel guibg=#F17A00 guifg=#4C0200 gui=none + hi PmenuSbar guibg=#430300 gui=none + hi PmenuThumb guibg=#720300 gui=none + hi PmenuSel guibg=#F17A00 guifg=#4C0200 gui=none + + " -> Tabs + hi TabLine guibg=#141414 guifg=#1F1F1F gui=none + hi TabLineFill guibg=#000000 gui=none + hi TabLineSel guibg=#1F1F1F guifg=#D0D0D0 gui=bold + " + " -> Visual Mode + hi Visual guibg=#000000 guifg=#FFB539 gui=none + hi VisualNOS guibg=#000000 guifg=#696567 gui=none + + " -> Code + hi Comment guibg=#1F1F1F guifg=#696567 gui=none + hi Constant guibg=#1F1F1F guifg=#6DF584 gui=none + hi String guibg=#1F1F1F guifg=#FFB539 gui=none + hi Error guibg=#1F1F1F guifg=#FC4234 gui=none + hi Identifier guibg=#1F1F1F guifg=#70BDF1 gui=none + hi Function guibg=#1F1F1F guifg=#90CBF1 gui=none + hi Ignore guibg=#1F1F1F guifg=#1F1F1F gui=none + hi MatchParen guibg=#FFA500 guifg=#1F1F1F gui=none + hi PreProc guibg=#1F1F1F guifg=#BF81FA gui=none + hi Special guibg=#1F1F1F guifg=#FFEE68 gui=none + hi Todo guibg=#1F1F1F guifg=#FC4234 gui=bold + hi Underlined guibg=#1F1F1F guifg=#FC4234 gui=underline + hi Statement guibg=#1F1F1F guifg=#E783E9 gui=none + hi Operator guibg=#1F1F1F guifg=#FC6984 gui=none + hi Delimiter guibg=#1F1F1F guifg=#FC6984 gui=none + hi Type guibg=#1F1F1F guifg=#FFEE68 gui=none + hi Exception guibg=#1F1F1F guifg=#FC4234 gui=none + + " -> HTML-specific + hi htmlBold guibg=#1F1F1F guifg=#D0D0D0 gui=bold + hi htmlBoldItalic guibg=#1F1F1F guifg=#D0D0D0 gui=bold,italic + hi htmlBoldUnderline guibg=#1F1F1F guifg=#D0D0D0 gui=bold,underline + hi htmlBoldUnderlineItalic guibg=#1F1F1F guifg=#D0D0D0 gui=bold,underline,italic + hi htmlItalic guibg=#1F1F1F guifg=#D0D0D0 gui=italic + hi htmlUnderline guibg=#1F1F1F guifg=#D0D0D0 gui=underline + hi htmlUnderlineItalic guibg=#1F1F1F guifg=#D0D0D0 gui=underline,italic + +elseif &t_Co == 256 + + " -> Text; Miscellaneous + hi Normal ctermbg=234 ctermfg=252 cterm=none + hi SpecialKey ctermbg=234 ctermfg=176 cterm=none + hi VertSplit ctermbg=234 ctermfg=227 cterm=none + hi SignColumn ctermbg=234 ctermfg=141 cterm=none + hi NonText ctermbg=234 ctermfg=204 cterm=none + hi Directory ctermbg=234 ctermfg=227 cterm=none + hi Title ctermbg=234 ctermfg=84 cterm=bold + + " -> Cursor + hi Cursor ctermbg=227 ctermfg=234 cterm=none + hi CursorIM ctermbg=227 ctermfg=234 cterm=none + hi CursorColumn ctermbg=0 cterm=none + hi CursorLine ctermbg=0 cterm=none + + " -> Folding + hi FoldColumn ctermbg=234 ctermfg=25 cterm=none + hi Folded ctermbg=234 ctermfg=25 cterm=none + + " -> Line info + hi LineNr ctermbg=0 ctermfg=241 cterm=none + hi StatusLine ctermbg=0 ctermfg=241 cterm=none + hi StatusLineNC ctermbg=237 ctermfg=241 cterm=none + + " -> Messages + hi ErrorMsg ctermbg=124 ctermfg=252 cterm=none + hi Question ctermbg=234 ctermfg=214 cterm=none + hi WarningMsg ctermbg=214 ctermfg=0 cterm=none + hi MoreMsg ctermbg=234 ctermfg=214 cterm=none + hi ModeMsg ctermbg=234 ctermfg=214 cterm=none + + " -> Search + hi Search ctermbg=241 ctermfg=227 cterm=none + hi IncSearch ctermbg=241 ctermfg=227 cterm=none + + " -> Diff + hi DiffAdd ctermbg=22 ctermfg=208 cterm=none + hi DiffChange ctermbg=235 ctermfg=130 cterm=none + hi DiffDelete ctermbg=234 ctermfg=208 cterm=none + hi DiffText ctermbg=24 ctermfg=208 cterm=underline + + " -> Menu + hi Pmenu ctermbg=0 ctermfg=52 cterm=none + hi PmenuSel ctermbg=208 ctermfg=52 cterm=none + hi PmenuSbar ctermbg=52 cterm=none + hi PmenuThumb ctermbg=52 cterm=none + hi PmenuSel ctermbg=208 ctermfg=52 cterm=none + + " -> Tabs + hi TabLine ctermbg=233 ctermfg=234 cterm=none + hi TabLineFill ctermbg=0 cterm=none + hi TabLineSel ctermbg=234 ctermfg=252 cterm=bold + " + " -> Visual Mode + hi Visual ctermbg=0 ctermfg=215 cterm=none + hi VisualNOS ctermbg=0 ctermfg=241 cterm=none + + " -> Code + hi Comment ctermbg=234 ctermfg=241 cterm=none + hi Constant ctermbg=234 ctermfg=84 cterm=none + hi String ctermbg=234 ctermfg=215 cterm=none + hi Error ctermbg=234 ctermfg=203 cterm=none + hi Identifier ctermbg=234 ctermfg=75 cterm=none + hi Function ctermbg=234 ctermfg=117 cterm=none + hi Ignore ctermbg=234 ctermfg=234 cterm=none + hi MatchParen ctermbg=214 ctermfg=234 cterm=none + hi PreProc ctermbg=234 ctermfg=141 cterm=none + hi Special ctermbg=234 ctermfg=227 cterm=none + hi Todo ctermbg=234 ctermfg=203 cterm=bold + hi Underlined ctermbg=234 ctermfg=203 cterm=underline + hi Statement ctermbg=234 ctermfg=176 cterm=none + hi Operator ctermbg=234 ctermfg=204 cterm=none + hi Delimiter ctermbg=234 ctermfg=204 cterm=none + hi Type ctermbg=234 ctermfg=227 cterm=none + hi Exception ctermbg=234 ctermfg=203 cterm=none + + " -> HTML-specific + hi htmlBold ctermbg=234 ctermfg=252 cterm=bold + hi htmlBoldItalic ctermbg=234 ctermfg=252 cterm=bold,italic + hi htmlBoldUnderline ctermbg=234 ctermfg=252 cterm=bold,underline + hi htmlBoldUnderlineItalic ctermbg=234 ctermfg=252 cterm=bold,underline,italic + hi htmlItalic ctermbg=234 ctermfg=252 cterm=italic + hi htmlUnderline ctermbg=234 ctermfg=252 cterm=underline + hi htmlUnderlineItalic ctermbg=234 ctermfg=252 cterm=underline,italic + +elseif &t_Co == 16 + + " -> Text; Miscellaneous + hi Normal ctermbg=8 ctermfg=15 cterm=none + hi SpecialKey ctermbg=8 ctermfg=5 cterm=none + hi VertSplit ctermbg=8 ctermfg=14 cterm=none + hi SignColumn ctermbg=8 ctermfg=5 cterm=none + hi NonText ctermbg=8 ctermfg=4 cterm=none + hi Directory ctermbg=8 ctermfg=14 cterm=none + hi Title ctermbg=8 ctermfg=10 cterm=bold + + " -> Cursor + hi Cursor ctermbg=14 ctermfg=8 cterm=none + hi CursorIM ctermbg=14 ctermfg=8 cterm=none + hi CursorColumn ctermbg=0 cterm=none + hi CursorLine ctermbg=0 cterm=none + + " -> Folding + hi FoldColumn ctermbg=0 ctermfg=1 cterm=none + hi Folded ctermbg=0 ctermfg=1 cterm=none + + " -> Line info + hi LineNr ctermbg=0 ctermfg=7 cterm=none + hi StatusLine ctermbg=0 ctermfg=7 cterm=none + hi StatusLineNC ctermbg=0 ctermfg=7 cterm=none + + " -> Messages + hi ErrorMsg ctermbg=4 ctermfg=7 cterm=none + hi Question ctermbg=8 ctermfg=14 cterm=none + hi WarningMsg ctermbg=14 ctermfg=0 cterm=none + hi MoreMsg ctermbg=8 ctermfg=14 cterm=none + hi ModeMsg ctermbg=8 ctermfg=14 cterm=none + + " -> Search + hi Search ctermbg=7 ctermfg=14 cterm=none + hi IncSearch ctermbg=7 ctermfg=14 cterm=none + + " -> Diff + hi DiffAdd ctermbg=0 ctermfg=10 cterm=none + hi DiffChange ctermbg=0 ctermfg=14 cterm=none + hi DiffDelete ctermbg=0 ctermfg=12 cterm=none + hi DiffText ctermbg=1 ctermfg=14 cterm=underline + + " -> Menu + hi Pmenu ctermbg=0 ctermfg=4 cterm=none + hi PmenuSel ctermbg=14 ctermfg=4 cterm=none + hi PmenuSbar ctermbg=0 cterm=none + hi PmenuThumb ctermbg=4 cterm=none + hi PmenuSel ctermbg=14 ctermfg=4 cterm=none + + " -> Tabs + hi TabLine ctermbg=7 ctermfg=8 cterm=none + hi TabLineFill ctermbg=0 cterm=none + hi TabLineSel ctermbg=8 ctermfg=7 cterm=bold + " + " -> Visual Mode + hi Visual ctermbg=0 ctermfg=14 cterm=none + hi VisualNOS ctermbg=0 ctermfg=7 cterm=none + + " -> Code + hi Comment ctermbg=8 ctermfg=7 cterm=none + hi Constant ctermbg=8 ctermfg=10 cterm=none + hi String ctermbg=8 ctermfg=6 cterm=none + hi Error ctermbg=8 ctermfg=4 cterm=none + hi Identifier ctermbg=8 ctermfg=11 cterm=none + hi Function ctermbg=8 ctermfg=11 cterm=none + hi Ignore ctermbg=8 ctermfg=8 cterm=none + hi MatchParen ctermbg=14 ctermfg=8 cterm=none + hi PreProc ctermbg=8 ctermfg=5 cterm=none + hi Special ctermbg=8 ctermfg=14 cterm=none + hi Todo ctermbg=8 ctermfg=12 cterm=bold + hi Underlined ctermbg=8 ctermfg=12 cterm=underline + hi Statement ctermbg=8 ctermfg=13 cterm=none + hi Operator ctermbg=8 ctermfg=4 cterm=none + hi Delimiter ctermbg=8 ctermfg=4 cterm=none + hi Type ctermbg=8 ctermfg=14 cterm=none + hi Exception ctermbg=8 ctermfg=12 cterm=none + + " -> HTML-specific + hi htmlBold ctermbg=8 ctermfg=7 cterm=bold + hi htmlBoldItalic ctermbg=8 ctermfg=7 cterm=bold,italic + hi htmlBoldUnderline ctermbg=8 ctermfg=7 cterm=bold,underline + hi htmlBoldUnderlineItalic ctermbg=8 ctermfg=7 cterm=bold,underline,italic + hi htmlItalic ctermbg=8 ctermfg=7 cterm=italic + hi htmlUnderline ctermbg=8 ctermfg=7 cterm=underline + hi htmlUnderlineItalic ctermbg=8 ctermfg=7 cterm=underline,italic + + +elseif &t_Co == 8 + + " -> Text; Miscellaneous + hi Normal ctermbg=8 ctermfg=7 cterm=none + hi SpecialKey ctermbg=8 ctermfg=5 cterm=none + hi VertSplit ctermbg=8 ctermfg=6 cterm=none + hi SignColumn ctermbg=8 ctermfg=5 cterm=none + hi NonText ctermbg=8 ctermfg=4 cterm=none + hi Directory ctermbg=8 ctermfg=6 cterm=none + hi Title ctermbg=8 ctermfg=2 cterm=bold + + " -> Cursor + hi Cursor ctermbg=6 ctermfg=8 cterm=none + hi CursorIM ctermbg=6 ctermfg=8 cterm=none + hi CursorColumn ctermbg=0 cterm=none + hi CursorLine ctermbg=0 cterm=none + + " -> Folding + hi FoldColumn ctermbg=0 ctermfg=1 cterm=none + hi Folded ctermbg=0 ctermfg=1 cterm=none + + " -> Line info + hi LineNr ctermbg=0 ctermfg=7 cterm=none + hi StatusLine ctermbg=0 ctermfg=7 cterm=none + hi StatusLineNC ctermbg=0 ctermfg=7 cterm=none + + " -> Messages + hi ErrorMsg ctermbg=4 ctermfg=7 cterm=none + hi Question ctermbg=8 ctermfg=6 cterm=none + hi WarningMsg ctermbg=6 ctermfg=0 cterm=none + hi MoreMsg ctermbg=8 ctermfg=6 cterm=none + hi ModeMsg ctermbg=8 ctermfg=6 cterm=none + + " -> Search + hi Search ctermbg=7 ctermfg=6 cterm=none + hi IncSearch ctermbg=7 ctermfg=6 cterm=none + + " -> Diff + hi DiffAdd ctermbg=0 ctermfg=2 cterm=none + hi DiffChange ctermbg=0 ctermfg=6 cterm=none + hi DiffDelete ctermbg=0 ctermfg=4 cterm=none + hi DiffText ctermbg=1 ctermfg=6 cterm=underline + + " -> Menu + hi Pmenu ctermbg=0 ctermfg=4 cterm=none + hi PmenuSel ctermbg=6 ctermfg=4 cterm=none + hi PmenuSbar ctermbg=0 cterm=none + hi PmenuThumb ctermbg=4 cterm=none + hi PmenuSel ctermbg=6 ctermfg=4 cterm=none + + " -> Tabs + hi TabLine ctermbg=7 ctermfg=8 cterm=none + hi TabLineFill ctermbg=0 cterm=none + hi TabLineSel ctermbg=8 ctermfg=7 cterm=bold + " + " -> Visual Mode + hi Visual ctermbg=0 ctermfg=6 cterm=none + hi VisualNOS ctermbg=0 ctermfg=7 cterm=none + + " -> Code + hi Comment ctermbg=8 ctermfg=7 cterm=none + hi Constant ctermbg=8 ctermfg=2 cterm=none + hi String ctermbg=8 ctermfg=6 cterm=none + hi Error ctermbg=8 ctermfg=4 cterm=none + hi Identifier ctermbg=8 ctermfg=3 cterm=none + hi Function ctermbg=8 ctermfg=3 cterm=none + hi Ignore ctermbg=8 ctermfg=8 cterm=none + hi MatchParen ctermbg=6 ctermfg=8 cterm=none + hi PreProc ctermbg=8 ctermfg=5 cterm=none + hi Special ctermbg=8 ctermfg=6 cterm=none + hi Todo ctermbg=8 ctermfg=4 cterm=bold + hi Underlined ctermbg=8 ctermfg=4 cterm=underline + hi Statement ctermbg=8 ctermfg=5 cterm=none + hi Operator ctermbg=8 ctermfg=4 cterm=none + hi Delimiter ctermbg=8 ctermfg=4 cterm=none + hi Type ctermbg=8 ctermfg=6 cterm=none + hi Exception ctermbg=8 ctermfg=4 cterm=none + + " -> HTML-specific + hi htmlBold ctermbg=8 ctermfg=7 cterm=bold + hi htmlBoldItalic ctermbg=8 ctermfg=7 cterm=bold,italic + hi htmlBoldUnderline ctermbg=8 ctermfg=7 cterm=bold,underline + hi htmlBoldUnderlineItalic ctermbg=8 ctermfg=7 cterm=bold,underline,italic + hi htmlItalic ctermbg=8 ctermfg=7 cterm=italic + hi htmlUnderline ctermbg=8 ctermfg=7 cterm=underline + hi htmlUnderlineItalic ctermbg=8 ctermfg=7 cterm=underline,italic + +endif + +hi! default link bbcodeBold htmlBold +hi! default link bbcodeBoldItalic htmlBoldItalic +hi! default link bbcodeBoldItalicUnderline htmlBoldUnderlineItalic +hi! default link bbcodeBoldUnderline htmlBoldUnderline +hi! default link bbcodeItalic htmlItalic +hi! default link bbcodeItalicUnderline htmlUnderlineItalic +hi! default link bbcodeUnderline htmlUnderline + +" Spellcheck formatting +if has("spell") + hi SpellBad guisp=#FC4234 gui=undercurl + hi SpellCap guisp=#70BDF1 gui=undercurl + hi SpellLocal guisp=#FFEE68 gui=undercurl + hi SpellRare guisp=#6DF584 gui=undercurl +endif diff --git a/colors/impact.vim b/colors/impact.vim new file mode 100755 index 0000000..507ff3d --- /dev/null +++ b/colors/impact.vim @@ -0,0 +1,66 @@ +" Vim color file +" Maintainer: Shirk +" Last Change: 19 September 2005 - 0.2 +" URL: trinity.gentoofreaks.org + +" cool help screens +" :he group-name +" :he highlight-groups +" :he cterm-colors + +set background=dark "or light +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="impact" + +if exists("g:impact_transbg") + hi Normal ctermfg=LightGray ctermbg=none + hi NonText ctermfg=DarkGray ctermbg=none + + hi Statement ctermfg=Blue ctermbg=none + hi Comment ctermfg=DarkGray ctermbg=none cterm=bold term=bold + hi Constant ctermfg=DarkCyan ctermbg=none + hi Identifier ctermfg=Cyan ctermbg=none + hi Type ctermfg=DarkGreen ctermbg=none + hi Folded ctermfg=DarkGreen ctermbg=none cterm=underline term=none + hi Special ctermfg=Blue ctermbg=none + hi PreProc ctermfg=LightGray ctermbg=none cterm=bold term=bold + hi Scrollbar ctermfg=Blue ctermbg=none + hi Cursor ctermfg=white ctermbg=none + hi ErrorMsg ctermfg=Red ctermbg=none cterm=bold term=bold + hi WarningMsg ctermfg=Yellow ctermbg=none + hi VertSplit ctermfg=White ctermbg=none + hi Directory ctermfg=Cyan ctermbg=DarkBlue + hi Visual ctermfg=White ctermbg=DarkGray cterm=underline term=none + hi Title ctermfg=White ctermbg=DarkBlue + + hi StatusLine term=bold cterm=bold,underline ctermfg=White ctermbg=Black + hi StatusLineNC term=bold cterm=bold,underline ctermfg=Gray ctermbg=Black + hi LineNr term=bold cterm=bold ctermfg=White ctermbg=DarkGray +else + hi Normal ctermfg=LightGray ctermbg=Black + hi NonText ctermfg=DarkGray ctermbg=Black + + hi Statement ctermfg=Blue ctermbg=Black + hi Comment ctermfg=DarkGray ctermbg=Black cterm=bold term=bold + hi Constant ctermfg=DarkCyan ctermbg=Black + hi Identifier ctermfg=Cyan ctermbg=Black + hi Type ctermfg=DarkGreen ctermbg=Black + hi Folded ctermfg=DarkGreen ctermbg=Black cterm=underline term=none + hi Special ctermfg=Blue ctermbg=Black + hi PreProc ctermfg=LightGray ctermbg=Black cterm=bold term=bold + hi Scrollbar ctermfg=Blue ctermbg=Black + hi Cursor ctermfg=white ctermbg=Black + hi ErrorMsg ctermfg=Red ctermbg=Black cterm=bold term=bold + hi WarningMsg ctermfg=Yellow ctermbg=Black + hi VertSplit ctermfg=White ctermbg=Black + hi Directory ctermfg=Cyan ctermbg=DarkBlue + hi Visual ctermfg=White ctermbg=DarkGray cterm=underline term=none + hi Title ctermfg=White ctermbg=DarkBlue + + hi StatusLine term=bold cterm=bold,underline ctermfg=White ctermbg=Black + hi StatusLineNC term=bold cterm=bold,underline ctermfg=Gray ctermbg=Black + hi LineNr term=bold cterm=bold ctermfg=White ctermbg=DarkGray +endif diff --git a/colors/inkpot.vim b/colors/inkpot.vim new file mode 100755 index 0000000..c6ecb46 --- /dev/null +++ b/colors/inkpot.vim @@ -0,0 +1,216 @@ +" Vim color file +" Name: inkpot.vim +" Maintainer: Ciaran McCreesh +" Homepage: http://github.com/ciaranm/inkpot/ +" +" This should work in the GUI, rxvt-unicode (88 colour mode) and xterm (256 +" colour mode). It won't work in 8/16 colour terminals. +" +" To use a black background, :let g:inkpot_black_background = 1 + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "inkpot" + +" map a urxvt cube number to an xterm-256 cube number +fun! M(a) + return strpart("0135", a:a, 1) + 0 +endfun + +" map a urxvt colour to an xterm-256 colour +fun! X(a) + if &t_Co == 88 + return a:a + else + if a:a == 8 + return 237 + elseif a:a < 16 + return a:a + elseif a:a > 79 + return 232 + (3 * (a:a - 80)) + else + let l:b = a:a - 16 + let l:x = l:b % 4 + let l:y = (l:b / 4) % 4 + let l:z = (l:b / 16) + return 16 + M(l:x) + (6 * M(l:y)) + (36 * M(l:z)) + endif + endif +endfun + +if ! exists("g:inkpot_black_background") + let g:inkpot_black_background = 0 +endif + +if has("gui_running") + if ! g:inkpot_black_background + hi Normal gui=NONE guifg=#cfbfad guibg=#1e1e27 + else + hi Normal gui=NONE guifg=#cfbfad guibg=#000000 + endif + + hi CursorLine guibg=#2e2e37 + + hi IncSearch gui=BOLD guifg=#303030 guibg=#cd8b60 + hi Search gui=NONE guifg=#303030 guibg=#ad7b57 + hi ErrorMsg gui=BOLD guifg=#ffffff guibg=#ce4e4e + hi WarningMsg gui=BOLD guifg=#ffffff guibg=#ce8e4e + hi ModeMsg gui=BOLD guifg=#7e7eae guibg=NONE + hi MoreMsg gui=BOLD guifg=#7e7eae guibg=NONE + hi Question gui=BOLD guifg=#ffcd00 guibg=NONE + + hi StatusLine gui=BOLD guifg=#b9b9b9 guibg=#3e3e5e + hi User1 gui=BOLD guifg=#00ff8b guibg=#3e3e5e + hi User2 gui=BOLD guifg=#7070a0 guibg=#3e3e5e + hi StatusLineNC gui=NONE guifg=#b9b9b9 guibg=#3e3e5e + hi VertSplit gui=NONE guifg=#b9b9b9 guibg=#3e3e5e + + hi WildMenu gui=BOLD guifg=#eeeeee guibg=#6e6eaf + + hi MBENormal guifg=#cfbfad guibg=#2e2e3f + hi MBEChanged guifg=#eeeeee guibg=#2e2e3f + hi MBEVisibleNormal guifg=#cfcfcd guibg=#4e4e8f + hi MBEVisibleChanged guifg=#eeeeee guibg=#4e4e8f + + hi DiffText gui=NONE guifg=#ffffcd guibg=#4a2a4a + hi DiffChange gui=NONE guifg=#ffffcd guibg=#306b8f + hi DiffDelete gui=NONE guifg=#ffffcd guibg=#6d3030 + hi DiffAdd gui=NONE guifg=#ffffcd guibg=#306d30 + + hi Cursor gui=NONE guifg=#404040 guibg=#8b8bff + hi lCursor gui=NONE guifg=#404040 guibg=#8fff8b + hi CursorIM gui=NONE guifg=#404040 guibg=#8b8bff + + hi Folded gui=NONE guifg=#cfcfcd guibg=#4b208f + hi FoldColumn gui=NONE guifg=#8b8bcd guibg=#2e2e2e + + hi Directory gui=NONE guifg=#00ff8b guibg=NONE + hi LineNr gui=NONE guifg=#8b8bcd guibg=#2e2e2e + hi NonText gui=BOLD guifg=#8b8bcd guibg=NONE + hi SpecialKey gui=BOLD guifg=#ab60ed guibg=NONE + hi Title gui=BOLD guifg=#af4f4b guibg=NONE + hi Visual gui=NONE guifg=#eeeeee guibg=#4e4e8f + + hi Comment gui=NONE guifg=#cd8b00 guibg=NONE + hi Constant gui=NONE guifg=#ffcd8b guibg=NONE + hi String gui=NONE guifg=#ffcd8b guibg=#404040 + hi Error gui=NONE guifg=#ffffff guibg=#6e2e2e + hi Identifier gui=NONE guifg=#ff8bff guibg=NONE + hi Ignore gui=NONE + hi Number gui=NONE guifg=#f0ad6d guibg=NONE + hi PreProc gui=NONE guifg=#409090 guibg=NONE + hi Special gui=NONE guifg=#c080d0 guibg=NONE + hi SpecialChar gui=NONE guifg=#c080d0 guibg=#404040 + hi Statement gui=NONE guifg=#808bed guibg=NONE + hi Todo gui=BOLD guifg=#303030 guibg=#d0a060 + hi Type gui=NONE guifg=#ff8bff guibg=NONE + hi Underlined gui=BOLD guifg=#df9f2d guibg=NONE + hi TaglistTagName gui=BOLD guifg=#808bed guibg=NONE + + hi perlSpecialMatch gui=NONE guifg=#c080d0 guibg=#404040 + hi perlSpecialString gui=NONE guifg=#c080d0 guibg=#404040 + + hi cSpecialCharacter gui=NONE guifg=#c080d0 guibg=#404040 + hi cFormat gui=NONE guifg=#c080d0 guibg=#404040 + + hi doxygenBrief gui=NONE guifg=#fdab60 guibg=NONE + hi doxygenParam gui=NONE guifg=#fdd090 guibg=NONE + hi doxygenPrev gui=NONE guifg=#fdd090 guibg=NONE + hi doxygenSmallSpecial gui=NONE guifg=#fdd090 guibg=NONE + hi doxygenSpecial gui=NONE guifg=#fdd090 guibg=NONE + hi doxygenComment gui=NONE guifg=#ad7b20 guibg=NONE + hi doxygenSpecial gui=NONE guifg=#fdab60 guibg=NONE + hi doxygenSpecialMultilineDesc gui=NONE guifg=#ad600b guibg=NONE + hi doxygenSpecialOnelineDesc gui=NONE guifg=#ad600b guibg=NONE + + if v:version >= 700 + hi Pmenu gui=NONE guifg=#eeeeee guibg=#4e4e8f + hi PmenuSel gui=BOLD guifg=#eeeeee guibg=#2e2e3f + hi PmenuSbar gui=BOLD guifg=#eeeeee guibg=#6e6eaf + hi PmenuThumb gui=BOLD guifg=#eeeeee guibg=#6e6eaf + + 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=#cfbfad guibg=#4e4e8f + endif +else + if ! g:inkpot_black_background + exec "hi Normal cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(80) + else + exec "hi Normal cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(16) + endif + + exec "hi IncSearch cterm=BOLD ctermfg=" . X(80) . " ctermbg=" . X(73) + exec "hi Search cterm=NONE ctermfg=" . X(80) . " ctermbg=" . X(52) + exec "hi ErrorMsg cterm=BOLD ctermfg=" . X(16) . " ctermbg=" . X(48) + exec "hi WarningMsg cterm=BOLD ctermfg=" . X(16) . " ctermbg=" . X(68) + exec "hi ModeMsg cterm=BOLD ctermfg=" . X(38) . " ctermbg=" . "NONE" + exec "hi MoreMsg cterm=BOLD ctermfg=" . X(38) . " ctermbg=" . "NONE" + exec "hi Question cterm=BOLD ctermfg=" . X(52) . " ctermbg=" . "NONE" + + exec "hi StatusLine cterm=BOLD ctermfg=" . X(85) . " ctermbg=" . X(81) + exec "hi User1 cterm=BOLD ctermfg=" . X(28) . " ctermbg=" . X(81) + exec "hi User2 cterm=BOLD ctermfg=" . X(39) . " ctermbg=" . X(81) + exec "hi StatusLineNC cterm=NONE ctermfg=" . X(84) . " ctermbg=" . X(81) + exec "hi VertSplit cterm=NONE ctermfg=" . X(84) . " ctermbg=" . X(81) + + exec "hi WildMenu cterm=BOLD ctermfg=" . X(87) . " ctermbg=" . X(38) + + exec "hi MBENormal ctermfg=" . X(85) . " ctermbg=" . X(81) + exec "hi MBEChanged ctermfg=" . X(87) . " ctermbg=" . X(81) + exec "hi MBEVisibleNormal ctermfg=" . X(85) . " ctermbg=" . X(82) + exec "hi MBEVisibleChanged ctermfg=" . X(87) . " ctermbg=" . X(82) + + exec "hi DiffText cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(34) + exec "hi DiffChange cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(17) + exec "hi DiffDelete cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(32) + exec "hi DiffAdd cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(20) + + exec "hi Folded cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(35) + exec "hi FoldColumn cterm=NONE ctermfg=" . X(39) . " ctermbg=" . X(80) + + exec "hi Directory cterm=NONE ctermfg=" . X(28) . " ctermbg=" . "NONE" + exec "hi LineNr cterm=NONE ctermfg=" . X(39) . " ctermbg=" . X(80) + exec "hi NonText cterm=BOLD ctermfg=" . X(39) . " ctermbg=" . "NONE" + exec "hi SpecialKey cterm=BOLD ctermfg=" . X(55) . " ctermbg=" . "NONE" + exec "hi Title cterm=BOLD ctermfg=" . X(48) . " ctermbg=" . "NONE" + exec "hi Visual cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(38) + + exec "hi Comment cterm=NONE ctermfg=" . X(52) . " ctermbg=" . "NONE" + exec "hi Constant cterm=NONE ctermfg=" . X(73) . " ctermbg=" . "NONE" + exec "hi String cterm=NONE ctermfg=" . X(73) . " ctermbg=" . X(81) + exec "hi Error cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(32) + exec "hi Identifier cterm=NONE ctermfg=" . X(53) . " ctermbg=" . "NONE" + exec "hi Ignore cterm=NONE" + exec "hi Number cterm=NONE ctermfg=" . X(69) . " ctermbg=" . "NONE" + exec "hi PreProc cterm=NONE ctermfg=" . X(25) . " ctermbg=" . "NONE" + exec "hi Special cterm=NONE ctermfg=" . X(55) . " ctermbg=" . "NONE" + exec "hi SpecialChar cterm=NONE ctermfg=" . X(55) . " ctermbg=" . X(81) + exec "hi Statement cterm=NONE ctermfg=" . X(27) . " ctermbg=" . "NONE" + exec "hi Todo cterm=BOLD ctermfg=" . X(16) . " ctermbg=" . X(57) + exec "hi Type cterm=NONE ctermfg=" . X(71) . " ctermbg=" . "NONE" + exec "hi Underlined cterm=BOLD ctermfg=" . X(77) . " ctermbg=" . "NONE" + exec "hi TaglistTagName cterm=BOLD ctermfg=" . X(39) . " ctermbg=" . "NONE" + + if v:version >= 700 + exec "hi Pmenu cterm=NONE ctermfg=" . X(87) . " ctermbg=" . X(82) + exec "hi PmenuSel cterm=BOLD ctermfg=" . X(87) . " ctermbg=" . X(38) + exec "hi PmenuSbar cterm=BOLD ctermfg=" . X(87) . " ctermbg=" . X(39) + exec "hi PmenuThumb cterm=BOLD ctermfg=" . X(87) . " ctermbg=" . X(39) + + exec "hi SpellBad cterm=NONE ctermbg=" . X(32) + exec "hi SpellRare cterm=NONE ctermbg=" . X(33) + exec "hi SpellLocal cterm=NONE ctermbg=" . X(36) + exec "hi SpellCap cterm=NONE ctermbg=" . X(21) + exec "hi MatchParen cterm=NONE ctermbg=" . X(14) . "ctermfg=" . X(25) + endif +endif + +" vim: set et : diff --git a/colors/ironman.vim b/colors/ironman.vim new file mode 100755 index 0000000..d98a936 --- /dev/null +++ b/colors/ironman.vim @@ -0,0 +1,133 @@ +" Vim color file +" Maintainer: Michael Boehler +" Mail: michael@familie-boehler.de +" Last Change: 2008-2-21 +" Version: 3.2 +" This color scheme uses a light background. +" GUI only +" inspired by colorsheme PYTE + +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "ironman" + +hi Normal guifg=#222222 guibg=#F0F0F0 + +" Search +hi IncSearch gui=NONE guifg=Black guibg=#FFFF4B +hi Search gui=NONE guifg=Black guibg=#FFFF8F + +" Messages +hi ErrorMsg gui=NONE guifg=#FF0000 guibg=NONE +hi WarningMsg gui=NONE guifg=#FF6600 guibg=NONE +hi ModeMsg gui=NONE guifg=#0070ff guibg=NONE +hi MoreMsg gui=NONE guifg=#FF6600 guibg=NONE +hi Question gui=NONE guifg=#008050 guibg=NONE + +" Completion Popup Menu +hi Pmenu gui=NONE guifg=#303040 guibg=#ccff00 +hi PmenuSel gui=NONE guifg=#303040 guibg=#ffff00 +" hi PmenuSbar scrollbar |hl-PmenuSbar| +" hi PmenuThumb thumb of the scrollbar |hl-PmenuThumb| + +" Split area +hi StatusLine gui=ITALIC guifg=white guibg=#8090a0 +hi StatusLineNC gui=ITALIC guifg=#506070 guibg=#a0b0c0 +hi VertSplit gui=NONE guifg=#a0b0c0 guibg=#a0b0c0 +hi WarningMsgildMenu gui=NONE guifg=Black guibg=Orange +" hi WildMenu gui=UNDERLINE guifg=#56A0EE guibg=#E9E9F4 + +" Diff +hi DiffText gui=NONE guifg=#2020ff guibg=#c8f2ea +hi DiffDelete gui=NONE guifg=#f83010 guibg=#ffeae0 +hi DiffAdd gui=NONE guifg=#006800 guibg=#d0ffd0 +hi DiffChange gui=NONE guifg=#2020ff guibg=#c8f2ea + +" Cursor +hi Cursor gui=NONE guifg=#ffffff guibg=#DE7171 +hi lCursor gui=NONE guifg=#f8f8f8 guibg=#8000ff +hi CursorIM gui=NONE guifg=#f8f8f8 guibg=#8000ff +hi CursorLine gui=NONE guifg=NONE guibg=#f6f6f6 +hi CursorColumn gui=NONE guifg=NONE guibg=#F9F9F9 + +" Fold +hi Folded gui=NONE guifg=#3399ff guibg=#EAF5FF +hi FoldColumn gui=NONE guifg=#3399ff guibg=#EAF5FF + +" Other hi Directory gui=NONE guifg=#0000ff guibg=NONE +hi LineNr gui=NONE guifg=#FFFFFF guibg=#C0D0E0 +hi NonText gui=NONE guifg=#C0C0C0 guibg=#E0E0E0 +hi SpecialKey gui=NONE guifg=#35E0DF guibg=NONE +hi Title gui=NONE guifg=#004060 guibg=#c8f0f8 +hi Visual gui=NONE guibg=#BDDFFF +hi MatchParen gui=NONE guifg=NONE guibg=#9FFF82 + +" Syntax group +hi Comment gui=ITALIC guifg=#A0B0C0 guibg=#EFEFFF +hi Paren gui=NONE guifg=#9326C1 guibg=NONE +hi Comma gui=NONE guifg=#C12660 guibg=NONE +hi Constant gui=NONE guifg=NONE guibg=#E8F1FF +hi Statement gui=NONE guifg=#005EC4 guibg=NONE +hi Error gui=BOLD,UNDERLINE guifg=#ff4080 guibg=NONE +hi Identifier gui=NONE guifg=#339933 guibg=NONE +hi Ignore gui=NONE guifg=#f8f8f8 guibg=NONE +hi Number gui=NONE guifg=#087B4D +hi PreProc gui=NONE guifg=#0070e6 guibg=NONE +hi Special gui=NONE guifg=#0000ff guibg=#ccf7ee +hi Delimiter gui=BOLD guifg=#A8360F guibg=NONE +hi Todo gui=NONE guifg=#ff0070 guibg=#ffe0f4 +hi Type gui=NONE guifg=#eb7950 guibg=NONE +hi Underlined gui=UNDERLINE guifg=#0000ff guibg=NONE + +hi Conditional gui=None guifg=#0053FF guibg=bg +hi Repeat gui=None guifg=SeaGreen2 guibg=bg +hi Operator gui=None guifg=#0085B1 guibg=bg +hi Keyword gui=None guifg=DarkBlue guibg=bg +hi Exception gui=None guifg=DarkBlue guibg=bg +hi Function gui=BOLD guifg=#3E0F70 + +hi! link String Constant +hi! link SpecialComment Comment +hi! link Character Constant +hi! link Boolean Constant +hi! link Float Number +hi! link Label Statement +hi! link Include PreProc +hi! link Define PreProc +hi! link Macro PreProc +hi! link PreCondit PreProc +hi! link StorageClass Type +hi! link Structure Type +hi! link Typedef Type +hi! link SpecialChar Special +hi! link Debug Special + +" HTML +hi htmlLink gui=UNDERLINE guifg=#0000ff guibg=NONE +hi htmlBold gui=BOLD +hi htmlBoldItalic gui=BOLD,ITALIC +hi htmlBoldUnderline gui=BOLD,UNDERLINE +hi htmlBoldUnderlineItalic gui=BOLD,UNDERLINE,ITALIC +hi htmlItalic gui=ITALIC +hi htmlUnderline gui=UNDERLINE +hi htmlUnderlineItalic gui=UNDERLINE,ITALIC + +" Tabs {{{1 +highlight TabLine gui=underline guibg=LightGrey +highlight TabLineFill gui=reverse +highlight TabLineSel gui=bold + +highlight SpellBad gui=undercurl guisp=Red +highlight SpellCap gui=undercurl guisp=Blue +highlight SpellRare gui=undercurl guisp=Magenta +highlight SpellLocale gui=undercurl guisp=DarkCyan + +" Completion {{{1 +highlight Pmenu guifg=Black guibg=#BDDFFF +highlight PmenuSel guifg=Black guibg=Orange +highlight PmenuSbar guifg=#CCCCCC guibg=#CCCCCC +highlight PmenuThumb gui=reverse guifg=Black guibg=#AAAAAA diff --git a/colors/jammy.vim b/colors/jammy.vim new file mode 100755 index 0000000..b12ed5f --- /dev/null +++ b/colors/jammy.vim @@ -0,0 +1,111 @@ +" Vim color file inherit from the desrt.vim +" Maintainer: Jammy Lee +" Last Change: $Date: 2008/03/20 19:30:30 $ +" Version: $Id: jammy.vim,v 1.1 2008/03/20 $ + +" cool help screens +" :he group-name +" :he highlight-groups +" :he cterm-colors + +set background=dark +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="jammy" + +hi Normal guifg=White guibg=Black + +" highlight groups +hi Cursor guibg=khaki guifg=slategrey +"hi CursorIM +"hi Directory +"hi DiffAdd +"hi DiffChange +"hi DiffDelete +"hi DiffText +"hi ErrorMsg +hi String guifg=Skyblue +hi VertSplit guibg=#c2bfa5 guifg=grey50 gui=none +hi Folded guibg=grey30 guifg=gold +hi FoldColumn guibg=grey30 guifg=tan +hi IncSearch guifg=slategrey guibg=khaki +"hi LineNr +hi ModeMsg guifg=goldenrod +hi MoreMsg guifg=SeaGreen +hi NonText guifg=LightBlue guibg=black +hi Question guifg=springgreen +hi Search guibg=peru guifg=wheat +hi SpecialKey guifg=yellowgreen +hi StatusLine guibg=#c2bfa5 guifg=black gui=none +hi StatusLineNC guibg=#c2bfa5 guifg=grey50 gui=none +hi Title guifg=indianred +hi Visual gui=none guibg=grey30 +"hi VisualNOS +hi WarningMsg guifg=salmon +"hi WildMenu +"hi Menu +"hi Scrollbar +"hi Tooltip + +" syntax highlighting groups +hi Comment guifg=grey60 +hi Constant guifg=indianred + +hi Identifier guifg=palegreen +"hi Identifier guifg=#D18B2C +"palegreen +"hi Statement guifg=khaki +hi Statement guifg=#E6DB74 +hi PreProc guifg=Skyblue +hi Type guifg=darkkhaki +hi Special guifg=navajowhite +"hi Underlined +hi Ignore guifg=grey40 +"hi Error +hi Todo guifg=orangered guibg=yellow2 + +" color terminal definitions +hi SpecialKey ctermfg=darkgreen +hi NonText cterm=bold ctermfg=darkblue +hi Directory ctermfg=darkcyan +hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1 +hi IncSearch cterm=NONE ctermfg=yellow ctermbg=green +hi Search cterm=NONE ctermfg=grey ctermbg=blue +hi MoreMsg ctermfg=darkgreen +hi ModeMsg cterm=NONE ctermfg=brown +hi LineNr ctermfg=3 +hi Question ctermfg=green +hi StatusLine cterm=bold,reverse +hi StatusLineNC cterm=reverse +hi VertSplit cterm=reverse +hi Title ctermfg=5 +hi Visual cterm=reverse +hi VisualNOS cterm=bold,underline +hi WarningMsg ctermfg=1 +hi WildMenu ctermfg=0 ctermbg=3 +hi Folded ctermfg=darkgrey ctermbg=NONE +hi FoldColumn ctermfg=darkgrey ctermbg=NONE +hi DiffAdd ctermbg=4 +hi DiffChange ctermbg=5 +hi DiffDelete cterm=bold ctermfg=4 ctermbg=6 +hi DiffText cterm=bold ctermbg=1 +hi Comment ctermfg=darkcyan +hi Constant ctermfg=brown +hi Special ctermfg=5 +hi Identifier ctermfg=6 +hi Statement ctermfg=3 +hi PreProc ctermfg=5 +hi Type ctermfg=2 +hi Underlined cterm=underline ctermfg=5 +hi Ignore cterm=bold ctermfg=7 +hi Ignore ctermfg=darkgrey +hi Error cterm=bold ctermfg=7 ctermbg=1 + + +"vim: sw=4 diff --git a/colors/jellybeans.vim b/colors/jellybeans.vim new file mode 100755 index 0000000..6b53596 --- /dev/null +++ b/colors/jellybeans.vim @@ -0,0 +1,410 @@ +" Vim color file +" +" " __ _ _ _ " +" " \ \ ___| | |_ _| |__ ___ __ _ _ __ ___ " +" " \ \/ _ \ | | | | | _ \ / _ \/ _ | _ \/ __| " +" " /\_/ / __/ | | |_| | |_| | __/ |_| | | | \__ \ " +" " \___/ \___|_|_|\__ |____/ \___|\____|_| |_|___/ " +" " \___/ " +" +" "A colorful, dark color scheme for Vim." +" +" File: jellybeans.vim +" Maintainer: NanoTech +" Version: 1.2 +" Last Change: May 26th, 2009 +" Contributors: Daniel Herbert , +" Henry So, Jr. , +" David Liang +" +" Copyright (c) 2009 NanoTech +" +" 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. + +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) + elseif l:fge && !l:bge + exec "hi ".a:group." guifg=NONE guibg=#".a:bg." ctermbg=".s:rgb(a:bg) + endif + endif + + if a:attr == "" + exec "hi ".a:group." gui=none cterm=none" + else + if a:attr == 'italic' + exec "hi ".a:group." gui=".a:attr." cterm=none" + else + exec "hi ".a:group." gui=".a:attr." cterm=".a:attr + endif + endif +endfun +" }}} + +if version >= 700 + call s:X("CursorLine","","1c1c1c","","","") + call s:X("CursorColumn","","1c1c1c","","","") + call s:X("MatchParen","ffffff","80a090","bold","","") + + call s:X("TabLine","000000","b0b8c0","italic","","Black") + call s:X("TabLineFill","9098a0","","","","") + call s:X("TabLineSel","000000","f0f0f0","italic,bold","","") + + " Auto-completion + call s:X("Pmenu","ffffff","000000","","","") + call s:X("PmenuSel","101010","eeeeee","","","") +endif + +call s:X("Visual","","404040","","","") +call s:X("Cursor","","b0d0f0","","","") + +call s:X("Normal","e8e8d3","151515","","White","") +call s:X("LineNr","605958","151515","none","Black","") +call s:X("Comment","888888","","italic","Grey","") +call s:X("Todo","808080","","bold","","") + +call s:X("StatusLine","f0f0f0","101010","italic","","") +call s:X("StatusLineNC","a0a0a0","181818","italic","","") +call s:X("VertSplit","181818","181818","italic","","") + +call s:X("Folded","a0a8b0","384048","italic","black","") +call s:X("FoldColumn","a0a8b0","384048","","","") +call s:X("SignColumn","a0a8b0","384048","","","") + +call s:X("Title","70b950","","bold","","") + +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 Normal + +call s:X("Type","ffb964","","","Yellow","") +call s:X("NonText","808080","151515","","","") + +call s:X("SpecialKey","808080","343434","","","") + +call s:X("Search","f0a0c0","302028","underline","Magenta","") + +call s:X("Directory","dad085","","","","") +call s:X("ErrorMsg","","902020","","","") +hi link Error ErrorMsg + +" Diff + +hi link diffRemoved Constant +hi link diffAdded String + +" VimDiff + +call s:X("DiffAdd","","032218","","Black","DarkGreen") +call s:X("DiffChange","","100920","","Black","DarkMagenta") +call s:X("DiffDelete","220000","220000","","DarkRed","DarkRed") +call s:X("DiffText","","000940","","","DarkRed") + +" 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 + +" Ruby + +hi link rubySharpBang Comment +call s:X("rubyClass","447799","","","DarkBlue","") +call s:X("rubyIdentifier","c6b6fe","","","","") + +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","","","","") + +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","") + +" JavaScript +hi link javaScriptValue Constant +hi link javaScriptRegexpString rubyRegexp + +" Tag list +hi link TagListFileName Directory + +" 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/kellys.vim b/colors/kellys.vim new file mode 100755 index 0000000..d52713a --- /dev/null +++ b/colors/kellys.vim @@ -0,0 +1,236 @@ +" Description: a colour scheme inspired by kellys bicycles +" Maintainer: kamil.stachowski@gmail.com +" License: gpl 3+ +" Version: 0.3 (2008.12.07) + +" changelog: +" 0.3: 2008.12.07 +" finished ada, haskell, html, lisp, pascal, php, python, ruby, scheme, sh, xml and vim +" changed preproc to slightly darker +" changed statement to bold +" 0.2: 2008.12.02 +" added support for 256-colour terminal +" added diff*, pmenu* and wildmenu +" added some cpp, java*, python*, some sh and ruby* +" removed italic from comments and made them slightly lighter +" 0.1: 2008.11.28 +" initial version + + +set background=dark + +if version > 580 + hi clear + if exists("syntax_on") + syntax reset + endif +endif + +let colors_name = "kellys" + +" black 2a2b2f 235 +" blue 62acce 81 +" blue slight 9ab2c8 74 +" brown slight d1c79e 144 +" green yellowy d1d435 184 +" grey dark 67686b 240 +" grey light e1e0e5 254 +" orange e6ac32 178 +" red 9d0e15 124 + +" tabline + +if has("gui_running") + hi Comment guifg=#67686b guibg=#2a2b2f gui=none + hi Cursor guifg=#2a2b2f guibg=#e1e0e5 gui=none + hi Constant guifg=#d1c79e guibg=#2a2b2f gui=none + hi CursorLine guibg=#303132 gui=none + hi DiffAdd guifg=#2a2b2f guibg=#9ab2c8 gui=none + hi DiffChange guifg=#2a2b2f guibg=#d1c79e gui=none + hi DiffDelete guifg=#67686b guibg=#2a2b2f gui=none + hi DiffText guifg=#9d0e15 guibg=#d1c79e gui=none + hi Folded guifg=#2a2b2f guibg=#67686b gui=none + hi MatchParen guifg=#d1d435 guibg=#2a2b2f gui=bold,underline + hi ModeMsg guifg=#e1e0e5 guibg=#2a2b2f gui=bold + hi Normal guifg=#e1e0e5 guibg=#2a2b2f gui=none + hi Pmenu guifg=#2a2b2f guibg=#9ab2c8 gui=none + hi PmenuSel guifg=#2a2b2f guibg=#62acce gui=bold + hi PmenuSbar guifg=#2a2b2f guibg=#2a2b2f gui=none + hi PmenuThumb guifg=#2a2b2f guibg=#62acce gui=none + hi PreProc guifg=#d1d435 guibg=#2a2b2f gui=none + hi Search guifg=#2a2b2f guibg=#e1e0e5 gui=none + hi Special guifg=#9ab2c8 guibg=#2a2b2f gui=none + hi Statement guifg=#62acce guibg=#2a2b2f gui=bold + hi StatusLine guifg=#2a2b2f guibg=#62acce gui=bold + hi StatusLineNC guifg=#2a2b2f guibg=#e1e0e5 gui=none + hi Todo guifg=#e1e0e5 guibg=#9d0e15 gui=bold + hi Type guifg=#e6ac32 guibg=#2a2b2f gui=none + hi Underlined guifg=#e1e0e5 guibg=#2a2b2f gui=underline + hi Visual guifg=#2a2b2f guibg=#e1e0e5 gui=none + hi Wildmenu guifg=#62acce guibg=#2a2b2f gui=bold +else + if &t_Co == 256 + hi Comment ctermfg=239 ctermbg=235 cterm=none + hi Cursor ctermfg=235 ctermbg=254 cterm=none + hi Constant ctermfg=144 ctermbg=235 cterm=none + hi CursorLine ctermbg=236 cterm=none + hi DiffAdd ctermfg=235 ctermbg=74 cterm=none + hi DiffChange ctermfg=235 ctermbg=144 cterm=none + hi DiffDelete ctermfg=239 ctermbg=235 cterm=none + hi DiffText ctermfg=124 ctermbg=144 cterm=none + hi Folded ctermfg=239 ctermbg=235 cterm=none + hi MatchParen ctermfg=184 ctermbg=235 cterm=bold,underline + hi ModeMsg ctermfg=254 ctermbg=235 cterm=bold + hi Normal ctermfg=254 ctermbg=235 cterm=none + hi Pmenu ctermfg=235 ctermbg=74 cterm=none + hi PmenuSel ctermfg=235 ctermbg=81 cterm=bold + hi PmenuSbar ctermfg=235 ctermbg=235 cterm=none + hi PmenuThumb ctermfg=235 ctermbg=81 cterm=none + hi PreProc ctermfg=184 ctermbg=235 cterm=none + hi Search ctermfg=235 ctermbg=254 cterm=none + hi Special ctermfg=74 ctermbg=235 cterm=none + hi Statement ctermfg=81 ctermbg=235 cterm=none + hi StatusLine ctermfg=235 ctermbg=81 cterm=bold + hi StatusLineNC ctermfg=235 ctermbg=254 cterm=none + hi Todo ctermfg=254 ctermbg=124 cterm=bold + hi Type ctermfg=178 ctermbg=234 cterm=none + hi Underlined ctermfg=254 ctermbg=234 cterm=underline + hi Visual ctermfg=235 ctermbg=254 cterm=none + hi Wildmenu ctermfg=81 ctermbg=234 cterm=bold + endif +endif + +hi! link Boolean Constant +hi! link Character Constant +hi! link Conditional Statement +hi! link CursorColumn CursorLine +hi! link Debug Special +hi! link Define PreProc +hi! link Delimiter Special +hi! link Directory Type +hi! link Error Todo +hi! link ErrorMsg Error +hi! link Exception Statement +hi! link Float Constant +hi! link FoldColumn Folded +hi! link Function Normal +hi! link Identifier Special +hi! link Ignore Comment +hi! link IncSearch Search +hi! link Include PreProc +hi! link Keyword Statement +hi! link Label Statement +hi! link LineNr Comment +hi! link Macro PreProc +hi! link MoreMsg ModeMsg +hi! link NonText Comment +hi! link Number Constant +hi! link Operator Special +hi! link PreCondit PreProc +hi! link Question MoreMsg +hi! link Repeat Statement +hi! link SignColumn FoldColumn +hi! link SpecialChar Special +hi! link SpecialComment Special +hi! link SpecialKey Special +hi! link SpellBad Error +hi! link SpellCap Error +hi! link SpellLocal Error +hi! link SpellRare Error +hi! link StorageClass Type +hi! link String Constant +hi! link Structure Type +hi! link Tag Special +hi! link Title ModeMsg +hi! link Typedef Type +hi! link VertSplit StatusLineNC +hi! link WarningMsg Error + +" ada +hi! link adaBegin Type +hi! link adaEnd Type +hi! link adaKeyword Special +" c++ +hi! link cppAccess Type +hi! link cppStatement Special +" hs +hi! link ConId Type +hi! link hsPragma PreProc +hi! link hsConSym Operator +" html +hi! link htmlArg Statement +hi! link htmlEndTag Special +hi! link htmlLink Underlined +hi! link htmlSpecialTagName PreProc +hi! link htmlTag Special +hi! link htmlTagName Type +" java +hi! link javaTypeDef Special +" lisp +hi! link lispAtom Constant +hi! link lispAtomMark Constant +hi! link lispConcat Special +hi! link lispDecl Type +hi! link lispFunc Special +hi! link lispKey PreProc +" pas +hi! link pascalAsmKey Statement +hi! link pascalDirective PreProc +hi! link pascalModifier PreProc +hi! link pascalPredefined Special +hi! link pascalStatement Type +hi! link pascalStruct Type +" php +hi! link phpComparison Special +hi! link phpDefine Normal +hi! link phpIdentifier Normal +hi! link phpMemberSelector Special +hi! link phpRegion Special +hi! link phpVarSelector Special +" py +hi! link pythonStatement Type +" rb +hi! link rubyConstant Special +hi! link rubyDefine Type +hi! link rubyRegexp Special +" scm +hi! link schemeSyntax Special +" sh +hi! link shArithRegion Normal +hi! link shDerefSimple Normal +hi! link shDerefVar Normal +hi! link shFunction Type +hi! link shLoop Statement +hi! link shStatement Special +hi! link shVariable Normal +" sql +hi! link sqlKeyword Statement +" vim +hi! link vimCommand Statement +hi! link vimCommentTitle Normal +hi! link vimEnvVar Special +hi! link vimFuncKey Type +hi! link vimGroup Special +hi! link vimHiAttrib Constant +hi! link vimHiCTerm Special +hi! link vimHiCtermFgBg Special +hi! link vimHighlight Special +hi! link vimHiGui Special +hi! link vimHiGuiFgBg Special +hi! link vimOption Special +hi! link vimSyntax Special +hi! link vimSynType Special +hi! link vimUserAttrb Special +" xml +hi! link xmlAttrib Special +hi! link xmlCdata Normal +hi! link xmlCdataCdata Statement +hi! link xmlCdataEnd PreProc +hi! link xmlCdataStart PreProc +hi! link xmlDocType PreProc +hi! link xmlDocTypeDecl PreProc +hi! link xmlDocTypeKeyword PreProc +hi! link xmlEndTag Statement +hi! link xmlProcessingDelim PreProc +hi! link xmlNamespace PreProc +hi! link xmlTagName Statement diff --git a/colors/leo.vim b/colors/leo.vim new file mode 100755 index 0000000..f11cbea --- /dev/null +++ b/colors/leo.vim @@ -0,0 +1,150 @@ +" Vim color file +" Maintainer: Lorenzo Leonini +" Last Change: 2009 Feb 23 +" URL: http://www.leonini.net + +" Description: +" A contrasted theme for long programming sessions. +" Specially for 256-colors term (xterm, Eterm, konsole, gnome-terminal, ...) +" Very good with Ruby, C, Lua, PHP, HTML, shell... +" (but no using language specific settings) + +" Note: +" If your term report 8 colors (but is 256 capable), put 'set t_Co=256' +" in your .vimrc + +" Tips: +" :verbose hi StatusLine +" Color numbers (0-255) see: +" http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html +" :so $VIMRUNTIME/syntax/hitest.vim + +" 0.81 => 0.82 +" menu backgrounf lighter +" LineNr +" gui comments in italic +" +" 0.8 => 0.81 +" invisible char +" line number +" status bar +" add MatchParen +" add Underlined +" +" 0.6 => 0.8 +" GUI fixed, color < 16 fixed +" comments from 247 => 249 +" main color 255 => 254 +" boolean and numbers more visible +" +" 0.5 => 0.6 +" Synchro with GUI + +" 0.3 => 0.5 +" Ligther vertical separation +" Better diff +" Better pmenu +" Uniformisation between status bar, tabs and pmenu +" Added spell hl +" Change search highlight (I don't use it...) +" Folding done +" All in 256 code + +if !has("gui_running") + if &t_Co != 256 + echomsg "err: Please use a 256-colors terminal (so that t_Co=256 could be set)." + echomsg "" + finish + end +endif + +let g:colors_name = "leo256" + +set background=dark +if v:version > 580 + highlight clear + if exists("syntax_on") + syntax reset + endif +endif + +" Normal should come first +hi Normal cterm=none ctermfg=255 ctermbg=16 guibg=#000000 guifg=#ffffff +hi CursorLine cterm=none ctermbg=16 guibg=#101010 +hi DiffAdd cterm=none ctermbg=235 guibg=#262626 +hi DiffChange cterm=none ctermbg=235 guibg=#262626 +hi DiffDelete cterm=none ctermfg=238 ctermbg=244 guibg=#808080 guifg=#444444 +hi DiffText cterm=bold ctermfg=255 ctermbg=196 guifg=#ffffff +hi Directory cterm=none ctermfg=196 +hi ErrorMsg cterm=none ctermfg=255 ctermbg=160 guifg=#ffffff +hi FoldColumn cterm=none ctermfg=110 ctermbg=16 guibg=#000000 +hi SignColumn cterm=none ctermbg=16 guibg=#000000 +hi Folded cterm=none ctermfg=16 ctermbg=110 guifg=#000000 guibg=#87afd7 +hi IncSearch cterm=reverse +hi LineNr cterm=none ctermfg=228 ctermbg=16 guifg=#ffff87 guibg=#000000 +hi ModeMsg cterm=bold +hi MoreMsg cterm=none ctermfg=40 +hi NonText cterm=none ctermfg=27 +hi Question cterm=none ctermfg=40 +hi Search cterm=none ctermfg=16 ctermbg=248 guifg=#000000 guibg=#a8a8a8 +hi SpecialKey cterm=none ctermfg=245 ctermbg=233 guifg=#8a8a8a guibg=#121212 +hi StatusLine cterm=bold ctermfg=255 ctermbg=19 guifg=#0000ff guibg=#ffffff +hi StatusLineNC cterm=none ctermfg=252 ctermbg=17 guibg=#d0d0d0 guifg=#00005f +hi Title cterm=none ctermfg=33 +hi VertSplit cterm=none ctermfg=254 ctermbg=16 guibg=#EEEEEE guifg=#000000 +hi Visual cterm=reverse ctermbg=none +hi VisualNOS cterm=underline,bold +hi WarningMsg cterm=none ctermfg=255 guifg=#ffffff +hi WildMenu cterm=none ctermfg=16 ctermbg=11 + +if v:version >= 700 + " light + "hi Pmenu cterm=none ctermfg=16 ctermbg=252 + "hi PmenuSel cterm=none ctermfg=255 ctermbg=21 + "hi PmenuSbar cterm=none ctermfg=240 ctermbg=240 + "hi PmenuThumb cterm=none ctermfg=255 ctermbg=255 + + "dark + hi Pmenu cterm=none ctermfg=255 ctermbg=237 guibg=#262626 guifg=#ffffff + hi PmenuSel cterm=none ctermfg=255 ctermbg=21 guibg=#0000ff guifg=#ffffff + hi PmenuSbar cterm=none ctermfg=240 ctermbg=240 guibg=#444444 + hi PmenuThumb cterm=none ctermfg=255 ctermbg=255 guifg=#ffffff + + hi SpellBad cterm=none ctermfg=16 ctermbg=196 + hi SpellCap cterm=none ctermfg=16 ctermbg=196 + hi SpellLocal cterm=none ctermfg=16 ctermbg=196 + hi SpellRare cterm=none ctermfg=16 ctermbg=196 + + " No need for GUI colors :) + hi TabLine cterm=none ctermfg=252 ctermbg=17 + hi TabLineSel cterm=none ctermfg=255 ctermbg=21 + hi TabLineFill cterm=none ctermfg=17 ctermbg=17 + + hi MatchParen cterm=none ctermfg=16 ctermbg=226 guibg=#ffff00 guifg=#000000 +endif + +" syntax highlighting +hi Boolean cterm=none ctermfg=171 guifg=#d75fff +hi Character cterm=none ctermfg=184 +hi Comment cterm=none ctermfg=248 gui=italic guifg=#a8a8a8 +hi Constant cterm=none ctermfg=226 guifg=#ffff00 +hi Conditional cterm=none ctermfg=154 guifg=#afff00 +hi Define cterm=bold ctermfg=27 gui=bold guifg=#005fff +hi Delimiter cterm=none ctermfg=196 guifg=#ff0000 +hi Exception cterm=bold ctermfg=226 gui=bold guifg=#ffff00 +hi Error cterm=none ctermfg=255 ctermbg=9 guifg=#ffffff +hi Keyword cterm=none ctermfg=159 guifg=#afffff +hi Function cterm=none ctermfg=196 guifg=#ff0000 +hi Identifier cterm=none ctermfg=33 guifg=#0087ff +hi Number cterm=none ctermfg=209 guifg=#ff875f +hi Operator cterm=none ctermfg=226 guifg=#ffff00 +hi PreProc cterm=none ctermfg=202 guifg=#ff5f00 +hi Special cterm=none ctermfg=206 ctermbg=234 guifg=#ff5fd7 guibg=#1c1c1c +hi Statement cterm=none ctermfg=40 gui=none guifg=#00d700 +hi String cterm=none ctermfg=224 ctermbg=234 guifg=#ffd7d7 guibg=#1c1c1c +hi Todo cterm=none ctermfg=16 ctermbg=226 guifg=#000000 guibg=#ffff00 +hi Type cterm=none ctermfg=75 gui=none guifg=#5fafff +hi Underlined cterm=underline ctermfg=39 gui=underline guifg=#00afff + +" ADDITIONNAL +hi Repeat cterm=none ctermfg=142 guifg=#afaf00 diff --git a/colors/lettuce.vim b/colors/lettuce.vim new file mode 100755 index 0000000..223dc36 --- /dev/null +++ b/colors/lettuce.vim @@ -0,0 +1,215 @@ +" Vim color file +" Version: 1.2 2007.08.08 +" Author: Valyaeff Valentin +" License: GPL +" +" Copyright 2007 Valyaeff Valentin +" +" This program is free software: you can redistribute it and/or modify +" it under the terms of the GNU General Public License as published by +" the Free Software Foundation, either version 3 of the License, or +" (at your option) any later version. +" +" This program is distributed in the hope that it will be useful, +" but WITHOUT ANY WARRANTY; without even the implied warranty of +" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +" GNU General Public License for more details. +" +" You should have received a copy of the GNU General Public License +" along with this program. If not, see . + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="lettuce" + + +augroup Syntax_extensions + au! + au Syntax c,cpp,ruby,javascript syn match Operator "[*/%&|!=><^~,.;:?+-]\+" display contains=TOP + au Syntax c,cpp syn region cParen matchgroup=Operator transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell + au Syntax c,cpp syn region cCppParen matchgroup=Operator transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell + au Syntax c,cpp syn region cBracket matchgroup=Operator transparent start='\[\|<::\@!' end=']\|:>' contains=ALLBUT,@cParenGroup,cErrInParen,cCppParen,cCppBracket,cCppString,@Spell + au Syntax c,cpp syn region cCppBracket matchgroup=Operator transparent start='\[\|<::\@!' skip='\\$' excludenl end=']\|:>' end='$' contained contains=ALLBUT,@cParenGroup,cErrInParen,cParen,cBracket,cString,@Spell + au Syntax c,cpp syn region cBlock matchgroup=OperatorCurlyBrackets start="{" end="}" transparent fold + au Syntax ruby syn match rubyBlockParameter "\%(\%(\\|{\)\s*\)\@<=|\s*[( ,a-zA-Z0-9_*)]\+\ze\s*|"hs=s+1 display + au Syntax ruby syn region rubyCurlyBlock matchgroup=Operator start="{" end="}" contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo fold + au Syntax ruby syn region rubyParentheses matchgroup=Operator start="(" end=")" contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo + au Syntax ruby syn region rubySquareBrackets matchgroup=Operator start="\[" end="\]" contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo + au Syntax javascript syn region javascriptCurlyBrackets matchgroup=Operator start="{" end="}" transparent fold + au Syntax javascript syn region javascriptParentheses matchgroup=Operator start="(" end=")" transparent + au Syntax javascript syn region javascriptSquareBrackets matchgroup=Operator start="\[" end="\]" transparent +augroup END + + +if !has("gui_running") + +hi rubyGlobalVariable cterm=none ctermfg=64 +hi rubyPredefinedIdentifier cterm=bold ctermfg=64 +hi def link rubyStringDelimiter String + +hi Normal cterm=none ctermbg=232 ctermfg=189 +hi StatusLine cterm=none ctermbg=236 ctermfg=231 +hi StatusLineNC cterm=none ctermbg=236 ctermfg=103 +hi User1 cterm=bold ctermbg=236 ctermfg=223 +hi User2 cterm=none ctermbg=236 ctermfg=240 +hi VertSplit cterm=none ctermbg=236 ctermfg=103 +hi TabLine cterm=none ctermbg=236 ctermfg=145 +hi TabLineFill cterm=none ctermbg=236 +hi TabLineSel cterm=none ctermbg=240 ctermfg=253 +hi LineNr cterm=none ctermfg=238 +hi NonText cterm=bold ctermbg=233 ctermfg=241 +hi Folded cterm=none ctermbg=234 ctermfg=136 +hi FoldColumn cterm=none ctermbg=236 ctermfg=103 +hi SignColumn cterm=none ctermbg=236 ctermfg=103 +hi CursorColumn cterm=none ctermbg=234 +hi CursorLine cterm=none ctermbg=234 +hi IncSearch cterm=bold ctermbg=63 ctermfg=232 +hi Search cterm=none ctermbg=36 ctermfg=232 +hi Visual cterm=none ctermbg=24 +hi WildMenu cterm=bold ctermbg=35 ctermfg=232 +hi ModeMsg cterm=bold ctermfg=110 +hi MoreMsg cterm=bold ctermfg=121 +hi Question cterm=bold ctermfg=121 +hi ErrorMsg cterm=none ctermbg=88 ctermfg=255 +hi WarningMsg cterm=none ctermbg=58 ctermfg=255 +hi SpecialKey cterm=none ctermfg=77 +hi Title cterm=bold ctermfg=147 +hi Directory ctermfg=105 +hi DiffAdd cterm=none ctermbg=18 +hi DiffChange cterm=none ctermbg=58 +hi DiffDelete cterm=none ctermbg=52 ctermfg=58 +hi DiffText cterm=none ctermbg=53 +hi Pmenu cterm=none ctermbg=17 ctermfg=121 +hi PmenuSel cterm=none ctermbg=24 ctermfg=121 +hi PmenuSbar cterm=none ctermbg=19 +hi PmenuThumb cterm=none ctermbg=37 +hi MatchParen cterm=bold ctermbg=24 +hi SpellBad cterm=none ctermbg=88 +hi SpellCap cterm=none ctermbg=18 +hi SpellLocal cterm=none ctermbg=30 +hi SpellRare cterm=none ctermbg=90 + +hi Comment cterm=none ctermfg=138 +hi Constant cterm=none ctermfg=215 + hi String cterm=none ctermbg=235 ctermfg=215 + hi Character cterm=none ctermbg=235 ctermfg=215 + hi Number cterm=none ctermfg=34 + hi Float cterm=none ctermfg=41 +hi Identifier cterm=none ctermfg=186 + hi Function cterm=none ctermfg=210 +hi Statement cterm=bold ctermfg=63 + hi Exception cterm=bold ctermfg=99 + hi Operator cterm=none ctermfg=75 + hi Label cterm=none ctermfg=63 +hi PreProc cterm=bold ctermfg=36 +hi Type cterm=bold ctermfg=71 +hi Special cterm=none ctermbg=235 ctermfg=87 +hi Underlined cterm=underline ctermfg=227 +hi Ignore cterm=bold ctermfg=235 +hi Error cterm=bold ctermbg=52 ctermfg=231 +hi Todo cterm=bold ctermbg=143 ctermfg=16 + +hi OperatorCurlyBrackets cterm=bold ctermfg=75 + +" highlight modes +autocmd InsertEnter * hi StatusLine ctermbg=52 +autocmd InsertEnter * hi User1 ctermbg=52 +autocmd InsertEnter * hi User2 ctermbg=52 +autocmd InsertLeave * hi User2 ctermbg=236 +autocmd InsertLeave * hi User1 ctermbg=236 +autocmd InsertLeave * hi StatusLine ctermbg=236 +autocmd CmdwinEnter * hi StatusLine ctermbg=22 +autocmd CmdwinEnter * hi User1 ctermbg=22 +autocmd CmdwinEnter * hi User2 ctermbg=22 +autocmd CmdwinLeave * hi User2 ctermbg=236 +autocmd CmdwinLeave * hi User1 ctermbg=236 +autocmd CmdwinLeave * hi StatusLine ctermbg=236 + +else + +hi rubyGlobalVariable gui=none guifg=#5f8700 +hi rubyPredefinedIdentifier gui=bold guifg=#5f8700 +hi def link rubyStringDelimiter String + +hi Normal gui=none guibg=#080808 guifg=#dfdfff +hi StatusLine gui=none guibg=#303030 guifg=#ffffff +hi StatusLineNC gui=none guibg=#303030 guifg=#8787af +hi User1 gui=bold guibg=#303030 guifg=#ffdfaf +hi User2 gui=none guibg=#303030 guifg=#585858 +hi VertSplit gui=none guibg=#303030 guifg=#8787af +hi TabLine gui=none guibg=#303030 guifg=#afafaf +hi TabLineFill gui=none guibg=#303030 +hi TabLineSel gui=none guibg=#585858 guifg=#dadada +hi LineNr gui=none guifg=#444444 +hi NonText gui=bold guibg=#121212 guifg=#606060 +hi Folded gui=none guibg=#1c1c1c guifg=#af8700 +hi FoldColumn gui=none guibg=#303030 guifg=#8787af +hi SignColumn gui=none guibg=#303030 guifg=#8787af +hi CursorColumn gui=none guibg=#1c1c1c +hi CursorLine gui=none guibg=#1c1c1c +hi IncSearch gui=bold guibg=#5f5fff guifg=#080808 +hi Search gui=none guibg=#00af87 guifg=#080808 +hi Visual gui=none guibg=#005f87 +hi WildMenu gui=bold guibg=#00af5f guifg=#080808 +hi ModeMsg gui=bold guifg=#87afdf +hi MoreMsg gui=bold guifg=#87ffaf +hi Question gui=bold guifg=#87ffaf +hi ErrorMsg gui=none guibg=#870000 guifg=#eeeeee +hi WarningMsg gui=none guibg=#5f5f00 guifg=#eeeeee +hi SpecialKey gui=none guifg=#5fdf5f +hi Title gui=bold guifg=#afafff +hi Directory guifg=#8787ff +hi DiffAdd gui=none guibg=#000087 +hi DiffChange gui=none guibg=#5f5f00 +hi DiffDelete gui=none guibg=#5f0000 guifg=#5f5f00 +hi DiffText gui=none guibg=#5f005f +hi Pmenu gui=none guibg=#00005f guifg=#87ffaf +hi PmenuSel gui=none guibg=#005f87 guifg=#87ffaf +hi PmenuSbar gui=none guibg=#0000af +hi PmenuThumb gui=none guibg=#00afaf +hi MatchParen gui=bold guibg=#005f87 +hi SpellBad gui=none guibg=#870000 +hi SpellCap gui=none guibg=#000087 +hi SpellLocal gui=none guibg=#008787 +hi SpellRare gui=none guibg=#870087 + +hi Comment gui=none guifg=#af8787 +hi Constant gui=none guifg=#ffaf5f + hi String gui=none guibg=#262626 guifg=#ffaf5f + hi Character gui=none guibg=#262626 guifg=#ffaf5f + hi Number gui=none guifg=#00af00 + hi Float gui=none guifg=#00df5f +hi Identifier gui=none guifg=#dfdf87 + hi Function gui=none guifg=#ff8787 +hi Statement gui=bold guifg=#5f5fff + hi Exception gui=bold guifg=#875fff + hi Operator gui=none guifg=#5fafff + hi Label gui=none guifg=#5f5fff +hi PreProc gui=bold guifg=#00af87 +hi Type gui=bold guifg=#5faf5f +hi Special gui=none guibg=#262626 guifg=#5fffff +hi Underlined gui=underline guifg=#ffff5f +hi Ignore gui=bold guifg=#262626 +hi Error gui=bold guibg=#5f0000 guifg=#ffffff +hi Todo gui=bold guibg=#afaf5f guifg=#000000 + +hi OperatorCurlyBrackets gui=bold guifg=#5fafff + +" highlight modes +autocmd InsertEnter * hi StatusLine guibg=#5f0000 +autocmd InsertEnter * hi User1 guibg=#5f0000 +autocmd InsertEnter * hi User2 guibg=#5f0000 +autocmd InsertLeave * hi User2 guibg=#303030 +autocmd InsertLeave * hi User1 guibg=#303030 +autocmd InsertLeave * hi StatusLine guibg=#303030 +autocmd CmdwinEnter * hi StatusLine guibg=#005f00 +autocmd CmdwinEnter * hi User1 guibg=#005f00 +autocmd CmdwinEnter * hi User2 guibg=#005f00 +autocmd CmdwinLeave * hi User2 guibg=#303030 +autocmd CmdwinLeave * hi User1 guibg=#303030 +autocmd CmdwinLeave * hi StatusLine guibg=#303030 + +end diff --git a/colors/lucius.vim b/colors/lucius.vim new file mode 100755 index 0000000..f83c92a --- /dev/null +++ b/colors/lucius.vim @@ -0,0 +1,346 @@ +" Vim color file +" Maintainer: Jonathan Filip +" Last Modified: Wed Oct 21, 2009 11:39AM +" Version: 3.1 +" +" GUI / 256 color terminal +" +" I started out trying to combine my favorite parts of other schemes and ended +" up with this (oceandeep, moria, peaksea, wombat, zenburn). +" +" This file also tries to have descriptive comments for each higlighting group +" so it is easy to understand what each part does. + + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let colors_name="lucius" + +" Some other colors to save +" blue: 3eb8e5 +" green: 92d400 +" c green: d5f876, cae682 +" new blue: 002D62 +" new gray: CCCCCC + + +" Base color +" ---------- +hi Normal guifg=#e0e0e0 guibg=#202020 +hi Normal ctermfg=253 ctermbg=235 + + +" Comment Group +" ------------- +" any comment +hi Comment guifg=#606060 gui=none +hi Comment ctermfg=240 cterm=none + + +" Constant Group +" -------------- +" any constant +hi Constant guifg=#8cd0d3 gui=none +hi Constant ctermfg=116 cterm=none +" strings +hi String guifg=#80c0d9 gui=none +hi String ctermfg=110 cterm=none +" character constant +hi Character guifg=#80c0d9 gui=none +hi Character ctermfg=110 cterm=none +" numbers decimal/hex +hi Number guifg=#8cd0d3 gui=none +hi Number ctermfg=116 cterm=none +" true, false +hi Boolean guifg=#8cd0d3 gui=none +hi Boolean ctermfg=116 cterm=none +" float +hi Float guifg=#8cd0d3 gui=none +hi Float ctermfg=116 cterm=none + + +" Identifier Group +" ---------------- +" any variable name +hi Identifier guifg=#efaf7f gui=none +hi Identifier ctermfg=216 cterm=none +" function, method, class +hi Function guifg=#efaf7f gui=none +hi Function ctermfg=216 cterm=none + + +" Statement Group +" --------------- +" any statement +hi Statement guifg=#b3d38c gui=none +hi Statement ctermfg=150 cterm=none +" if, then, else +hi Conditional guifg=#b3d38c gui=none +hi Conditional ctermfg=150 cterm=none +" try, catch, throw, raise +hi Exception guifg=#b3d38c gui=none +hi Exception ctermfg=150 cterm=none +" for, while, do +hi Repeat guifg=#b3d38c gui=none +hi Repeat ctermfg=150 cterm=none +" case, default +hi Label guifg=#b3d38c gui=none +hi Label ctermfg=150 cterm=none +" sizeof, +, * +hi Operator guifg=#b3d38c gui=none +hi Operator ctermfg=150 cterm=none +" any other keyword +hi Keyword guifg=#b3d38c gui=none +hi Keyword ctermfg=150 cterm=none + + +" Preprocessor Group +" ------------------ +" generic preprocessor +hi PreProc guifg=#f0dfaf gui=none +hi PreProc ctermfg=223 cterm=none +" #include +hi Include guifg=#f0dfaf gui=none +hi Include ctermfg=223 cterm=none +" #define +hi Define guifg=#f0dfaf gui=none +hi Define ctermfg=223 cterm=none +" same as define +hi Macro guifg=#f0dfaf gui=none +hi Macro ctermfg=223 cterm=none +" #if, #else, #endif +hi PreCondit guifg=#f0dfaf gui=none +hi PreCondit ctermfg=223 cterm=none + + +" Type Group +" ---------- +" int, long, char +hi Type guifg=#93d6a9 gui=none +hi Type ctermfg=115 cterm=none +" static, register, volative +hi StorageClass guifg=#93d6a9 gui=none +hi StorageClass ctermfg=115 cterm=none +" struct, union, enum +hi Structure guifg=#93d6a9 gui=none +hi Structure ctermfg=115 cterm=none +" typedef +hi Typedef guifg=#93d6a9 gui=none +hi Typedef ctermfg=115 cterm=none + + +" Special Group +" ------------- +" any special symbol +hi Special guifg=#cca3b3 gui=none +hi Special ctermfg=181 cterm=none +" special character in a constant +hi SpecialChar guifg=#cca3b3 gui=none +hi SpecialChar ctermfg=181 cterm=none +" things you can CTRL-] +hi Tag guifg=#cca3b3 gui=none +hi Tag ctermfg=181 cterm=none +" character that needs attention +hi Delimiter guifg=#cca3b3 gui=none +hi Delimiter ctermfg=181 cterm=none +" special things inside a comment +hi SpecialComment guifg=#cca3b3 gui=none +hi SpecialComment ctermfg=181 cterm=none +" debugging statements +hi Debug guifg=#cca3b3 guibg=NONE gui=none +hi Debug ctermfg=181 ctermbg=NONE cterm=none + + +" Underlined Group +" ---------------- +" text that stands out, html links +hi Underlined guifg=fg gui=underline +hi Underlined ctermfg=fg cterm=underline + + +" Ignore Group +" ------------ +" left blank, hidden +hi Ignore guifg=bg +hi Ignore ctermfg=bg + + +" Error Group +" ----------- +" any erroneous construct +hi Error guifg=#e37170 guibg=#432323 gui=none +hi Error ctermfg=167 ctermbg=52 cterm=none + + +" Todo Group +" ---------- +" todo, fixme, note, xxx +hi Todo guifg=#efef8f guibg=NONE gui=underline +hi Todo ctermfg=228 ctermbg=NONE cterm=underline + + +" Spelling +" -------- +" word not recognized +hi SpellBad guisp=#ee0000 gui=undercurl +hi SpellBad ctermbg=9 cterm=undercurl +" word not capitalized +hi SpellCap guisp=#eeee00 gui=undercurl +hi SpellCap ctermbg=12 cterm=undercurl +" rare word +hi SpellRare guisp=#ffa500 gui=undercurl +hi SpellRare ctermbg=13 cterm=undercurl +" wrong spelling for selected region +hi SpellLocal guisp=#ffa500 gui=undercurl +hi SpellLocal ctermbg=14 cterm=undercurl + + +" Cursor +" ------ +" character under the cursor +hi Cursor guifg=bg guibg=#a3e3ed +hi Cursor ctermfg=bg ctermbg=153 +" like cursor, but used when in IME mode +hi CursorIM guifg=bg guibg=#96cdcd +hi CursorIM ctermfg=bg ctermbg=116 +" cursor column +hi CursorColumn guifg=NONE guibg=#202438 gui=none +hi CursorColumn ctermfg=NONE ctermbg=236 cterm=none +" cursor line/row +hi CursorLine gui=NONE guibg=#202438 gui=none +hi CursorLine cterm=NONE ctermbg=236 cterm=none + + +" Misc +" ---- +" directory names and other special names in listings +hi Directory guifg=#c0e0b0 gui=none +hi Directory ctermfg=151 cterm=none +" error messages on the command line +hi ErrorMsg guifg=#ee0000 guibg=NONE gui=none +hi ErrorMsg ctermfg=196 ctermbg=NONE cterm=none +" column separating vertically split windows +hi VertSplit guifg=#777777 guibg=#363946 gui=none +hi VertSplit ctermfg=242 ctermbg=237 cterm=none +" columns where signs are displayed (used in IDEs) +hi SignColumn guifg=#9fafaf guibg=#181818 gui=none +hi SignColumn ctermfg=145 ctermbg=233 cterm=none +" line numbers +hi LineNr guifg=#818698 guibg=#363946 +hi LineNr ctermfg=102 ctermbg=237 +" match parenthesis, brackets +hi MatchParen guifg=#00ff00 guibg=NONE gui=bold +hi MatchParen ctermfg=46 ctermbg=NONE cterm=bold +" the 'more' prompt when output takes more than one line +hi MoreMsg guifg=#2e8b57 gui=none +hi MoreMsg ctermfg=29 cterm=none +" text showing what mode you are in +hi ModeMsg guifg=#76d5f8 guibg=NONE gui=none +hi ModeMsg ctermfg=117 ctermbg=NONE cterm=none +" the '~' and '@' and showbreak, '>' double wide char doesn't fit on line +hi NonText guifg=#404040 gui=none +hi NonText ctermfg=235 cterm=none +" the hit-enter prompt (show more output) and yes/no questions +hi Question guifg=fg gui=none +hi Question ctermfg=fg cterm=none +" meta and special keys used with map, unprintable characters +hi SpecialKey guifg=#404040 +hi SpecialKey ctermfg=237 +" titles for output from :set all, :autocmd, etc +hi Title guifg=#62bdde gui=none +hi Title ctermfg=74 cterm=none +"hi Title guifg=#5ec8e5 gui=none +" warning messages +hi WarningMsg guifg=#e5786d gui=none +hi WarningMsg ctermfg=173 cterm=none +" current match in the wildmenu completion +hi WildMenu guifg=#cae682 guibg=#363946 gui=bold,underline +hi WildMenu ctermfg=16 ctermbg=186 cterm=bold + + +" Diff +" ---- +" added line +hi DiffAdd guifg=#80a090 guibg=#313c36 gui=none +hi DiffAdd ctermfg=108 ctermbg=22 cterm=none +" changed line +hi DiffChange guifg=NONE guibg=#4a343a gui=none +hi DiffChange ctermfg=fg ctermbg=52 cterm=none +" deleted line +hi DiffDelete guifg=#6c6661 guibg=#3c3631 gui=none +hi DiffDelete ctermfg=59 ctermbg=58 cterm=none +" changed text within line +hi DiffText guifg=#f05060 guibg=#4a343a gui=bold +hi DiffText ctermfg=203 ctermbg=52 cterm=bold + + +" Folds +" ----- +" line used for closed folds +hi Folded guifg=#91d6f8 guibg=#363946 gui=none +hi Folded ctermfg=117 ctermbg=238 cterm=none +" column on side used to indicated open and closed folds +hi FoldColumn guifg=#91d6f8 guibg=#363946 gui=none +hi FoldColumn ctermfg=117 ctermbg=238 cterm=none + + +" Search +" ------ +" highlight incremental search text; also highlight text replaced with :s///c +hi IncSearch guifg=#66ffff gui=reverse +hi IncSearch ctermfg=87 cterm=reverse +" hlsearch (last search pattern), also used for quickfix +hi Search guibg=#ffaa33 gui=none +hi Search ctermbg=214 cterm=none + + +" Popup Menu +" ---------- +" normal item in popup +hi Pmenu guifg=#e0e0e0 guibg=#303840 gui=none +hi Pmenu ctermfg=253 ctermbg=233 cterm=none +" selected item in popup +hi PmenuSel guifg=#cae682 guibg=#505860 gui=none +hi PmenuSel ctermfg=186 ctermbg=237 cterm=none +" scrollbar in popup +hi PMenuSbar guibg=#505860 gui=none +hi PMenuSbar ctermbg=59 cterm=none +" thumb of the scrollbar in the popup +hi PMenuThumb guibg=#808890 gui=none +hi PMenuThumb ctermbg=102 cterm=none + + +" Status Line +" ----------- +" status line for current window +hi StatusLine guifg=#e0e0e0 guibg=#363946 gui=bold +hi StatusLine ctermfg=254 ctermbg=237 cterm=bold +" status line for non-current windows +hi StatusLineNC guifg=#767986 guibg=#363946 gui=none +hi StatusLineNC ctermfg=244 ctermbg=237 cterm=none + + +" Tab Lines +" --------- +" tab pages line, not active tab page label +hi TabLine guifg=#b6bf98 guibg=#363946 gui=none +hi TabLine ctermfg=244 ctermbg=236 cterm=none +" tab pages line, where there are no labels +hi TabLineFill guifg=#cfcfaf guibg=#363946 gui=none +hi TabLineFill ctermfg=187 ctermbg=236 cterm=none +" tab pages line, active tab page label +hi TabLineSel guifg=#efefef guibg=#414658 gui=bold +hi TabLineSel ctermfg=254 ctermbg=236 cterm=bold + + +" Visual +" ------ +" visual mode selection +hi Visual guifg=NONE guibg=#364458 +hi Visual ctermfg=NONE ctermbg=24 +" visual mode selection when vim is not owning the selection (x11 only) +hi VisualNOS guifg=fg gui=underline +hi VisualNOS ctermfg=fg cterm=underline diff --git a/colors/manxome.vim b/colors/manxome.vim new file mode 100755 index 0000000..0db38ea --- /dev/null +++ b/colors/manxome.vim @@ -0,0 +1,47 @@ +""" local syntax file - set colors on a per-machine basis: +""" Vim color file +""" Title: Manxome Foes Color Scheme +""" Maintainer: Ricardo SIGNES +""" This Version: R2v2 [2003-07-16] +""" suggested vim editing options: tw=0 ts=4 sw=4 + +"" clear and re-initialize global variables +hi clear +set background=dark +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "manxome" + +"" set highlight groups +"" you'll notice that the ctermbg is often 'none'; this is so that when +"" console vim runs in a terminal, transparency (if any) is not broken + +highlight Title ctermfg=3 ctermbg=none cterm=bold guifg=#ffff00 guibg=#000000 gui=none +highlight Directory ctermfg=4 ctermbg=none cterm=bold guifg=#0000ff guibg=#000000 gui=none +highlight StatusLine ctermfg=7 ctermbg=4 cterm=bold guifg=#ffffff guibg=#0000ff gui=none +highlight StatusLineNC ctermfg=0 ctermbg=4 cterm=bold guifg=#000000 guibg=#0000ff gui=none +highlight Normal ctermfg=7 ctermbg=none cterm=none guifg=#cccccc guibg=#000000 gui=none +highlight Search ctermfg=7 ctermbg=4 cterm=bold guifg=#ffffff guibg=#0000ff gui=none +highlight Visual ctermfg=7 ctermbg=6 cterm=bold guifg=#ffffff guibg=#00aaaa gui=none + +"" set major preferred groups + +highlight Comment ctermfg=2 ctermbg=none cterm=bold guifg=#00ff00 guibg=#000000 gui=none +highlight Constant ctermfg=6 ctermbg=none cterm=bold guifg=#00ffff guibg=#000000 gui=none +highlight Identifier ctermfg=4 ctermbg=none cterm=bold guifg=#0000ee guibg=#000000 gui=none +highlight Statement ctermfg=6 ctermbg=none cterm=none guifg=#00aaaa guibg=#000000 gui=none +highlight PreProc ctermfg=7 ctermbg=none cterm=bold guifg=#ffffff guibg=#000000 gui=none +highlight Type ctermfg=6 ctermbg=none cterm=none guifg=#00aaaa guibg=#000000 gui=none +highlight Special ctermfg=7 ctermbg=none cterm=bold guifg=#ffffff guibg=#000000 gui=none +highlight Underlined ctermfg=2 ctermbg=none cterm=none guifg=#00aa00 guibg=#000000 gui=none +highlight Ignore ctermfg=0 ctermbg=none cterm=bold guifg=#aaaaaa guibg=#000000 gui=none +highlight Error ctermfg=1 ctermbg=none cterm=bold guibg=#ff0000 guibg=#000000 gui=none +highlight Todo ctermfg=3 ctermbg=none cterm=none guifg=#aaaa00 guibg=#000000 gui=none + +" set syntax-specific groups +" I'd like to avoid using these, but the default settings for these two are +" just no good. Seeing italic text in Vim is just plain wrong. + +highlight htmlBold ctermfg=7 ctermbg=none cterm=bold guifg=#ffffff guibg=#000000 gui=none +highlight htmlItalic ctermfg=5 ctermbg=none cterm=bold guifg=#ff00ff guibg=#000000 gui=none diff --git a/colors/marklar.vim b/colors/marklar.vim new file mode 100755 index 0000000..ea9395f --- /dev/null +++ b/colors/marklar.vim @@ -0,0 +1,174 @@ +" ------------------------------------------------------------------ +" Filename: marklar.vim +" Last Modified: Nov, 30 2006 (13:01) +" Version: 0.5 +" Maintainer: SM Smithfield (m_smithfield AT yahoo DOT com) +" Copyright: 2006 SM Smithfield +" This script is free software; you can redistribute it and/or +" modify it under the terms of the GNU General Public License as +" published by the Free Software Foundation; either version 2 of +" the License, or (at your option) any later version. +" Description: Vim colorscheme file. +" Install: Put this file in the users colors directory (~/.vim/colors) +" then load it with :colorscheme marklar +" ------------------------------------------------------------------ + +hi clear +set background=dark +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "marklar" + +if !exists("s:main") + + " OPTIONS: + let s:bold_opt = 0 + let s:ignore_opt = 1 + + function! s:main() + if version >= 700 + call s:apply_opts() + endif + + if s:bold_opt + let s:bold = 'bold' + else + let s:bold = 'NONE' + endif + + if s:ignore_opt + " completely invisible + let s:ignore = 'bg' + else + " nearly invisible + let s:ignore = '#467C5C' + endif + + execute "hi Constant guifg=#FFFFFF guibg=NONE ctermfg=7 cterm=NONE" + execute "hi Identifier guifg=#38FF56 guibg=NONE gui=".s:bold." ctermfg=8 cterm=bold" + execute "hi Statement guifg=#FFFF00 guibg=NONE gui=".s:bold." ctermfg=3 cterm=bold" + execute "hi Special guifg=#25B9F8 guibg=bg gui=".s:bold." ctermfg=2 cterm=underline" + execute "hi PreProc guifg=#FF80FF guibg=bg gui=NONE ctermfg=2" + execute "hi Type guifg=#00FFFF guibg=NONE gui=".s:bold." ctermfg=6 cterm=bold" + + execute "hi Ignore guifg=".s:ignore." guibg=NONE ctermfg=0" + + hi Comment guifg=#00BBBB guibg=NONE ctermfg=6 cterm=none + hi Cursor guifg=NONE guibg=#FF0000 + hi DiffAdd guifg=NONE guibg=#136769 ctermfg=4 ctermbg=7 cterm=NONE + hi DiffDelete guifg=NONE guibg=#50694A ctermfg=1 ctermbg=7 cterm=NONE + hi DiffChange guifg=fg guibg=#00463c gui=NONE ctermfg=4 ctermbg=2 cterm=NONE + hi DiffText guifg=#7CFC94 guibg=#00463c gui=bold ctermfg=4 ctermbg=3 cterm=NONE + hi Directory guifg=#25B9F8 guibg=NONE ctermfg=2 + hi Error guifg=#FFFFFF guibg=#000000 ctermfg=7 ctermbg=0 cterm=bold + hi ErrorMsg guifg=#8eff2e guibg=#204d40 + hi FoldColumn guifg=#00BBBB guibg=#204d40 + hi Folded guifg=#44DDDD guibg=#204d40 ctermfg=0 ctermbg=8 cterm=bold + + hi IncSearch guibg=#52891f gui=bold + hi LineNr guifg=#38ff56 guibg=#204d40 + hi ModeMsg guifg=#FFFFFF guibg=#0000FF ctermfg=7 ctermbg=4 cterm=bold + hi MoreMsg guifg=#FFFFFF guibg=#00A261 ctermfg=7 ctermbg=2 cterm=bold + hi NonText guifg=#00bbbb guibg=#204d40 + hi Normal guifg=#71C293 guibg=#06544a + hi Question guifg=#FFFFFF guibg=#00A261 + hi Search guifg=NONE guibg=#0f374c ctermfg=3 ctermbg=0 cterm=bold + + hi SignColumn guifg=#00BBBB guibg=#204d40 + hi SpecialKey guifg=#00FFFF guibg=#266955 + hi StatusLine guifg=#245748 guibg=#71C293 gui=NONE cterm=reverse + hi StatusLineNC guifg=#245748 guibg=#689C7C gui=NONE + hi Title guifg=#7CFC94 guibg=NONE gui=bold ctermfg=2 cterm=bold + hi Todo guifg=#FFFFFF guibg=#884400 ctermfg=6 ctermbg=4 cterm=NONE + hi Underlined guifg=#df820c guibg=NONE gui=underline ctermfg=8 cterm=underline + hi Visual guibg=#0B7260 gui=NONE + hi WarningMsg guifg=#FFFFFF guibg=#FF0000 ctermfg=7 ctermbg=1 cterm=bold + hi WildMenu guifg=#20012e guibg=#00a675 gui=bold ctermfg=NONE ctermbg=NONE cterm=bold + " + if version >= 700 + hi SpellBad guisp=#FF0000 + hi SpellCap guisp=#0000FF + hi SpellRare guisp=#ff4046 + hi SpellLocal guisp=#000000 ctermbg=0 + hi Pmenu guifg=#00ffff guibg=#000000 ctermbg=0 ctermfg=6 + hi PmenuSel guifg=#ffff00 guibg=#000000 gui=bold cterm=bold ctermfg=3 + hi PmenuSbar guibg=#204d40 ctermbg=6 + hi PmenuThumb guifg=#38ff56 ctermfg=3 + hi CursorColumn guibg=#096354 + hi CursorLine guibg=#096354 + hi Tabline guifg=bg guibg=fg gui=NONE cterm=reverse,bold ctermfg=NONE ctermbg=NONE + hi TablineSel guifg=#20012e guibg=#00a675 gui=bold + hi TablineFill guifg=#689C7C + hi MatchParen guifg=#38ff56 guibg=#0000ff gui=bold ctermbg=4 + endif + " + hi Tag guifg=#7CFC94 guibg=NONE gui=bold ctermfg=2 cterm=bold + hi link Bold Tag + " + hi pythonPreCondit ctermfg=2 cterm=NONE + execute "hi tkWidget guifg=#ffa0a0 guibg=bg gui=".s:bold." ctermfg=7 cterm=bold" + endfunction + + if version >= 700 + + let s:opts = {'bold': 0, 'ignore': 1} + + " preserves vim<7 compat, while letting me reuses some code + function! s:apply_opts() + let s:bold_opt = s:opts['bold'] + let s:ignore_opt = s:opts['ignore'] + endfunction + + function! s:print_opts(...) + let d = a:000 + if len(a:000) == 0 + let d = keys(s:opts) + endif + for k in d + echo k.': '.s:opts[k] + endfor + endfunction + + function! s:Marklar(...) + let args = a:000 + if len(args) == 0 + call s:print_opts() + else + while len(args)>0 + " take first arg + let k = args[0] + let args = args[1:] + " is it a key? + if k =~ '\a\+!' + " does it bang? + let k = strpart(k,0,strlen(k)-1) + let s:opts[k] = !s:opts[k] + call s:main() + elseif k =~ '\a\+?' + " does it quiz? + let k = strpart(k,0,strlen(k)-1) + call s:print_opts(k) + elseif len(args) + " is there another arg? + " take it + let v = args[0] + let args = args[1:] + " is it legal value? + if v == 0 || v == 1 + " assign val->key + let s:opts[k] = v + call s:main() + else + echoerr "(".v.") Bad value. Expected 0 or 1." + endif + else + endif + endwhile + endif + endfunction + command! -nargs=* Marklar :call s:Marklar() + endif +endif + +call s:main() diff --git a/colors/maroloccio.vim b/colors/maroloccio.vim new file mode 100755 index 0000000..732bbae --- /dev/null +++ b/colors/maroloccio.vim @@ -0,0 +1,594 @@ +" File : maroloccio.vim +" Description : a colour scheme for Vim (GUI only) +" Scheme : maroloccio +" Maintainer : Marco Ippolito < m a r o l o c c i o [at] g m a i l . c o m > +" Comment : works well in GUI mode +" Version : v0.3.0 inspired by watermark +" Date : 6 may 2009 +" +" History: +" +" 0.3.0 Greatly improved cterm colours when t_Co=256 thanks to Kyle and CSApprox +" 0.2.9 Improved readability of cterm searches for dark backgrounds +" 0.2.8 Added VimDiff colouring +" 0.2.7 Further improved readability of cterm colours +" 0.2.6 Improved readability of cterm colours on different terminals +" 0.2.5 Reinstated minimal cterm support +" 0.2.4 Added full colour descriptions and reinstated minimal cterm support +" 0.2.3 Added FoldColumn to the list of hlights as per David Hall's suggestion +" 0.2.2 Removed cterm support, changed visual highlight, fixed bolds +" 0.2.1 Changed search highlight +" 0.2.0 Removed italics +" 0.1.9 Improved search and menu highlighting +" 0.1.8 Added minimal cterm support +" 0.1.7 Uploaded to vim.org +" 0.1.6 Removed redundant highlight definitions +" 0.1.5 Improved display of folded sections +" 0.1.4 Removed linked sections for improved compatibility, more Python friendly +" 0.1.3 Removed settings which usually belong to .vimrc (as in 0.1.1) +" 0.1.2 Fixed versioning system, added .vimrc -like commands +" 0.1.1 Corrected typo in header comments, changed colour for Comment +" 0.1.0 Inital upload to vim.org + +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="maroloccio" + +" --- GUI section +" +hi Normal guifg=#8b9aaa guibg=#1a202a gui=none " watermark-foreground on watermark-background +hi Constant guifg=#82ade0 guibg=bg gui=none " cyan on background +hi Boolean guifg=#82ade0 guibg=bg gui=none " cyan on background +hi Character guifg=#82ade0 guibg=bg gui=none " cyan on background +hi Float guifg=#82ade0 guibg=bg gui=none " cyan on background +hi Comment guifg=#006666 guibg=bg gui=none " teal on background +hi Type guifg=#ffcc00 guibg=bg gui=none " yellow on background +hi Typedef guifg=#ffcc00 guibg=bg gui=none " yellow on background +hi Structure guifg=#ffcc00 guibg=bg gui=none " yellow on background +hi Function guifg=#ffcc00 guibg=bg gui=none " yellow on background +hi StorageClass guifg=#ffcc00 guibg=bg gui=none " yellow on background +hi Conditional guifg=#ff9900 guibg=bg gui=none " orange on background +hi Repeat guifg=#78ba42 guibg=bg gui=none " light green on background +hi Visual guifg=fg guibg=#3741ad gui=none " foreground on blue +hi DiffChange guifg=fg guibg=#3741ad gui=none " foreground on blue +if version>= 700 +hi Pmenu guifg=fg guibg=#3741ad gui=none " foreground on blue +endif +hi String guifg=#4c4cad guibg=bg gui=none " violet on background +hi Folded guifg=fg guibg=#333366 gui=none " foreground on dark violet +hi VertSplit guifg=fg guibg=#333366 gui=none " foreground on dark violet +if version>= 700 +hi PmenuSel guifg=fg guibg=#333366 gui=none " foreground on dark violet +endif +hi Search guifg=#78ba42 guibg=#107040 gui=none " light green on green +hi DiffAdd guifg=#78ba42 guibg=#107040 gui=none " light green on green +hi Exception guifg=#8f3231 guibg=bg gui=none " red on background +hi Title guifg=#8f3231 guibg=bg gui=none " red on background +hi Error guifg=fg guibg=#8f3231 gui=none " foreground on red +hi DiffDelete guifg=fg guibg=#8f3231 gui=none " foreground on red +hi Todo guifg=#8f3231 guibg=#0e1219 gui=bold,undercurl guisp=#cbc32a " red on dark grey +hi LineNr guifg=#2c3138 guibg=#0e1219 gui=none " grey on dark grey +hi Statement guifg=#9966cc guibg=bg gui=none " lavender on background +hi Underlined gui=bold,underline " underline +if version>= 700 +hi CursorLine guibg=#0e1219 gui=none " foreground on dark grey +hi CursorColumn guibg=#0e1219 gui=none " foreground on dark grey +endif +hi Include guifg=#107040 guibg=bg gui=none " green on background +hi Define guifg=#107040 guibg=bg gui=none " green on background +hi Macro guifg=#107040 guibg=bg gui=none " green on background +hi PreProc guifg=#107040 guibg=bg gui=none " green on background +hi PreCondit guifg=#107040 guibg=bg gui=none " green on background +hi StatusLineNC guifg=#2c3138 guibg=black gui=none " grey on black +hi StatusLine guifg=fg guibg=black gui=none " foreground on black +hi WildMenu guifg=fg guibg=#0e1219 gui=none " foreground on dark grey +hi FoldColumn guifg=#333366 guibg=#0e1219 gui=none " dark violet on dark grey +hi IncSearch guifg=#0e1219 guibg=#82ade0 gui=bold " dark grey on cyan +hi DiffText guifg=#0e1219 guibg=#82ade0 gui=bold " dark grey on cyan +hi Label guifg=#7e28a9 guibg=bg gui=none " purple on background +hi Operator guifg=#6d5279 guibg=bg gui=none " pink on background +hi Number guifg=#8b8b00 guibg=bg gui=none " dark yellow on background +if version>= 700 +hi MatchParen guifg=#0e1219 guibg=#78ba42 gui=none " dark grey on light green +endif +hi SpecialKey guifg=#333366 guibg=bg gui=none " metal on background + +hi Cursor guifg=#0e1219 guibg=#8b9aaa gui=none " dark grey on foreground +hi TabLine guifg=fg guibg=black gui=none " foreground on black +hi NonText guifg=#333366 guibg=bg gui=none " metal on background +hi Tag guifg=#3741ad guibg=bg gui=none " blue on background +hi Delimiter guifg=#3741ad guibg=bg gui=none " blue on background +hi Special guifg=#3741ad guibg=bg gui=none " blue on background +hi SpecialChar guifg=#3741ad guibg=bg gui=none " blue on background +hi SpecialComment guifg=#2680af guibg=bg gui=none " blue2 on background + +" --- CTerm8 section +if &t_Co == 8 + + " --- CTerm8 (Dark) + if &background == "dark" + "hi Normal ctermfg=Grey "ctermbg=DarkGrey + hi Constant ctermfg=DarkGreen + hi Boolean ctermfg=DarkGreen + hi Character ctermfg=DarkGreen + hi Float ctermfg=DarkGreen + hi Comment ctermfg=DarkCyan + hi Type ctermfg=Brown + hi Typedef ctermfg=Brown + hi Structure ctermfg=Brown + hi Function ctermfg=Brown + hi StorageClass ctermfg=Brown + hi Conditional ctermfg=Brown + hi Repeat ctermfg=Brown + hi Visual ctermfg=Brown ctermbg=Black + hi DiffChange ctermfg=Grey ctermbg=DarkBlue + if version>= 700 + hi Pmenu ctermfg=Grey ctermbg=DarkBlue + endif + hi String ctermfg=DarkGreen + hi Folded ctermfg=DarkGrey ctermbg=Black + hi VertSplit ctermfg=DarkGrey ctermbg=DarkGrey + if version>= 700 + hi PmenuSel ctermfg=DarkBlue ctermbg=Grey + endif + hi Search ctermfg=Black ctermbg=Brown + hi DiffAdd ctermfg=Black ctermbg=DarkGreen + hi Exception ctermfg=Brown + hi Title ctermfg=DarkRed + hi Error ctermfg=Brown ctermbg=DarkRed + hi DiffDelete ctermfg=Brown ctermbg=DarkRed + hi Todo ctermfg=Brown ctermbg=DarkRed + hi LineNr ctermfg=DarkGrey + hi Statement ctermfg=Brown + hi Underlined cterm=Underline + if version>= 700 + hi CursorLine ctermbg=Black cterm=Underline + hi CursorColumn ctermfg=Grey ctermbg=Black + endif + hi Include ctermfg=DarkMagenta + hi Define ctermfg=DarkMagenta + hi Macro ctermfg=DarkMagenta + hi PreProc ctermfg=DarkMagenta + hi PreCondit ctermfg=DarkMagenta + hi StatusLineNC ctermfg=DarkGrey ctermbg=Black + hi StatusLine ctermfg=Grey ctermbg=DarkGrey + hi WildMenu ctermfg=Grey ctermbg=DarkGrey + hi FoldColumn ctermfg=DarkGrey + hi IncSearch ctermfg=DarkCyan ctermbg=Black + hi DiffText ctermfg=DarkBlue ctermbg=Grey + hi Label ctermfg=Brown + hi Operator ctermfg=Brown + hi Number ctermfg=DarkGreen + if version>= 700 + hi MatchParen ctermfg=Grey ctermbg=Green + endif + hi SpecialKey ctermfg=DarkRed + + hi Cursor ctermfg=Black ctermbg=Grey + hi Delimiter ctermfg=Brown + hi NonText ctermfg=DarkRed + hi Special ctermfg=Brown + hi SpecialChar ctermfg=Brown + hi SpecialComment ctermfg=DarkCyan + hi TabLine ctermfg=DarkGrey ctermbg=Grey + hi Tag ctermfg=Brown + + " --- CTerm8 (Light) + elseif &background == "light" + hi Normal ctermfg=Black ctermbg=White + hi Constant ctermfg=DarkCyan + hi Boolean ctermfg=DarkCyan + hi Character ctermfg=DarkCyan + hi Float ctermfg=DarkCyan + hi Comment ctermfg=DarkGreen + hi Type ctermfg=DarkBlue + hi Typedef ctermfg=DarkBlue + hi Structure ctermfg=DarkBlue + hi Function ctermfg=DarkBlue + hi StorageClass ctermfg=DarkBlue + hi Conditional ctermfg=DarkBlue + hi Repeat ctermfg=DarkBlue + hi Visual ctermfg=Brown ctermbg=Black + hi DiffChange ctermfg=Grey ctermbg=DarkBlue + if version>= 700 + hi Pmenu ctermfg=Grey ctermbg=DarkBlue + endif + hi String ctermfg=DarkRed + hi Folded ctermfg=Black ctermbg=DarkCyan + hi VertSplit ctermfg=Grey ctermbg=Black + if version>= 700 + hi PmenuSel ctermfg=DarkBlue ctermbg=Grey + endif + hi Search ctermfg=Grey ctermbg=DarkGreen + hi DiffAdd ctermfg=Black ctermbg=DarkGreen + hi Exception ctermfg=DarkBlue + hi Title ctermfg=DarkRed + hi Error ctermfg=Brown ctermbg=DarkRed + hi DiffDelete ctermfg=Brown ctermbg=DarkRed + hi Todo ctermfg=Brown ctermbg=DarkRed + hi LineNr ctermfg=Black ctermbg=Grey + hi Statement ctermfg=DarkBlue + hi Underlined cterm=Underline + if version>= 700 + hi CursorLine ctermbg=Grey cterm=Underline + hi CursorColumn ctermfg=Black ctermbg=Grey + endif + hi Include ctermfg=DarkMagenta + hi Define ctermfg=DarkMagenta + hi Macro ctermfg=DarkMagenta + hi PreProc ctermfg=DarkMagenta + hi PreCondit ctermfg=DarkMagenta + hi StatusLineNC ctermfg=Grey ctermbg=DarkBlue + hi StatusLine ctermfg=Grey ctermbg=Black + hi WildMenu ctermfg=Grey ctermbg=DarkBlue + hi FoldColumn ctermfg=Black ctermbg=Grey + hi IncSearch ctermfg=Brown ctermbg=Black + hi DiffText ctermfg=DarkBlue ctermbg=Grey + hi Label ctermfg=DarkBlue + hi Operator ctermfg=DarkBlue + hi Number ctermfg=DarkCyan + if version>= 700 + hi MatchParen ctermfg=Grey ctermbg=Green + endif + hi SpecialKey ctermfg=Red + + hi Cursor ctermfg=Black ctermbg=Grey + hi Delimiter ctermfg=DarkBlue + hi NonText ctermfg=Red + hi Special ctermfg=DarkBlue + hi SpecialChar ctermfg=DarkBlue + hi SpecialComment ctermfg=DarkGreen + hi TabLine ctermfg=DarkBlue ctermbg=Grey + hi Tag ctermfg=DarkBlue + endif + +" --- CTerm256 section +elseif &t_Co == 256 + + if v:version < 700 + command! -nargs=+ CSAHi exe "hi" substitute(substitute(, "undercurl", "underline", "g"), "guisp\\S\\+", "", "g") + else + command! -nargs=+ CSAHi exe "hi" + endif + if has("gui_running") || (&t_Co == 256 && (&term ==# "xterm" || &term =~# "^screen") && exists("g:CSApprox_konsole") && g:CSApprox_konsole) || &term =~? "^konsole" + CSAHi Normal ctermbg=59 ctermfg=145 + CSAHi Constant term=underline ctermbg=59 ctermfg=146 + CSAHi Boolean ctermbg=59 ctermfg=146 + CSAHi Character ctermbg=59 ctermfg=146 + CSAHi Float ctermbg=59 ctermfg=146 + CSAHi Comment term=bold ctermbg=59 ctermfg=30 + CSAHi Type term=underline ctermbg=59 ctermfg=220 + CSAHi Typedef ctermbg=59 ctermfg=220 + CSAHi Structure ctermbg=59 ctermfg=220 + CSAHi Function ctermbg=59 ctermfg=220 + CSAHi StorageClass ctermbg=59 ctermfg=220 + CSAHi Conditional ctermbg=59 ctermfg=214 + CSAHi Repeat ctermbg=59 ctermfg=113 + CSAHi Visual term=reverse ctermbg=61 ctermfg=white + CSAHi DiffChange term=bold ctermbg=61 ctermfg=white + CSAHi Pmenu ctermbg=61 ctermfg=white + CSAHi String ctermbg=59 ctermfg=61 + CSAHi Folded ctermbg=61 ctermfg=black + CSAHi VertSplit term=reverse ctermbg=black ctermfg=61 + CSAHi PmenuSel ctermbg=220 ctermfg=black + CSAHi Search term=reverse ctermbg=29 ctermfg=113 + CSAHi DiffAdd term=bold ctermbg=29 ctermfg=113 + CSAHi Exception ctermbg=59 ctermfg=red + CSAHi Title term=bold ctermbg=59 ctermfg=red + CSAHi Error term=reverse ctermbg=red ctermfg=white + CSAHi DiffDelete term=bold ctermbg=red ctermfg=white + CSAHi Todo cterm=bold,undercurl ctermbg=black ctermfg=red + CSAHi LineNr term=underline ctermbg=black ctermfg=61 + CSAHi Statement term=bold ctermbg=59 ctermfg=140 + CSAHi Underlined term=underline cterm=bold,underline ctermfg=147 + CSAHi CursorLine term=underline cterm=underline ctermbg=black + CSAHi CursorColumn term=reverse ctermfg=white ctermbg=29 + CSAHi Include ctermbg=59 ctermfg=97 + CSAHi Define ctermbg=59 ctermfg=97 + CSAHi Macro ctermbg=59 ctermfg=97 + CSAHi PreProc term=underline ctermbg=59 ctermfg=97 + CSAHi PreCondit ctermbg=59 ctermfg=97 + CSAHi StatusLineNC term=reverse ctermbg=16 ctermfg=61 + CSAHi StatusLine term=reverse,bold ctermbg=16 ctermfg=220 + CSAHi WildMenu ctermbg=16 ctermfg=145 + CSAHi FoldColumn ctermbg=16 ctermfg=61 + CSAHi IncSearch term=reverse cterm=bold ctermbg=146 ctermfg=16 + CSAHi DiffText term=reverse cterm=bold ctermbg=146 ctermfg=16 + CSAHi Label ctermbg=59 ctermfg=140 + CSAHi Operator ctermbg=59 ctermfg=142 + CSAHi Number ctermbg=59 ctermfg=146 + CSAHi MatchParen term=reverse ctermbg=113 ctermfg=16 + CSAHi SpecialKey term=bold ctermbg=59 ctermfg=97 + + CSAHi Cursor ctermbg=145 ctermfg=16 + CSAHi lCursor ctermbg=145 ctermfg=59 + CSAHi Delimiter ctermbg=59 ctermfg=61 + CSAHi Directory term=bold ctermfg=39 + CSAHi ErrorMsg ctermbg=160 ctermfg=231 + CSAHi Identifier term=underline ctermfg=87 + CSAHi Ignore ctermfg=59 + CSAHi ModeMsg term=bold cterm=bold + CSAHi MoreMsg term=bold cterm=bold ctermfg=72 + CSAHi NonText term=bold ctermbg=59 ctermfg=60 + CSAHi PmenuSbar ctermbg=250 + CSAHi PmenuThumb ctermbg=145 ctermfg=59 + CSAHi Question cterm=bold ctermfg=28 + CSAHi SignColumn ctermbg=250 ctermfg=39 + CSAHi Special term=bold ctermbg=59 ctermfg=61 + CSAHi SpecialChar ctermbg=59 ctermfg=61 + CSAHi SpecialComment ctermbg=59 ctermfg=73 + CSAHi SpellBad term=reverse cterm=undercurl ctermfg=196 + CSAHi SpellCap term=reverse cterm=undercurl ctermfg=21 + CSAHi SpellLocal term=underline cterm=undercurl ctermfg=51 + CSAHi SpellRare term=reverse cterm=undercurl ctermfg=201 + CSAHi TabLine term=underline ctermbg=16 ctermfg=145 + CSAHi TabLineFill term=reverse ctermbg=145 ctermfg=59 + CSAHi TabLineSel term=bold cterm=bold + CSAHi Tag ctermbg=59 ctermfg=61 + CSAHi VisualNOS term=bold,underline cterm=bold,underline + CSAHi WarningMsg ctermfg=160 + CSAHi htmlBold term=bold cterm=bold + CSAHi htmlBoldItalic term=bold,italic cterm=bold + CSAHi htmlBoldUnderline term=bold,underline cterm=bold,underline + CSAHi htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,underline + CSAHi htmlItalic term=italic + CSAHi htmlUnderline term=underline cterm=underline + CSAHi htmlUnderlineItalic term=italic,underline cterm=underline + elseif has("gui_running") || (&t_Co == 256 && (&term ==# "xterm" || &term =~# "^screen") && exists("g:CSApprox_eterm") && g:CSApprox_eterm) || &term =~? "^eterm" + CSAHi Normal ctermbg=59 ctermfg=152 + CSAHi Constant term=underline ctermbg=59 ctermfg=153 + CSAHi Boolean ctermbg=59 ctermfg=153 + CSAHi Character ctermbg=59 ctermfg=153 + CSAHi Float ctermbg=59 ctermfg=153 + CSAHi Comment term=bold ctermbg=59 ctermfg=30 + CSAHi Type term=underline ctermbg=59 ctermfg=226 + CSAHi Typedef ctermbg=59 ctermfg=226 + CSAHi Structure ctermbg=59 ctermfg=226 + CSAHi Function ctermbg=59 ctermfg=226 + CSAHi StorageClass ctermbg=59 ctermfg=226 + CSAHi Conditional ctermbg=59 ctermfg=220 + CSAHi Repeat ctermbg=59 ctermfg=150 + CSAHi Visual term=reverse ctermbg=68 ctermfg=white + CSAHi DiffChange term=bold ctermbg=68 ctermfg=white + CSAHi Pmenu ctermbg=68 ctermfg=white + CSAHi String ctermbg=59 ctermfg=104 + CSAHi Folded ctermbg=104 ctermfg=black + CSAHi VertSplit term=reverse ctermbg=black ctermfg=104 + CSAHi PmenuSel ctermbg=226 ctermfg=black + CSAHi Search term=reverse ctermbg=36 ctermfg=150 + CSAHi DiffAdd term=bold ctermbg=36 ctermfg=150 + CSAHi Exception ctermbg=59 ctermfg=red + CSAHi Title term=bold ctermbg=59 ctermfg=red + CSAHi Error term=reverse ctermbg=red ctermfg=white + CSAHi DiffDelete term=bold ctermbg=red ctermfg=white + CSAHi Todo cterm=bold,undercurl ctermbg=black ctermfg=red + CSAHi LineNr term=underline ctermbg=black ctermfg=104 + CSAHi Statement term=bold ctermbg=59 ctermfg=177 + CSAHi Underlined term=underline cterm=bold,underline ctermfg=153 + CSAHi CursorLine term=underline cterm=underline ctermbg=black + CSAHi CursorColumn term=reverse ctermfg=white ctermbg=36 + CSAHi Include ctermbg=59 ctermfg=134 + CSAHi Define ctermbg=59 ctermfg=134 + CSAHi Macro ctermbg=59 ctermfg=134 + CSAHi PreProc term=underline ctermbg=59 ctermfg=134 + CSAHi PreCondit ctermbg=59 ctermfg=134 + CSAHi StatusLineNC term=reverse ctermbg=16 ctermfg=104 + CSAHi StatusLine term=reverse,bold ctermbg=16 ctermfg=226 + CSAHi WildMenu ctermbg=17 ctermfg=152 + CSAHi FoldColumn ctermbg=17 ctermfg=104 + CSAHi IncSearch term=reverse cterm=bold ctermbg=153 ctermfg=17 + CSAHi DiffText term=reverse cterm=bold ctermbg=153 ctermfg=17 + CSAHi Label ctermbg=59 ctermfg=177 + CSAHi Operator ctermbg=59 ctermfg=142 + CSAHi Number ctermbg=59 ctermfg=153 + CSAHi MatchParen term=reverse ctermbg=150 ctermfg=17 + CSAHi SpecialKey term=bold ctermbg=59 ctermfg=134 + + CSAHi Cursor ctermbg=152 ctermfg=17 + CSAHi lCursor ctermbg=152 ctermfg=59 + CSAHi TabLine term=underline ctermbg=16 ctermfg=152 + CSAHi Ignore ctermfg=59 + CSAHi NonText term=bold ctermbg=59 ctermfg=60 + CSAHi Directory term=bold ctermfg=45 + CSAHi ErrorMsg ctermbg=196 ctermfg=255 + CSAHi MoreMsg term=bold cterm=bold ctermfg=72 + CSAHi ModeMsg term=bold cterm=bold + CSAHi htmlBoldUnderline term=bold,underline cterm=bold,underline + CSAHi htmlBoldItalic term=bold,italic cterm=bold + CSAHi htmlBold term=bold cterm=bold + CSAHi htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,underline + CSAHi PmenuSbar ctermbg=250 + CSAHi PmenuThumb ctermbg=152 ctermfg=59 + CSAHi TabLineSel term=bold cterm=bold + CSAHi TabLineFill term=reverse ctermbg=152 ctermfg=59 + CSAHi Question cterm=bold ctermfg=28 + CSAHi VisualNOS term=bold,underline cterm=bold,underline + CSAHi WarningMsg ctermfg=196 + CSAHi htmlUnderlineItalic term=italic,underline cterm=underline + CSAHi htmlUnderline term=underline cterm=underline + CSAHi Special term=bold ctermbg=59 ctermfg=68 + CSAHi Identifier term=underline ctermfg=123 + CSAHi Tag ctermbg=59 ctermfg=68 + CSAHi SpecialChar ctermbg=59 ctermfg=68 + CSAHi Delimiter ctermbg=59 ctermfg=68 + CSAHi SpecialComment ctermbg=59 ctermfg=74 + CSAHi SignColumn ctermbg=250 ctermfg=45 + CSAHi SpellBad term=reverse cterm=undercurl ctermfg=196 + CSAHi SpellCap term=reverse cterm=undercurl ctermfg=21 + CSAHi SpellRare term=reverse cterm=undercurl ctermfg=201 + CSAHi SpellLocal term=underline cterm=undercurl ctermfg=51 + CSAHi htmlItalic term=italic + elseif has("gui_running") || &t_Co == 256 + CSAHi Normal ctermbg=16 ctermfg=103 + CSAHi Constant term=underline ctermbg=16 ctermfg=110 + CSAHi Boolean ctermbg=16 ctermfg=110 + CSAHi Character ctermbg=16 ctermfg=110 + CSAHi Float ctermbg=16 ctermfg=110 + CSAHi Comment term=bold ctermbg=16 ctermfg=23 + CSAHi Type term=underline ctermbg=16 ctermfg=220 + CSAHi Typedef ctermbg=16 ctermfg=220 + CSAHi Structure ctermbg=16 ctermfg=220 + CSAHi Function ctermbg=16 ctermfg=220 + CSAHi StorageClass ctermbg=16 ctermfg=220 + CSAHi Conditional ctermbg=16 ctermfg=208 + CSAHi Repeat ctermbg=16 ctermfg=107 + CSAHi Visual term=reverse ctermbg=61 ctermfg=white + CSAHi DiffChange term=bold ctermbg=61 ctermfg=white + CSAHi Pmenu ctermbg=61 ctermfg=white + CSAHi String ctermbg=16 ctermfg=61 + CSAHi Folded ctermbg=61 ctermfg=black + CSAHi VertSplit term=reverse ctermbg=black ctermfg=61 + CSAHi PmenuSel ctermbg=220 ctermfg=black + CSAHi Search term=reverse ctermbg=23 ctermfg=107 + CSAHi DiffAdd term=bold ctermbg=23 ctermfg=107 + CSAHi Exception ctermbg=16 ctermfg=red + CSAHi Title term=bold ctermbg=16 ctermfg=red + CSAHi Error term=reverse ctermbg=red ctermfg=white + CSAHi DiffDelete term=bold ctermbg=red ctermfg=white + CSAHi Todo cterm=bold,undercurl ctermbg=black ctermfg=red + CSAHi LineNr term=underline ctermbg=black ctermfg=61 + CSAHi Statement term=bold ctermbg=16 ctermfg=98 + CSAHi Underlined term=underline cterm=bold,underline ctermfg=111 + CSAHi CursorLine term=underline cterm=underline ctermbg=black + CSAHi CursorColumn term=reverse ctermbg=23 ctermfg=white + CSAHi Include ctermbg=16 ctermfg=91 + CSAHi Define ctermbg=16 ctermfg=91 + CSAHi Macro ctermbg=16 ctermfg=91 + CSAHi PreProc term=underline ctermbg=16 ctermfg=91 + CSAHi PreCondit ctermbg=16 ctermfg=91 + CSAHi StatusLineNC term=reverse ctermbg=16 ctermfg=61 + CSAHi StatusLine term=reverse,bold ctermbg=16 ctermfg=220 + CSAHi WildMenu ctermbg=16 ctermfg=103 + CSAHi FoldColumn ctermbg=16 ctermfg=61 + CSAHi IncSearch term=reverse cterm=bold ctermbg=110 ctermfg=16 + CSAHi DiffText term=reverse cterm=bold ctermbg=110 ctermfg=16 + CSAHi Label ctermbg=16 ctermfg=98 + CSAHi Operator ctermbg=16 ctermfg=100 + CSAHi Number ctermbg=16 ctermfg=110 + CSAHi MatchParen term=reverse ctermbg=107 ctermfg=16 + CSAHi SpecialKey term=bold ctermbg=16 ctermfg=91 + + CSAHi Cursor ctermbg=103 ctermfg=16 + CSAHi lCursor ctermbg=103 ctermfg=16 + CSAHi Delimiter ctermbg=16 ctermfg=61 + CSAHi Directory term=bold ctermfg=38 + CSAHi ErrorMsg ctermbg=160 ctermfg=231 + CSAHi Identifier term=underline ctermfg=87 + CSAHi Ignore ctermfg=16 + CSAHi ModeMsg term=bold cterm=bold + CSAHi MoreMsg term=bold cterm=bold ctermfg=29 + CSAHi NonText term=bold ctermbg=16 ctermfg=59 + CSAHi PmenuSbar ctermbg=250 + CSAHi PmenuThumb ctermbg=103 ctermfg=16 + CSAHi Question cterm=bold ctermfg=22 + CSAHi SignColumn ctermbg=250 ctermfg=38 + CSAHi Special term=bold ctermbg=16 ctermfg=61 + CSAHi SpecialChar ctermbg=16 ctermfg=61 + CSAHi SpecialComment ctermbg=16 ctermfg=31 + CSAHi SpellBad term=reverse cterm=undercurl ctermfg=196 + CSAHi SpellCap term=reverse cterm=undercurl ctermfg=21 + CSAHi SpellLocal term=underline cterm=undercurl ctermfg=51 + CSAHi SpellRare term=reverse cterm=undercurl ctermfg=201 + CSAHi TabLine term=underline ctermbg=16 ctermfg=103 + CSAHi TabLineFill term=reverse ctermbg=103 ctermfg=16 + CSAHi TabLineSel term=bold cterm=bold + CSAHi Tag ctermbg=16 ctermfg=61 + CSAHi VisualNOS term=bold,underline cterm=bold,underline + CSAHi WarningMsg ctermfg=160 + CSAHi htmlBold term=bold cterm=bold + CSAHi htmlBoldItalic term=bold,italic cterm=bold + CSAHi htmlBoldUnderline term=bold,underline cterm=bold,underline + CSAHi htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,underline + CSAHi htmlItalic term=italic + CSAHi htmlUnderline term=underline cterm=underline + CSAHi htmlUnderlineItalic term=italic,underline cterm=underline + elseif has("gui_running") || &t_Co == 88 + CSAHi Normal ctermbg=80 ctermfg=37 + CSAHi Constant term=underline ctermbg=80 ctermfg=42 + CSAHi Boolean ctermbg=80 ctermfg=42 + CSAHi Character ctermbg=80 ctermfg=42 + CSAHi Float ctermbg=80 ctermfg=42 + CSAHi Comment term=bold ctermbg=80 ctermfg=21 + CSAHi Type term=underline ctermbg=80 ctermfg=72 + CSAHi Typedef ctermbg=80 ctermfg=72 + CSAHi Structure ctermbg=80 ctermfg=72 + CSAHi Function ctermbg=80 ctermfg=72 + CSAHi StorageClass ctermbg=80 ctermfg=72 + CSAHi Conditional ctermbg=80 ctermfg=68 + CSAHi Repeat ctermbg=80 ctermfg=40 + CSAHi Visual term=reverse ctermbg=18 ctermfg=white + CSAHi DiffChange term=bold ctermbg=18 ctermfg=white + CSAHi Pmenu ctermbg=18 ctermfg=white + CSAHi String ctermbg=80 ctermfg=38 + CSAHi Folded ctermbg=38 ctermfg=black + CSAHi VertSplit term=reverse ctermbg=black ctermfg=38 + CSAHi PmenuSel ctermbg=72 ctermfg=black + CSAHi Search term=reverse ctermbg=20 ctermfg=40 + CSAHi DiffAdd term=bold ctermbg=20 ctermfg=40 + CSAHi Exception ctermbg=80 ctermfg=red + CSAHi Title term=bold ctermbg=80 ctermfg=red + CSAHi Error term=reverse ctermbg=red ctermfg=white + CSAHi DiffDelete term=bold ctermbg=red ctermfg=white + CSAHi Todo cterm=bold,undercurl ctermbg=black ctermfg=white + CSAHi LineNr term=underline ctermbg=black ctermfg=38 + CSAHi Statement term=bold ctermbg=80 ctermfg=38 + CSAHi Underlined term=underline cterm=bold,underline ctermfg=39 + CSAHi CursorLine term=underline ctermbg=black + CSAHi CursorColumn term=reverse ctermbg=20 ctermfg=white + CSAHi Include ctermbg=80 ctermfg=33 + CSAHi Define ctermbg=80 ctermfg=33 + CSAHi Macro ctermbg=80 ctermfg=33 + CSAHi PreProc term=underline ctermbg=80 ctermfg=33 + CSAHi PreCondit ctermbg=80 ctermfg=33 + CSAHi StatusLineNC term=reverse ctermbg=16 ctermfg=38 + CSAHi StatusLine term=reverse,bold ctermbg=16 ctermfg=72 + CSAHi WildMenu ctermbg=16 ctermfg=37 + CSAHi FoldColumn ctermbg=16 ctermfg=38 + CSAHi IncSearch term=reverse cterm=bold ctermbg=42 ctermfg=16 + CSAHi DiffText term=reverse cterm=bold ctermbg=42 ctermfg=16 + CSAHi Label ctermbg=80 ctermfg=38 + CSAHi Operator ctermbg=80 ctermfg=36 + CSAHi Number ctermbg=80 ctermfg=42 + CSAHi MatchParen term=reverse ctermbg=40 ctermfg=16 + CSAHi SpecialKey term=bold ctermbg=80 ctermfg=33 + + CSAHi Cursor ctermbg=37 ctermfg=16 + CSAHi lCursor ctermbg=37 ctermfg=80 + CSAHi Delimiter ctermbg=80 ctermfg=18 + CSAHi Directory term=bold ctermfg=23 + CSAHi ErrorMsg ctermbg=48 ctermfg=79 + CSAHi Identifier term=underline ctermfg=31 + CSAHi Ignore ctermfg=80 + CSAHi ModeMsg term=bold cterm=bold + CSAHi MoreMsg term=bold cterm=bold ctermfg=21 + CSAHi NonText term=bold ctermbg=80 ctermfg=17 + CSAHi PmenuSbar ctermbg=85 + CSAHi PmenuThumb ctermbg=37 ctermfg=80 + CSAHi Question cterm=bold ctermfg=20 + CSAHi SignColumn ctermbg=85 ctermfg=23 + CSAHi Special term=bold ctermbg=80 ctermfg=18 + CSAHi SpecialChar ctermbg=80 ctermfg=18 + CSAHi SpecialComment ctermbg=80 ctermfg=22 + CSAHi SpellBad term=reverse cterm=undercurl ctermfg=64 + CSAHi SpellCap term=reverse cterm=undercurl ctermfg=19 + CSAHi SpellLocal term=underline cterm=undercurl ctermfg=31 + CSAHi SpellRare term=reverse cterm=undercurl ctermfg=67 + CSAHi TabLine term=underline ctermbg=16 ctermfg=37 + CSAHi TabLineFill term=reverse ctermbg=37 ctermfg=80 + CSAHi TabLineSel term=bold cterm=bold + CSAHi Tag ctermbg=80 ctermfg=18 + CSAHi VisualNOS term=bold,underline cterm=bold,underline + CSAHi WarningMsg ctermfg=48 + CSAHi htmlBold term=bold cterm=bold + CSAHi htmlBoldItalic term=bold,italic cterm=bold + CSAHi htmlBoldUnderline term=bold,underline cterm=bold,underline + CSAHi htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,underline + CSAHi htmlItalic term=italic + CSAHi htmlUnderline term=underline cterm=underline + CSAHi htmlUnderlineItalic term=italic,underline cterm=underline + endif + delcommand CSAHi + +endif diff --git a/colors/martin_krischik.vim b/colors/martin_krischik.vim new file mode 100755 index 0000000..0975ba0 --- /dev/null +++ b/colors/martin_krischik.vim @@ -0,0 +1,397 @@ +"------------------------------------------------------------------------------- +" Description: My personal colors +" $Id: martin_krischik.vim 458 2006-11-18 09:42:10Z krischik $ +" Copyright: Copyright (C) 2006 Martin Krischik +" Maintainer: Martin Krischik +" $Author: krischik $ +" $Date: 2006-11-18 10:42:10 +0100 (Sa, 18 Nov 2006) $ +" Version: 3.2 +" $Revision: 458 $ +" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/colors/martin_krischik.vim $ +" Note: Tried and Tested for 'builtin_gui', 'xterm' (KDE Konsole) +" 'vt320'" (OpenVMS) and 'linux' (Linux Console). +" History: 16.05.2006 MK Check that all vim 7.0 colors are set +" 16.05.2006 MK Split GUI from terminal. +" 24.05.2006 MK Unified Headers +" 24.07.2006 MK Omni-Completion Colors. +" 15.10.2006 MK Bram's suggestion for runtime integration +" Usage: copy to colors directory +"------------------------------------------------------------------------------ + +" First remove all existing highlighting. + +set background=light +highlight clear + +if exists ("syntax_on") + syntax reset +endif + +let colors_name = "martin_krischik" + +if version < 700 + " Section: works only with vim 7.0 use default otherwise {{{1 + " + colorscheme default + " + " }}}1 + finish +elseif (&term == "builtin_gui") + " Section: Set GUI colors. {{{1 + " + " Subsection: User-Interface Colors {{{2 + " + " Group: Normal Text Colors {{{3 + " + highlight Normal gui=none guifg=black guibg=white + highlight Search guibg=Yellow + highlight SpecialKey guifg=Blue + highlight Title gui=bold guifg=Magenta + highlight LineNr guifg=Brown guibg=grey80 + highlight NonText gui=bold guifg=Blue guibg=grey80 + highlight MatchParen guibg=Cyan + highlight IncSearch gui=reverse + " + " Group: Messages {{{3 + " + highlight WarningMsg guifg=Red + highlight ErrorMsg guifg=White guibg=Red + highlight ModeMsg gui=bold + highlight MoreMsg gui=bold guifg=SeaGreen + highlight Question gui=bold guifg=SeaGreen + " + " Group: Spell Checker {{{3 + " + highlight SpellBad gui=undercurl guisp=Red + highlight SpellCap gui=undercurl guisp=Blue + highlight SpellLocal gui=undercurl guisp=DarkCyan + highlight SpellRare gui=undercurl guisp=Magenta + " + " Group: Status line {{{3 + " + highlight StatusLine gui=bold,reverse guifg=LightBlue2 guibg=black + highlight StatusLineNC gui=reverse guifg=grey75 guibg=black + highlight VertSplit gui=reverse guifg=LightBlue3 guibg=black + " + " Group: Visual selektio {{{3n + " + highlight Visual gui=reverse guifg=firebrick guibg=white + highlight VisualNOS gui=reverse guifg=firebrick guibg=black + " + " Group: tab pages line {{{3 + " + highlight TabLine gui=reverse guifg=grey75 guibg=black + highlight TabLineFill gui=reverse + highlight TabLineSel gui=bold,reverse guifg=LightBlue2 guibg=black + " + " Group: Competion (omni and otherwise) menu colors {{{3 + " + highlight Pmenu guibg=Grey + highlight PmenuSel guifg=White guibg=firebrick + highlight PmenuSbar guibg=LightGrey guibg=DarkGrey + highlight PmenuThumb gui=reverse + highlight WildMenu guifg=White guibg=firebrick + " + " Group: Diff colors {{{3 + " + highlight DiffAdd guibg=LightBlue + highlight DiffChange guibg=LightMagenta + highlight DiffDelete gui=bold guifg=Blue guibg=LightCyan + highlight DiffText gui=bold guibg=Red + " + " Group: Fold colors {{{3 + " + highlight FoldColumn guifg=DarkBlue guibg=Grey + highlight Folded guifg=DarkBlue guibg=LightGrey + " + " Group: Other Syntax Highlight Colors {{{3 + " + highlight Directory guifg=Blue + highlight SignColumn guifg=DarkBlue guibg=Grey + " + " Group: Motif and Athena widget colors. {{{3 + " + highlight Menu guifg=Black guibg=LightGrey + highlight Scrollbar guifg=LightGrey guibg=DarkGrey + highlight Tooltip guifg=Black guibg=LightGrey + + " Subsection: Syntax Colors {{{2 + " + " Group: Comment colors syntax-group + " + highlight Comment guifg=grey30 + " + " Group: Constant colors group {{{3 + " + highlight Boolean guifg=DarkOrchid3 guibg=grey95 + highlight Character guifg=RoyalBlue3 guibg=grey95 + highlight Constant guifg=MediumOrchid3 guibg=grey95 + highlight Float guifg=MediumOrchid4 guibg=grey95 + highlight Number guifg=DarkOrchid4 guibg=grey95 + highlight String guifg=RoyalBlue4 guibg=grey95 + " + " Group: Identifier colors group {{{3 + " + highlight Function guifg=SteelBlue + highlight Identifier guifg=DarkCyan + " + " Group: Statement colors group {{{3 + " + highlight Conditional gui=bold guifg=DodgerBlue4 + highlight Exception gui=none guifg=SlateBlue4 + highlight Keyword gui=bold guifg=RoyalBlue4 + highlight Label gui=none guifg=SlateBlue3 + highlight Operator gui=none guifg=RoyalBlue3 + highlight Repeat gui=bold guifg=DodgerBlue3 + highlight Statement gui=none guifg=RoyalBlue4 + " + " Group: Preprocessor colors group {{{3 + " + highlight Define guifg=brown4 guibg=snow + highlight Include guifg=firebrick3 guibg=snow + highlight Macro guifg=brown3 guibg=snow + highlight PreCondit guifg=red guibg=snow + highlight PreProc guifg=firebrick4 guibg=snow + " + " Group: type group {{{3 + " + highlight StorageClass gui=none guifg=SeaGreen3 + highlight Structure gui=none guifg=DarkSlateGray4 + highlight Type gui=none guifg=SeaGreen4 + highlight Typedef gui=none guifg=DarkSeaGreen4 + " + " Group: special symbol group {{{3 + " + highlight Special guifg=SlateBlue guibg=GhostWhite + highlight SpecialChar guifg=DeepPink guibg=GhostWhite + highlight Tag guifg=DarkSlateBlue guibg=GhostWhite + highlight Delimiter guifg=DarkOrchid guibg=GhostWhite + highlight SpecialComment guifg=VioletRed guibg=GhostWhite + highlight Debug guifg=maroon guibg=GhostWhite + " + " Group: text that stands out {{{3 + " + highlight Underlined gui=underline guifg=SlateBlue + " + " Group: left blank, hidden {{{3 + " + highlight Ignore guifg=bg + " + " Group: any erroneous construct {{{3 + " + highlight Error gui=undercurl guifg=Red guibg=MistyRose + " + " Group: anything that needs extra attention {{{3 + " + highlight Todo guifg=Blue guibg=Yellow + + " Subsection: Cursor Colors {{{2 + " + " Group: Mouse Cursor {{{3 + " + highlight cCursor guifg=bg guibg=DarkRed + highlight Cursor guifg=bg guibg=DarkGreen + highlight CursorColumn guibg=FloralWhite + highlight CursorIM guifg=bg guibg=DarkGrey + highlight CursorLine guibg=cornsilk + highlight lCursor guifg=bg guibg=DarkMagenta + highlight oCursor guifg=bg guibg=DarkCyan + highlight vCursor guifg=bg guibg=DarkYellow + " + " Group: Text Cursor {{{3 + " + set guicursor=n:block-lCursor, + \i:ver25-Cursor, + \r:hor25-Cursor, + \v:block-vCursor, + \ve:ver35-vCursor, + \o:hor50-oCursor-blinkwait75-blinkoff50-blinkon75, + \c:block-cCursor, + \ci:ver20-cCursor, + \cr:hor20-cCursor, + \sm:block-Cursor-blinkwait175-blinkoff150-blinkon175 + + syntax enable + + " }}}1 + finish +elseif (&term == "xterm") || + \ (&term == "vt320") || + \ (&term == "linux") + " Section: Only set colors for terminals we actualy know of {{{1 + " + if &term=="vt320" + set t_Co=8 + else + set t_Co=16 + endif + + " Subsection: User Interface Colors {{{2 + " + " Group: Normal Text Colors {{{3 + " + highlight Normal term=none cterm=none ctermfg=Black ctermbg=LightGray + highlight Search term=reverse ctermbg=DarkYellow + highlight SpecialKey term=bold ctermfg=DarkBlue ctermbg=LightGray + highlight Title term=bold ctermfg=DarkMagenta ctermbg=LightGray + highlight LineNr term=underline ctermfg=DarkRed ctermbg=DarkGray + highlight NonText term=bold ctermfg=LightBlue ctermbg=LightGray + highlight MatchParen term=reverse ctermbg=DarkYellow + highlight IncSearch term=reverse cterm=reverse + " + " Group: Messages {{{3 + " + highlight WarningMsg term=standout ctermfg=DarkRed ctermbg=LightGray + highlight ErrorMsg term=standout ctermfg=White ctermbg=DarkRed + highlight ModeMsg term=bold cterm=bold ctermbg=LightGray + highlight MoreMsg term=bold ctermfg=DarkGreen ctermbg=LightGray + highlight Question term=standout ctermfg=DarkGreen ctermbg=LightGray + " + " Group: Spell Checker {{{3 + " + highlight SpellBad term=reverse ctermbg=LightRed + highlight SpellCap term=reverse ctermbg=LightBlue + highlight SpellLocal term=underline ctermbg=LightCyan + highlight SpellRare term=reverse ctermbg=LightMagenta + " + " Group: Status line {{{3 + " + highlight StatusLine term=bold,reverse cterm=bold,reverse + highlight StatusLineNC term=reverse cterm=reverse + highlight VertSplit term=reverse cterm=reverse + " + " Group: Visual selektion {{{3 + " + highlight Visual term=reverse cterm=reverse ctermfg=DarkRed ctermbg=LightGray + highlight VisualNOS term=bold,underline cterm=bold,underline + " + " Group: tab pages line {{{3 + " + highlight TabLine term=reverse cterm=reverse + highlight TabLineFill term=reverse cterm=reverse + highlight TabLineSel term=bold,reverse cterm=bold,reverse + " + " Group: Menu colors {{{3 + " + highlight Pmenu ctermbg=Grey + highlight PmenuSel ctermfg=White ctermbg=Red + highlight PmenuSbar ctermfg=LightGrey ctermbg=DarkGray + highlight PmenuThumb cterm=reverse + highlight WildMenu term=standout ctermfg=White ctermbg=Red + " + " Group: Diff colors {{{3 + " + highlight DiffAdd term=bold ctermbg=LightBlue + highlight DiffChange term=bold ctermbg=LightMagenta + highlight DiffDelete term=bold ctermfg=LightBlue ctermbg=LightCyan + highlight DiffText term=reverse cterm=bold ctermbg=LightRed + " + " Group: Fold colors {{{3 + " + highlight FoldColumn term=standout ctermfg=DarkBlue ctermbg=DarkGray + highlight Folded term=standout ctermfg=DarkBlue ctermbg=DarkGray + " + " Group: Other Syntax Highlight Colors {{{3 + " + highlight Directory term=bold ctermfg=DarkBlue ctermbg=LightGray + highlight SignColumn term=standout ctermfg=DarkBlue ctermbg=DarkGray + + " Subsection: Syntax Colors {{{2 + " + " Group: Comment colors syntax-group {{{3 + " + highlight Comment term=bold ctermfg=DarkGray ctermbg=LightGray + " + " Group: Constant colors group {{{3 + " + highlight Boolean term=underline ctermfg=DarkRed ctermbg=LightGray + highlight Character term=underline ctermfg=DarkRed ctermbg=LightGray + highlight Constant term=underline ctermfg=DarkRed ctermbg=LightGray + highlight Float term=underline ctermfg=DarkRed ctermbg=LightGray + highlight Number term=underline ctermfg=DarkRed ctermbg=LightGray + highlight String term=underline ctermfg=DarkRed ctermbg=LightGray + " + " Group: Identifier colors group {{{3 + " + highlight Function term=underline ctermfg=DarkCyan ctermbg=LightGray + highlight Identifier term=underline ctermfg=DarkCyan ctermbg=LightGray + " + " Group: Statement colors group {{{3 + " + highlight Conditional term=bold ctermfg=DarkBlue ctermbg=LightGray + highlight Exception term=bold ctermfg=DarkBlue ctermbg=LightGray + highlight Keyword term=bold ctermfg=DarkBlue ctermbg=LightGray + highlight Label term=bold ctermfg=DarkBlue ctermbg=LightGray + highlight Operator term=bold ctermfg=DarkBlue ctermbg=LightGray + highlight Repeat term=bold ctermfg=DarkBlue ctermbg=LightGray + highlight Statement term=bold ctermfg=DarkBlue ctermbg=LightGray + " + " Group: Preprocessor colors group {{{3 + " + highlight Define term=underline ctermfg=DarkMagenta ctermbg=LightGray + highlight Include term=underline ctermfg=DarkMagenta ctermbg=LightGray + highlight Macro term=underline ctermfg=DarkMagenta ctermbg=LightGray + highlight PreCondit term=underline ctermfg=DarkMagenta ctermbg=LightGray + highlight PreProc term=underline ctermfg=DarkMagenta ctermbg=LightGray + " + " Group: type group {{{3 + " + highlight StorageClass term=underline ctermfg=DarkGreen ctermbg=LightGray + highlight Structure term=underline ctermfg=DarkGreen ctermbg=LightGray + highlight Type term=underline ctermfg=DarkGreen ctermbg=LightGray + highlight Typedef term=underline ctermfg=DarkGreen ctermbg=LightGray + " + " Group: special symbol group {{{3 + " + highlight Special term=bold ctermfg=DarkMagenta ctermbg=LightGray + highlight SpecialChar term=bold ctermfg=DarkMagenta ctermbg=LightGray + highlight Tag term=bold ctermfg=DarkMagenta ctermbg=LightGray + highlight Delimiter term=bold ctermfg=DarkMagenta ctermbg=LightGray + highlight SpecialComment term=bold ctermfg=DarkMagenta ctermbg=LightGray + highlight Debug term=bold ctermfg=DarkMagenta ctermbg=LightGray + " + " Group: text that stands out {{{3 + " + highlight Underlined term=underline cterm=underline ctermfg=DarkMagenta ctermbg=LightGray + " + " Group: left blank, hidden {{{3 + " + highlight Ignore ctermfg=White ctermbg=grey + " + " Group: any erroneous construct {{{3 + " + highlight Error term=reverse ctermfg=White ctermbg=LightRed + " + " Group: anything that needs extra attention {{{3 + " + highlight Todo term=standout ctermfg=Black ctermbg=Yellow + + " Subsection: Cursor Colors {{{2 + " + " Group: Mouse Cursor {{{3 + " + highlight Cursor ctermfg=bg ctermbg=DarkGreen + highlight CursorColumn term=reverse ctermbg=LightGray + highlight CursorIM ctermfg=bg ctermbg=DarkGrey + highlight CursorLine term=reverse ctermbg=LightGray + + syntax enable + + " }}}1 + finish +else + " Section: terminal is completely unknown - fallback to system default {{{1 + " + set t_Co=8 + + " }}}1 + finish +endif + +"------------------------------------------------------------------------------ +" Copyright (C) 2006 Martin Krischik +" +" Vim is Charityware - see ":help license" or uganda.txt for licence details. +"------------------------------------------------------------------------------ +" vim: nowrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab +" vim: filetype=vim foldmethod=marker textwidth=0 diff --git a/colors/matrix.vim b/colors/matrix.vim new file mode 100755 index 0000000..75a0950 --- /dev/null +++ b/colors/matrix.vim @@ -0,0 +1,80 @@ +" vim:set ts=8 sts=2 sw=2 tw=0: +" +" matrix.vim - MATRIX like colorscheme. +" +" Maintainer: MURAOKA Taro +" Last Change: 10-Jun-2003. + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name = 'matrix' + +" the character under the cursor +hi Cursor guifg=#226622 guibg=#55ff55 +hi lCursor guifg=#226622 guibg=#55ff55 +" like Cursor, but used when in IME mode |CursorIM| +hi CursorIM guifg=#226622 guibg=#55ff55 +" directory names (and other special names in listings) +hi Directory guifg=#55ff55 guibg=#000000 +" diff mode: Added line |diff.txt| +hi DiffAdd guifg=#55ff55 guibg=#226622 gui=none +" diff mode: Changed line |diff.txt| +hi DiffChange guifg=#55ff55 guibg=#226622 gui=none +" diff mode: Deleted line |diff.txt| +hi DiffDelete guifg=#113311 guibg=#113311 gui=none +" diff mode: Changed text within a changed line |diff.txt| +hi DiffText guifg=#55ff55 guibg=#339933 gui=bold +" error messages on the command line +hi ErrorMsg guifg=#55ff55 guibg=#339933 +" the column separating vertically split windows +hi VertSplit guifg=#339933 guibg=#339933 +" line used for closed folds +hi Folded guifg=#44cc44 guibg=#113311 +" 'foldcolumn' +hi FoldColumn guifg=#44cc44 guibg=#226622 +" 'incsearch' highlighting; also used for the text replaced with +hi IncSearch guifg=#226622 guibg=#55ff55 gui=none +" line number for ":number" and ":#" commands, and when 'number' +hi LineNr guifg=#44cc44 guibg=#000000 +" 'showmode' message (e.g., "-- INSERT --") +hi ModeMsg guifg=#44cc44 guibg=#000000 +" |more-prompt| +hi MoreMsg guifg=#44cc44 guibg=#000000 +" '~' and '@' at the end of the window, characters from +hi NonText guifg=#44cc44 guibg=#113311 +" normal text +hi Normal guifg=#44cc44 guibg=#000000 +" |hit-enter| prompt and yes/no questions +hi Question guifg=#44cc44 guibg=#000000 +" Last search pattern highlighting (see 'hlsearch'). +hi Search guifg=#113311 guibg=#44cc44 gui=none +" Meta and special keys listed with ":map", also for text used +hi SpecialKey guifg=#44cc44 guibg=#000000 +" status line of current window +hi StatusLine guifg=#55ff55 guibg=#339933 gui=none +" status lines of not-current windows +hi StatusLineNC guifg=#113311 guibg=#339933 gui=none +" titles for output from ":set all", ":autocmd" etc. +hi Title guifg=#55ff55 guibg=#113311 gui=bold +" Visual mode selection +hi Visual guifg=#55ff55 guibg=#339933 gui=none +" Visual mode selection when vim is "Not Owning the Selection". +hi VisualNOS guifg=#44cc44 guibg=#000000 +" warning messages +hi WarningMsg guifg=#55ff55 guibg=#000000 +" current match in 'wildmenu' completion +hi WildMenu guifg=#226622 guibg=#55ff55 + +hi Comment guifg=#226622 guibg=#000000 +hi Constant guifg=#55ff55 guibg=#226622 +hi Special guifg=#44cc44 guibg=#226622 +hi Identifier guifg=#55ff55 guibg=#000000 +hi Statement guifg=#55ff55 guibg=#000000 gui=bold +hi PreProc guifg=#339933 guibg=#000000 +hi Type guifg=#55ff55 guibg=#000000 gui=bold +hi Underlined guifg=#55ff55 guibg=#000000 gui=underline +hi Error guifg=#55ff55 guibg=#339933 +hi Todo guifg=#113311 guibg=#44cc44 gui=none diff --git a/colors/molokai.vim b/colors/molokai.vim new file mode 100755 index 0000000..aae9420 --- /dev/null +++ b/colors/molokai.vim @@ -0,0 +1,211 @@ +" Vim color file +" +" Author: Tomas Restrepo +" +" Note: Based on the monokai theme for textmate +" by Wimer Hazenberg and its darker variant +" by Hamish Stuart Macpherson +" + +hi clear + +set background=dark +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 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=#960050 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=#FFFFFF guibg=#455354 +" marks column +hi SignColumn guifg=#A6E22E guibg=#232526 +hi SpecialChar guifg=#F92672 gui=bold +hi SpecialComment guifg=#465457 gui=bold +hi Special guifg=#66D9EF guibg=bg gui=italic +hi SpecialKey guifg=#888A85 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 + +if s:molokai_original == 1 + hi Normal guifg=#F8F8F2 guibg=#272822 + hi Comment guifg=#75715E + hi CursorLine guibg=#3E3D32 + hi CursorColumn guibg=#3E3D32 + hi LineNr guifg=#BCBCBC guibg=#3B3A32 + hi NonText guifg=#BCBCBC guibg=#3B3A32 +else + hi Normal guifg=#F8F8F2 guibg=#1B1D1E + hi Comment guifg=#465457 + hi CursorLine guibg=#293739 + hi CursorColumn guibg=#293739 + hi LineNr guifg=#BCBCBC guibg=#232526 + hi NonText guifg=#BCBCBC guibg=#232526 +end + +" +" Support for 256-color terminal +" +if &t_Co > 255 + 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 + 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=16 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 ctermbg=244 + 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=253 ctermbg=66 + + " marks column + hi SignColumn ctermfg=118 ctermbg=235 + hi SpecialChar ctermfg=161 cterm=bold + hi SpecialComment ctermfg=245 cterm=bold + hi Special ctermfg=81 ctermbg=232 + hi SpecialKey ctermfg=245 + + 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 Normal ctermfg=252 ctermbg=233 + hi Comment ctermfg=59 + hi CursorLine ctermbg=234 cterm=none + hi CursorColumn ctermbg=234 + hi LineNr ctermfg=250 ctermbg=234 + hi NonText ctermfg=250 ctermbg=234 +end diff --git a/colors/moria.vim b/colors/moria.vim new file mode 100755 index 0000000..6562cb7 --- /dev/null +++ b/colors/moria.vim @@ -0,0 +1,247 @@ +if exists("g:moria_style") + let s:moria_style = g:moria_style +else + let s:moria_style = &background +endif + +if exists("g:moria_monochrome") + let s:moria_monochrome = g:moria_monochrome +else + let s:moria_monochrome = 0 +endif + +if exists("g:moria_fontface") + let s:moria_fontface = g:moria_fontface +else + let s:moria_fontface = "plain" +endif + +execute "command! -nargs=1 Colo let g:moria_style = \"\" | colo moria" + +if s:moria_style == "black" || s:moria_style == "dark" + set background=dark +elseif s:moria_style == "light" || s:moria_style == "white" + set background=light +else + let s:moria_style = &background +endif + +hi clear + +if exists("syntax_on") + syntax reset +endif + +let colors_name = "moria" + +if &background == "dark" + if s:moria_style == "dark" + hi Normal ctermbg=Black ctermfg=LightGray guibg=#202020 guifg=#d0d0d0 gui=none + + hi CursorColumn ctermbg=DarkGray ctermfg=White guibg=#404040 gui=none + hi CursorLine ctermbg=DarkGray ctermfg=White guibg=#404040 gui=none + elseif s:moria_style == "black" + hi Normal ctermbg=Black ctermfg=LightGray guibg=#000000 guifg=#d0d0d0 gui=none + + hi CursorColumn ctermbg=DarkGray ctermfg=White guibg=#3a3a3a gui=none + hi CursorLine ctermbg=DarkGray ctermfg=White guibg=#3a3a3a gui=none + endif + if s:moria_monochrome == 1 + hi FoldColumn ctermbg=bg guibg=bg guifg=#a0a0a0 gui=none + hi LineNr guifg=#a0a0a0 gui=none + hi MoreMsg guibg=bg guifg=#b6b6b6 gui=bold + hi NonText ctermfg=DarkGray guibg=bg guifg=#a0a0a0 gui=bold + hi Pmenu guibg=#909090 guifg=#000000 gui=none + hi PmenuSbar guibg=#707070 guifg=fg gui=none + hi PmenuThumb guibg=#d0d0d0 guifg=bg gui=none + hi SignColumn ctermbg=bg guibg=bg guifg=#a0a0a0 gui=none + hi StatusLine ctermbg=LightGray ctermfg=Black guibg=#4c4c4c guifg=fg gui=bold + hi StatusLineNC ctermbg=DarkGray ctermfg=Black guibg=#404040 guifg=fg gui=none + hi TabLine guibg=#6e6e6e guifg=fg gui=underline + hi TabLineFill guibg=#6e6e6e guifg=fg gui=underline + hi VertSplit ctermbg=LightGray ctermfg=Black guibg=#404040 guifg=fg gui=none + if s:moria_fontface == "mixed" + hi Folded guibg=#4e4e4e guifg=#c0c0c0 gui=bold + else + hi Folded guibg=#4e4e4e guifg=#c0c0c0 gui=none + endif + else + hi FoldColumn ctermbg=bg guibg=bg guifg=#8fa5d1 gui=none + hi LineNr guifg=#8fa5d1 gui=none + hi MoreMsg guibg=bg guifg=#97abd5 gui=bold + hi NonText ctermfg=DarkGray guibg=bg guifg=#8fa5d1 gui=bold + hi Pmenu guibg=#6381be guifg=#000000 gui=none + hi PmenuSbar guibg=#41609e guifg=fg gui=none + hi PmenuThumb guibg=#bdcae3 guifg=bg gui=none + hi SignColumn ctermbg=bg guibg=bg guifg=#8fa5d1 gui=none + hi StatusLine ctermbg=LightGray ctermfg=Black guibg=#334b7d guifg=fg gui=bold + hi StatusLineNC ctermbg=DarkGray ctermfg=Black guibg=#25365a guifg=fg gui=none + hi TabLine guibg=#41609e guifg=fg gui=underline + hi TabLineFill guibg=#41609e guifg=fg gui=underline + hi VertSplit ctermbg=LightGray ctermfg=Black guibg=#25365a guifg=fg gui=none + if s:moria_fontface == "mixed" + hi Folded guibg=#4e4e4e guifg=#bdcae3 gui=bold + else + hi Folded guibg=#4e4e4e guifg=#bdcae3 gui=none + endif + endif + hi Cursor guibg=#ffa500 guifg=bg gui=none + hi DiffAdd guibg=#008b00 guifg=fg gui=none + hi DiffChange guibg=#00008b guifg=fg gui=none + hi DiffDelete guibg=#8b0000 guifg=fg gui=none + hi DiffText guibg=#0000cd guifg=fg gui=bold + hi Directory guibg=bg guifg=#1e90ff gui=none + hi ErrorMsg guibg=#ee2c2c guifg=#ffffff gui=bold + hi IncSearch guibg=#e0cd78 guifg=#000000 gui=none + hi ModeMsg guibg=bg guifg=fg gui=bold + hi PmenuSel guibg=#e0e000 guifg=#000000 gui=none + hi Question guibg=bg guifg=#e8b87e gui=bold + hi Search guibg=#90e090 guifg=#000000 gui=none + hi SpecialKey guibg=bg guifg=#e8b87e gui=none + if has("spell") + hi SpellBad guisp=#ee2c2c gui=undercurl + hi SpellCap guisp=#2c2cee gui=undercurl + hi SpellLocal guisp=#2ceeee gui=undercurl + hi SpellRare guisp=#ee2cee gui=undercurl + endif + hi TabLineSel guibg=bg guifg=fg gui=bold + hi Title ctermbg=Black ctermfg=White guifg=fg gui=bold + if version >= 700 + hi Visual ctermbg=LightGray ctermfg=Black guibg=#606060 gui=none + else + hi Visual ctermbg=LightGray ctermfg=Black guibg=#606060 guifg=fg gui=none + endif + hi VisualNOS ctermbg=DarkGray ctermfg=Black guibg=bg guifg=#a0a0a0 gui=bold,underline + hi WarningMsg guibg=bg guifg=#ee2c2c gui=bold + hi WildMenu guibg=#e0e000 guifg=#000000 gui=bold + + hi Comment guibg=bg guifg=#d0d0a0 gui=none + hi Constant guibg=bg guifg=#87df71 gui=none + hi Error guibg=bg guifg=#ee2c2c gui=none + hi Identifier guibg=bg guifg=#7ee0ce gui=none + hi Ignore guibg=bg guifg=bg gui=none + hi lCursor guibg=#00e700 guifg=#000000 gui=none + hi MatchParen guibg=#008b8b gui=none + hi PreProc guibg=bg guifg=#d7a0d7 gui=none + hi Special guibg=bg guifg=#e8b87e gui=none + hi Todo guibg=#e0e000 guifg=#000000 gui=none + hi Underlined ctermbg=Black ctermfg=White guibg=bg guifg=#00a0ff gui=underline + + if s:moria_fontface == "mixed" + hi Statement guibg=bg guifg=#7ec0ee gui=bold + hi Type guibg=bg guifg=#f09479 gui=bold + else + hi Statement guibg=bg guifg=#7ec0ee gui=none + hi Type guibg=bg guifg=#f09479 gui=none + endif + + hi htmlBold ctermbg=Black ctermfg=White guibg=bg guifg=fg gui=bold + hi htmlBoldItalic ctermbg=Black ctermfg=White guibg=bg guifg=fg gui=bold,italic + hi htmlBoldUnderline ctermbg=Black ctermfg=White guibg=bg guifg=fg gui=bold,underline + hi htmlBoldUnderlineItalic ctermbg=Black ctermfg=White guibg=bg guifg=fg gui=bold,underline,italic + hi htmlItalic ctermbg=Black ctermfg=White guibg=bg guifg=fg gui=italic + hi htmlUnderline ctermbg=Black ctermfg=White guibg=bg guifg=fg gui=underline + hi htmlUnderlineItalic ctermbg=Black ctermfg=White guibg=bg guifg=fg gui=underline,italic +elseif &background == "light" + if s:moria_style == "light" + hi Normal ctermbg=White ctermfg=Black guibg=#f0f0f0 guifg=#000000 gui=none + + hi CursorColumn ctermbg=LightGray ctermfg=Black guibg=#d8d8d8 gui=none + hi CursorLine ctermbg=LightGray ctermfg=Black guibg=#d8d8d8 gui=none + elseif s:moria_style == "white" + hi Normal ctermbg=White ctermfg=Black guibg=#ffffff guifg=#000000 gui=none + + hi CursorColumn ctermbg=LightGray ctermfg=Black guibg=#dfdfdf gui=none + hi CursorLine ctermbg=LightGray ctermfg=Black guibg=#dfdfdf gui=none + endif + if s:moria_monochrome == 1 + hi FoldColumn ctermbg=bg guibg=bg guifg=#7a7a7a gui=none + hi Folded guibg=#cfcfcf guifg=#404040 gui=bold + hi LineNr guifg=#7a7a7a gui=none + hi MoreMsg guibg=bg guifg=#505050 gui=bold + hi NonText ctermfg=DarkGray guibg=bg guifg=#7a7a7a gui=bold + hi Pmenu guibg=#9a9a9a guifg=#000000 gui=none + hi PmenuSbar guibg=#808080 guifg=fg gui=none + hi PmenuThumb guibg=#c0c0c0 guifg=fg gui=none + hi SignColumn ctermbg=bg guibg=bg guifg=#7a7a7a gui=none + hi StatusLine ctermbg=Black ctermfg=White guibg=#a0a0a0 guifg=fg gui=bold + hi StatusLineNC ctermbg=LightGray ctermfg=Black guibg=#b0b0b0 guifg=fg gui=none + hi TabLine guibg=#cdcdcd guifg=fg gui=underline + hi TabLineFill guibg=#cdcdcd guifg=fg gui=underline + hi VertSplit ctermbg=LightGray ctermfg=Black guibg=#b0b0b0 guifg=fg gui=none + else + hi FoldColumn ctermbg=bg guibg=bg guifg=#375288 gui=none + hi Folded guibg=#cfcfcf guifg=#25365a gui=bold + hi LineNr guifg=#375288 gui=none + hi MoreMsg guibg=bg guifg=#2f4471 gui=bold + hi NonText ctermfg=DarkGray guibg=bg guifg=#375288 gui=bold + hi Pmenu guibg=#708bc5 guifg=#000000 gui=none + hi PmenuSbar guibg=#4a6db5 guifg=fg gui=none + hi PmenuThumb guibg=#a6b7db guifg=fg gui=none + hi SignColumn ctermbg=bg guibg=bg guifg=#375288 gui=none + hi StatusLine ctermbg=Black ctermfg=White guibg=#8fa5d1 guifg=fg gui=bold + hi StatusLineNC ctermbg=LightGray ctermfg=Black guibg=#a6b7db guifg=fg gui=none + hi TabLine guibg=#b8c6e2 guifg=fg gui=underline + hi TabLineFill guibg=#b8c6e2 guifg=fg gui=underline + hi VertSplit ctermbg=LightGray ctermfg=Black guibg=#a6b7db guifg=fg gui=none + endif + hi Cursor guibg=#883400 guifg=bg gui=none + hi DiffAdd guibg=#008b00 guifg=#ffffff gui=none + hi DiffChange guibg=#00008b guifg=#ffffff gui=none + hi DiffDelete guibg=#8b0000 guifg=#ffffff gui=none + hi DiffText guibg=#0000cd guifg=#ffffff gui=bold + hi Directory guibg=bg guifg=#0000f0 gui=none + hi ErrorMsg guibg=#ee2c2c guifg=#ffffff gui=bold + hi IncSearch guibg=#ffcd78 gui=none + hi ModeMsg ctermbg=White ctermfg=Black guibg=bg guifg=fg gui=bold + hi PmenuSel guibg=#ffff00 guifg=#000000 gui=none + hi Question guibg=bg guifg=#813f11 gui=bold + hi Search guibg=#a0f0a0 gui=none + hi SpecialKey guibg=bg guifg=#912f11 gui=none + if has("spell") + hi SpellBad guisp=#ee2c2c gui=undercurl + hi SpellCap guisp=#2c2cee gui=undercurl + hi SpellLocal guisp=#008b8b gui=undercurl + hi SpellRare guisp=#ee2cee gui=undercurl + endif + hi TabLineSel guibg=bg guifg=fg gui=bold + hi Title guifg=fg gui=bold + if version >= 700 + hi Visual ctermbg=LightGray ctermfg=Black guibg=#c4c4c4 gui=none + else + hi Visual ctermbg=LightGray ctermfg=Black guibg=#c4c4c4 guifg=fg gui=none + endif + hi VisualNOS ctermbg=DarkGray ctermfg=Black guibg=bg guifg=#a0a0a0 gui=bold,underline + hi WarningMsg guibg=bg guifg=#ee2c2c gui=bold + hi WildMenu guibg=#ffff00 guifg=fg gui=bold + + hi Comment guibg=bg guifg=#786000 gui=none + hi Constant guibg=bg guifg=#077807 gui=none + hi Error guibg=bg guifg=#ee2c2c gui=none + hi Identifier guibg=bg guifg=#007080 gui=none + hi Ignore guibg=bg guifg=bg gui=none + hi lCursor guibg=#008000 guifg=#ffffff gui=none + hi MatchParen guibg=#00ffff gui=none + hi PreProc guibg=bg guifg=#800090 gui=none + hi Special guibg=bg guifg=#912f11 gui=none + hi Statement guibg=bg guifg=#1f3f81 gui=bold + hi Todo guibg=#ffff00 guifg=fg gui=none + hi Type guibg=bg guifg=#912f11 gui=bold + hi Underlined ctermbg=White ctermfg=Black guibg=bg guifg=#0000cd gui=underline + + hi htmlBold ctermbg=White ctermfg=Black guibg=bg guifg=fg gui=bold + hi htmlBoldItalic ctermbg=White ctermfg=Black guibg=bg guifg=fg gui=bold,italic + hi htmlBoldUnderline ctermbg=White ctermfg=Black guibg=bg guifg=fg gui=bold,underline + hi htmlBoldUnderlineItalic ctermbg=White ctermfg=Black guibg=bg guifg=fg gui=bold,underline,italic + hi htmlItalic ctermbg=White ctermfg=Black guibg=bg guifg=fg gui=italic + hi htmlUnderline ctermbg=White ctermfg=Black guibg=bg guifg=fg gui=underline + hi htmlUnderlineItalic ctermbg=White ctermfg=Black guibg=bg guifg=fg gui=underline,italic +endif + +hi! default link bbcodeBold htmlBold +hi! default link bbcodeBoldItalic htmlBoldItalic +hi! default link bbcodeBoldItalicUnderline htmlBoldUnderlineItalic +hi! default link bbcodeBoldUnderline htmlBoldUnderline +hi! default link bbcodeItalic htmlItalic +hi! default link bbcodeItalicUnderline htmlUnderlineItalic +hi! default link bbcodeUnderline htmlUnderline diff --git a/colors/moss.vim b/colors/moss.vim new file mode 100755 index 0000000..fa8f47c --- /dev/null +++ b/colors/moss.vim @@ -0,0 +1,109 @@ +" ------------------------------------------------------------------ +" Vim color file +" Name: moss (苔) +" Maintainer: Li Chunlin +" Last Change: 2009-10-15 +" Version: 2.0 +" URL: http://vim.sourceforge.net/script.php?script_id=2779 +" ------------------------------------------------------------------ + +" Init +" ------------------------------------------------------------------ +set background=dark +highlight clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "moss" + +" Highlighting groups for various occasions +" ------------------------------------------------------------------ +hi SpecialKey guifg=RosyBrown4 +hi NonText guifg=MidnightBlue guibg=#0C2628 +hi Directory gui=BOLD guifg=DarkOliveGreen3 +hi ErrorMsg guifg=LightGoldenRod guibg=Firebrick +hi IncSearch gui=BOLD guifg=Firebrick1 +hi Search gui=REVERSE guifg=NONE guibg=NONE +hi MoreMsg guifg=DarkCyan +hi ModeMsg guifg=OliveDrab2 +hi LineNr guifg=DarkSeaGreen3 guibg=#0C2628 +hi Question guifg=Green +hi StatusLine gui=BOLD guifg=LemonChiffon3 guibg=#334680 +hi StatusLineNC gui=BOLD guifg=Honeydew4 guibg=Gray26 +hi VertSplit gui=BOLD guifg=Gray20 guibg=Gray26 +hi Title gui=BOLD guifg=RoyalBlue3 +hi Visual guifg=PowderBlue guibg=#22364C +hi VisualNOS gui=BOLD,UNDERLINE guifg=SlateGray +hi WarningMsg guifg=Gold +hi WildMenu gui=BOLD guifg=Black guibg=Chartreuse3 +hi Folded guifg=PaleGreen3 guibg=DarkSlateGray +hi FoldColumn gui=BOLD guifg=PaleGreen3 guibg=DarkSlateGray +hi DiffAdd guifg=SandyBrown guibg=DarkOliveGreen +hi DiffChange guibg=#3C444C +hi DiffDelete guifg=Gray20 guibg=Black +hi DiffText guifg=Chocolate guibg=#033B40 + +" new Vim 7.0 items +if v:version >= 700 + hi CursorColumn guibg=#063C36 + hi CursorLine guibg=#063C36 + hi SignColumn guifg=PaleGoldenrod guibg=Turquoise4 + hi TabLine guifg=CornflowerBlue guibg=Gray26 + hi TabLineSel guifg=RoyalBlue guibg=#082926 + hi TabLineFill gui=UNDERLINE guifg=CornflowerBlue guibg=Gray20 + hi Pmenu guifg=White guibg=MediumPurple4 + hi PmenuSel guifg=Wheat guibg=#22364C + hi PmenuSbar guifg=Tan guibg=SeaShell4 + hi PmenuThumb guifg=IndianRed guibg=SeaShell4 + hi MatchParen gui=BOLD guifg=GoldenRod guibg=DarkCyan +endif + +hi Cursor guifg=Black guibg=LimeGreen +hi CursorIM guifg=Black guibg=OrangeRed + +" Syntax highlighting groups +" ------------------------------------------------------------------ + +hi Normal gui=NONE guifg=LightBlue3 guibg=#082926 +hi Comment gui=ITALIC guifg=BurlyWood4 + +hi Constant gui=NONE guifg=CadetBlue3 +hi link String Constant +hi link Character Constant +hi Number gui=NONE guifg=Turquoise3 +hi link Boolean Number +hi link Float Number + +hi Identifier gui=NONE guifg=SteelBlue3 +hi Function gui=NONE guifg=Aquamarine3 + +hi Statement gui=NONE guifg=SpringGreen3 +hi link Conditional Statement +hi link Repeat Statement +hi link Label Statement +hi Operator gui=NONE guifg=SeaGreen3 +hi link Keyword Statement +hi link Exception Statement + +hi PreProc gui=NONE guifg=DodgerBlue3 +hi link Include PreProc +hi link Define PreProc +hi link Macro PreProc +hi link PreCondit PreProc + +hi Type gui=NONE guifg=DeepSkyBlue3 +hi link StorageClass Type +hi link Structure Type +hi link Typedef Type + +hi Special gui=NONE guifg=SlateBlue +hi link Specialchar Special +hi link Tag Special +hi link Delimiter Special +hi link Debug Special + +hi Underlined gui=UNDERLINE guifg=SkyBlue3 +hi Ignore gui=NONE guifg=Gray18 +hi Error gui=NONE guifg=Khaki3 guibg=VioletRed4 +hi Todo gui=BOLD guifg=GoldenRod3 guibg=NONE + diff --git a/colors/motus.vim b/colors/motus.vim new file mode 100755 index 0000000..146e88d --- /dev/null +++ b/colors/motus.vim @@ -0,0 +1,66 @@ +" Vim color file +" Dark (grey on black) color scheme based on on a popular torte config. +" Maintainer: Sergei Matusevich +" ICQ: 31114346 Yahoo: motus2 +" http://motus.kiev.ua/motus2/Files/motus.vim +" Last Change: 3 November 2005 +" Orinal torte screme maintainer: Thorsten Maerz +" Licence: Public Domain + +" INSTALLATION: copy this file to ~/.vim/colors/ directory +" and add "colorscheme motus" to your ~/.vimrc file + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +"colorscheme default +let g:colors_name = "motus" + +" hardcoded colors : +" GUI Comment : #80a0ff = Light blue + +" GUI +highlight Normal guifg=Grey80 guibg=Black +highlight Search guifg=Grey guibg=DarkBlue +highlight Visual guifg=Black guibg=DarkGrey gui=NONE +" highlight Cursor guifg=Black guibg=Green gui=bold +highlight Special guifg=Orange +highlight Comment guifg=#80a0ff +highlight Statement guifg=Yellow gui=NONE +highlight Type gui=NONE + +highlight VertSplit gui=bold guifg=Grey25 guibg=Black +highlight StatusLine gui=bold guifg=White guibg=Grey25 +highlight StatusLineNC gui=NONE guifg=LightGrey guibg=Grey25 + +highlight FoldColumn gui=bold guifg=White guibg=Black + +" Console +highlight Normal ctermfg=LightGrey ctermbg=Black +highlight Search ctermfg=Grey ctermbg=DarkBlue cterm=NONE +highlight Visual cterm=reverse +" highlight Cursor ctermfg=Black ctermbg=Green cterm=bold +highlight Special ctermfg=Brown +highlight Comment ctermfg=Blue +highlight Statement ctermfg=Yellow cterm=NONE +highlight Type cterm=NONE + +highlight VertSplit ctermfg=DarkGrey ctermbg=Black cterm=bold +highlight StatusLine ctermfg=White ctermbg=Grey cterm=bold +highlight StatusLineNC ctermfg=Black ctermbg=Grey cterm=NONE + +highlight FoldColumn ctermbg=Black ctermfg=White cterm=bold + +" only for vim 5 +if has("unix") + if v:version<600 + highlight Normal ctermfg=Grey ctermbg=Black cterm=NONE guifg=Grey80 guibg=Black gui=NONE + highlight Search ctermfg=Black ctermbg=Red cterm=bold guifg=Black guibg=Red gui=bold + highlight Visual ctermfg=Black ctermbg=yellow cterm=bold guifg=Grey25 gui=bold + highlight Special ctermfg=LightBlue cterm=NONE guifg=LightBlue gui=NONE + highlight Comment ctermfg=Cyan cterm=NONE guifg=LightBlue gui=NONE + endif +endif + diff --git a/colors/mustang.vim b/colors/mustang.vim new file mode 100755 index 0000000..98cf18e --- /dev/null +++ b/colors/mustang.vim @@ -0,0 +1,57 @@ +" 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 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=#303030 gui=none ctermfg=244 ctermbg=235 +hi LineNr guifg=#808080 guibg=#000000 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 guibg=#384048 guifg=#a0a8b0 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=#343434 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 + +hi Search guifg=white guibg=NONE cterm=NONE gui=underline + diff --git a/colors/navajo-night.vim b/colors/navajo-night.vim new file mode 100755 index 0000000..f0c27f0 --- /dev/null +++ b/colors/navajo-night.vim @@ -0,0 +1,119 @@ +" Vim colour file +" Maintainer: Matthew Hawkins +" Last Change: Mon, 22 Apr 2002 15:28:04 +1000 +" URI: http://mh.dropbear.id.au/vim/navajo-night.png +" +" This colour scheme uses a "navajo-black" background +" I have added colours for the statusbar and for spell checking +" as taken from Cream (http://cream.sf.net/) + + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = "navajo-night" + +" This is the list of colour changes from Navajo that +" weren't a simple mathematical subtraction from 0xffffff +" DarkBlue -> #ffff74 +" DarkRed -> #74ffff +" DarkGreen -> #ff9bff +" DarkCyan -> #ff7474 +" DarkMagenta -> #74ff74 +" DarkYellow -> #7474ff +" DarkGray -> #565656 +" Blue -> Yellow +" Red -> Cyan +" Yellow -> Blue +" Gray -> #414141 +" Brown -> #5ad5d5 +" #ff8060 -> #007f9f +" #f6e8d0 -> #09172f +" #edb5cd -> #124a32 +" #c0c0c0 -> #3f3f3f +" #907050 -> #6f8faf +" #808080 -> #7f7f7f +" #707070 -> #8f8f8f +" SeaGreen -> #d174a8 +" LightRed (assuming #ee9090) -> #116f6f +" LightBlue -> #522719 + +hi Normal ctermfg=White guifg=White guibg=#35536f + +hi SpecialKey term=bold ctermfg=darkblue guifg=Yellow +hi NonText term=bold ctermfg=darkblue cterm=bold gui=bold guifg=#7f7f7f +hi Directory term=bold ctermfg=darkblue guifg=Yellow +hi ErrorMsg term=standout ctermfg=grey ctermbg=darkred cterm=bold gui=bold guifg=Black guibg=Cyan +hi IncSearch term=reverse cterm=reverse gui=reverse +hi Search term=reverse ctermbg=White ctermfg=Black cterm=reverse guibg=Black guifg=Yellow +hi MoreMsg term=bold ctermfg=green gui=bold guifg=#d174a8 +hi ModeMsg term=bold cterm=bold gui=bold +hi LineNr term=underline ctermfg=darkcyan ctermbg=grey guibg=#7f7f7f gui=bold guifg=White +hi Question term=standout ctermfg=darkgreen gui=bold guifg=#d174a8 +hi StatusLine term=bold,reverse cterm=bold,reverse gui=bold guifg=Black guibg=White +hi StatusLineNC term=reverse cterm=reverse gui=bold guifg=#116f6f guibg=#8f8f8f +hi VertSplit term=reverse cterm=reverse gui=bold guifg=Black guibg=#8f8f8f +hi Title term=bold ctermfg=green gui=bold guifg=#74ff74 +"+++ Cream: +"hi Visual term=reverse cterm=reverse gui=reverse guifg=#3f3f3f guibg=White +"+++ +hi VisualNOS term=bold,underline cterm=bold,underline gui=reverse guifg=#414141 guibg=Black +hi WarningMsg term=standout ctermfg=darkred gui=bold guifg=Cyan +hi WildMenu term=standout ctermfg=White ctermbg=darkyellow guifg=White guibg=Blue +hi Folded term=standout ctermfg=darkblue ctermbg=grey guifg=White guibg=NONE guifg=#afcfef +hi FoldColumn term=standout ctermfg=darkblue ctermbg=grey guifg=#ffff74 guibg=#3f3f3f +hi DiffAdd term=bold ctermbg=darkblue guibg=Black +hi DiffChange term=bold ctermbg=darkmagenta guibg=#124a32 +hi DiffDelete term=bold ctermfg=darkblue ctermbg=blue cterm=bold gui=bold guifg=#522719 guibg=#09172f +hi DiffText term=reverse ctermbg=darkblue cterm=bold gui=bold guibg=#007f9f +hi Cursor gui=reverse guifg=#bfbfef guibg=Black +hi lCursor guifg=fg guibg=bg +hi Match term=bold,reverse ctermbg=Blue ctermfg=Yellow cterm=bold,reverse gui=bold,reverse guifg=Blue guibg=Yellow + + +" Colours for syntax highlighting +hi Comment term=bold ctermfg=darkblue guifg=#e7e77f +hi Constant term=underline ctermfg=darkred guifg=#3fffa7 +hi Special term=bold ctermfg=darkgreen guifg=#bfbfef +hi Identifier term=underline ctermfg=darkcyan cterm=NONE guifg=#ef9f9f +hi Statement term=bold ctermfg=darkred cterm=bold gui=bold guifg=#5ad5d5 +hi PreProc term=underline ctermfg=darkmagenta guifg=#74ff74 +hi Type term=underline ctermfg=green gui=bold guifg=#d174a8 +hi Ignore ctermfg=grey cterm=bold guifg=bg + +hi Error term=reverse ctermfg=grey ctermbg=darkred cterm=bold gui=bold guifg=Black guibg=Cyan +hi Todo term=standout ctermfg=darkblue ctermbg=Blue guifg=Yellow guibg=Blue + +"+++ Cream: statusbar +" Colours for statusbar +"hi User1 gui=bold guifg=#565656 guibg=#0c0c0c +"hi User2 gui=bold guifg=White guibg=#0c0c0c +"hi User3 gui=bold guifg=Yellow guibg=#0c0c0c +"hi User4 gui=bold guifg=Cyan guibg=#0c0c0c +highlight User1 gui=bold guifg=#999933 guibg=#45637f +highlight User2 gui=bold guifg=#e7e77f guibg=#45637f +highlight User3 gui=bold guifg=Black guibg=#45637f +highlight User4 gui=bold guifg=#33cc99 guibg=#45637f +"+++ + +"+++ Cream: selection +highlight Visual gui=bold guifg=Black guibg=#aacc77 +"+++ + +"+++ Cream: bookmarks +highlight Cream_ShowMarksHL ctermfg=blue ctermbg=lightblue cterm=bold guifg=Black guibg=#aacc77 gui=bold +"+++ + +"+++ Cream: spell check +" Colour misspelt words +"hi BadWord ctermfg=White ctermbg=darkred cterm=bold guifg=Yellow guibg=#522719 gui=bold +" mathematically correct: +"highlight BadWord ctermfg=black ctermbg=lightblue gui=NONE guifg=White guibg=#003333 +" adjusted: +highlight BadWord ctermfg=black ctermbg=lightblue gui=NONE guifg=#ff9999 guibg=#003333 +"+++ + + diff --git a/colors/navajo.vim b/colors/navajo.vim new file mode 100755 index 0000000..e7eebe7 --- /dev/null +++ b/colors/navajo.vim @@ -0,0 +1,65 @@ +" Vim color file +" Maintainer: R. Edward Ralston +" Last Change: 2002-01-24 09:56:48 +" URI: http://eralston.tripod.com/navajo.png +" +" This color scheme uses a "navajo-white" background +" + +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = "navajo" + +" looks good on Linux +"hi Normal ctermfg=Black guifg=Black guibg=#b39674 +"hi Normal ctermfg=Black guifg=Black guibg=NavajoWhite3 + +" slightly brighter for w32 +hi Normal ctermfg=Black guifg=Black guibg=#ba9c80 + +hi SpecialKey term=bold ctermfg=DarkBlue guifg=Blue +hi NonText term=bold ctermfg=DarkBlue cterm=bold gui=bold guifg=#808080 +hi Directory term=bold ctermfg=DarkBlue guifg=Blue +hi ErrorMsg term=standout ctermfg=Gray ctermbg=DarkRed cterm=bold gui=bold guifg=White guibg=Red +hi IncSearch term=reverse cterm=reverse gui=reverse +hi Search term=reverse ctermbg=Black ctermfg=White cterm=reverse guibg=White +hi MoreMsg term=bold ctermfg=DarkGreen gui=bold guifg=SeaGreen +hi ModeMsg term=bold cterm=bold gui=bold +hi LineNr term=underline ctermfg=DarkCyan ctermbg=Gray guibg=#808080 gui=bold guifg=black +hi Question term=standout ctermfg=DarkGreen gui=bold guifg=SeaGreen +hi StatusLine term=bold,reverse cterm=bold,reverse gui=bold guifg=White guibg=Black +hi StatusLineNC term=reverse cterm=reverse gui=bold guifg=LightRed guibg=#707070 +hi VertSplit term=reverse cterm=reverse gui=bold guifg=White guibg=#707070 +hi Title term=bold ctermfg=DarkMagenta gui=bold guifg=DarkMagenta +hi Visual term=reverse cterm=reverse gui=reverse guifg=#c0c0c0 guibg=black +hi VisualNOS term=bold,underline cterm=bold,underline gui=reverse guifg=Grey guibg=white +hi WarningMsg term=standout ctermfg=DarkRed gui=bold guifg=Red +hi WildMenu term=standout ctermfg=Black ctermbg=DarkYellow guifg=Black guibg=Yellow +hi Folded term=standout ctermfg=DarkBlue ctermbg=Gray guifg=Black guibg=NONE guifg=#907050 +hi FoldColumn term=standout ctermfg=DarkBlue ctermbg=Gray guifg=DarkBlue guibg=#c0c0c0 +hi DiffAdd term=bold ctermbg=DarkBlue guibg=White +hi DiffChange term=bold ctermbg=DarkMagenta guibg=#edb5cd +hi DiffDelete term=bold ctermfg=DarkBlue ctermbg=6 cterm=bold gui=bold guifg=LightBlue guibg=#f6e8d0 +hi DiffText term=reverse ctermbg=DarkRed cterm=bold gui=bold guibg=#ff8060 +hi Cursor gui=reverse guifg=#404010 guibg=white +hi lCursor guifg=bg guibg=fg +hi Match term=bold,reverse ctermbg=Yellow ctermfg=Blue cterm=bold,reverse gui=bold,reverse guifg=yellow guibg=blue + + +" Colors for syntax highlighting +hi Comment term=bold ctermfg=DarkBlue guifg=#181880 +hi Constant term=underline ctermfg=DarkRed guifg=#c00058 +hi Special term=bold ctermfg=DarkMagenta guifg=#404010 +hi Identifier term=underline ctermfg=DarkCyan cterm=NONE guifg=#106060 +hi Statement term=bold ctermfg=DarkRed cterm=bold gui=bold guifg=Brown +hi PreProc term=underline ctermfg=DarkMagenta guifg=DarkMagenta +hi Type term=underline ctermfg=DarkGreen gui=bold guifg=SeaGreen +hi Ignore ctermfg=Gray cterm=bold guifg=bg +hi Error term=reverse ctermfg=Gray ctermbg=DarkRed cterm=bold gui=bold guifg=White guibg=Red +hi Todo term=standout ctermfg=DarkBlue ctermbg=Yellow guifg=Blue guibg=Yellow + +" vim:set list et: diff --git a/colors/neon.vim b/colors/neon.vim new file mode 100755 index 0000000..d0ba309 --- /dev/null +++ b/colors/neon.vim @@ -0,0 +1,70 @@ +" Vim color file +" Maintainer: Tiza +" Last Change: 2002/10/25 Fri 16:23. +" version: 1.2 +" This color scheme uses a dark background. + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "neon" + +hi Normal guifg=#f0f0f0 guibg=#303030 + +" Search +hi IncSearch gui=UNDERLINE guifg=#80ffff guibg=#0060c0 +hi Search gui=NONE guifg=#ffffa8 guibg=#808000 +" hi Search gui=NONE guifg=#b0ffb0 guibg=#008000 + +" Messages +hi ErrorMsg gui=BOLD guifg=#ffa0ff guibg=NONE +hi WarningMsg gui=BOLD guifg=#ffa0ff guibg=NONE +hi ModeMsg gui=BOLD guifg=#a0d0ff guibg=NONE +hi MoreMsg gui=BOLD guifg=#70ffc0 guibg=#8040ff +hi Question gui=BOLD guifg=#e8e800 guibg=NONE + +" Split area +hi StatusLine gui=NONE guifg=#000000 guibg=#c4c4c4 +hi StatusLineNC gui=NONE guifg=#707070 guibg=#c4c4c4 +hi VertSplit gui=NONE guifg=#707070 guibg=#c4c4c4 +hi WildMenu gui=NONE guifg=#000000 guibg=#ff80c0 + +" Diff +hi DiffText gui=NONE guifg=#ff78f0 guibg=#a02860 +hi DiffChange gui=NONE guifg=#e03870 guibg=#601830 +hi DiffDelete gui=NONE guifg=#a0d0ff guibg=#0020a0 +hi DiffAdd gui=NONE guifg=#a0d0ff guibg=#0020a0 + +" Cursor +hi Cursor gui=NONE guifg=#70ffc0 guibg=#8040ff +hi lCursor gui=NONE guifg=#ffffff guibg=#8800ff +hi CursorIM gui=NONE guifg=#ffffff guibg=#8800ff + +" Fold +hi Folded gui=NONE guifg=#40f0f0 guibg=#006090 +hi FoldColumn gui=NONE guifg=#40c0ff guibg=#404040 + +" Other +hi Directory gui=NONE guifg=#c8c8ff guibg=NONE +hi LineNr gui=NONE guifg=#707070 guibg=NONE +hi NonText gui=BOLD guifg=#d84070 guibg=#383838 +hi SpecialKey gui=BOLD guifg=#8888ff guibg=NONE +hi Title gui=BOLD guifg=fg guibg=NONE +hi Visual gui=NONE guifg=#b0ffb0 guibg=#008000 +hi VisualNOS gui=NONE guifg=#ffe8c8 guibg=#c06800 + +" Syntax group +hi Comment gui=NONE guifg=#c0c0c0 guibg=NONE +hi Constant gui=NONE guifg=#92d4ff guibg=NONE +hi Error gui=BOLD guifg=#ffffff guibg=#8000ff +hi Identifier gui=NONE guifg=#40f8f8 guibg=NONE +hi Ignore gui=NONE guifg=bg guibg=NONE +hi PreProc gui=NONE guifg=#ffa8ff guibg=NONE +hi Special gui=NONE guifg=#ffc890 guibg=NONE +hi Statement gui=NONE guifg=#dcdc78 guibg=NONE +hi Todo gui=BOLD,UNDERLINE guifg=#ff80d0 guibg=NONE +hi Type gui=NONE guifg=#60f0a8 guibg=NONE +hi Underlined gui=UNDERLINE guifg=fg guibg=NONE diff --git a/colors/neverness.vim b/colors/neverness.vim new file mode 100755 index 0000000..450ea47 --- /dev/null +++ b/colors/neverness.vim @@ -0,0 +1,141 @@ +" NEVERNESS colour scheme +" Author: Yann GOLANSKI +" Version: 1.2 +" Last Change: 13 Jan 2010 +" url http://web.njit.edu/~kevin/rgb.txt.html + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = 'neverness' + +" Comments: grey +hi Comment ctermfg=DarkCyan guifg=#848484 guibg=#000000 gui=none + +" Constants: SkyBlue +hi Boolean ctermfg=Cyan guifg=#87ceeb guibg=#000000 gui=none +hi Character ctermfg=Cyan guifg=#87ceeb guibg=#000000 gui=none +hi Constant ctermfg=Cyan guifg=#87ceeb guibg=#000000 gui=none +hi Float ctermfg=Cyan guifg=#87ceeb guibg=#000000 gui=none +hi Number ctermfg=Cyan guifg=#87ceeb guibg=#000000 gui=none +hi String ctermfg=Cyan guifg=#87ceeb guibg=#000000 gui=none + +" Identifier: SteelBlue1 +hi Identifier ctermfg=LightCyan guifg=#63b8ff guibg=#000000 gui=none +hi Function ctermfg=LightCyan guifg=#63b8ff guibg=#000000 gui=none + +" Statement: SteelBlue +hi Conditional ctermfg=DarkBlue guifg=#4682b4 guibg=#000000 gui=bold +hi Exception ctermfg=DarkBlue guifg=#4682b4 guibg=#000000 gui=bold +hi Keyword ctermfg=DarkBlue guifg=#4682b4 guibg=#000000 gui=bold +hi Label ctermfg=DarkBlue guifg=#4682b4 guibg=#000000 gui=bold +hi Operator ctermfg=DarkBlue guifg=#4682b4 guibg=#000000 gui=bold +hi Repeat ctermfg=DarkBlue guifg=#4682b4 guibg=#000000 gui=bold +hi Statement ctermfg=DarkBlue guifg=#4682b4 guibg=#000000 gui=bold + +" PreProc: DarkOrchid1 +hi PreProc ctermfg=DarkGreen guifg=#bf3eff guibg=#000000 gui=none +hi Include ctermfg=DarkGreen guifg=#bf3eff guibg=#000000 gui=none +hi Define ctermfg=DarkGreen guifg=#bf3eff guibg=#000000 gui=none +hi Macro ctermfg=DarkGreen guifg=#bf3eff guibg=#000000 gui=none +hi PreCondit ctermfg=DarkGreen guifg=#bf3eff guibg=#000000 gui=none + +" Type: orchid2 +hi Type ctermfg=DarkGreen guifg=#ee7ae9 guibg=#000000 gui=bold +hi StorageClass ctermfg=DarkGreen guifg=#ee7ae9 guibg=#000000 gui=bold +hi Structure ctermfg=DarkGreen guifg=#ee7ae9 guibg=#000000 gui=bold +hi Typedef ctermfg=DarkGreen guifg=#ee7ae9 guibg=#000000 gui=bold + +" Special: cyan2 +hi Special ctermfg=DarkGray guifg=#00eeee guibg=#000000 gui=none +hi SpecialChar ctermfg=DarkGray guifg=#00eeee guibg=#000000 gui=none +hi Tag ctermfg=DarkGray guifg=#00eeee guibg=#000000 gui=none +hi SpecialComment ctermfg=DarkGray guifg=#00eeee guibg=#000000 gui=none +hi Delimiter ctermfg=DarkGray guifg=#00eeee guibg=#000000 gui=none +hi Debug ctermfg=DarkGray guifg=#00eeee guibg=#000000 gui=none + +" Underline: NavajoWhite2 +hi Underlined ctermfg=LightGray guifg=#eecfa1 guibg=#000000 gui=none + +" Ignore: black +hi Ignore ctermfg=LightGray guifg=#ffffff guibg=#000000 gui=none + +" Error: red +hi Error ctermfg=LightGray guifg=#ff0000 guibg=#232323 gui=bold + +" To do: SlateGray3 +hi Todo ctermfg=LightMagenta guifg=#9fb6cd guibg=#232323 gui=none + +" Spelling... +hi SpellBad ctermfg=DarkRed ctermbg=black +hi SpellCap ctermfg=DarkBlue ctermbg=black +hi SpellRare ctermfg=DarkYellow ctermbg=black +hi SpellLocal ctermfg=DarkGreen ctermbg=black + +" "set cursorline" and "set cursorcolumn" options. +hi lCursor guifg=#43705a guibg=#e6fff3 gui=none +hi CursorColumn guibg=#222222 gui=none +hi CursorLine guibg=#222222 gui=none + +" Line number. +"hi LineNr ctermfg=DarkMagenta guifg=#4682b4 guibg=#000000 gui=bold +hi LineNr ctermfg=DarkMagenta guifg=#2b506e guibg=#000000 gui=none + +" Normal colour: just white thank you. +hi Normal guifg=#ffffff guibg=#000000 gui=none + +" Others: These are "highlight-groups" and "highlight-default" in help section. +hi Cursor guifg=#43705a guibg=#e6fff3 gui=none +hi DiffAdd guifg=#e6fff3 guibg=#43705a gui=bold +hi DiffChange guifg=#e6fff3 guibg=#43705a gui=none +hi DiffDelete guifg=#e6fff3 guibg=#43705a gui=none +hi DiffText guifg=#000000 guibg=#e6fff3 gui=bold +hi Directory guifg=#e6fff3 guibg=#000000 gui=none +hi ErrorMsg guifg=#e6fff3 guibg=#61a181 gui=bold +hi FoldColumn guifg=#9bcfb5 guibg=#43705a gui=bold +hi Folded guifg=#9bcfb5 guibg=#43705a gui=bold +hi IncSearch guifg=#1d3026 guibg=#61a181 gui=bold +hi ModeMsg guifg=#4EEE94 guibg=#000000 gui=bold +hi MoreMsg guifg=#4EEE94 guibg=#000000 gui=bold +hi NonText guifg=#c0c0c0 guibg=#000000 gui=bold +hi Question guifg=#9bcfb5 guibg=#000000 gui=bold +hi Search guifg=#1d3026 guibg=#61a181 gui=bold +hi SpecialKey guifg=#9bcfb5 guibg=#000000 gui=none +"hi StatusLine guifg=#e6fff3 guibg=#61a181 gui=bold +"hi StatusLineNC guifg=#1d3026 guibg=#61a181 gui=bold +hi StatusLine guifg=#4EEE94 guibg=#333333 gui=none +hi StatusLineNC guifg=#4EEE94 guibg=#222222 gui=none +hi Title guifg=#e6fff3 guibg=#1d3026 gui=bold +hi VertSplit guifg=#61a181 guibg=#61a181 gui=none +hi Visual guifg=#e6fff3 guibg=#61a181 gui=none +hi VisualNOS guifg=#9bcfb5 guibg=#000000 gui=none +hi WarningMsg guifg=#BF3EFF guibg=#000000 gui=bold +hi WildMenu guifg=#43705a guibg=#e6fff3 gui=none + +" OTL +hi normal guifg=white guibg=black ctermfg=white ctermbg=black +hi VertSplit guifg=white guibg=black ctermfg=white ctermbg=black +hi Folded guifg=darkcyan guibg=bg ctermfg=cyan ctermbg=black +hi FoldColumn guifg=darkcyan guibg=bg ctermfg=cyan ctermbg=black + +hi def OL0 ctermfg=1 cterm=bold gui=bold guifg=#36648B term=reverse +hi def OL1 ctermfg=4 cterm=bold gui=bold guifg=#4682B4 term=reverse +hi def OL2 ctermfg=2 cterm=bold gui=bold guifg=#4F94CD term=reverse +hi def OL3 ctermfg=3 cterm=bold gui=bold guifg=#5CACEE term=reverse +hi def OL4 ctermfg=5 cterm=bold gui=bold guifg=#63B8FF term=reverse +hi def OL5 ctermfg=6 cterm=bold gui=bold guifg=#708090 term=reverse +hi def OL6 ctermfg=1 cterm=bold gui=bold guifg=#6C7B8B term=reverse +hi def OL7 ctermfg=4 cterm=bold gui=bold guifg=#9FB6CD term=reverse +hi def OL8 ctermfg=2 cterm=bold gui=bold guifg=#B9D3EE term=reverse +hi def OL9 ctermfg=3 cterm=bold gui=bold guifg=#C6E2FF term=reverse + + +" PMenu from Sam Grönblom +hi PmenuSel ctermfg=Black ctermbg=Cyan guifg=#000000 guibg=#87ceeb gui=none +hi Pmenu ctermfg=White ctermbg=DarkBlue guifg=#000000 guibg=#4682b4 gui=none +hi PmenuSbar ctermfg=White ctermbg=LightCyan guifg=#ffffff guibg=#848484 gui=none +hi PmenuThumb ctermfg=White ctermbg=DarkGreen guifg=#ffffff guibg=#87ceeb gui=none + diff --git a/colors/night.vim b/colors/night.vim new file mode 100755 index 0000000..8fb7f56 --- /dev/null +++ b/colors/night.vim @@ -0,0 +1,70 @@ +" Vim color file +" Maintainer: Tiza +" Last Change: 2002/10/13 Sun 16:59. +" version: 2.2 +" This color scheme uses a dark background. + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "night" + +hi Normal guifg=#f0f0f8 guibg=#303040 + +" Search +hi IncSearch gui=UNDERLINE,BOLD guifg=#f0f0f8 guibg=#d000d0 +hi Search gui=BOLD guifg=#ffd0ff guibg=#c000c0 + +" Messages +hi ErrorMsg gui=BOLD guifg=#ffffff guibg=#f00080 +hi WarningMsg gui=BOLD guifg=#ffffff guibg=#f00080 +hi ModeMsg gui=BOLD guifg=#00e0ff guibg=NONE +hi MoreMsg gui=BOLD guifg=#00ffdd guibg=NONE +hi Question gui=BOLD guifg=#d0d050 guibg=NONE + +" Split area +hi StatusLine gui=NONE guifg=#000000 guibg=#c8c8d8 +hi StatusLineNC gui=NONE guifg=#606080 guibg=#c8c8d8 +hi VertSplit gui=NONE guifg=#606080 guibg=#c8c8d8 +hi WildMenu gui=NONE guifg=#000000 guibg=#e0e078 + +" Diff +hi DiffText gui=NONE guifg=#ffffff guibg=#40a060 +hi DiffChange gui=NONE guifg=#ffffff guibg=#007070 +hi DiffDelete gui=NONE guifg=#ffffff guibg=#40a0c0 +hi DiffAdd gui=NONE guifg=#ffffff guibg=#40a0c0 + +" Cursor +hi Cursor gui=NONE guifg=#ffffff guibg=#d86020 +hi lCursor gui=NONE guifg=#ffffff guibg=#e000b0 +hi CursorIM gui=NONE guifg=#ffffff guibg=#e000b0 + +" Fold +hi Folded gui=NONE guifg=#ffffff guibg=#9060c0 +hi FoldColumn gui=NONE guifg=#c0a0ff guibg=#404052 + +" Other +hi Directory gui=NONE guifg=#00ffff guibg=NONE +hi LineNr gui=NONE guifg=#787894 guibg=NONE +hi NonText gui=BOLD guifg=#8040ff guibg=#383848 +hi SpecialKey gui=BOLD guifg=#60a0ff guibg=NONE +hi Title gui=BOLD guifg=#f0f0f8 guibg=#9000a0 +hi Visual gui=NONE guifg=#ffffff guibg=#c08040 +" hi VisualNOS gui=NONE guifg=#ffffff guibg=#c08040 + +" Syntax group +hi Comment gui=NONE guifg=#e0e070 guibg=NONE +hi Constant gui=NONE guifg=#f0f0f8 guibg=#4830a0 +hi Error gui=BOLD guifg=#ffffff guibg=#f00080 +hi Identifier gui=NONE guifg=#ffa0ff guibg=NONE +hi Ignore gui=NONE guifg=#303040 guibg=NONE +hi Number gui=BOLD guifg=#b8b8c8 guibg=NONE +hi PreProc gui=NONE guifg=#40ffa0 guibg=NONE +hi Special gui=NONE guifg=#40f8f8 guibg=#4830a0 +hi Statement gui=BOLD guifg=#00d8f8 guibg=NONE +hi Todo gui=BOLD guifg=#00ffe0 guibg=#0080a0 +hi Type gui=BOLD guifg=#bbaaff guibg=NONE +hi Underlined gui=UNDERLINE,BOLD guifg=#f0f0f8 guibg=NONE diff --git a/colors/nightshimmer.vim b/colors/nightshimmer.vim new file mode 100755 index 0000000..53dce84 --- /dev/null +++ b/colors/nightshimmer.vim @@ -0,0 +1,111 @@ +" Vim color file +" Maintainer: Niklas Lindstrm +" Last Change: 2002-03-22 +" Version: 0.3 +" URI: http://localhost/ + + +""" Init +set background=dark +highlight clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "nightshimmer" + + +""""""""\ Colors \"""""""" + + +"""" GUI Colors + +highlight Cursor gui=None guibg=Green guifg=White +highlight CursorIM gui=bold guifg=white guibg=Green1 +highlight Directory guifg=LightSeaGreen guibg=bg +highlight DiffAdd gui=None guifg=fg guibg=DarkCyan +highlight DiffChange gui=None guifg=fg guibg=Green4 +highlight DiffDelete gui=None guifg=fg guibg=black +highlight DiffText gui=bold guifg=fg guibg=bg +highlight ErrorMsg guifg=LightYellow guibg=FireBrick +" previously 'FillColumn': +"highlight FillColumn gui=NONE guifg=black guibg=grey60 +highlight VertSplit gui=NONE guifg=black guibg=grey60 +highlight Folded gui=bold guibg=#305060 guifg=#b0d0e0 +highlight FoldColumn gui=bold guibg=#305060 guifg=#b0d0e0 +highlight IncSearch gui=reverse guifg=fg guibg=bg +highlight LineNr gui=bold guibg=grey6 guifg=Purple3 +highlight ModeMsg guibg=DarkGreen guifg=LightGreen +highlight MoreMsg gui=bold guifg=SeaGreen4 guibg=bg +if version < 600 + " same as SpecialKey + highlight NonText guibg=#123A4A guifg=#3D5D6D +else + " Bottom fill (use e.g. same as LineNr) + highlight NonText gui=None guibg=grey6 guifg=Purple +endif +highlight Normal gui=None guibg=#103040 guifg=honeydew2 +highlight Question gui=bold guifg=SeaGreen2 guibg=bg +highlight Search gui=NONE guibg=Purple4 guifg=NONE +highlight SpecialKey guibg=#123A4A guifg=#426272 +highlight StatusLine gui=bold guibg=grey88 guifg=black +highlight StatusLineNC gui=NONE guibg=grey60 guifg=grey10 +highlight Title gui=bold guifg=MediumOrchid1 guibg=bg +highlight Visual gui=reverse guibg=WHITE guifg=SeaGreen +highlight VisualNOS gui=bold,underline guifg=fg guibg=bg +highlight WarningMsg gui=bold guifg=FireBrick1 guibg=bg +highlight WildMenu gui=bold guibg=Chartreuse guifg=Black + + +"""" Syntax Colors + +highlight Comment gui=reverse guifg=#507080 +"highlight Comment gui=None guifg=#507080 + +highlight Constant guifg=Cyan guibg=bg + "hi String gui=None guifg=Cyan guibg=bg + "hi Character gui=None guifg=Cyan guibg=bg + highlight Number gui=None guifg=Cyan guibg=bg + highlight Boolean gui=bold guifg=Cyan guibg=bg + "hi Float gui=None guifg=Cyan guibg=bg + +highlight Identifier guifg=orchid1 + "hi Function gui=None guifg=orchid1 guibg=bg + +highlight Statement gui=NONE guifg=LightGreen + highlight Conditional gui=None guifg=LightGreen guibg=bg + highlight Repeat gui=None guifg=SeaGreen2 guibg=bg + "hi Label gui=None guifg=LightGreen guibg=bg + highlight Operator gui=None guifg=Chartreuse guibg=bg + highlight Keyword gui=bold guifg=LightGreen guibg=bg + highlight Exception gui=bold guifg=LightGreen guibg=bg + +highlight PreProc guifg=MediumPurple1 + "hi Include gui=None guifg=MediumPurple1 guibg=bg + "hi Define gui=None guifg=MediumPurple1g guibg=bg + "hi Macro gui=None guifg=MediumPurple1g guibg=bg + "hi PreCondit gui=None guifg=MediumPurple1g guibg=bg + +highlight Type gui=NONE guifg=LightBlue + "hi StorageClass gui=None guifg=LightBlue guibg=bg + "hi Structure gui=None guifg=LightBlue guibg=bg + "hi Typedef gui=None guifg=LightBlue guibg=bg + +highlight Special gui=bold guifg=White + "hi SpecialChar gui=bold guifg=White guibg=bg + "hi Tag gui=bold guifg=White guibg=bg + "hi Delimiter gui=bold guifg=White guibg=bg + "hi SpecialComment gui=bold guifg=White guibg=bg + "hi Debug gui=bold guifg=White guibg=bg + +highlight Underlined gui=underline guifg=honeydew4 guibg=bg + +highlight Ignore guifg=#204050 + +highlight Error guifg=LightYellow guibg=FireBrick + +highlight Todo guifg=Cyan guibg=#507080 + +""" OLD COLORS + + + diff --git a/colors/no_quarter.vim b/colors/no_quarter.vim new file mode 100755 index 0000000..5c0ee20 --- /dev/null +++ b/colors/no_quarter.vim @@ -0,0 +1,134 @@ +" Vim color file +" Maintainer: Otavio Fernandes +" Last Change: 2010/01/03 Sun 22:56 +" Version: 1.0.6 +" +" ts=4 +" + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let colors_name = "no_quarter" + +" +" Vim Colors (( Default Options )) +" + +hi Normal guifg=grey90 guibg=#303030 + +hi Comment gui=NONE guifg=#647bcf guibg=NONE +hi Constant gui=NONE guifg=#b07050 guibg=NONE +hi Cursor gui=NONE guifg=#424242 guibg=green +hi CursorIM gui=NONE guifg=#ffffff guibg=#8800ff +hi CursorLine gui=NONE guibg=gray25 +hi DiffAdd gui=NONE guifg=#a0d0ff guibg=#0020a0 +hi DiffChange gui=NONE guifg=#e03870 guibg=#601830 +hi DiffDelete gui=NONE guifg=#a0d0ff guibg=#0020a0 +hi DiffText gui=NONE guifg=#ff78f0 guibg=#a02860 +hi Directory gui=NONE guifg=lightmagenta guibg=NONE +hi Error gui=BOLD guifg=#ffffff guibg=#8000ff +hi ErrorMsg gui=BOLD guifg=#ffa0ff guibg=NONE +hi FoldColumn gui=NONE guifg=#40c0ff guibg=#404040 +hi Folded gui=NONE guifg=#40f0f0 guibg=#006090 +hi Identifier gui=NONE guifg=#90c0c0 guibg=NONE +hi Ignore gui=NONE guifg=bg guibg=NONE +hi IncSearch gui=UNDERLINE guifg=#80ffff guibg=#0060c0 +hi LineNr gui=NONE guifg=#707070 guibg=NONE +hi ModeMsg gui=BOLD guifg=#a0d0ff guibg=NONE +hi MoreMsg gui=NONE guifg=lightred guibg=bg +hi NonText gui=BOLD guifg=#707070 guibg=#383838 +hi OverLength gui=NONE guifg=fg guibg=#353535 +hi PreProc gui=NONE guifg=#c090c0 guibg=NONE +hi Question gui=BOLD guifg=#e8e800 guibg=NONE +hi Search gui=NONE guifg=bg guibg=grey60 +hi SignColumn gui=NONE guifg=darkyellow guibg=bg +hi Special gui=NONE guifg=#c090c0 guibg=NONE +hi SpecialKey gui=BOLD guifg=green guibg=NONE +hi Statement gui=NONE guifg=#c0c090 guibg=NONE +hi StatusLine gui=NONE guifg=#000000 guibg=#909090 +hi StatusLineNC gui=NONE guifg=#abac84 guibg=#404040 +hi Title gui=NONE guifg=darkcyan guibg=bg +hi Todo gui=BOLD guifg=#ff80d0 guibg=NONE +hi Type gui=NONE guifg=#60f0a8 guibg=NONE +hi Underlined gui=UNDERLINE guifg=#707070 guibg=NONE +hi VertSplit gui=NONE guifg=#abac84 guibg=#404040 +hi Visual gui=NONE guifg=#b0ffb0 guibg=#008000 +hi VisualNOS gui=NONE guifg=#ffe8c8 guibg=#c06800 +hi WarningMsg gui=BOLD guifg=#ffa0ff guibg=NONE +hi WildMenu gui=NONE guifg=#000000 guibg=#abac84 +hi htmlTagName gui=NONE guifg=grey70 guibg=bg +hi lCursor gui=NONE guifg=#ffffff guibg=#8800ff + +" +" Tag List +" + +hi MyTagListFileName gui=underline guifg=fg guibg=grey25 + +" +" Perl +" + +hi perlIdentifier gui=NONE guifg=#90c0c0 guibg=NONE +hi perlStatement gui=NONE guifg=#c0c090 guibg=NONE +hi perlStatementHash gui=NONE guifg=#c0c090 guibg=#404040 +hi perlStatementNew gui=NONE guifg=#c0c090 guibg=#424242 +hi perlMatchStartEnd gui=NONE guifg=#c0c090 guibg=#424242 +hi perlVarPlain gui=NONE guifg=#74c5c6 guibg=bg +hi perlVarNotInMatches gui=NONE guifg=#915555 guibg=bg +hi perlVarPlain2 gui=NONE guifg=#74c6a8 guibg=bg +hi perlFunctionName gui=NONE guifg=white guibg=bg +hi perlNumber gui=NONE guifg=#80ac7b guibg=bg +hi perlQQ gui=NONE guifg=fg guibg=#393939 +hi perlSpecialString gui=NONE guifg=#dc966b guibg=bg +hi perlSpecialMatch gui=NONE guifg=#c864c7 guibg=bg +hi perlSpecialBEOM gui=NONE guifg=fg guibg=#404040 +hi perlStringStartEnd gui=NONE guifg=#b07050 guibg=#353535 +hi perlShellCommand gui=NONE guibg=#c090c0 guibg=#424242 +hi perlOperator gui=NONE guifg=#c0c090 guibg=#404040 +hi perlLabel gui=NONE guifg=#c0c090 guibg=#404040 +hi perlControl gui=NONE guifg=#c0c090 guibg=#404040 +hi perlSharpBang gui=NONE guifg=#c0c090 guibg=#505050 +hi perlPackageDecl gui=NONE guifg=#80ac7b guibg=#404040 +hi perlStatementFiledesc gui=NONE guifg=#a2c090 guibg=bg +hi perlRepeat gui=NONE guifg=#c0b790 guibg=bg +hi perlStatementInclude gui=NONE guifg=#c0c090 guibg=#3b4038 +hi perlStatementControl gui=NONE guifg=#dcdb6b guibg=bg +hi perlStatementSub gui=NONE guifg=#c0c090 guibg=bg +hi perlVarSimpleMember gui=NONE guifg=#c0c090 guibg=bg +hi perlVarSimpleMemberName gui=NONE guifg=grey70 guibg=bg + +" ------------------------------------------------------------------------------------------------- +" perlStatementRegexp perlSpecialDollar perlSpecialStringU perlSubstitutionBracket +" perlTranslationBracket perlType perlStatementStorage perlStatementScalar +" perlStatementNumeric perlStatementList perlStatementIOfunc +" perlStatementVector perlStatementFiles perlStatementFlow perlStatementScope +" perlStatementProc perlStatementSocket perlStatementIPC perlStatementNetwork perlStatementPword +" perlStatementTime perlStatementMisc perlStatementPackage perlList perlMisc +" perlVarSlash perlMethod perlFiledescRead perlFiledescStatement perlFormatName +" perlFloat perlString perlSubstitutionSQ perlSubstitutionDQ +" perlSubstitutionSlash perlSubstitutionHash perlSubstitutionCurly perlSubstitutionPling +" perlTranslationSlash perlTranslationHash perlTranslationCurly perlHereDoc perlFormatField +" perlStringUnexpanded perlCharacter perlSpecialAscii perlConditional perlInclude +" perlStorageClass perlPackageRef perlFunctionPRef +" ------------------------------------------------------------------------------------------------- + +" +" Omni Menu +" + +hi Pmenu guifg=grey10 guibg=grey50 +hi PmenuSel guifg=#abac84 guibg=#404040 +hi PmenuSbar guibg=grey20 +hi PmenuThumb guifg=grey30 + +" +" Right Margin +" + +hi rightMargin guibg=#453030 + +" EOF diff --git a/colors/northland.vim b/colors/northland.vim new file mode 100755 index 0000000..cb2fd36 --- /dev/null +++ b/colors/northland.vim @@ -0,0 +1,149 @@ +" Vim color file - northland +" Maintainer: Luka Djigas +" URL: http://www.vim.org/scripts/script.php?script_id=2200 + +" Version: 0.2 +" Last Change: 24.11.2008. 19:13 +" ===== +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="northland" +" ===== :he highlight-groups +hi Normal gui=NONE guifg=White guibg=#001020 guisp=NONE + +hi StatusLine gui=NONE guifg=Black guibg=DarkRed +hi StatusLineNC gui=NONE guifg=Black guibg=DarkGray + hi VertSplit gui=NONE guifg=Black guibg=DarkGray + +hi Cursor gui=NONE guifg=White guibg=PaleTurquoise3 + hi CursorIM gui=NONE guifg=White guibg=PaleTurquoise3 +hi CursorLine guibg=#003853 + hi CursorColumn guibg=#003853 + +hi ErrorMsg gui=NONE guifg=Yellow guibg=NONE + hi WarningMsg gui=NONE guifg=Yellow guibg=NONE + hi MoreMsg gui=NONE guifg=Yellow guibg=NONE + hi Question gui=NONE guifg=Yellow guibg=NONE +hi ModeMsg gui=bold guifg=White guibg=DarkRed + +"hi Directory gui=NONE guifg=DarkGreen guibg=NONE +"hi Directory gui=bold guifg=#0475B9 "---lighter blue +hi Directory gui=bold guifg=#035587 "---darker blue + +hi Search gui=NONE guifg=White guibg=DarkRed + hi IncSearch gui=NONE guifg=White guibg=DarkRed + +hi NonText gui=NONE guifg=DarkRed guibg=NONE +hi SpecialKey gui=NONE guifg=#999999 guibg=NONE + +hi Pmenu gui=NONE guifg=Black guibg=DarkRed +hi PmenuSel gui=NONE guifg=#507080 guibg=Black +hi PmenuSbar guibg=#003853 +hi PmenuThumb gui=NONE guibg=Black +hi WildMenu gui=NONE guifg=#507080 guibg=Black + +hi MatchParen gui=bold guifg=DarkRed guibg=NONE + +hi LineNr gui=bold guifg=#507080 guibg=Black + +hi Visual gui=NONE guifg=NONE guibg=DarkRed +hi VisualNOS gui=underline guifg=NONE guibg=DarkRed + +hi DiffAdd gui=NONE guifg=White guibg=DarkGreen +hi DiffChange gui=NONE guifg=White guibg=DarkGray +hi DiffDelete gui=NONE guifg=White guibg=DarkRed +hi DiffText gui=NONE guifg=White guibg=NONE + +hi Folded gui=bold guifg=DarkGreen guibg=Black +hi FoldColumn gui=NONE guifg=#507080 guibg=Black +hi SignColumn gui=bold guifg=DarkRed guibg=Black + +hi SpellBad gui=undercurl guisp=Red +hi SpellCap gui=undercurl guisp=White +hi SpellLocal gui=undercurl guisp=Orange + hi SpellRare gui=undercurl guisp=Orange + +hi TabLine gui=NONE guifg=#507080 guibg=Black +hi TabLineSel gui=bold guifg=Black guibg=#507080 +hi TabLineFill gui=NONE guifg=White guibg=Black + +hi Title gui=bold guifg=#507080 guibg=NONE + +"hi Menu +"hi Scrollbar +"hi Tooltip +"hi User1 ... User9 +" ===== :he group-name +hi Comment gui=italic guifg=DarkGray +"*Comment any comment +"hi Constant gui=none guifg=#0475B9 "---lighter blue +hi Constant gui=none guifg=#035587 "---darker blue +"*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 +"hi Identifier gui=bold,italic guifg=#FB000A "---lighter +hi Identifier gui=bold,italic guifg=#BC0007 "---darker +"*Identifier any variable name +" Function function name (also: methods for classes) +"hi Statement gui=bold guifg=#FF9500 "---lighter +hi Statement gui=bold guifg=#BF6F00 "---darker +"*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 +"hi PreProc gui=bold,italic guifg=#640A9B "--- +"hi PreProc gui=bold,italic guifg=#576D02 "--- +hi PreProc gui=bold,italic guifg=#AD6141 +"*PreProc generic Preprocessor +" Include preprocessor #include +" Define preprocessor #define +" Macro same as Define +" PreCondit preprocessor #if, #else, #endif, etc. +"hi Type gui=none guifg=#14AE00 "---lighter +hi Type gui=none guifg=#0F8200 "---darker +"*Type int, long, char, etc. +" StorageClass static, register, volatile, etc. +" Structure struct, union, enum, etc. +" Typedef A typedef +"hi! link Special Constant +hi! link Special Type +"*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 +hi clear Underlined +"*Underlined text that stands out, HTML links +hi! link Ignore Constant +"*Ignore left blank, hidden +hi Error gui=bold guifg=Black guibg=Yellow +"*Error any erroneous construct +hi! link Todo LineNr +"*Todo anything that needs extra attention; mostly the +" keywords TODO FIXME and XXX +" ===== fortran +hi fortranUnitHeader gui=bold guifg=Purple +hi fortranType gui=none guifg=#0F8200 +hi! link fortranTypeR fortranType +hi! link fortranStructure fortranType +hi! link fortranOperator Normal "/// +hi! link fortranNumber Normal "/// + + + +hi fortranLabelNumber guifg=DarkRed + + + +"hi fortranTodo guifg=Black guibg=#507080 +"hi fortranContinueMark guifg=White guibg=DarkRed diff --git a/colors/nuvola.vim b/colors/nuvola.vim new file mode 100755 index 0000000..f9a608a --- /dev/null +++ b/colors/nuvola.vim @@ -0,0 +1,107 @@ +" local syntax file - set colors on a per-machine basis: +" vim: tw=0 ts=4 sw=4 +" Vim color file +" Maintainer: Dr. J. Pfefferl +" Source: $Source: /MISC/projects/cvsroot/user/pfefferl/vim/colors/nuvola.vim,v $ +" Id: $Id: nuvola.vim,v 1.14 2003/08/11 14:03:28 pfefferl Exp $ +" Last Change: $Date: 2003/08/11 14:03:28 $ + +" Intro {{{1 +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "nuvola" + +" Normal {{{1 +hi Normal ctermfg=black ctermbg=NONE guifg=black guibg=#F9F5F9 + +" Search {{{1 +hi IncSearch cterm=UNDERLINE ctermfg=Black ctermbg=brown gui=UNDERLINE guifg=Black guibg=#FFE568 +hi Search term=reverse cterm=UNDERLINE ctermfg=Black ctermbg=brown gui=NONE guifg=Black guibg=#FFE568 + +" Messages {{{1 +hi ErrorMsg gui=BOLD guifg=#EB1513 guibg=NONE +hi! link WarningMsg ErrorMsg +hi ModeMsg gui=BOLD guifg=#0070ff guibg=NONE +hi MoreMsg guibg=NONE guifg=seagreen +hi! link Question MoreMsg + +" Split area {{{1 +hi StatusLine term=BOLD,reverse cterm=NONE ctermfg=Yellow ctermbg=DarkGray gui=BOLD guibg=#56A0EE guifg=white +hi StatusLineNC gui=NONE guibg=#56A0EE guifg=#E9E9F4 +hi! link VertSplit StatusLineNC +hi WildMenu gui=UNDERLINE guifg=#56A0EE guibg=#E9E9F4 + +" Diff {{{1 +hi DiffText gui=NONE guifg=#f83010 guibg=#ffeae0 +hi DiffChange gui=NONE guifg=#006800 guibg=#d0ffd0 +hi DiffDelete gui=NONE guifg=#2020ff guibg=#c8f2ea +hi! link DiffAdd DiffDelete + +" Cursor {{{1 +hi Cursor gui=none guifg=black guibg=orange +"hi lCursor gui=NONE guifg=#f8f8f8 guibg=#8000ff +hi CursorIM gui=NONE guifg=#f8f8f8 guibg=#8000ff + +" Fold {{{1 +hi Folded gui=NONE guibg=#B5EEB5 guifg=black +"hi FoldColumn gui=NONE guibg=#9FD29F guifg=black +hi! link FoldColumn Folded + +" Other {{{1 +hi Directory gui=NONE guifg=#0000ff guibg=NONE +hi LineNr gui=NONE guifg=#8080a0 guibg=NONE +hi NonText gui=BOLD guifg=#4000ff guibg=#EFEFF7 +"hi SpecialKey gui=NONE guifg=#A35B00 guibg=NONE +hi Title gui=BOLD guifg=#1014AD guibg=NONE +hi Visual term=reverse ctermfg=yellow ctermbg=black gui=NONE guifg=Black guibg=#BDDFFF +hi VisualNOS term=reverse ctermfg=yellow ctermbg=black gui=UNDERLINE guifg=Black guibg=#BDDFFF + +" Syntax group {{{1 +hi Comment term=BOLD ctermfg=darkgray guifg=#3F6B5B +hi Constant term=UNDERLINE ctermfg=red guifg=#B91F49 +hi Error term=REVERSE ctermfg=15 ctermbg=9 guibg=Red guifg=White +hi Identifier term=UNDERLINE ctermfg=Blue guifg=Blue +hi Number term=UNDERLINE ctermfg=red gui=NONE guifg=#00C226 +hi PreProc term=UNDERLINE ctermfg=darkblue guifg=#1071CE +hi Special term=BOLD ctermfg=darkmagenta guifg=red2 +hi Statement term=BOLD ctermfg=DarkRed gui=NONE guifg=#F06F00 +hi Tag term=BOLD ctermfg=DarkGreen guifg=DarkGreen +hi Todo term=STANDOUT ctermbg=Yellow ctermfg=blue guifg=Blue guibg=Yellow +hi Type term=UNDERLINE ctermfg=Blue gui=NONE guifg=Blue +hi! link String Constant +hi! link Character Constant +hi! link Boolean Constant +hi! link Float Number +hi! link Function Identifier +hi! link Conditional Statement +hi! link Repeat Statement +hi! link Label Statemengreen +hi! link Operator Statement +hi! link Keyword Statement +hi! link Exception Statement +hi! link Include PreProc +hi! link Define PreProc +hi! link Macro PreProc +hi! link PreCondit PreProc +hi! link StorageClass Type +hi! link Structure Type +hi! link Typedef Type +hi! link SpecialChar Special +hi! link Delimiter Special +hi! link SpecialComment Special +hi! link Debug Special + +" HTML {{{1 +hi htmlLink gui=UNDERLINE guifg=#0000ff guibg=NONE +hi htmlBold gui=BOLD +hi htmlBoldItalic gui=BOLD,ITALIC +hi htmlBoldUnderline gui=BOLD,UNDERLINE +hi htmlBoldUnderlineItalic gui=BOLD,UNDERLINE,ITALIC +hi htmlItalic gui=ITALIC +hi htmlUnderline gui=UNDERLINE +hi htmlUnderlineItalic gui=UNDERLINE,ITALIC + +" vim600:foldmethod=marker diff --git a/colors/oceanblack.vim b/colors/oceanblack.vim new file mode 100755 index 0000000..e6e6be3 --- /dev/null +++ b/colors/oceanblack.vim @@ -0,0 +1,115 @@ +" Vim color file +" Maintainer: Chris Vertonghen +" Last Change: 2003-03-25 +" Version: 0.1 +" based on Tom Regner's oceanblue.vim + +""" Init +set background=dark +highlight clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "oceanblack" + + +""""""""\ Colors \"""""""" + + +"""" GUI Colors + +highlight Cursor gui=None guibg=PaleTurquoise3 guifg=White +highlight CursorIM gui=bold guifg=white guibg=PaleTurquoise3 +highlight Directory guifg=LightSeaGreen guibg=bg +highlight DiffAdd gui=None guifg=fg guibg=DarkCyan +highlight DiffChange gui=None guifg=fg guibg=Green4 +highlight DiffDelete gui=None guifg=fg guibg=black +highlight DiffText gui=bold guifg=fg guibg=bg +highlight ErrorMsg guifg=LightYellow guibg=FireBrick +" previously 'FillColumn': +"highlight FillColumn gui=NONE guifg=black guibg=grey60 +highlight VertSplit gui=NONE guifg=black guibg=grey60 +highlight Folded gui=bold guibg=#305060 guifg=#b0d0e0 +highlight FoldColumn gui=None guibg=#305060 guifg=#b0d0e0 +highlight IncSearch gui=reverse guifg=fg guibg=bg +"highlight LineNr guibg=grey6 guifg=LightSkyBlue3 +highlight LineNr guibg=grey6 guifg=#777777 +highlight ModeMsg guibg=DarkGreen guifg=LightGreen +highlight MoreMsg gui=bold guifg=SeaGreen4 guibg=bg +if version < 600 + " same as SpecialKey + highlight NonText guibg=#123A4A guifg=#3D5D6D +else + " Bottom fill (use e.g. same as LineNr) + highlight NonText gui=None guibg=#000000 guifg=LightSkyBlue +endif +highlight Normal gui=None guibg=#000000 guifg=honeydew2 +highlight Question gui=bold guifg=SeaGreen2 guibg=bg +highlight Search gui=NONE guibg=LightSkyBlue4 guifg=NONE +highlight SpecialKey guibg=#103040 guifg=#324262 +highlight StatusLine gui=bold guibg=grey88 guifg=black +highlight StatusLineNC gui=NONE guibg=grey60 guifg=grey10 +highlight Title gui=bold guifg=MediumOrchid1 guibg=bg +highlight Visual gui=reverse guibg=WHITE guifg=SeaGreen +highlight VisualNOS gui=bold,underline guifg=fg guibg=bg +highlight WarningMsg gui=bold guifg=FireBrick1 guibg=bg +highlight WildMenu gui=bold guibg=Chartreuse guifg=Black + + +"""" Syntax Colors + +"highlight Comment gui=reverse guifg=#507080 +"highlight Comment gui=None guifg=#507080 +highlight Comment gui=None guifg=#7C7268 + +highlight Constant guifg=cyan3 guibg=bg +"hi String gui=None guifg=turquoise2 guibg=bg +hi String gui=None guifg=#80a0ff guibg=bg + "hi Character gui=None guifg=Cyan guibg=bg + "highlight Number gui=None guifg=Cyan guibg=bg + highlight Number gui=None guifg=Cyan guibg=black + highlight Boolean gui=bold guifg=Cyan guibg=bg + "hi Float gui=None guifg=Cyan guibg=bg + +highlight Identifier guifg=LightSkyBlue3 +hi Function gui=None guifg=DarkSeaGreen3 guibg=bg + +highlight Statement gui=NONE guifg=LightGreen + highlight Conditional gui=None guifg=LightGreen guibg=bg + highlight Repeat gui=None guifg=SeaGreen2 guibg=bg + "hi Label gui=None guifg=LightGreen guibg=bg + highlight Operator gui=None guifg=Chartreuse guibg=bg + highlight Keyword gui=None guifg=LightGreen guibg=bg + highlight Exception gui=None guifg=LightGreen guibg=bg + +highlight PreProc guifg=SkyBlue1 +hi Include gui=None guifg=LightSteelBlue3 guibg=bg +hi Define gui=None guifg=LightSteelBlue2 guibg=bg +hi Macro gui=None guifg=LightSkyBlue3 guibg=bg +hi PreCondit gui=None guifg=LightSkyBlue2 guibg=bg + +highlight Type gui=NONE guifg=LightBlue +hi StorageClass gui=None guifg=LightBlue guibg=bg +hi Structure gui=None guifg=LightBlue guibg=bg +hi Typedef gui=None guifg=LightBlue guibg=bg + +"highlight Special gui=bold guifg=aquamarine3 +highlight Special guifg=#999999 + "hi SpecialChar gui=bold guifg=White guibg=bg + "hi Tag gui=bold guifg=White guibg=bg + "hi Delimiter gui=bold guifg=White guibg=bg + "hi SpecialComment gui=bold guifg=White guibg=bg + "hi Debug gui=bold guifg=White guibg=bg + +highlight Underlined gui=underline guifg=honeydew4 guibg=bg + +highlight Ignore guifg=#204050 + +highlight Error guifg=LightYellow guibg=FireBrick + +highlight Todo guifg=Cyan guibg=#507080 + +""" OLD COLORS + + + diff --git a/colors/oceandeep.vim b/colors/oceandeep.vim new file mode 100755 index 0000000..08923d0 --- /dev/null +++ b/colors/oceandeep.vim @@ -0,0 +1,140 @@ +" Vim color file +" Maintainer: Tom Regner +" Last Change: +" +" 2007-10-16 change by Alexei Alexandrov +" - highlight CursorColumn +" +" 2007-08-20 change by Diederick Niehorster +" - highlight CursorLine +" +" 2007-02-05 +" - included changes from Keffin Barnaby +" (vim>=7.0 PMenu and Spellchecking) +" +" 2006-09-06 +" - changed String to DarkCyan, Macro to DarkRed +" +" 2006-09-05 +" - more console-colors +" - added console-colors, clean-up +" +" Version: 1.2.5 +" URL: http://vim.sourceforge.net/script.php?script_id=368 + + +""" Init +set background=dark +highlight clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "oceandeep" + +"""" GUI + +highlight Cursor gui=None guibg=PaleTurquoise3 guifg=White +highlight CursorIM gui=bold guifg=white guibg=PaleTurquoise3 +highlight CursorLine gui=None guibg=#003853 +highlight CursorColumn gui=None guibg=#003853 +highlight Directory guifg=LightSeaGreen guibg=bg +highlight DiffAdd gui=None guifg=fg guibg=DarkCyan +highlight DiffChange gui=None guifg=fg guibg=Green4 +highlight DiffDelete gui=None guifg=fg guibg=black +highlight DiffText gui=bold guifg=fg guibg=bg +highlight ErrorMsg guifg=LightYellow guibg=FireBrick +highlight VertSplit gui=NONE guifg=black guibg=grey60 +highlight Folded gui=bold guibg=#305060 guifg=#b0d0e0 +highlight FoldColumn gui=bold guibg=#305060 guifg=#b0d0e0 +highlight IncSearch gui=reverse guifg=fg guibg=bg +highlight LineNr gui=bold guibg=grey6 guifg=LightSkyBlue3 +highlight ModeMsg guibg=DarkGreen guifg=LightGreen +highlight MoreMsg gui=bold guifg=SeaGreen4 guibg=bg +if version < 600 + " same as SpecialKey + highlight NonText guibg=#123A4A guifg=#3D5D6D +else + " Bottom fill (use e.g. same as LineNr) + highlight NonText gui=None guibg=#103040 guifg=LightSkyBlue +endif +highlight Normal gui=None guibg=#103040 guifg=honeydew2 +highlight Question gui=bold guifg=SeaGreen2 guibg=bg +highlight Search gui=NONE guibg=LightSkyBlue4 guifg=NONE +highlight SpecialKey guibg=#103040 guifg=#324262 +highlight StatusLine gui=bold guibg=grey88 guifg=black +highlight StatusLineNC gui=NONE guibg=grey60 guifg=grey10 +highlight Title gui=bold guifg=MediumOrchid1 guibg=bg +highlight Visual gui=reverse guibg=WHITE guifg=SeaGreen +highlight VisualNOS gui=bold,underline guifg=fg guibg=bg +highlight WarningMsg gui=bold guifg=FireBrick1 guibg=bg +highlight WildMenu gui=bold guibg=Chartreuse guifg=Black + +highlight Comment gui=None guifg=#507080 +highlight Constant guifg=cyan3 guibg=bg +highlight String gui=None guifg=turquoise2 guibg=bg +highlight Number gui=None guifg=Cyan guibg=bg +highlight Boolean gui=bold guifg=Cyan guibg=bg +highlight Identifier guifg=LightSkyBlue3 +highlight Function gui=None guifg=DarkSeaGreen3 guibg=bg + +highlight Statement gui=NONE guifg=LightGreen +highlight Conditional gui=None guifg=LightGreen guibg=bg +highlight Repeat gui=None guifg=SeaGreen2 guibg=bg +highlight Operator gui=None guifg=Chartreuse guibg=bg +highlight Keyword gui=bold guifg=LightGreen guibg=bg +highlight Exception gui=bold guifg=LightGreen guibg=bg + +highlight PreProc guifg=SkyBlue1 +highlight Include gui=None guifg=LightSteelBlue3 guibg=bg +highlight Define gui=None guifg=LightSteelBlue2 guibg=bg +highlight Macro gui=None guifg=LightSkyBlue3 guibg=bg +highlight PreCondit gui=None guifg=LightSkyBlue2 guibg=bg + +highlight Type gui=NONE guifg=LightBlue +highlight StorageClass gui=None guifg=LightBlue guibg=bg +highlight Structure gui=None guifg=LightBlue guibg=bg +highlight Typedef gui=None guifg=LightBlue guibg=bg + +highlight Special gui=bold guifg=aquamarine3 +highlight Underlined gui=underline guifg=honeydew4 guibg=bg +highlight Ignore guifg=#204050 +highlight Error guifg=LightYellow guibg=FireBrick +highlight Todo guifg=Cyan guibg=#507080 +if v:version >= 700 + highlight PMenu gui=bold guibg=LightSkyBlue4 guifg=honeydew2 + highlight PMenuSel gui=bold guibg=DarkGreen guifg=honeydew2 + highlight PMenuSbar gui=bold guibg=LightSkyBlue4 + highlight PMenuThumb gui=bold guibg=DarkGreen + highlight SpellBad gui=undercurl guisp=Red + highlight SpellRare gui=undercurl guisp=Orange + highlight SpellLocal gui=undercurl guisp=Orange + highlight SpellCap gui=undercurl guisp=Yellow +endif + +""" Console +if v:version >= 700 + highlight PMenu cterm=bold ctermbg=DarkGreen ctermfg=Gray + highlight PMenuSel cterm=bold ctermbg=Yellow ctermfg=Gray + highlight PMenuSbar cterm=bold ctermbg=DarkGreen + highlight PMenuThumb cterm=bold ctermbg=Yellow + highlight SpellBad ctermbg=Red + highlight SpellRare ctermbg=Red + highlight SpellLocal ctermbg=Red + highlight SpellCap ctermbg=Yellow +endif + +highlight Normal ctermfg=Gray ctermbg=None +highlight Search ctermfg=Black ctermbg=Red cterm=NONE +highlight Visual cterm=reverse +highlight Cursor ctermfg=Black ctermbg=Green cterm=bold +highlight Special ctermfg=Brown +highlight Comment ctermfg=DarkGray +highlight StatusLine ctermfg=Blue ctermbg=White +highlight Statement ctermfg=Yellow cterm=NONE +highlight Type cterm=NONE +highlight Macro ctermfg=DarkRed +highlight Identifier ctermfg=DarkYellow +highlight Structure ctermfg=DarkGreen +highlight String ctermfg=DarkCyan + +" vim: sw=4 ts=4 et diff --git a/colors/oceanlight.vim b/colors/oceanlight.vim new file mode 100755 index 0000000..08fb22e --- /dev/null +++ b/colors/oceanlight.vim @@ -0,0 +1,105 @@ +" Vim color file +" Maintainer: Hkan Wikstrm +" Last Change: 2005-01-06 +" Version: 0.1 +" URL: +" Originally based on oceandeep by Tom Regner (Vim script #368) + + +""" Init +set background=light +highlight clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "oceanlight" + + +""""""""\ Colors \"""""""" + + +"""" GUI Colors + +highlight Cursor gui=None guibg=PaleTurquoise3 guifg=White +highlight CursorIM gui=none guifg=white guibg=PaleTurquoise3 +highlight Directory guifg=SeaGreen guibg=bg +highlight DiffAdd gui=None guifg=SteelBlue guibg=LightGray +highlight DiffChange gui=None guifg=fg guibg=CadetBlue +highlight DiffDelete gui=None guifg=LightGray guibg=SteelBlue +highlight DiffText gui=none guifg=fg guibg=bg +highlight ErrorMsg guifg=FireBrick guibg=bg +highlight VertSplit gui=NONE guifg=black guibg=grey60 +highlight Folded gui=none guibg=LightSteelBlue guifg=SteelBlue +highlight FoldColumn gui=none guibg=LightSteelBLue guifg=SteelBlue +highlight IncSearch gui=reverse guifg=fg guibg=bg +highlight LineNr gui=none guibg=#d3d3d3 guifg=#5daf83 +highlight ModeMsg guibg=CadetBlue guifg=LightGrey +highlight MoreMsg gui=none guifg=CadetBlue guibg=bg +if version < 600 + " same as SpecialKey + highlight NonText guibg=#d3d3d3 guifg=#3D5D6D +else + " Bottom fill (use e.g. same as LineNr) + highlight NonText gui=None guibg=#d3d3d3 guifg=#5daf83 +endif +highlight Normal gui=None guibg=#f5f5f5 guifg=DimGray +highlight Question gui=none guifg=SeaGreen2 guibg=bg +highlight Search gui=NONE guibg=SlateGray2 guifg=NONE +highlight SpecialKey guibg=LightGray guifg=CadetBlue +highlight StatusLine gui=none guibg=SlateGrey guifg=LightGrey +highlight StatusLineNC gui=NONE guibg=LightGrey guifg=SlateGrey +highlight Title gui=none guifg=MediumOrchid1 guibg=bg +highlight Visual gui=reverse guibg=slategray4 guifg=SlateGray2 +highlight VisualNOS gui=none,underline guifg=fg guibg=bg +highlight WarningMsg gui=none guifg=FireBrick1 guibg=bg +highlight WildMenu gui=none guibg=Chartreuse guifg=Black + + +"""" Syntax Colors + +"highlight Comment gui=reverse guifg=#507080 +highlight Comment gui=None guifg=LightSteelBlue + +highlight Constant guifg=#483d8b guibg=bg +hi String gui=None guifg=MediumAquamarine guibg=bg + "hi Character gui=None guifg=Cyan guibg=bg + highlight Number gui=None guifg=MediumSeaGreen guibg=bg + highlight Boolean gui=none guifg=DarkSeaGreen guibg=bg + "hi Float gui=None guifg=Cyan guibg=bg + +highlight Identifier guifg=CornflowerBlue +hi Function gui=None guifg=DarkSeaGreen guibg=bg + +highlight Statement gui=NONE guifg=SeaGreen + highlight Conditional gui=None guifg=#5daf83 guibg=bg + highlight Repeat gui=None guifg=#5daf83 guibg=bg + "hi Label gui=None guifg=seagreen guibg=bg + highlight Operator gui=None guifg=LightSlateBlue guibg=bg + highlight Keyword gui=none guifg=SeaGreen guibg=bg + highlight Exception gui=none guifg=SeaGreen guibg=bg + +highlight PreProc guifg=SkyBlue1 +hi Include gui=None guifg=SteelBlue guibg=bg +hi Define gui=None guifg=LightSteelBlue2 guibg=bg +hi Macro gui=None guifg=LightSkyBlue3 guibg=bg +hi PreCondit gui=None guifg=LightSkyBlue2 guibg=bg + +highlight Type gui=NONE guifg=SteelBlue +hi StorageClass gui=None guifg=SteelBlue guibg=bg +hi Structure gui=None guifg=SteelBlue guibg=bg +hi Typedef gui=None guifg=SteelBlue guibg=bg + +highlight Special gui=none guifg=aquamarine3 + "hi SpecialChar gui=none guifg=White guibg=bg + "hi Tag gui=none guifg=White guibg=bg + "hi Delimiter gui=none guifg=White guibg=bg + "hi SpecialComment gui=none guifg=White guibg=bg + "hi Debug gui=none guifg=White guibg=bg + +highlight Underlined gui=underline guifg=honeydew4 guibg=bg + +highlight Ignore guifg=#204050 + +highlight Error guifg=FireBrick gui=Bold guibg=bg + +highlight Todo guifg=LightSkyBlue guibg=SlateGray diff --git a/colors/olive.vim b/colors/olive.vim new file mode 100755 index 0000000..8935c52 --- /dev/null +++ b/colors/olive.vim @@ -0,0 +1,119 @@ +" Vim color file +" Maintainer: Charles +" Last Change: 11 June 2004 +" URL: http:// + +" cool help screens +" :he group-name +" :he highlight-groups +" :he cterm-colors + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="olive" + +"======================================================= +hi Normal guifg=#D9D9C3 guibg=#333300 +hi Cursor guifg=black guibg=white +hi CursorIM guifg=black guibg=green +hi Directory guifg=gold gui=underline +"hi DiffAdd +"hi DiffChange +"hi DiffDelete +"hi DiffText +hi ErrorMsg guibg=indianred +"hi VertSplit guifg=gold +hi Folded guifg=khaki guibg=darkolivegreen gui=underline +hi FoldColumn guifg=khaki guibg=darkolivegreen gui=none +hi IncSearch guifg=black guibg=khaki +hi LineNr guifg=gray80 +hi ModeMsg guifg=greenyellow gui=bold +hi MoreMsg guifg=greenyellow gui=bold +"hi NonText guibg=black +hi Question guifg=yellowgreen gui=NONE +hi Search guifg=black guibg=khaki gui=NONE +hi SpecialKey guifg=black guibg=darkkhaki +hi StatusLine guifg=palegoldenrod guibg=#808000 gui=none +hi StatusLineNC guifg=gray guibg=darkolivegreen gui=none +hi Title guifg=gold gui=bold +hi Visual guifg=black guibg=darkkhaki gui=NONE +"hi VisualNOS +hi WarningMsg guifg=palevioletred +"hi WildMenu +"hi Menu +"hi Scrollbar +"hi Tooltip + + +" ============================================================ +" syntax highlighting groups +" ============================================================ +hi Comment guifg=darkkhaki guibg=#4C4C00 gui=underline + +hi Constant guifg=navajowhite +hi String guifg=greenyellow +"hi Character +"hi Number +"hi Boolean +"hi Float + +hi Identifier guifg=lightsteelblue +" hi Function guibg=gray60 + +hi Statement guifg=darkseagreen gui=bold +"hi Conditional +"hi Repeat +"hi Label +hi Operator guifg=gold +"hi Keyword +"hi Exception + +hi PreProc guifg=sandybrown gui=bold +"hi Include +"hi Define +"hi Macro +"hi PreCondit + +hi Type guifg=goldenrod +"hi StorageClass +"hi Structure +"hi Typedef + +hi Special guifg=navajowhite gui=underline +"hi SpecialChar +"hi Tag +"hi Delimiter +"hi SpecialComment +"hi Debug + +hi Underlined gui=underline + +hi Ignore guifg=black + +hi Error guifg=white + +hi Todo guifg=black guibg=gold gui=NONE + +" ================================================================= +" Language specific color +" ================================================================= + +" C / C++ +hi cIncluded guifg=yellowgreen + +" HTML +hi Title guifg=palegoldenrod + +" VIM +hi VimError guifg=red gui=bold +hi VimOption guifg=gold + +" TeX / LaTeX +hi texSection guifg=greenyellow +" tex between { and } +hi texMatcher guifg=yellowgreen gui=none +hi texMath gui=none + diff --git a/colors/papayawhip.vim b/colors/papayawhip.vim new file mode 100755 index 0000000..5f8725a --- /dev/null +++ b/colors/papayawhip.vim @@ -0,0 +1,31 @@ +" Vim color file +" Maintainer: Gerald S. Williams +" Last Change: 2003 Apr 17 + +" A nice light background (you guessed it, PapayaWhip) that's relatively easy +" on the eyes yet very usable. Not nearly as "puffy" as peachpuff. +" +" Only values that differ from defaults are specified. + +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "PapayaWhip" + +hi Normal guifg=#3f1f1f guibg=PapayaWhip ctermbg=Gray ctermfg=Black +hi NonText guibg=Moccasin guifg=Brown ctermfg=Brown +hi LineNr guibg=Moccasin +hi DiffDelete guibg=LightRed guifg=Black ctermbg=DarkRed ctermfg=White +hi DiffAdd guibg=LightGreen ctermbg=DarkGreen ctermfg=White +hi DiffChange guibg=LightCyan3 ctermbg=DarkCyan ctermfg=White +hi DiffText gui=NONE guibg=Gray80 ctermbg=DarkCyan ctermfg=Yellow +hi Comment guifg=MediumBlue +hi Constant guifg=DeepPink +hi PreProc guifg=DarkMagenta +hi StatusLine guibg=White guifg=#5f3705 cterm=bold ctermbg=Brown ctermfg=White +hi StatusLineNC gui=None guibg=Gray +hi VertSplit gui=None guibg=Gray +hi Identifier guifg=#005f5f +hi Statement ctermfg=DarkRed diff --git a/colors/peaksea.vim b/colors/peaksea.vim new file mode 100755 index 0000000..359a9ac --- /dev/null +++ b/colors/peaksea.vim @@ -0,0 +1,597 @@ +" Vim color file --- psc (peak sea color) "Lite version" +" Maintainer: Pan, Shi Zhu +" URL: http://vim.sourceforge.net/scripts/script.php?script_id=760 +" Last Change: 31 Oct 2008 +" Version: 3.3 +" +" Comments and e-mails are welcomed, thanks. +" +" The peaksea color is simply a colorscheme with the default settings of +" the original ps_color. Lite version means there's no custom settings +" and fancy features such as integration with reloaded.vim +" +" The full version of ps_color.vim will be maintained until Vim 8. +" By then there will be only the lite version: peaksea.vim +" +" Note: Please set the background option in your .vimrc and/or .gvimrc +" +" It is much better *not* to set 'background' option inside +" a colorscheme file. because ":set background" inside a colorscheme +" may cause colorscheme be sourced twice or in the worst case result an +" infinite loop. +" +" Color Scheme Overview: +" :ru syntax/hitest.vim +" +" Relevant Help: +" :h highlight-groups +" :h psc-cterm-color-table +" +" Colors Order: +" #rrggbb +" + +hi clear + +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = expand(":t:r") + +" I don't want to abuse folding, but here folding is used to avoid confusion. +if &background=='light' + " for background=light {{{2 + " LIGHT COLOR DEFINE START + + hi Normal guifg=#000000 guibg=#e0e0e0 gui=NONE + hi Search guifg=NONE guibg=#f8f8f8 gui=NONE + hi Visual guifg=NONE guibg=#a6caf0 gui=NONE + hi Cursor guifg=#f0f0f0 guibg=#008000 gui=NONE + " The idea of CursorIM is pretty good, however, the feature is still buggy + " in the current version (Vim 7.0). + " The following line will be kept commented until the bug fixed. + " + " hi CursorIM guifg=#f0f0f0 guibg=#800080 + hi Special guifg=#907000 guibg=NONE gui=NONE + hi Comment guifg=#606000 guibg=NONE gui=NONE + hi Number guifg=#907000 guibg=NONE gui=NONE + hi Constant guifg=#007068 guibg=NONE gui=NONE + hi StatusLine guifg=fg guibg=#a6caf0 gui=NONE + hi LineNr guifg=#686868 guibg=NONE gui=NONE + hi Question guifg=fg guibg=#d0d090 gui=NONE + hi PreProc guifg=#009030 guibg=NONE gui=NONE + hi Statement guifg=#2060a8 guibg=NONE gui=NONE + hi Type guifg=#0850a0 guibg=NONE gui=NONE + hi Todo guifg=#800000 guibg=#e0e090 gui=NONE + " NOTE THIS IS IN THE WARM SECTION + hi Error guifg=#c03000 guibg=NONE gui=NONE + hi Identifier guifg=#a030a0 guibg=NONE gui=NONE + hi ModeMsg guifg=fg guibg=#b0b0e0 gui=NONE + hi VisualNOS guifg=fg guibg=#b0b0e0 gui=NONE + hi SpecialKey guifg=#1050a0 guibg=NONE gui=NONE + hi NonText guifg=#002090 guibg=#d0d0d0 gui=NONE + hi Directory guifg=#a030a0 guibg=NONE gui=NONE + hi ErrorMsg guifg=fg guibg=#f0b090 gui=NONE + hi MoreMsg guifg=#489000 guibg=NONE gui=NONE + hi Title guifg=#a030a0 guibg=NONE gui=NONE + hi WarningMsg guifg=#b02000 guibg=NONE gui=NONE + hi WildMenu guifg=fg guibg=#d0d090 gui=NONE + hi Folded guifg=NONE guibg=#b0e0b0 gui=NONE + hi FoldColumn guifg=fg guibg=#90e090 gui=NONE + hi DiffAdd guifg=NONE guibg=#b0b0e0 gui=NONE + hi DiffChange guifg=NONE guibg=#e0b0e0 gui=NONE + hi DiffDelete guifg=#002090 guibg=#d0d0d0 gui=NONE + hi DiffText guifg=NONE guibg=#c0e080 gui=NONE + hi SignColumn guifg=fg guibg=#90e090 gui=NONE + + hi IncSearch guifg=#f0f0f0 guibg=#806060 gui=NONE + hi StatusLineNC guifg=fg guibg=#c0c0c0 gui=NONE + hi VertSplit guifg=fg guibg=#c0c0c0 gui=NONE + hi Underlined guifg=#6a5acd guibg=NONE gui=underline + hi Ignore guifg=bg guibg=NONE + " NOTE THIS IS IN THE WARM SECTION + if v:version >= 700 + if has('spell') + hi SpellBad guifg=NONE guibg=NONE guisp=#c03000 + hi SpellCap guifg=NONE guibg=NONE guisp=#2060a8 + hi SpellRare guifg=NONE guibg=NONE guisp=#a030a0 + hi SpellLocal guifg=NONE guibg=NONE guisp=#007068 + endif + hi Pmenu guifg=fg guibg=#e0b0e0 + hi PmenuSel guifg=#f0f0f0 guibg=#806060 gui=NONE + hi PmenuSbar guifg=fg guibg=#c0c0c0 gui=NONE + hi PmenuThumb guifg=fg guibg=#c0e080 gui=NONE + hi TabLine guifg=fg guibg=#c0c0c0 gui=NONE + hi TabLineFill guifg=fg guibg=#c0c0c0 gui=NONE + hi TabLineSel guifg=fg guibg=NONE gui=NONE + hi CursorColumn guifg=NONE guibg=#f0b090 + hi CursorLine guifg=NONE guibg=NONE gui=underline + hi MatchParen guifg=NONE guibg=#c0e080 + endif + + " LIGHT COLOR DEFINE END + + " Vim 7 added stuffs + if v:version >= 700 + hi Ignore gui=NONE + + " the gui=undercurl guisp could only support in Vim 7 + if has('spell') + hi SpellBad gui=undercurl + hi SpellCap gui=undercurl + hi SpellRare gui=undercurl + hi SpellLocal gui=undercurl + endif + hi TabLine gui=underline + hi TabLineFill gui=underline + hi CursorLine gui=underline + endif + + " For reversed stuffs, clear the reversed prop and set the bold prop again + hi IncSearch gui=bold + hi StatusLine gui=bold + hi StatusLineNC gui=bold + hi VertSplit gui=bold + hi Visual gui=bold + + " Enable the bold property + hi Question gui=bold + hi DiffText gui=bold + hi Statement gui=bold + hi Type gui=bold + hi MoreMsg gui=bold + hi ModeMsg gui=bold + hi NonText gui=bold + hi Title gui=bold + hi DiffDelete gui=bold + hi TabLineSel gui=bold + + " gui define for background=light end here + + if &t_Co==256 + " 256color light terminal support here + + hi Normal ctermfg=16 ctermbg=254 cterm=NONE + " Comment/Uncomment the following line to disable/enable transparency + "hi Normal ctermfg=16 ctermbg=NONE cterm=NONE + hi Search ctermfg=NONE ctermbg=231 cterm=NONE + hi Visual ctermfg=NONE ctermbg=153 cterm=NONE + hi Cursor ctermfg=255 ctermbg=28 cterm=NONE + " hi CursorIM ctermfg=255 ctermbg=90 + hi Special ctermfg=94 ctermbg=NONE cterm=NONE + hi Comment ctermfg=58 ctermbg=NONE cterm=NONE + hi Number ctermfg=94 ctermbg=NONE cterm=NONE + hi Constant ctermfg=23 ctermbg=NONE cterm=NONE + hi StatusLine ctermfg=fg ctermbg=153 cterm=NONE + hi LineNr ctermfg=242 ctermbg=NONE cterm=NONE + hi Question ctermfg=fg ctermbg=186 cterm=NONE + hi PreProc ctermfg=29 ctermbg=NONE cterm=NONE + hi Statement ctermfg=25 ctermbg=NONE cterm=NONE + hi Type ctermfg=25 ctermbg=NONE cterm=NONE + hi Todo ctermfg=88 ctermbg=186 cterm=NONE + " NOTE THIS IS IN THE WARM SECTION + hi Error ctermfg=130 ctermbg=NONE cterm=NONE + hi Identifier ctermfg=133 ctermbg=NONE cterm=NONE + hi ModeMsg ctermfg=fg ctermbg=146 cterm=NONE + hi VisualNOS ctermfg=fg ctermbg=146 cterm=NONE + hi SpecialKey ctermfg=25 ctermbg=NONE cterm=NONE + hi NonText ctermfg=18 ctermbg=252 cterm=NONE + " Comment/Uncomment the following line to disable/enable transparency + "hi NonText ctermfg=18 ctermbg=NONE cterm=NONE + hi Directory ctermfg=133 ctermbg=NONE cterm=NONE + hi ErrorMsg ctermfg=fg ctermbg=216 cterm=NONE + hi MoreMsg ctermfg=64 ctermbg=NONE cterm=NONE + hi Title ctermfg=133 ctermbg=NONE cterm=NONE + hi WarningMsg ctermfg=124 ctermbg=NONE cterm=NONE + hi WildMenu ctermfg=fg ctermbg=186 cterm=NONE + hi Folded ctermfg=NONE ctermbg=151 cterm=NONE + hi FoldColumn ctermfg=fg ctermbg=114 cterm=NONE + hi DiffAdd ctermfg=NONE ctermbg=146 cterm=NONE + hi DiffChange ctermfg=NONE ctermbg=182 cterm=NONE + hi DiffDelete ctermfg=18 ctermbg=252 cterm=NONE + hi DiffText ctermfg=NONE ctermbg=150 cterm=NONE + hi SignColumn ctermfg=fg ctermbg=114 cterm=NONE + + hi IncSearch ctermfg=255 ctermbg=95 cterm=NONE + hi StatusLineNC ctermfg=fg ctermbg=250 cterm=NONE + hi VertSplit ctermfg=fg ctermbg=250 cterm=NONE + hi Underlined ctermfg=62 ctermbg=NONE cterm=underline + hi Ignore ctermfg=bg ctermbg=NONE + " NOTE THIS IS IN THE WARM SECTION + if v:version >= 700 + if has('spell') + if 0 + " ctermsp is not supported in Vim7, we ignore it. + hi SpellBad cterm=undercurl ctermbg=NONE ctermfg=130 + hi SpellCap cterm=undercurl ctermbg=NONE ctermfg=25 + hi SpellRare cterm=undercurl ctermbg=NONE ctermfg=133 + hi SpellLocal cterm=undercurl ctermbg=NONE ctermfg=23 + else + hi SpellBad cterm=undercurl ctermbg=NONE ctermfg=NONE + hi SpellCap cterm=undercurl ctermbg=NONE ctermfg=NONE + hi SpellRare cterm=undercurl ctermbg=NONE ctermfg=NONE + hi SpellLocal cterm=undercurl ctermbg=NONE ctermfg=NONE + endif + endif + hi Pmenu ctermfg=fg ctermbg=182 + hi PmenuSel ctermfg=255 ctermbg=95 cterm=NONE + hi PmenuSbar ctermfg=fg ctermbg=250 cterm=NONE + hi PmenuThumb ctermfg=fg ctermbg=150 cterm=NONE + hi TabLine ctermfg=fg ctermbg=250 cterm=NONE + hi TabLineFill ctermfg=fg ctermbg=250 cterm=NONE + hi TabLineSel ctermfg=fg ctermbg=NONE cterm=NONE + hi CursorColumn ctermfg=NONE ctermbg=216 + hi CursorLine ctermfg=NONE ctermbg=NONE cterm=underline + hi MatchParen ctermfg=NONE ctermbg=150 + endif + + hi TabLine cterm=underline + hi TabLineFill cterm=underline + hi CursorLine cterm=underline + + " For reversed stuffs, clear the reversed prop and set the bold prop again + hi IncSearch cterm=bold + hi StatusLine cterm=bold + hi StatusLineNC cterm=bold + hi VertSplit cterm=bold + hi Visual cterm=bold + + hi NonText cterm=bold + hi Question cterm=bold + hi Title cterm=bold + hi DiffDelete cterm=bold + hi DiffText cterm=bold + hi Statement cterm=bold + hi Type cterm=bold + hi MoreMsg cterm=bold + hi ModeMsg cterm=bold + hi TabLineSel cterm=bold + + hi lCursor ctermfg=bg ctermbg=fg cterm=NONE + endif " t_Co==256 + " }}}2 +elseif &background=='dark' + " for background=dark {{{2 + " DARK COLOR DEFINE START + + hi Normal guifg=#d0d0d0 guibg=#202020 gui=NONE + hi Comment guifg=#d0d090 guibg=NONE gui=NONE + hi Constant guifg=#80c0e0 guibg=NONE gui=NONE + hi Number guifg=#e0c060 guibg=NONE gui=NONE + hi Identifier guifg=#f0c0f0 guibg=NONE gui=NONE + hi Statement guifg=#c0d8f8 guibg=NONE gui=NONE + hi PreProc guifg=#60f080 guibg=NONE gui=NONE + hi Type guifg=#b0d0f0 guibg=NONE gui=NONE + hi Special guifg=#e0c060 guibg=NONE gui=NONE + hi Error guifg=#f08060 guibg=NONE gui=NONE + hi Todo guifg=#800000 guibg=#d0d090 gui=NONE + hi Search guifg=NONE guibg=#800000 gui=NONE + hi Visual guifg=#000000 guibg=#a6caf0 gui=NONE + hi Cursor guifg=#000000 guibg=#00f000 gui=NONE + " NOTE THIS IS IN THE COOL SECTION + " hi CursorIM guifg=#000000 guibg=#f000f0 gui=NONE + hi StatusLine guifg=#000000 guibg=#a6caf0 gui=NONE + hi LineNr guifg=#b0b0b0 guibg=NONE gui=NONE + hi Question guifg=#000000 guibg=#d0d090 gui=NONE + hi ModeMsg guifg=fg guibg=#000080 gui=NONE + hi VisualNOS guifg=fg guibg=#000080 gui=NONE + hi SpecialKey guifg=#b0d0f0 guibg=NONE gui=NONE + hi NonText guifg=#6080f0 guibg=#101010 gui=NONE + hi Directory guifg=#80c0e0 guibg=NONE gui=NONE + hi ErrorMsg guifg=#d0d090 guibg=#800000 gui=NONE + hi MoreMsg guifg=#c0e080 guibg=NONE gui=NONE + hi Title guifg=#f0c0f0 guibg=NONE gui=NONE + hi WarningMsg guifg=#f08060 guibg=NONE gui=NONE + hi WildMenu guifg=#000000 guibg=#d0d090 gui=NONE + hi Folded guifg=NONE guibg=#004000 gui=NONE + hi FoldColumn guifg=#e0e0e0 guibg=#008000 gui=NONE + hi DiffAdd guifg=NONE guibg=#000080 gui=NONE + hi DiffChange guifg=NONE guibg=#800080 gui=NONE + hi DiffDelete guifg=#6080f0 guibg=#202020 gui=NONE + hi DiffText guifg=#000000 guibg=#c0e080 gui=NONE + hi SignColumn guifg=#e0e0e0 guibg=#008000 gui=NONE + hi IncSearch guifg=#000000 guibg=#d0d0d0 gui=NONE + hi StatusLineNC guifg=#000000 guibg=#c0c0c0 gui=NONE + hi VertSplit guifg=#000000 guibg=#c0c0c0 gui=NONE + hi Underlined guifg=#80a0ff guibg=NONE gui=underline + hi Ignore guifg=#000000 guibg=NONE + " NOTE THIS IS IN THE COOL SECTION + if v:version >= 700 + if has('spell') + " the guisp= could only support in Vim 7 + hi SpellBad guifg=NONE guibg=NONE guisp=#f08060 + hi SpellCap guifg=NONE guibg=NONE guisp=#6080f0 + hi SpellRare guifg=NONE guibg=NONE guisp=#f0c0f0 + hi SpellLocal guifg=NONE guibg=NONE guisp=#c0d8f8 + endif + hi Pmenu guifg=fg guibg=#800080 + hi PmenuSel guifg=#000000 guibg=#d0d0d0 gui=NONE + hi PmenuSbar guifg=fg guibg=#000080 gui=NONE + hi PmenuThumb guifg=fg guibg=#008000 gui=NONE + hi TabLine guifg=fg guibg=#008000 gui=NONE + hi TabLineFill guifg=fg guibg=#008000 gui=NONE + hi TabLineSel guifg=fg guibg=NONE gui=NONE + hi CursorColumn guifg=NONE guibg=#800000 gui=NONE + hi CursorLine guifg=NONE guibg=NONE gui=underline + hi MatchParen guifg=NONE guibg=#800080 + endif + + " DARK COLOR DEFINE END + + " Vim 7 added stuffs + if v:version >= 700 + hi Ignore gui=NONE + + " the gui=undercurl could only support in Vim 7 + if has('spell') + hi SpellBad gui=undercurl + hi SpellCap gui=undercurl + hi SpellRare gui=undercurl + hi SpellLocal gui=undercurl + endif + hi TabLine gui=underline + hi TabLineFill gui=underline + hi Underlined gui=underline + hi CursorLine gui=underline + endif + + " gui define for background=dark end here + + if &t_Co==8 || &t_Co==16 + " for 8-color and 16-color term + hi Normal ctermfg=LightGrey ctermbg=Black + hi Special ctermfg=Yellow ctermbg=bg + hi Comment ctermfg=DarkYellow ctermbg=bg + hi Constant ctermfg=Blue ctermbg=bg + hi Number ctermfg=Yellow ctermbg=bg + hi LineNr ctermfg=DarkGrey ctermbg=bg + hi PreProc ctermfg=Green ctermbg=bg + hi Statement ctermfg=Cyan ctermbg=bg + hi Type ctermfg=Cyan ctermbg=bg + hi Error ctermfg=Red ctermbg=bg + hi Identifier ctermfg=Magenta ctermbg=bg + hi SpecialKey ctermfg=Cyan ctermbg=bg + hi NonText ctermfg=Blue ctermbg=bg + hi Directory ctermfg=Blue ctermbg=bg + hi MoreMsg ctermfg=Green ctermbg=bg + hi Title ctermfg=Magenta ctermbg=bg + hi WarningMsg ctermfg=Red ctermbg=bg + hi DiffDelete ctermfg=Blue ctermbg=bg + + hi Search ctermfg=NONE ctermbg=DarkRed + hi Visual ctermfg=Black ctermbg=DarkCyan + hi Cursor ctermfg=Black ctermbg=Green + hi StatusLine ctermfg=Black ctermbg=DarkCyan + hi Question ctermfg=Black ctermbg=DarkYellow + hi Todo ctermfg=DarkRed ctermbg=DarkYellow + hi Folded ctermfg=White ctermbg=DarkGreen + hi ModeMsg ctermfg=Grey ctermbg=DarkBlue + hi VisualNOS ctermfg=Grey ctermbg=DarkBlue + hi ErrorMsg ctermfg=DarkYellow ctermbg=DarkRed + hi WildMenu ctermfg=Black ctermbg=DarkYellow + hi FoldColumn ctermfg=White ctermbg=DarkGreen + hi SignColumn ctermfg=White ctermbg=DarkGreen + hi DiffText ctermfg=Black ctermbg=DarkYellow + + if v:version >= 700 + if has('spell') + hi SpellBad ctermfg=NONE ctermbg=DarkRed + hi SpellCap ctermfg=NONE ctermbg=DarkBlue + hi SpellRare ctermfg=NONE ctermbg=DarkMagenta + hi SpellLocal ctermfg=NONE ctermbg=DarkGreen + endif + hi Pmenu ctermfg=fg ctermbg=DarkMagenta + hi PmenuSel ctermfg=Black ctermbg=fg + hi PmenuSbar ctermfg=fg ctermbg=DarkBlue + hi PmenuThumb ctermfg=fg ctermbg=DarkGreen + hi TabLine ctermfg=fg ctermbg=DarkGreen cterm=underline + hi TabLineFill ctermfg=fg ctermbg=DarkGreen cterm=underline + hi CursorColumn ctermfg=NONE ctermbg=DarkRed + + hi TabLineSel ctermfg=fg ctermbg=bg + hi CursorLine ctermfg=NONE ctermbg=bg cterm=underline + + hi MatchParen ctermfg=NONE ctermbg=DarkMagenta + endif + if &t_Co==8 + " 8 colour terminal support, this assumes 16 colour is available through + " setting the 'bold' attribute, will get bright foreground colour. + " However, the bright background color is not available for 8-color terms. + " + " You can manually set t_Co=16 in your .vimrc to see if your terminal + " supports 16 colours, + hi DiffText cterm=none + hi Visual cterm=none + hi Cursor cterm=none + hi Comment cterm=none + hi Todo cterm=none + hi StatusLine cterm=none + hi Question cterm=none + hi DiffChange cterm=none + hi ModeMsg cterm=none + hi VisualNOS cterm=none + hi ErrorMsg cterm=none + hi WildMenu cterm=none + hi DiffAdd cterm=none + hi Folded cterm=none + hi DiffDelete cterm=none + hi Normal cterm=none + hi PmenuThumb cterm=none + hi Search cterm=bold + hi Special cterm=bold + hi Constant cterm=bold + hi Number cterm=bold + hi LineNr cterm=bold + hi PreProc cterm=bold + hi Statement cterm=bold + hi Type cterm=bold + hi Error cterm=bold + hi Identifier cterm=bold + hi SpecialKey cterm=bold + hi NonText cterm=bold + hi MoreMsg cterm=bold + hi Title cterm=bold + hi WarningMsg cterm=bold + hi FoldColumn cterm=bold + hi SignColumn cterm=bold + hi Directory cterm=bold + hi DiffDelete cterm=bold + else + " Background > 7 is only available with 16 or more colors + + hi WarningMsg cterm=none + hi Search cterm=none + hi Visual cterm=none + hi Cursor cterm=none + hi Special cterm=none + hi Comment cterm=none + hi Constant cterm=none + hi Number cterm=none + hi LineNr cterm=none + hi PreProc cterm=none + hi Todo cterm=none + hi Error cterm=none + hi Identifier cterm=none + hi Folded cterm=none + hi SpecialKey cterm=none + hi Directory cterm=none + hi ErrorMsg cterm=none + hi Normal cterm=none + hi PmenuThumb cterm=none + hi WildMenu cterm=none + hi FoldColumn cterm=none + hi SignColumn cterm=none + hi DiffAdd cterm=none + hi DiffChange cterm=none + hi Question cterm=none + hi StatusLine cterm=none + hi DiffText cterm=none + hi IncSearch cterm=reverse + hi StatusLineNC cterm=reverse + hi VertSplit cterm=reverse + + " Well, well, bold font with color 0-7 is not possible. + " So, the Question, StatusLine, DiffText cannot act as expected. + + hi Statement cterm=none + hi Type cterm=none + hi MoreMsg cterm=none + hi ModeMsg cterm=none + hi NonText cterm=none + hi Title cterm=none + hi VisualNOS cterm=none + hi DiffDelete cterm=none + hi TabLineSel cterm=none + + endif + elseif &t_Co==256 + " 256color dark terminal support here + hi Normal ctermfg=252 ctermbg=234 cterm=NONE + " Comment/Uncomment the following line to disable/enable transparency + "hi Normal ctermfg=252 ctermbg=NONE cterm=NONE + hi Comment ctermfg=186 ctermbg=NONE cterm=NONE + hi Constant ctermfg=110 ctermbg=NONE cterm=NONE + hi Number ctermfg=179 ctermbg=NONE cterm=NONE + hi Identifier ctermfg=219 ctermbg=NONE cterm=NONE + hi Statement ctermfg=153 ctermbg=NONE cterm=NONE + hi PreProc ctermfg=84 ctermbg=NONE cterm=NONE + hi Type ctermfg=153 ctermbg=NONE cterm=NONE + hi Special ctermfg=179 ctermbg=NONE cterm=NONE + hi Error ctermfg=209 ctermbg=NONE cterm=NONE + hi Todo ctermfg=88 ctermbg=186 cterm=NONE + hi Search ctermfg=NONE ctermbg=88 cterm=NONE + hi Visual ctermfg=16 ctermbg=153 cterm=NONE + hi Cursor ctermfg=16 ctermbg=46 cterm=NONE + " NOTE THIS IS IN THE COOL SECTION + " hi CursorIM ctermfg=16 ctermbg=201 cterm=NONE + hi StatusLine ctermfg=16 ctermbg=153 cterm=NONE + hi LineNr ctermfg=249 ctermbg=NONE cterm=NONE + hi Question ctermfg=16 ctermbg=186 cterm=NONE + hi ModeMsg ctermfg=fg ctermbg=18 cterm=NONE + hi VisualNOS ctermfg=fg ctermbg=18 cterm=NONE + hi SpecialKey ctermfg=153 ctermbg=NONE cterm=NONE + hi NonText ctermfg=69 ctermbg=233 cterm=NONE + " Comment/Uncomment the following line to disable/enable transparency + "hi NonText ctermfg=69 ctermbg=NONE cterm=NONE + hi Directory ctermfg=110 ctermbg=NONE cterm=NONE + hi ErrorMsg ctermfg=186 ctermbg=88 cterm=NONE + hi MoreMsg ctermfg=150 ctermbg=NONE cterm=NONE + hi Title ctermfg=219 ctermbg=NONE cterm=NONE + hi WarningMsg ctermfg=209 ctermbg=NONE cterm=NONE + hi WildMenu ctermfg=16 ctermbg=186 cterm=NONE + hi Folded ctermfg=NONE ctermbg=22 cterm=NONE + hi FoldColumn ctermfg=254 ctermbg=28 cterm=NONE + hi DiffAdd ctermfg=NONE ctermbg=18 cterm=NONE + hi DiffChange ctermfg=NONE ctermbg=90 cterm=NONE + hi DiffDelete ctermfg=69 ctermbg=234 cterm=NONE + hi DiffText ctermfg=16 ctermbg=150 cterm=NONE + hi SignColumn ctermfg=254 ctermbg=28 cterm=NONE + hi IncSearch ctermfg=16 ctermbg=252 cterm=NONE + hi StatusLineNC ctermfg=16 ctermbg=250 cterm=NONE + hi VertSplit ctermfg=16 ctermbg=250 cterm=NONE + hi Underlined ctermfg=111 ctermbg=NONE cterm=underline + hi Ignore ctermfg=16 ctermbg=NONE + " NOTE THIS IS IN THE COOL SECTION + if v:version >= 700 + if has('spell') + " the ctermsp= is not supported in Vim 7 we simply ignored + if 0 + hi SpellBad cterm=undercurl ctermbg=NONE ctermfg=209 + hi SpellCap cterm=undercurl ctermbg=NONE ctermfg=69 + hi SpellRare cterm=undercurl ctermbg=NONE ctermfg=219 + hi SpellLocal cterm=undercurl ctermbg=NONE ctermfg=153 + else + hi SpellBad cterm=undercurl ctermbg=NONE ctermfg=NONE + hi SpellCap cterm=undercurl ctermbg=NONE ctermfg=NONE + hi SpellRare cterm=undercurl ctermbg=NONE ctermfg=NONE + hi SpellLocal cterm=undercurl ctermbg=NONE ctermfg=NONE + endif + endif + hi Pmenu ctermfg=fg ctermbg=90 + hi PmenuSel ctermfg=16 ctermbg=252 cterm=NONE + hi PmenuSbar ctermfg=fg ctermbg=18 cterm=NONE + hi PmenuThumb ctermfg=fg ctermbg=28 cterm=NONE + hi TabLine ctermfg=fg ctermbg=28 cterm=NONE + hi TabLineFill ctermfg=fg ctermbg=28 cterm=NONE + hi TabLineSel ctermfg=fg ctermbg=NONE cterm=NONE + hi CursorColumn ctermfg=NONE ctermbg=88 cterm=NONE + hi CursorLine ctermfg=NONE ctermbg=NONE cterm=underline + hi MatchParen ctermfg=NONE ctermbg=90 + hi TabLine cterm=underline + hi TabLineFill cterm=underline + hi Underlined cterm=underline + hi CursorLine cterm=underline + endif + + endif " t_Co + + " }}}2 +endif + +" Links: +" +" COLOR LINKS DEFINE START + +hi link String Constant +" Character must be different from strings because in many languages +" (especially C, C++) a 'char' variable is scalar while 'string' is pointer, +" mistaken a 'char' for a 'string' will cause disaster! +hi link Character Number +hi link SpecialChar LineNr +hi link Tag Identifier +hi link cCppOut LineNr +" The following are not standard hi links, +" these are used by DrChip +hi link Warning MoreMsg +hi link Notice Constant +" these are used by Calendar +hi link CalToday PreProc +" these are used by TagList +hi link MyTagListTagName IncSearch +hi link MyTagListTagScope Constant + +" COLOR LINKS DEFINE END + +" vim:et:nosta:sw=2:ts=8: +" vim600:fdm=marker:fdl=1: diff --git a/colors/print_bw.vim b/colors/print_bw.vim new file mode 100755 index 0000000..7a4f5e1 --- /dev/null +++ b/colors/print_bw.vim @@ -0,0 +1,65 @@ +" Vim color file +" Maintainer: Mike Williams +" Last Change: 2nd June 2003 +" Version: 1.1 + +" Remove all existing highlighting. +set background=light + +hi clear + +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = "print_bw" + +highlight Normal cterm=NONE ctermfg=black ctermbg=white gui=NONE guifg=black guibg=white +highlight NonText ctermfg=black ctermbg=white guifg=black guibg=white +highlight LineNr cterm=italic ctermfg=black ctermbg=white gui=italic guifg=black guibg=white + +" Syntax highlighting scheme +highlight Comment cterm=italic ctermfg=black ctermbg=white gui=italic guifg=black guibg=white + +highlight Constant ctermfg=black ctermbg=white guifg=black guibg=white +highlight String ctermfg=black ctermbg=white guifg=black guibg=white +highlight Character ctermfg=black ctermbg=white guifg=black guibg=white +highlight Number ctermfg=black ctermbg=white guifg=black guibg=white +" Boolean defaults to Constant +highlight Float ctermfg=black ctermbg=white guifg=black guibg=white + +highlight Identifier ctermfg=black ctermbg=white guifg=black guibg=white +highlight Function ctermfg=black ctermbg=white guifg=black guibg=white + +highlight Statement ctermfg=black ctermbg=white guifg=black guibg=white +highlight Conditional ctermfg=black ctermbg=white guifg=black guibg=white +highlight Repeat ctermfg=black ctermbg=white guifg=black guibg=white +highlight Label ctermfg=black ctermbg=white guifg=black guibg=white +highlight Operator ctermfg=black ctermbg=white guifg=black guibg=white +" Keyword defaults to Statement +" Exception defaults to Statement + +highlight PreProc cterm=bold ctermfg=black ctermbg=white gui=bold guifg=black guibg=white +" Include defaults to PreProc +" Define defaults to PreProc +" Macro defaults to PreProc +" PreCondit defaults to PreProc + +highlight Type cterm=bold ctermfg=black ctermbg=white gui=bold guifg=black guibg=white +" StorageClass defaults to Type +" Structure defaults to Type +" Typedef defaults to Type + +highlight Special cterm=italic ctermfg=black ctermbg=white gui=italic guifg=black guibg=white +" SpecialChar defaults to Special +" Tag defaults to Special +" Delimiter defaults to Special +highlight SpecialComment cterm=italic ctermfg=black ctermbg=white gui=italic guifg=black guibg=white +" Debug defaults to Special + +highlight Todo cterm=italic,bold ctermfg=black ctermbg=white gui=italic,bold guifg=black guibg=white +" Ideally, the bg color would be white but VIM cannot print white on black! +highlight Error cterm=bold,reverse ctermfg=black ctermbg=grey gui=bold,reverse guifg=black guibg=grey + +" vim:et:ff=unix:tw=0:ts=4:sw=4 +" EOF print_bw.vim diff --git a/colors/pyte.vim b/colors/pyte.vim new file mode 100755 index 0000000..b8471af --- /dev/null +++ b/colors/pyte.vim @@ -0,0 +1,92 @@ + +set background=light + +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "pyte" + +if version >= 700 + hi CursorLine guibg=#f6f6f6 + hi CursorColumn guibg=#eaeaea + hi MatchParen guifg=white guibg=#80a090 gui=bold + + "Tabpages + hi TabLine guifg=black guibg=#b0b8c0 gui=italic + hi TabLineFill guifg=#9098a0 + hi TabLineSel guifg=black guibg=#f0f0f0 gui=italic,bold + + "P-Menu (auto-completion) + hi Pmenu guifg=white guibg=#808080 + "PmenuSel + "PmenuSbar + "PmenuThumb +endif +" +" Html-Titles +hi Title guifg=#202020 gui=bold +hi Underlined guifg=#202020 gui=underline + + +hi Cursor guifg=black guibg=#b0b4b8 +hi lCursor guifg=black guibg=white +hi LineNr guifg=#ffffff guibg=#c0d0e0 + +hi Normal guifg=#202020 guibg=#f0f0f0 + +hi StatusLine guifg=white guibg=#8090a0 gui=bold,italic +hi StatusLineNC guifg=#506070 guibg=#a0b0c0 gui=italic +hi VertSplit guifg=#a0b0c0 guibg=#a0b0c0 gui=NONE + +hi Folded guifg=#708090 guibg=#c0d0e0 + +hi NonText guifg=#c0c0c0 guibg=#e0e0e0 +" Kommentare +hi Comment guifg=#a0b0c0 gui=italic + +" Konstanten +hi Constant guifg=#a07040 +hi String guifg=#4070a0 +hi Number guifg=#40a070 +hi Float guifg=#70a040 +"hi Statement guifg=#0070e0 gui=NONE +" Python: def and so on, html: tag-names +hi Statement guifg=#007020 gui=bold + + +" HTML: arguments +hi Type guifg=#e5a00d gui=italic +" Python: Standard exceptions, True&False +hi Structure guifg=#007020 gui=italic +hi Function guifg=#06287e gui=italic + +hi Identifier guifg=#5b3674 gui=italic + +hi Repeat guifg=#7fbf58 gui=bold +hi Conditional guifg=#4c8f2f gui=bold + +" Cheetah: #-Symbol, function-names +hi PreProc guifg=#1060a0 gui=NONE +" Cheetah: def, for and so on, Python: Decorators +hi Define guifg=#1060a0 gui=bold + +hi Error guifg=red guibg=white gui=bold,underline +hi Todo guifg=#a0b0c0 guibg=NONE gui=italic,bold,underline + +" Python: %(...)s - constructs, encoding +hi Special guifg=#70a0d0 gui=italic + +hi Operator guifg=#408010 + +" color of s etc... +hi SpecialKey guifg=#d8a080 guibg=#e8e8e8 gui=italic + +" Diff +hi DiffChange guifg=NONE guibg=#e0e0e0 gui=italic,bold +hi DiffText guifg=NONE guibg=#f0c8c8 gui=italic,bold +hi DiffAdd guifg=NONE guibg=#c0e0d0 gui=italic,bold +hi DiffDelete guifg=NONE guibg=#f0e0b0 gui=italic,bold + + diff --git a/colors/railscasts.vim b/colors/railscasts.vim new file mode 100755 index 0000000..138e876 --- /dev/null +++ b/colors/railscasts.vim @@ -0,0 +1,124 @@ +" Vim color scheme +" +" Name: railscast.vim +" Maintainer: Josh O'Rourke +" License: public domain +" +" A GUI Only port of the RailsCasts TextMate theme [1] to Vim. +" Some parts of this theme were borrowed from the well-documented Lucius theme [2]. +" +" [1] http://railscasts.com/about +" [2] http://www.vim.org/scripts/script.php?script_id=2536 + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "railscasts" + +" Colors +" Brown #BC9458 +" Dark Blue #6D9CBE +" Dark Green #519F50 +" Dark Orange #CC7833 +" Light Blue #D0D0FF +" Light Green #A5C261 +" Tan #FFC66D + +hi Normal guifg=#E6E1DC guibg=#2B2B2B +hi Cursor guibg=#FFFFFF +hi CursorLine guibg=#333435 +hi LineNr guifg=#888888 guibg=#DEDEDE +hi Search guibg=#5A647E +hi Visual guibg=#5A647E + +" Folds +" ----- +" line used for closed folds +hi Folded guifg=#F6F3E8 guibg=#444444 gui=NONE + +" Misc +" ---- +" directory names and other special names in listings +hi Directory guifg=#A5C261 gui=NONE + +" Popup Menu +" ---------- +" normal item in popup +hi Pmenu guifg=#F6F3E8 guibg=#444444 gui=NONE +" selected item in popup +hi PmenuSel guifg=#000000 guibg=#A5C261 gui=NONE +" scrollbar in popup +hi PMenuSbar guibg=#5A647E gui=NONE +" thumb of the scrollbar in the popup +hi PMenuThumb guibg=#AAAAAA gui=NONE + + +"rubyComment +hi Comment guifg=#BC9458 gui=italic +hi Todo guifg=#BC9458 guibg=NONE gui=italic + +"rubyPseudoVariable +"nil, self, symbols, etc +hi Constant guifg=#6D9CBE + +"rubyClass, rubyModule, rubyDefine +"def, end, include, etc +hi Define guifg=#CC7833 + +"rubyInterpolation +hi Delimiter guifg=#519F50 + +"rubyError, rubyInvalidVariable +hi Error guifg=#FFFFFF guibg=#990000 + +"rubyFunction +hi Function guifg=#FFC66D gui=NONE + +"rubyIdentifier +"@var, @@var, $var, etc +hi Identifier guifg=#D0D0FF gui=NONE + +"rubyInclude +"include, autoload, extend, load, require +hi Include guifg=#CC7833 gui=NONE + +"rubyKeyword, rubyKeywordAsMethod +"alias, undef, super, yield, callcc, caller, lambda, proc +hi Keyword guifg=#CC7833 + +" same as define +hi Macro guifg=#CC7833 gui=NONE + +"rubyInteger +hi Number guifg=#A5C261 + +" #if, #else, #endif +hi PreCondit guifg=#CC7833 gui=NONE + +" generic preprocessor +hi PreProc guifg=#CC7833 gui=NONE + +"rubyControl, rubyAccess, rubyEval +"case, begin, do, for, if unless, while, until else, etc. +hi Statement guifg=#CC7833 gui=NONE + +"rubyString +hi String guifg=#A5C261 + +hi Title guifg=#FFFFFF + +"rubyConstant +hi Type guifg=#DA4939 gui=NONE + +hi DiffAdd guifg=#E6E1DC guibg=#144212 +hi DiffDelete guifg=#E6E1DC guibg=#660000 + +hi link htmlTag xmlTag +hi link htmlTagName xmlTagName +hi link htmlEndTag xmlEndTag + +hi xmlTag guifg=#E8BF6A +hi xmlTagName guifg=#E8BF6A +hi xmlEndTag guifg=#E8BF6A diff --git a/colors/railscasts2.vim b/colors/railscasts2.vim new file mode 100755 index 0000000..138e876 --- /dev/null +++ b/colors/railscasts2.vim @@ -0,0 +1,124 @@ +" Vim color scheme +" +" Name: railscast.vim +" Maintainer: Josh O'Rourke +" License: public domain +" +" A GUI Only port of the RailsCasts TextMate theme [1] to Vim. +" Some parts of this theme were borrowed from the well-documented Lucius theme [2]. +" +" [1] http://railscasts.com/about +" [2] http://www.vim.org/scripts/script.php?script_id=2536 + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "railscasts" + +" Colors +" Brown #BC9458 +" Dark Blue #6D9CBE +" Dark Green #519F50 +" Dark Orange #CC7833 +" Light Blue #D0D0FF +" Light Green #A5C261 +" Tan #FFC66D + +hi Normal guifg=#E6E1DC guibg=#2B2B2B +hi Cursor guibg=#FFFFFF +hi CursorLine guibg=#333435 +hi LineNr guifg=#888888 guibg=#DEDEDE +hi Search guibg=#5A647E +hi Visual guibg=#5A647E + +" Folds +" ----- +" line used for closed folds +hi Folded guifg=#F6F3E8 guibg=#444444 gui=NONE + +" Misc +" ---- +" directory names and other special names in listings +hi Directory guifg=#A5C261 gui=NONE + +" Popup Menu +" ---------- +" normal item in popup +hi Pmenu guifg=#F6F3E8 guibg=#444444 gui=NONE +" selected item in popup +hi PmenuSel guifg=#000000 guibg=#A5C261 gui=NONE +" scrollbar in popup +hi PMenuSbar guibg=#5A647E gui=NONE +" thumb of the scrollbar in the popup +hi PMenuThumb guibg=#AAAAAA gui=NONE + + +"rubyComment +hi Comment guifg=#BC9458 gui=italic +hi Todo guifg=#BC9458 guibg=NONE gui=italic + +"rubyPseudoVariable +"nil, self, symbols, etc +hi Constant guifg=#6D9CBE + +"rubyClass, rubyModule, rubyDefine +"def, end, include, etc +hi Define guifg=#CC7833 + +"rubyInterpolation +hi Delimiter guifg=#519F50 + +"rubyError, rubyInvalidVariable +hi Error guifg=#FFFFFF guibg=#990000 + +"rubyFunction +hi Function guifg=#FFC66D gui=NONE + +"rubyIdentifier +"@var, @@var, $var, etc +hi Identifier guifg=#D0D0FF gui=NONE + +"rubyInclude +"include, autoload, extend, load, require +hi Include guifg=#CC7833 gui=NONE + +"rubyKeyword, rubyKeywordAsMethod +"alias, undef, super, yield, callcc, caller, lambda, proc +hi Keyword guifg=#CC7833 + +" same as define +hi Macro guifg=#CC7833 gui=NONE + +"rubyInteger +hi Number guifg=#A5C261 + +" #if, #else, #endif +hi PreCondit guifg=#CC7833 gui=NONE + +" generic preprocessor +hi PreProc guifg=#CC7833 gui=NONE + +"rubyControl, rubyAccess, rubyEval +"case, begin, do, for, if unless, while, until else, etc. +hi Statement guifg=#CC7833 gui=NONE + +"rubyString +hi String guifg=#A5C261 + +hi Title guifg=#FFFFFF + +"rubyConstant +hi Type guifg=#DA4939 gui=NONE + +hi DiffAdd guifg=#E6E1DC guibg=#144212 +hi DiffDelete guifg=#E6E1DC guibg=#660000 + +hi link htmlTag xmlTag +hi link htmlTagName xmlTagName +hi link htmlEndTag xmlEndTag + +hi xmlTag guifg=#E8BF6A +hi xmlTagName guifg=#E8BF6A +hi xmlEndTag guifg=#E8BF6A diff --git a/colors/rdark.vim b/colors/rdark.vim new file mode 100755 index 0000000..62c7cdd --- /dev/null +++ b/colors/rdark.vim @@ -0,0 +1,159 @@ +" Vim color file +" Maintaner: Radu Dineiu +" URL: http://ld.yi.org/vim/rdark/ +" Last Change: 2007 Jun 23 +" Version: 0.6 +" +" Features: +" - let rdark_current_line = 1 if you want to highlight the current line +" +" Changelog: +" 0.5 - fixed the Pmenu colors +" 0.6 - added SignColumn colors + +set background=dark + +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "rdark" + +" Current Line +if exists('rdark_current_line') && rdark_current_line == 1 + set cursorline + hi CursorLine guibg=#191f21 +endif + +" Default Colors +hi Normal guifg=#babdb6 guibg=#1e2426 +hi NonText guifg=#2c3032 guibg=#2c3032 gui=none +hi Cursor guibg=#babdb6 +hi ICursor guibg=#babdb6 + +" Search +hi Search guifg=#2e3436 guibg=#fcaf3e +hi IncSearch guibg=#2e3436 guifg=#fcaf3e + +" Window Elements +hi StatusLine guifg=#2e3436 guibg=#babdb6 gui=none +hi StatusLineNC guifg=#2e3436 guibg=#888a85 gui=none +hi VertSplit guifg=#555753 guibg=#888a85 gui=none +hi Visual guibg=#000000 +hi MoreMsg guifg=#729fcf +hi Question guifg=#8ae234 gui=none +hi WildMenu guifg=#eeeeec guibg=#0e1416 +hi LineNr guifg=#3f4b4d guibg=#000000 +hi SignColumn guibg=#1e2426 + +" Pmenu +hi Pmenu guibg=#2e3436 guifg=#eeeeec +hi PmenuSel guibg=#ffffff guifg=#1e2426 +hi PmenuSbar guibg=#555753 +hi PmenuThumb guifg=#ffffff + +" Diff +hi DiffDelete guifg=#2e3436 guibg=#0e1416 +hi DiffAdd guibg=#1f2b2d +hi DiffChange guibg=#2e3436 +hi DiffText guibg=#000000 gui=none + +" Folds +hi Folded guifg=#d3d7cf guibg=#204a87 +hi FoldColumn guifg=#3465a4 guibg=#000000 + +" Specials +hi Title guifg=#fcaf3e +hi Todo guifg=#fcaf3e guibg=bg +hi SpecialKey guifg=#ef2929 + +" Tabs +hi TabLine guibg=#0a1012 guifg=#888a85 +hi TabLineFill guifg=#0a1012 +hi TabLineSel guibg=#555753 guifg=#eeeeec gui=none + +" Matches +hi MatchParen guifg=#2e3436 guibg=#fcaf3e + +" Tree +hi Directory guifg=#ffffff + +" Syntax +hi Comment guifg=#656763 +hi Constant guifg=#8ae234 +hi Number guifg=#8ae234 +hi Statement guifg=#729fcf gui=none +hi Identifier guifg=#ffffff +hi PreProc guifg=#fcaf3e +hi Function guifg=#fcaf3e +hi Type guifg=#e3e7df gui=none +hi Keyword guifg=#eeeeec +hi Special guifg=#888a85 +hi Error guifg=#eeeeec guibg=#cc0000 + +" PHP +hi phpRegionDelimiter guifg=#ad7fa8 +hi phpPropertySelector guifg=#888a85 +hi phpPropertySelectorInString guifg=#888a85 +hi phpOperator guifg=#888a85 +hi phpArrayPair guifg=#888a85 +hi phpAssignByRef guifg=#888a85 +hi phpRelation guifg=#888a85 +hi phpMemberSelector guifg=#888a85 +hi phpUnknownSelector guifg=#888a85 +hi phpVarSelector guifg=#babdb6 +hi phpSemicolon guifg=#888a85 gui=none +hi phpFunctions guifg=#d3d7cf +hi phpParent guifg=#888a85 + +" JavaScript +hi javaScriptBraces guifg=#888a85 +hi javaScriptOperator guifg=#888a85 + +" HTML +hi htmlTag guifg=#888a85 +hi htmlEndTag guifg=#888a85 +hi htmlTagName guifg=#babdb6 +hi htmlSpecialTagName guifg=#babdb6 +hi htmlArg guifg=#d3d7cf +hi htmlTitle guifg=#8ae234 gui=none +hi link htmlH1 htmlTitle +hi link htmlH2 htmlH1 +hi link htmlH3 htmlH1 +hi link htmlH4 htmlH1 +hi link htmlH5 htmlH1 +hi link htmlH6 htmlH1 + +" XML +hi link xmlTag htmlTag +hi link xmlEndTag htmlEndTag +hi link xmlAttrib htmlArg + +" CSS +hi cssSelectorOp guifg=#eeeeec +hi link cssSelectorOp2 cssSelectorOp +hi cssUIProp guifg=#d3d7cf +hi link cssPagingProp cssUIProp +hi link cssGeneratedContentProp cssUIProp +hi link cssRenderProp cssUIProp +hi link cssBoxProp cssUIProp +hi link cssTextProp cssUIProp +hi link cssColorProp cssUIProp +hi link cssFontProp cssUIProp +hi cssPseudoClassId guifg=#eeeeec +hi cssBraces guifg=#888a85 +hi cssIdentifier guifg=#fcaf3e +hi cssTagName guifg=#fcaf3e +hi link cssInclude Function +hi link cssCommonAttr Constant +hi link cssUIAttr Constant +hi link cssTableAttr Constant +hi link cssPagingAttr Constant +hi link cssGeneratedContentAttr Constant +hi link cssAuralAttr Constant +hi link cssRenderAttr Constant +hi link cssBoxAttr Constant +hi link cssTextAttr Constant +hi link cssColorAttr Constant +hi link cssFontAttr Constant diff --git a/colors/relaxedgreen.vim b/colors/relaxedgreen.vim new file mode 100755 index 0000000..9d2bf14 --- /dev/null +++ b/colors/relaxedgreen.vim @@ -0,0 +1,112 @@ +" ---------------------------------------------------------------------------------------------------------------------------------- +" Filename: relaxedgreen.vim +" Last Modified: 13 Feb 2007 09:57:24 PM by Dave V +" Maintainer: Dave Vehrs (dvehrs at gmail.com) +" Copyright: 2002,2003,2004,2005,2006,2007 Dave Vehrs +" This script is free software; you can redistribute it and/or +" modify it under the terms of the GNU General Public License as +" published by the Free Software Foundation; either version 2 of +" the License, or (at your option) any later version. +" Description: Vim colorscheme file. +" Install: Place this file in the users colors directory (~/.vim/colors) or +" in the shared colors directory (/usr/shared/vim/vim/colors/), +" then load it with :colorscheme relaxedgreen +" ---------------------------------------------------------------------------------------------------------------------------------- +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "relaxedgreen" +highlight Cursor term=reverse ctermfg=green ctermbg=blue guifg=#000000 guibg=#559955 +highlight CursorIM term=reverse ctermfg=black ctermbg=darkgreen guifg=#000000 guibg=#336633 +highlight CursorColumn term=none ctermbg=darkred guibg=#663333 +highlight CursorLine term=none ctermbg=darkblue guibg=#333366 +highlight Comment term=italic ctermfg=darkcyan ctermbg=black guifg=#00a594 +highlight Constant term=underline ctermfg=blue guifg=#0099dd +highlight Debug term=bold ctermfg=red ctermbg=black guifg=#dc0000 guibg=#000000 +highlight DiffAdd term=reverse ctermfg=black ctermbg=cyan guifg=#000000 guibg=#007200 +highlight DiffChange term=underline cterm=reverse ctermfg=darkgreen ctermbg=black guifg=#000000 guibg=#006700 +highlight DiffDelete term=standout ctermfg=black ctermbg=cyan guifg=#000000 guibg=#007200 +highlight DiffText term=bold ctermfg=green ctermbg=black guifg=#00ac00 guibg=#000000 +highlight Directory term=underline ctermfg=green ctermbg=black guifg=#336633 guibg=#000000 +highlight Error term=reverse,bold ctermfg=black ctermbg=red guifg=#000000 guibg=#dc0000 +highlight ErrorMsg term=reverse,bold ctermfg=white ctermbg=red guifg=#ffffff guibg=#dc0000 +highlight Folded ctermfg=darkgreen ctermbg=black guifg=#20de20 guibg=#000000 +highlight FoldColumn ctermfg=darkgreen ctermbg=black guifg=#20de20 guibg=#000000 +highlight Function term=standout ctermfg=darkgreen guifg=#22bb22 +highlight Identifier term=underline ctermfg=darkcyan gui=underline guifg=#008800 +highlight Ignore ctermfg=lightgreen guifg=#33bb33 +highlight IncSearch term=reverse ctermfg=black ctermbg=darkgreen guifg=#000000 guibg=#336633 +highlight LineNr term=bold ctermfg=green guifg=#00ff00 +highlight MatchParen term=bold ctermbg=green guifg=#009900 +highlight ModeMsg term=bold cterm=bold gui=bold +highlight MoreMsg term=bold cterm=bold gui=bold +highlight NonText ctermfg=brown guifg=#b26818 +highlight Normal ctermfg=gray ctermbg=black guifg=#aaaaaa guibg=#000000 +highlight Pmenu term=reverse ctermfg=black ctermbg=green guifg=#000000 guibg=#337733 +highlight PmenuSel term=bold ctermfg=black ctermbg=gray guifg=#000000 guibg=#999999 +highlight PmenuSbar term=reverse ctermfg=black ctermbg=green guifg=#000000 guibg=#337733 +highlight PmenuThumb term=reverse ctermfg=gray ctermbg=black guifg=#999999 guibg=#000000 +highlight PreProc term=standout ctermfg=darkgreen guifg=#22bb22 +highlight Question term=standout ctermfg=red guifg=#ff0000 +highlight Search term=reverse ctermfg=black ctermbg=darkgreen guifg=#000000 guibg=#228822 +highlight SignColumn ctermfg=darkgreen guifg=#20de20 guibg=#000000 +highlight Special term=bold ctermfg=green guifg=#00ff00 +highlight SpecialKey term=bold ctermfg=green guifg=#00ff00 +highlight SpellBad term=reverse cterm=underline ctermfg=red ctermbg=black gui=undercurl guisp=#ff0000 +highlight SpellCap term=reverse cterm=underline ctermfg=yellow ctermbg=black gui=undercurl guisp=#00ffff +highlight SpellLocal term=reverse cterm=underline ctermfg=blue ctermbg=black gui=undercurl guisp=#0000ff +highlight SpellRare term=reverse cterm=underline ctermfg=darkgreen ctermbg=black gui=undercurl guisp=#00ff00 +highlight Statement term=standout ctermfg=darkred guifg=#ac0000 +highlight StatusLine term=reverse ctermfg=darkgreen ctermbg=black gui=none guibg=#228822 guifg=#000000 +highlight StatusLineNC term=reverse ctermfg=darkgreen ctermbg=blue gui=none guibg=#336633 guifg=#000000 +highlight TabLine term=reverse cterm=reverse ctermfg=black ctermbg=green guibg=#222222 guifg=#228822 +highlight TabLineFill term=reverse cterm=reverse ctermfg=green ctermbg=black guibg=#222222 guifg=#226622 +highlight TabLineSel ctermfg=black ctermbg=green guibg=#228822 guifg=#222222 +highlight Title term=reverse ctermfg=black ctermbg=green guifg=#000000 guibg=#00ff00 +highlight Todo term=reverse cterm=reverse ctermfg=darkgreen ctermbg=black guibg=#336633 guifg=#000000 +highlight Type term=standout ctermfg=green guifg=#559955 +highlight Visual term=reverse cterm=reverse ctermfg=darkgreen guifg=#000000 guibg=#336633 +highlight VisualNOS term=reverse,bold cterm=reverse ctermbg=darkgreen guifg=#000000 guibg=#228822 +highlight VertSplit term=reverse ctermfg=darkgreen guifg=#336633 +highlight User1 term=standout cterm=bold ctermbg=darkgreen ctermfg=red gui=bold guibg=#228822 guifg=#FF0000 +highlight WarningMsg term=reverse ctermfg=black ctermbg=yellow guifg=#000000 guibg=#007a7a +highlight WildMenu term=reverse ctermfg=blue ctermbg=darkgreen guifg=#000099 guibg=#00ac00 + +" ---------------------------------------------------------------------------------------------------------------------------------- +" Common groups that link to other highlight definitions. + +highlight link Character Constant +highlight link Number Constant +highlight link Boolean Constant +highlight link String Constant + +highlight link Operator LineNr + +highlight link Float Number + +highlight link Define PreProc +highlight link Include PreProc +highlight link Macro PreProc +highlight link PreCondit PreProc + +highlight link Repeat Question + +highlight link Conditional Repeat + +highlight link Delimiter Special +highlight link SpecialChar Special +highlight link SpecialComment Special +highlight link Tag Special + +highlight link Exception Statement +highlight link Keyword Statement +highlight link Label Statement + +highlight link StorageClass Type +highlight link Structure Type +highlight link Typedef Type + +" ---------------------------------------------------------------------------------------------------------------------------------- +" vim:tw=132:ts=4:sw=4 diff --git a/colors/robinhood.vim b/colors/robinhood.vim new file mode 100755 index 0000000..ab1d14d --- /dev/null +++ b/colors/robinhood.vim @@ -0,0 +1,103 @@ +" Vim color file +" Maintainer: Datila Carvalho +" Last Change: May, 19, 2005 +" Version: 0.2 + +" This is a VIM's version of the emacs color theme +" _Robin Hood_ created by Alex Schroede. + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = "robinhood" + + +""" Colors + +" GUI colors +hi Cursor guifg=fg guibg=gray +hi CursorIM guifg=NONE guibg=gray +"hi Directory +"hi DiffAdd +"hi DiffChange +"hi DiffDelete +"hi DiffText +hi ErrorMsg gui=bold guifg=white guibg=Red +"hi VertSplit +"hi Folded +"hi FoldColumn +"hi IncSearch +hi LineNr gui=bold guifg=yellowgreen guibg=#203010 +"hi ModeMsg +"hi MoreMsg +"hi NonText +hi Normal guibg=#304020 guifg=wheat +"hi Question +hi Search gui=bold guifg=black guibg=gray +"hi SpecialKey +hi StatusLine guifg=darkolivegreen guibg=wheat +hi StatusLineNC guifg=olivedrab guibg=wheat +"hi Title +hi Visual guifg=darkslategrey guibg=fg +hi VisualNOS gui=bold guifg=Black guibg=fg +hi WarningMsg guifg=White guibg=Tomato +"hi WildMenu + +hi User2 guifg=yellowgreen guibg=#091900 gui=bold + +" If using Motif/Athena +hi Menu guibg=#304020 guifg=wheat +hi Scrollbar guibg=bg + +" Colors for syntax highlighting +hi Comment guifg=lightblue + +hi Constant gui=bold guifg=lightcyan + hi String guifg=lightsalmon + hi Character guifg=lightsalmon + hi Number gui=bold guifg=lightcyan + hi Boolean gui=bold guifg=lightcyan + hi Float gui=bold guifg=lightcyan + +hi Identifier gui=bold guifg=palegreen + hi Function guifg=yellowgreen + +hi Statement gui=bold guifg=salmon + hi Conditional gui=bold guifg=salmon + hi Repeat gui=bold guifg=salmon + hi Label guifg=salmon + hi Operator guifg=salmon + "hi Keyword + "hi Exception + +hi PreProc guifg=palegreen + hi Include gui=bold guifg=palegreen + hi Define guifg=palegreen + hi Macro guifg=aquamarine + hi PreCondit guifg=palegreen + +hi Type gui=bold guifg=yellowgreen + hi StorageClass gui=bold guifg=aquamarine + hi Structure gui=bold guifg=aquamarine + hi Typedef gui=bold guifg=aquamarine + +"hi Special + ""Underline Character + "hi SpecialChar gui=underline + "hi Tag gui=bold,underline + ""Statement + "hi Delimiter gui=bold + ""Bold comment (in Java at least) + "hi SpecialComment gui=bold + "hi Debug gui=bold + +hi Underlined gui=underline + +hi Ignore guifg=bg + +hi Error gui=bold guifg=White guibg=Red + +"hi Todo diff --git a/colors/rootwater.vim b/colors/rootwater.vim new file mode 100755 index 0000000..4be5aeb --- /dev/null +++ b/colors/rootwater.vim @@ -0,0 +1,98 @@ +" Name: rootwater.vim +" Maintainer: Kojo Sugita +" Last Change: 2008-11-22 +" Revision: 1.2 +" +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name = 'rootwater' + +" Default colors +hi Normal guifg=#babdb6 guibg=#151b1d +hi NonText guifg=#4f5b5d guibg=#232729 gui=none +hi SpecialKey guifg=#4f5b5d guibg=#2c3032 gui=none +hi Cursor guifg=#3a553a guibg=#77dd88 +hi CursorLine guibg=#303035 +hi CursorColumn guibg=#303035 +hi lCursor guifg=#3a553a guibg=#77dd88 +hi CursorIM guifg=#3a553a guibg=#77dd88 + +" Directory +hi Directory guifg=white gui=bold + +" Diff +hi DiffAdd guifg=#77dd88 guibg=#3a553a gui=none +hi DiffChange guifg=#77dd88 guibg=#3a553a gui=none +hi DiffDelete guifg=#223322 guibg=#223322 gui=none +hi DiffText guifg=#77dd88 guibg=#448844 gui=bold + +hi ErrorMsg guifg=red guibg=black +hi VertSplit guifg=black guibg=#88ee99 + +" Folds +hi Folded guifg=#55af66 guibg=black +hi FoldColumn guifg=#557755 guibg=#102010 + +" Search +hi Search guifg=#223322 guibg=#55af66 gui=none +hi IncSearch guifg=#3a553a guibg=#77dd88 gui=none + +" hi LineNr guifg=#446644 guibg=black gui=none +hi LineNr guifg=#607075 guibg=black gui=none +hi ModeMsg guifg=#55af66 guibg=black +hi MoreMsg guifg=#55af66 guibg=black +hi Question guifg=#55af66 guibg=black + +"\n, \0, %d, %s, etc... +hi Special guifg=pink gui=none + +" status line +hi StatusLine guifg=#88ee99 guibg=black gui=none +hi StatusLineNC guifg=#446644 guibg=black gui=none + +hi Title guifg=#88ee99 guibg=#000000 gui=none +hi Visual guifg=#77dd88 guibg=#448844 gui=none +hi VisualNOS guifg=#55af66 guibg=black +hi WarningMsg guifg=#77dd88 guibg=black +hi WildMenu guifg=#3a553a guibg=#77dd88 + +hi Number guifg=#77dd88 +hi Char guifg=#77dd88 +hi String guifg=#77dd88 +hi Boolean guifg=#77dd88 +hi Comment guifg=#656565 +hi Constant guifg=#88ee99 gui=none +hi Identifier guifg=white +hi Statement guifg=#8fffff gui=none + +" Procedure name +hi Function guifg=#ffaa33 + +" Define, def +hi PreProc guifg=lightred gui=none +hi Type guifg=white gui=none +hi Underlined guifg=gray gui=underline +hi Error guifg=red guibg=black +hi Todo guifg=pink guibg=black gui=none +hi SignColumn guibg=#151b1d + +" Matches +hi MatchParen guifg=#000000 guibg=#ffaa33 + +" Pmenu +if version >= 700 + hi Pmenu guibg=#202530 + hi PmenuSel guifg=#88ee99 guibg=black + hi PmenuSbar guibg=#202530 + + hi TabLine guifg=#446644 guibg=black gui=None + hi TabLineFill guibg=#232729 guibg=#232729 gui=None + hi TabLineSel guifg=#88ee99 guibg=black gui=None +endif + +finish + +" vim:set ts=8 sts=2 sw=2 tw=0: diff --git a/colors/satori.vim b/colors/satori.vim new file mode 100755 index 0000000..5c7b250 --- /dev/null +++ b/colors/satori.vim @@ -0,0 +1,47 @@ +" Vim color file +" Maintainer: Ruda Moura +" Last Change: Sun Feb 24 18:50:47 BRT 2008 + +highlight clear Normal +set background& + +highlight clear + +if exists("syntax_on") + syntax reset +endif + +let colors_name = "satori" + +" Vim colors +highlight Normal ctermfg=NONE cterm=NONE +highlight Comment ctermfg=Cyan cterm=NONE +highlight Constant ctermfg=Red cterm=NONE +highlight Number ctermfg=Red cterm=NONE +highlight Identifier ctermfg=NONE cterm=NONE +highlight Statement ctermfg=NONE cterm=Bold +highlight PreProc ctermfg=Blue cterm=NONE +highlight Type ctermfg=Magenta cterm=NONE +highlight Special ctermfg=Magenta cterm=NONE + +" Vim monochrome +highlight Normal term=NONE +highlight Comment term=NONE +highlight Constant term=Underline +highlight Number term=Underline +highlight Identifier term=NONE +highlight Statement term=Bold +highlight PreProc term=NONE +highlight Type term=Bold +highlight Special term=NONE + +" GVim colors +highlight Normal guifg=NONE gui=NONE +highlight Comment guifg=DarkCyan gui=NONE +highlight Constant guifg=Red gui=NONE +highlight Number guifg=Red gui=Bold +highlight Identifier guifg=NONE gui=NONE +highlight Statement guifg=NONE gui=Bold +highlight PreProc guifg=Blue gui=NONE +highlight Type guifg=Magenta gui=NONE +highlight Special guifg=Red gui=Bold diff --git a/colors/sea.vim b/colors/sea.vim new file mode 100755 index 0000000..0c79c47 --- /dev/null +++ b/colors/sea.vim @@ -0,0 +1,69 @@ +" Vim color file +" Maintainer: Tiza +" Last Change: 2002/10/30 Wed 00:01. +" version: 1.0 +" This color scheme uses a dark background. + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "sea" + +hi Normal guifg=#f0f0f8 guibg=#343478 + +" Search +hi IncSearch gui=UNDERLINE,BOLD guifg=#ffffff guibg=#c030ff +hi Search gui=BOLD guifg=#f0e0ff guibg=#b020ff + +" Messages +hi ErrorMsg gui=BOLD guifg=#ffffff guibg=#f000a0 +hi WarningMsg gui=BOLD guifg=#ffffff guibg=#f000a0 +hi ModeMsg gui=BOLD guifg=#00e0ff guibg=NONE +hi MoreMsg gui=BOLD guifg=#00ffff guibg=#6060ff +hi Question gui=BOLD guifg=#00f0d0 guibg=NONE + +" Split area +hi StatusLine gui=NONE guifg=#000000 guibg=#d0d0e0 +hi StatusLineNC gui=NONE guifg=#606080 guibg=#d0d0e0 +hi VertSplit gui=NONE guifg=#606080 guibg=#d0d0e0 +hi WildMenu gui=NONE guifg=#000000 guibg=#ff90ff + +" Diff +hi DiffText gui=UNDERLINE guifg=#ffff00 guibg=#000000 +hi DiffChange gui=NONE guifg=#ffffff guibg=#000000 +hi DiffDelete gui=NONE guifg=#60ff60 guibg=#000000 +hi DiffAdd gui=NONE guifg=#60ff60 guibg=#000000 + +" Cursor +hi Cursor gui=NONE guifg=#ffffff guibg=#d86020 +hi lCursor gui=NONE guifg=#ffffff guibg=#e000b0 +hi CursorIM gui=NONE guifg=#ffffff guibg=#e000b0 + +" Fold +hi Folded gui=NONE guifg=#ffffff guibg=#0080a0 +hi FoldColumn gui=NONE guifg=#9090ff guibg=#3c3c88 + +" Other +hi Directory gui=NONE guifg=#00ffff guibg=NONE +hi LineNr gui=NONE guifg=#7070e8 guibg=NONE +hi NonText gui=BOLD guifg=#8080ff guibg=#2c2c78 +hi SpecialKey gui=BOLD guifg=#60c0ff guibg=NONE +hi Title gui=BOLD guifg=#f0f0f8 guibg=NONE +hi Visual gui=NONE guifg=#ffffff guibg=#6060ff +" hi VisualNOS gui=NONE guifg=#ffffff guibg=#6060ff + +" Syntax group +hi Comment gui=NONE guifg=#b0b0c8 guibg=NONE +hi Constant gui=NONE guifg=#60ffff guibg=NONE +hi Error gui=BOLD guifg=#ffffff guibg=#f000a0 +hi Identifier gui=NONE guifg=#c0c0ff guibg=NONE +hi Ignore gui=NONE guifg=#303080 guibg=NONE +hi PreProc gui=NONE guifg=#ffb0ff guibg=NONE +hi Special gui=NONE guifg=#ffd858 guibg=NONE +hi Statement gui=NONE guifg=#f0f060 guibg=NONE +hi Todo gui=BOLD,UNDERLINE guifg=#ff70e0 guibg=NONE +hi Type gui=NONE guifg=#40ff80 guibg=NONE +hi Underlined gui=UNDERLINE,BOLD guifg=#f0f0f8 guibg=NONE diff --git a/colors/settlemyer.vim b/colors/settlemyer.vim new file mode 100755 index 0000000..91495ff --- /dev/null +++ b/colors/settlemyer.vim @@ -0,0 +1,53 @@ +" Vim color file +" Maintainer: Max Lynch +" URL: http://muffinpeddler.com +" Version: 0.1 +" +" :he group-name +" :he highlight-groups +" :he cterm-colors + +set background=dark +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="settlemyer" + +hi Normal guibg=gray25 guifg=gray85 +hi Cursor guibg=red3 guifg=bg + +" Syntax Highlighting +hi Comment guifg=LightPink +hi Constant guifg=SpringGreen +" hi Identifier gui=bold guifg=SkyBlue +" hi Function guifg=Wheat3 +" hi Type guifg=orange1 +hi Keyword guifg=SkyBlue +hi PreProc guifg=SkyBlue +hi Statement guifg=SkyBlue +hi Type gui=bold guifg=SkyBlue +hi NonText guifg=DarkGray +hi Tags guifg=orange1 + +hi link Character Constant +hi link Number Constant +hi link Float Constant +hi link Function Statement +hi link Conditional Statement +hi link Repeat Statement +hi link Label Statement +hi link Operator Statement +hi link Keyword Statement +hi link Include PreProc +hi link Define PreProc +hi link Macro PreProc +hi link PreCondit PreProc +hi link StorageClass Type +hi link Structure Type +hi link Typedef Type +hi link Tag Tags diff --git a/colors/sienna.vim b/colors/sienna.vim new file mode 100755 index 0000000..08b8eda --- /dev/null +++ b/colors/sienna.vim @@ -0,0 +1,150 @@ +" Vim colour scheme +" Maintainer: Georg Dahn +" Last Change: 26 April 2006 +" Version: 1.6 +" +" This color scheme has both light and dark styles with harmonic colors +" easy to distinguish. Terminals are not supported, therefore you should +" only try it if you use the GUI version of Vim. +" +" You can choose the style by adding one of the following lines to your +" vimrc or gvimrc file before sourcing the color scheme: +" +" let g:sienna_style = 'dark' +" let g:sienna_style = 'light' +" +" If none of above lines is given, the light style is choosen. +" +" You can switch between these styles by using the :Colo command, like +" :Colo dark or :Colo light (many thanks to Pan Shizhu). + +if exists("g:sienna_style") + let s:sienna_style = g:sienna_style +else + let s:sienna_style = 'light' +endif + +execute "command! -nargs=1 Colo let g:sienna_style = \"\" | colo sienna" + +if s:sienna_style == 'dark' + set background=dark +elseif s:sienna_style == 'light' + set background=light +else + finish +endif + +hi clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = 'sienna' + +if s:sienna_style == 'dark' + hi Normal gui=none guifg=Grey85 guibg=Grey15 + + hi Cursor guifg=Black guibg=Grey85 + hi LineNr gui=none guifg=Grey65 + hi NonText gui=bold guifg=Grey65 guibg=Grey20 + hi SpecialKey gui=none guifg=SkyBlue2 + hi Title gui=bold guifg=Grey85 + hi Visual gui=bold guifg=Black guibg=LightSalmon1 + + hi FoldColumn gui=none guifg=Black guibg=Wheat3 + hi Folded gui=none guifg=White guibg=Wheat4 + hi StatusLine gui=bold guifg=Black guibg=Grey85 + hi StatusLineNC gui=none guifg=White guibg=DimGray + hi VertSplit gui=none guifg=White guibg=DimGray + hi Wildmenu gui=bold guifg=White guibg=Black + + hi Pmenu guibg=Grey55 guifg=Black gui=none + hi PmenuSbar guibg=Grey40 guifg=fg gui=none + hi PmenuSel guibg=Yellow2 guifg=Black gui=none + hi PmenuThumb guibg=Grey80 guifg=bg gui=none + + hi IncSearch gui=none guifg=Grey15 guibg=Grey85 + hi Search gui=none guifg=Black guibg=Yellow2 + + hi MoreMsg gui=bold guifg=PaleGreen2 + hi Question gui=bold guifg=PaleGreen2 + hi WarningMsg gui=bold guifg=Red + + hi Comment gui=italic guifg=SkyBlue3 + hi Error gui=none guifg=White guibg=Red2 + hi Identifier gui=none guifg=LightSalmon2 + hi Special gui=none guifg=SkyBlue2 + hi PreProc gui=none guifg=SkyBlue3 + hi Todo gui=bold guifg=Black guibg=Yellow2 + hi Type gui=bold guifg=SkyBlue2 + hi Underlined gui=underline guifg=DodgerBlue + + hi Boolean gui=bold guifg=PaleGreen2 + hi Constant gui=none guifg=PaleGreen2 + hi Number gui=bold guifg=PaleGreen2 + hi String gui=none guifg=PaleGreen2 + + hi Label gui=bold,underline guifg=LightSalmon2 + hi Statement gui=bold guifg=LightSalmon2 + + hi htmlBold gui=bold + hi htmlItalic gui=italic + hi htmlUnderline gui=underline + hi htmlBoldItalic gui=bold,italic + hi htmlBoldUnderline gui=bold,underline + hi htmlBoldUnderlineItalic gui=bold,underline,italic + hi htmlUnderlineItalic gui=underline,italic +elseif s:sienna_style == 'light' + hi Normal gui=none guifg=Black guibg=White + + hi Cursor guifg=White guibg=Black + hi LineNr gui=none guifg=DarkGray + hi NonText gui=bold guifg=DarkGray guibg=Grey95 + hi SpecialKey gui=none guifg=RoyalBlue4 + hi Title gui=bold guifg=Black + hi Visual gui=bold guifg=Black guibg=Sienna1 + + hi FoldColumn gui=none guifg=Black guibg=Wheat2 + hi Folded gui=none guifg=Black guibg=Wheat1 + hi StatusLine gui=bold guifg=White guibg=Black + hi StatusLineNC gui=none guifg=White guibg=DimGray + hi VertSplit gui=none guifg=White guibg=DimGray + hi Wildmenu gui=bold guifg=Black guibg=White + + hi Pmenu guibg=Grey65 guifg=Black gui=none + hi PmenuSbar guibg=Grey50 guifg=fg gui=none + hi PmenuSel guibg=Yellow guifg=Black gui=none + hi PmenuThumb guibg=Grey75 guifg=fg gui=none + + hi IncSearch gui=none guifg=White guibg=Black + hi Search gui=none guifg=Black guibg=Yellow + + hi MoreMsg gui=bold guifg=ForestGreen + hi Question gui=bold guifg=ForestGreen + hi WarningMsg gui=bold guifg=Red + + hi Comment gui=italic guifg=RoyalBlue3 + hi Error gui=none guifg=White guibg=Red + hi Identifier gui=none guifg=Sienna4 + hi Special gui=none guifg=RoyalBlue4 + hi PreProc gui=none guifg=RoyalBlue3 + hi Todo gui=bold guifg=Black guibg=Yellow + hi Type gui=bold guifg=RoyalBlue4 + hi Underlined gui=underline guifg=Blue + + hi Boolean gui=bold guifg=ForestGreen + hi Constant gui=none guifg=ForestGreen + hi Number gui=bold guifg=ForestGreen + hi String gui=none guifg=ForestGreen + + hi Label gui=bold,underline guifg=Sienna4 + hi Statement gui=bold guifg=Sienna4 + + hi htmlBold gui=bold + hi htmlItalic gui=italic + hi htmlUnderline gui=underline + hi htmlBoldItalic gui=bold,italic + hi htmlBoldUnderline gui=bold,underline + hi htmlBoldUnderlineItalic gui=bold,underline,italic + hi htmlUnderlineItalic gui=underline,italic +endif diff --git a/colors/silent.vim b/colors/silent.vim new file mode 100755 index 0000000..679ecd7 --- /dev/null +++ b/colors/silent.vim @@ -0,0 +1,116 @@ +" Vim color file +" @Author: Pascal Vasilii + +hi clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = "silent" +set background=light + +hi Cursor guibg=#0057ae guifg=white gui=NONE +hi LineNr guibg=#F1FFC1 guifg=DarkGray gui=bold,italic +hi StatusLineNC guibg=#bbbbbb guifg=White gui=bold,italic +hi StatusLine guibg=#1D343B guifg=#DDDDDD gui=italic +hi Title guibg=white guifg=Black gui=bold +hi TablineSel guibg=white guifg=Black gui=bold +hi CursorLine guibg=#F1FFC1 guifg=Black gui=none +hi CursorColumn guibg=#fafafa guifg=black gui=NONE +hi MatchParen guifg=#141312 guibg=Yellow gui=underline +hi AutoHiGroup guibg=Yellow guifg=black +"hi TabLineFill guibg=red guifg=#606060 gui=none +hi SignColumn guibg=#F1FFC1 guifg=black gui=bold + +hi Directory guibg=white guifg=Black gui=bold,italic +hi Tooltip guibg=#F1FFC1 guifg=DarkGray gui=bold,italic +hi FoldColumn guibg=#F1FFC1 guifg=Black gui=none +hi VertSplit guibg=#F1FFC1 guifg=#F1FFC1 gui=none +hi Wildmenu guibg=White guifg=Black gui=bold + +hi Pmenu guibg=#DDDDDD guifg=Black gui=italic +hi PmenuSbar guibg=#DDDDDD guifg=fg gui=italic +hi PmenuSel guibg=#F1FFC1 guifg=Black gui=italic +hi PmenuThumb guibg=#DDDDDD guifg=fg gui=none + +hi IncSearch guibg=Black guifg=White gui=none +hi Search guibg=Yellow guifg=Black gui=none + +hi Normal guibg=White guifg=#141312 gui=NONE +hi Visual guibg=#4485FF guifg=white gui=bold +hi VisualNos guibg=#4485FF guifg=white gui=bold +hi Comment guibg=white guifg=#888786 gui=italic +hi PerlPOD guibg=white guifg=#B86A18 gui=NONE +" dark green 006e26 +hi Constant guibg=white guifg=#006e26 gui=bold + +hi Character guibg=white guifg=#644A9B gui=NONE +hi String guibg=white guifg=#BF0303 gui=italic +"hi Number guibg=white guifg=black gui=bold +hi Number guibg=white guifg=#B07E00 gui=NONE +hi Boolean guibg=white guifg=#B07E00 gui=NONE +hi Define guibg=white guifg=#006E26 gui=bold + +" vars +hi Identifier guibg=white guifg=#0057AE gui=NONE +hi Exception guibg=white guifg=black gui=bold +" return ~olive +hi Statement guibg=white guifg=#B07E00 gui=NONE +"hi Label guibg=white guifg=#B07E00 gui=NONE +hi PreProc guibg=white guifg=#141312 gui=bold +hi Function guibg=white guifg=#B07E00 gui=NONE +hi Repeat guibg=white guifg=#B07E00 gui=bold +"$='"[ +hi Operator guibg=white guifg=#0057AE gui=NONE +hi Ignore guibg=white guifg=bg +hi Folded guibg=#F1FFC1 guifg=#101010 gui=italic +hi Error guibg=#D80000 guifg=#FFD1CC term=reverse gui=NONE +hi Todo guibg=#AD5500 guifg=Grey term=standout gui=NONE +hi Done guibg=Gray guifg=#CCEEFF term=standout gui=NONE + +hi SpellErrors guibg=white guifg=#9C0D0D gui=NONE +hi SpellBad guibg=white gui=undercurl guisp=#9C0D0D +hi SpellCap guibg=white gui=undercurl guisp=#9C0D0D +hi SpellLocal guibg=white gui=undercurl guisp=#9C0D0D +hi SpellRare guibg=white gui=undercurl guisp=#9C0D0D + +hi MoreMsg guibg=white guifg=black gui=NONE +hi ModeMsg guibg=white guifg=black gui=NONE +hi DiffAdd guibg=#CCFFCC guifg=NONE gui=NONE +hi DiffDelete guibg=#FFCCCC guifg=NONE gui=NONE +hi DiffChange guibg=#F1FFC1 guifg=NONE gui=NONE +hi DiffText guibg=white guifg=NONE gui=NONE + +hi Question guibg=white guifg=black gui=bold +hi Conditional guibg=white guifg=#B07E00 gui=NONE +hi Include guibg=white guifg=#141312 gui=bold +hi SpecialChar guibg=white guifg=#141312 gui=bold +hi Underlined guibg=white guifg=#0057ae gui=underline + +" -> +hi Structure guibg=white guifg=black gui=none +hi Chatacter guibg=white guifg=black gui=none +" dark red #D80000 +hi Float guibg=#CCFFCC guifg=blue gui=NONE +hi Macro guibg=white guifg=black gui=bold +" #ifdef #endif dark blue +hi PreCondit guibg=white guifg=#0057ae gui=bold +hi Delimiter guibg=white guifg=black gui=NONE +" const static +hi StorageClass guibg=white guifg=#006e26 gui=NONE +"type +hi Typedef guibg=#CCFFCC guifg=#006e26 gui=bold +" int char +hi Type guibg=white guifg=black gui=NONE +hi Tag guibg=#CCFFCC guifg=#0057AE gui=NONE +hi Special guibg=white guifg=black gui=NONE +hi SpecialKey guibg=white guifg=black gui=none +"NonText '~' and '@' at the end of the window, characters from + "'showbreak' and other characters that do not really exist in + "the text (e.g., ">" displayed when a double-wide character + "doesn't fit at the end of the line). +hi NonText guibg=white guifg=black gui=none +hi Keyword guibg=white guifg=#141312 gui=NONE + +hi link SpecialComment Special +hi link Debug Special diff --git a/colors/simpleandfriendly.vim b/colors/simpleandfriendly.vim new file mode 100755 index 0000000..cd6d8b4 --- /dev/null +++ b/colors/simpleandfriendly.vim @@ -0,0 +1,65 @@ +" Vim color file +" Maintainer: Thomas Schmall www.oxpal.com +" Last Change: Nov 2 2009 +" URL: http://www.vim.org/scripts/script.php?script_id=792 +" Version: 1.4 + +" This color scheme uses a light grey background. + +" Last Changes: +" *line number colors changed +" *current line highlighting + + +" First remove all existing highlighting. +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = "simpleandfriendly" + +"set the highlighting of the current line to true - then give it a color +"delete next line to turn off current line highlighting for this color scheme +set cul +hi cursorline gui=underline +"guibg=grey91 +hi visual guibg=grey80 guifg=black + + +"Set nice colors #DC6210 +"Cursor is Cyan when ":lmap" mappings are active +hi lCursor guibg=Cyan guifg=NONE +hi LineNr guifg=white guibg=#acbbff + +"Text below the last line is darker grey +hi NonText guibg=grey80 +"Normal text is black background is grey +hi Normal guifg=black guibg=grey89 ctermfg=Black ctermbg=LightGrey +hi Comment guifg=Orange guibg=grey94 ctermfg=DarkCyan term=bold +"Constants are not underlined but have a slightly lighter background +hi Constant guifg=#8080a0 guibg=grey92 gui=NONE term=underline +hi String guifg=#80a0ff guibg=grey93 gui=NONE term=underline +hi Number guifg=#80a5ff guibg=grey91 gui=NONE ctermfg=Gray term=none +"Words like _if_ or _else_ (Grey27) +hi Statement guifg=#4A2B99 gui=NONE ctermfg=Blue + +hi Title guifg=red ctermfg=red gui=NONE term=BOLD +"color for _NONE_ for instance: +hi PreProc term=underline ctermfg=LightBlue guifg=#DC6210 +"color for _guifg_ for instance: (SlateBlue works here nice too) +hi Type guifg=#008080 ctermfg=LightGreen gui=None term=underline +hi Function guifg=#61577A term=bold +"in lingo the defined functions. (alt: SlateBlue) +hi Identifier guifg=Seagreen +"hi Identifier term=underline cterm=bold ctermfg=Cyan guifg=#40ffff + +"hi Repeat term=underline ctermfg=White guifg=white +"hi Ignore guifg=bg ctermfg=black +hi Error term=reverse ctermbg=Red ctermfg=White guibg=Red guifg=White +hi Todo term=standout ctermbg=Yellow ctermfg=Black guifg=Blue guibg=Yellow +"Special Characters +hi Special guibg=grey90 guifg=Slateblue gui=UNDERLINE + +hi operator guifg=gray25 ctermfg=Black term=bold cterm=bold gui=bold diff --git a/colors/softblue.vim b/colors/softblue.vim new file mode 100755 index 0000000..8d8ee1b --- /dev/null +++ b/colors/softblue.vim @@ -0,0 +1,45 @@ +" Vim color file +" Maintainer: Zhang Jing +" Last Change: %[% 20051207 10ʱ4149 %]% + +set background=dark +if version > 580 + hi clear + if exists("syntax_on") + syntax reset + endif +endif +let g:colors_name="softblue" + +hi Normal guibg=#183058 guifg=#b0b0e0 + +hi Cursor guibg=#b3b2df guifg=grey30 gui=bold +hi VertSplit guibg=#466292 guifg=grey50 gui=none +hi Folded guibg=#0d2349 guifg=lightblue +hi FoldColumn guibg=#0d2349 guifg=lightblue +hi IncSearch guifg=slategrey guibg=khaki +hi LineNr guifg=grey30 +hi ModeMsg guifg=SkyBlue +hi MoreMsg guifg=SeaGreen +hi NonText guifg=LightBlue guibg=#0d2349 +hi Question guifg=#487cc4 +hi Search guibg=#787878 guifg=wheat +hi SpecialKey guifg=yellowgreen +hi StatusLine guibg=#466292 guifg=black gui=none +hi StatusLineNC guibg=#466292 guifg=grey22 gui=none +hi Title guifg=#38d9ff +hi Visual guifg=lightblue guibg=#001146 gui=none +hi WarningMsg guifg=salmon +hi ErrorMsg guifg=white guibg=#b2377a + +hi Comment guifg=#6279a0 +hi Constant guifg=#9b60be +hi Identifier guifg=#00ac55 +hi Statement guifg=SkyBlue2 +hi PreProc guifg=#20a0d0 +hi Type guifg=#8070ff +hi Special guifg=#b6a040"wheat4"#7c9cf5"a2b9e0 +hi Ignore guifg=grey40 +hi Error guifg=white guibg=#b2377a +hi Todo guifg=#54b900 guibg=#622098 gui=bold +"vim:ts=4:tw=4 diff --git a/colors/soso.vim b/colors/soso.vim new file mode 100755 index 0000000..c1e1a02 --- /dev/null +++ b/colors/soso.vim @@ -0,0 +1,67 @@ +"--------------------------------------------------------------------- +" $Id: soso.vim,v 1.3 2007/10/31 06:24:34 soso Exp $ +" +" Maintainer: Soeren Sonntag +" Last Change: $Date: 2007/10/31 06:24:34 $ +" +" Description: Vim color file +"--------------------------------------------------------------------- + +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name="soso" + +hi Normal guifg=black guibg=#e4e4e4 ctermfg=black ctermbg=white +hi DiffAdd guibg=#c0ffe0 ctermbg=3 +hi DiffDelete guifg=#ff8097 guibg=#ffe0f7 ctermfg=4 ctermbg=5 +hi DiffChange guibg=#cfefff ctermbg=9 +hi DiffText guibg=#bfdfff gui=bold ctermbg=6 cterm=bold +hi NonText guifg=grey50 guibg=grey86 gui=bold ctermfg=darkblue +hi SpecialKey guifg=grey50 guibg=grey86 gui=bold ctermfg=darkblue +hi NonText guifg=grey50 guibg=grey86 ctermfg=blue +hi LineNr guifg=grey50 guibg=grey86 ctermfg=darkblue +hi Search guibg=#fff999 +hi StatusLine guifg=bg guibg=black gui=bold ctermfg=bg ctermbg=black cterm=bold +hi StatusLineNC guifg=bg guibg=grey40 gui=NONE ctermfg=bg ctermbg=black cterm=NONE +hi Visual guifg=fg guibg=#ccccdd gui=NONE +hi VisualNOS guifg=bg guibg=#ccccdd gui=NONE + +" syntax highlighting groups +hi Comment guifg=#000099 guibg=bg ctermfg=darkblue +hi String guifg=#b30000 guibg=bg ctermfg=darkred +hi Constant guifg=#c033ff guibg=bg ctermfg=darkmagenta +hi Statement guifg=black guibg=bg ctermfg=black cterm=bold +hi PreProc guifg=#335588 guibg=bg gui=bold ctermfg=blue +hi Type guifg=#338855 guibg=bg gui=bold ctermfg=darkgreen +hi StorageClass guifg=#990000 guibg=bg ctermfg=red +hi Special guifg=#6688ff guibg=bg ctermfg=darkcyan +hi Function guifg=#117777 guibg=bg ctermfg=red + +" showpairs plugin +" for cursor on paren +hi ShowPairsHL guibg=#c4ffc4 ctermbg=lightgreen +" for cursor between parens +hi ShowPairsHLp guibg=#c4f0c4 ctermbg=lightgreen +" unmatched paren +hi ShowPairsHLe guibg=#ff5555 ctermbg=red + +" settings for Vim7 +if version >= 700 + hi MatchParen guibg=#c4ffc4 ctermbg=lightgreen + " Spell + hi SpellBad guifg=#cc0000 gui=undercurl guisp=#cc0000 ctermfg=red cterm=underline + hi SpellRare guifg=magenta gui=undercurl ctermfg=magenta cterm=underline + hi SpellCap gui=undercurl guisp=#22cc22 cterm=underline + " Completion menu + hi Pmenu guibg=#ffffcc ctermbg=yellow + hi PmenuSel guibg=#ddddaa ctermbg=lightcyan cterm=bold + hi PmenuSbar guibg=#999966 ctermbg=lightcyan + " Tab line + hi TabLine guibg=grey70 cterm=underline + hi TabLineSel gui=bold cterm=bold + hi TabLineFill guifg=black guibg=grey80 cterm=underline +endif diff --git a/colors/spring.vim b/colors/spring.vim new file mode 100755 index 0000000..06d79d0 --- /dev/null +++ b/colors/spring.vim @@ -0,0 +1,71 @@ + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +" File Name: spring.vim +" Abstract: A color sheme file (only for GVIM), which make the VIM +" bright with colors. It looks like the flowers are in +" blossom in Spring. +" Author: CHE Wenlong +" Version: 1.0 +" Last Change: September 16, 2008 + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +if !has("gui_running") + runtime! colors/default.vim + finish +endif + +set background=light + +hi clear + +" Version control +if version > 580 + hi clear + if exists("syntax_on") + syntax reset + endif +endif + +let colors_name = "spring" + +" Common +hi Normal guifg=#000000 guibg=#cce8cf gui=NONE +hi Visual guibg=#ccffff gui=NONE +hi Cursor guifg=#f5deb3 guibg=#2f4f4f gui=NONE +hi Cursorline guibg=#ccffff +hi lCursor guifg=#000000 guibg=#ffffff gui=NONE +hi LineNr guifg=#1060a0 guibg=#e0e0e0 gui=NONE +hi Title guifg=#202020 guibg=NONE gui=bold +hi Underlined guifg=#202020 guibg=NONE gui=underline + +" Split +hi StatusLine guifg=#f5deb3 guibg=#2f4f4f gui=bold +hi StatusLineNC guifg=#f5deb3 guibg=#2f4f4f gui=NONE +hi VertSplit guifg=#2f4f4f guibg=#2f4f4f gui=NONE + +" Folder +hi Folded guifg=#006699 guibg=#e0e0e0 gui=NONE + +" Syntax +hi Type guifg=#009933 guibg=NONE gui=bold +hi Define guifg=#1060a0 guibg=NONE gui=bold +hi Comment guifg=#1e90ff guibg=NONE gui=NONE +hi Constant guifg=#a07040 guibg=NONE gui=NONE +hi String guifg=#a07040 guibg=NONE gui=NONE +hi Number guifg=#cd0000 guibg=NONE gui=NONE +hi Statement guifg=#fc548f guibg=NONE gui=bold + +" Others +hi PreProc guifg=#1060a0 guibg=NONE gui=NONE +hi Error guifg=#ff0000 guibg=#ffffff gui=bold,underline +hi Todo guifg=#a0b0c0 guibg=NONE gui=bold,underline +hi Special guifg=#8B038D guibg=NONE gui=NONE +hi SpecialKey guifg=#d8a080 guibg=#e8e8e8 gui=NONE + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +" vim:tabstop=4 + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/colors/summerfruit256.vim b/colors/summerfruit256.vim new file mode 100755 index 0000000..d62cbf8 --- /dev/null +++ b/colors/summerfruit256.vim @@ -0,0 +1,322 @@ +" Vim color file +" Maintainer: Martin Baeuml +" Last Change: 2008-02-09 +" +" This color file is a modification of the "summerfruit" color scheme by Armin Ronacher +" so that it can be used on 88- and 256-color xterms. The colors are translated +" using Henry So's programmatic approximation of gui colors from his "desert256" +" color scheme. +" +" I removed the "italic" option and the background color from +" comment-coloring because that looks odd on my console. +" +" The original "summerfruit" color scheme and "desert256" are available from vim.org. + +set background=light +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="summerfruit256" + +if has("gui_running") || &t_Co == 88 || &t_Co == 256 + " functions {{{ + " 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_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 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 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 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 color(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 color + 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_color(l:gx) + else + " use the color + return rgb_color(l:x, l:y, l:z) + endif + else + " only one possibility + return rgb_color(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 color(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 + " }}} + + " Global + call X("Normal", "000000", "ffffff", "") + call X("NonText", "438ec3", "b7dce8", "") + + " Search + call X("Search", "800000", "ffae00", "") + call X("IncSearch", "800000", "ffae00", "") + + " Interface Elements + call X("StatusLine", "ffffff", "43c464", "bold") + call X("StatusLineNC", "9bd4a9", "51b069", "") + call X("VertSplit", "3687a2", "3687a2", "") + call X("Folded", "3c78a2", "c3daea", "") + call X("IncSearch", "708090", "f0e68c", "") + call X("Pmenu", "ffffff", "cb2f27", "") + call X("SignColumn", "", "", "") + call X("CursorLine", "", "c0d9eb", "") + call X("LineNr", "eeeeee", "438ec3", "bold") + call X("MatchParen", "", "", "") + + " Specials + call X("Todo", "e50808", "dbf3cd", "bold") + call X("Title", "000000", "", "") + call X("Special", "fd8900", "", "") + + " Syntax Elements + call X("String", "0086d2", "", "") + call X("Constant", "0086d2", "", "") + call X("Number", "0086f7", "", "") + call X("Statement", "fb660a", "", "") + call X("Function", "ff0086", "", "") + call X("PreProc", "ff0007", "", "") + call X("Comment", "22a21f", "", "bold") + call X("Type", "70796b", "", "") + call X("Error", "ffffff", "d40000", "") + call X("Identifier", "ff0086", "", "") + call X("Label", "ff0086", "", "") + + " Python Highlighting + call X("pythonCoding", "ff0086", "", "") + call X("pythonRun", "ff0086", "", "") + call X("pythonBuiltinObj", "2b6ba2", "", "") + call X("pythonBuiltinFunc", "2b6ba2", "", "") + call X("pythonException", "ee0000", "", "") + call X("pythonExClass", "66cd66", "", "") + call X("pythonSpaceError", "", "", "") + call X("pythonDocTest", "2f5f49", "", "") + call X("pythonDocTest2", "3b916a", "", "") + call X("pythonFunction", "ee0000", "", "") + call X("pythonClass", "ff0086", "", "") + + " HTML Highlighting + call X("htmlTag", "00bdec", "", "") + call X("htmlEndTag", "00bdec", "", "") + call X("htmlSpecialTagName", "4aa04a", "", "") + call X("htmlTagName", "4aa04a", "", "") + call X("htmlTagN", "4aa04a", "", "") + + " Jinja Highlighting + call X("jinjaTagBlock", "ff0007", "fbf4c7", "bold") + call X("jinjaVarBlock", "ff0007", "fbf4c7", "") + call X("jinjaString", "0086d2", "fbf4c7", "") + call X("jinjaNumber", "bf0945", "fbf4c7", "bold") + call X("jinjaStatement", "fb660a", "fbf4c7", "bold") + call X("jinjaComment", "008800", "002300", "italic") + call X("jinjaFilter", "ff0086", "fbf4c7", "") + call X("jinjaRaw", "aaaaaa", "fbf4c7", "") + call X("jinjaOperator", "ffffff", "fbf4c7", "") + call X("jinjaVariable", "92cd35", "fbf4c7", "") + call X("jinjaAttribute", "dd7700", "fbf4c7", "") + call X("jinjaSpecial", "008ffd", "fbf4c7", "") + + " delete functions {{{ + delf X + delf rgb + delf color + delf rgb_color + delf rgb_level + delf rgb_number + delf grey_color + delf grey_level + delf grey_number + " }}} +endif + +" vim: set fdl=0 fdm=marker: + diff --git a/colors/synic.vim b/colors/synic.vim new file mode 100755 index 0000000..1f47a5c --- /dev/null +++ b/colors/synic.vim @@ -0,0 +1,81 @@ +" ------------------------------------------------------------------ +" Filename: synic.vim +" Last Modified: May, 14 2007 (10:47) +" Maintainer: Adam Olsen (arolsen@gmail.com) +" Copyright: 2007 Adam Olsen +" This script is free software; you can redistribute it and/or +" modify it under the terms of the GNU General Public License as +" published by the Free Software Foundation; either version 2 of +" the License, or (at your option) any later version. +" Description: Vim colorscheme file. +" Install: Put this file in the users colors directory (~/.vim/colors) +" then load it with :colorscheme synic +" ------------------------------------------------------------------ +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +"" +"" SPECIAL NOTE: +"" I believe this colorscheme is based off of Hans +"" Fugal's colorscheme "desert". +"" http://hans.fugal.net/vim/colors/desert.html +"" I might be wrong on this... if it looks like it was based off +"" of your colorscheme, let me know so I can give you credits. +"" +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = "synic" + +hi Normal guifg=ivory guibg=Black + +hi TabLineFill guifg=#272d2f guibg=#272d2f gui=None +hi TabLine guifg=MistyRose3 guibg=#272d2f gui=None +hi TabLineSel guifg=LightBlue3 guibg=#272d2f gui=None +hi ErrorMsg gui=NONE guifg=Red guibg=Linen +hi IncSearch gui=NONE guibg=LightGreen guifg=Black +hi ModeMsg gui=NONE guifg=fg guibg=bg +hi StatusLine gui=NONE guifg=LightBlue3 guibg=#272d2f +hi StatusLineNC gui=NONE guifg=MistyRose3 guibg=#272d2f +hi VertSplit gui=NONE guifg=LightBlue4 guibg=Black +hi Visual gui=reverse guifg=LightBlue4 guibg=Black +hi VisualNOS gui=underline guifg=fg guibg=bg +hi DiffText gui=NONE guifg=Yellow guibg=LightSkyBlue4 +hi Cursor guibg=Lavender guifg=Black +hi lCursor guibg=Lavender guifg=Black +hi Directory guifg=LightGreen guibg=bg +hi LineNr guifg=LightBlue3 guibg=bg +hi MoreMsg gui=NONE guifg=SeaGreen guibg=bg +hi NonText gui=NONE guifg=Cyan4 guibg=Black +hi Question gui=NONE guifg=LimeGreen guibg=bg +hi Search gui=NONE guifg=SkyBlue4 guibg=Bisque +hi SpecialKey guifg=Cyan guibg=bg +hi Title gui=NONE guifg=Yellow2 guibg=bg +hi WarningMsg guifg=Tomato3 guibg=Black +hi WildMenu gui=NONE guifg=Black guibg=SkyBlue4 +hi Folded guifg=#f4aba2 guibg=bg +hi FoldColumn guifg=DarkBlue guibg=Grey +hi DiffAdd gui=NONE guifg=Blue guibg=LightCyan +hi DiffChange gui=NONE guifg=white guibg=LightCyan4 +hi DiffDelete gui=None guifg=LightBlue guibg=LightCyan + +hi Constant gui=NONE guifg=MistyRose3 guibg=bg +hi String gui=NONE guifg=LightBlue3 guibg=bg +hi Special gui=NONE guifg=GoldenRod guibg=bg +hi Statement gui=NONE guifg=khaki guibg=bg +hi Operator gui=NONE guifg=#8673e8 guibg=bg +hi Ignore gui=NONE guifg=bg guibg=bg +hi ToDo gui=NONE guifg=DodgerBlue guibg=bg +hi Error gui=NONE guifg=Red guibg=Linen +hi Comment gui=NONE guifg=SlateGrey guibg=bg +hi Comment gui=NONE guifg=#62c600 guibg=bg +hi Identifier gui=bold guifg=LightBlue4 guibg=bg +hi PreProc gui=NONE guifg=#ffa0a0 guibg=bg +hi Type gui=NONE guifg=NavajoWhite guibg=bg +hi Underlined gui=underline guifg=fg guibg=bg + +" vim: sw=2 diff --git a/colors/tabula.vim b/colors/tabula.vim new file mode 100755 index 0000000..61cd0ee --- /dev/null +++ b/colors/tabula.vim @@ -0,0 +1,698 @@ +" ============================================================================ +" Filename: tabula.vim +" Last Modified: 2007-02-08 +" Version: 1.3.2 +" Maintainer: Bernd Pol (bernd.pol AT online DOT de) +" Copyright: 2006 Bernd Pol +" This script is free software; you can redistribute it and/or +" modify it under the terms of the GNU General Public License as +" published by the Free Software Foundation; either version 2 of +" the License, or (at your option) any later version. +" Description: Vim colorscheme based on marklar.vim by SM Smithfield, +" slightly modified for harmonic, yet easily distinguishable +" display on GUI and a 256 color xterm as well. +" Install: Put this file in the users colors directory (~/.vim/colors) +" then load it with :colorscheme tabula +" ============================================================================= +" Latest Changes: +" ============================================================================= +" TODO +" - automize options setting +" - keep options in some setup file, e.g.: +" tabula.rc, sub e.g. " ... " marks +" - options set up per directory (autoload option) +" such that text files be displayed other than e.g. c sources +" ============================================================================= + +hi clear +set background=dark +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "tabula" +"let g:Tabula_setOptions = 0 + +"============================================================================== +" Option Settings {{{1 +"============================================================================== +" +" Use these in your .vimrc file before the ':colorscheme tabula' line +" +" Alternatively set the options variable from the command line, e.g. +" :let Tabula_LNumUnderline=1 +" and then call +" :colorscheme tabula +" again. + +"------------------------------------------------------------------------------ +" Display Statements In Bold: {{{2 +" Tabula_BoldStatement = 0 statements display not bold +" Tabula_BoldStatement = 1 statements display bold +" Defaults to non-bold display. +"------------------------------------------------------------------------------ +" +let s:BoldStatement = 0 +if exists("g:Tabula_BoldStatement") + let s:BoldStatement = g:Tabula_BoldStatement +endif + +"------------------------------------------------------------------------------ +" Set GUI Cursor Color: {{{2 +" Tabula_CurColor = 'blue' +" Tabula_CurColor = 'red' +" Tabula_CurColor = 'yellow' +" Tabula_CurColor = 'white' +" Defaults to 'blue'. +"------------------------------------------------------------------------------ +" +let s:CurColor = "blue" +if exists("g:Tabula_CurColor") + let s:CurColor = g:Tabula_CurColor +endif + +"------------------------------------------------------------------------------ +" Set Color For Preprocessor Statements: {{{2 +" Tabula_ColorPre = 'blue' purple-blue +" Tabula_ColorPre = 'red' orange-red +" Tabula_ColorPre = 'yellow' lightgreen-yellow +" Defaults to 'blue'. +"------------------------------------------------------------------------------ +" +let s:ColorPre = "blue" +if exists("g:Tabula_ColorPre") + if g:Tabula_ColorPre == "red" || g:Tabula_ColorPre == "yellow" + let s:ColorPre = g:Tabula_ColorPre + endif +endif + +"------------------------------------------------------------------------------ +" Use Dark Error Background: {{{2 +" Sometimes desirable for less distracting error highlighting. +" Tabula_DarkError = 0 light red error background +" Tabula_DarkError = 1 dark red error background +" Defaults to light error background. +"------------------------------------------------------------------------------ +" +let s:DarkError = 0 +if exists("g:Tabula_DarkError") + let s:DarkError = g:Tabula_DarkError +endif + +"------------------------------------------------------------------------------ +" Use Multiple Colors For Constant Values: {{{2 +" Tabula_FlatConstants = 0 use different color for each type +" Tabula_FlatConstants = 1 use common color for all +" Defaults to using common colors. +"------------------------------------------------------------------------------ +" +let s:FlatConstants = 1 +if exists("g:Tabula_FlatConstants") + let s:FlatConstants = g:Tabula_FlatConstants +endif + +"------------------------------------------------------------------------------ +" How To Display Ignore And NonText Characters: {{{2 +" Tabula_InvisibleIgnore = 0 slightly visible +" (good for Vim documentation editing) +" Tabula_InvisibleIgnore = 1 invisible on standard background +" Defaults to invisible display. +"------------------------------------------------------------------------------ +" +let s:InvisibleIgnore = 1 +if exists("g:Tabula_InvisibleIgnore") + let s:InvisibleIgnore = g:Tabula_InvisibleIgnore +endif + +"------------------------------------------------------------------------------ +" Show Line Numbers Underlined: {{{2 +" Sometimes useful to spot a line more easily. +" Tabula_LNumUnderline = 0 not underlined +" Tabula_LNumUnderline = 1 line numbers are underlined +" Defaults to not underlined. +"------------------------------------------------------------------------------ +" +let s:LNumUnderline = 0 +if exists("g:Tabula_LNumUnderline") + let s:LNumUnderline = g:Tabula_LNumUnderline +endif + +"------------------------------------------------------------------------------ +" Let Search Occurrences Stand Out More Prominently: {{{2 +" Tabula_SearchStandOut = 0 normal dark background display +" Tabula_SearchStandOut = 1 prominent underlined display +" Tabula_SearchStandOut = 2 even more prominent display +" Defaults to normal display. +"------------------------------------------------------------------------------ +" +let s:SearchStandOut=0 +if exists("g:Tabula_SearchStandOut") + let s:SearchStandOut = g:Tabula_SearchStandOut +endif + +"------------------------------------------------------------------------------ +" How To Display TODOs And Similar: {{{2 +" Tabula_TodoUnderline = 0 display on a blue background +" Tabula_TodoUnderline = 1 display them underlined white +" Defaults to underlined display. +"------------------------------------------------------------------------------ +" +let s:TodoUnderline=1 +if exists("g:Tabula_TodoUnderline") + let s:TodoUnderline = g:Tabula_TodoUnderline +endif + +"============================================================================== +" Color Definitions {{{1 +"============================================================================== + +if version >= 700 + hi SpellBad guisp=#FF0000 + hi SpellCap guisp=#afaf00 + hi SpellRare guisp=#bf4040 + hi SpellLocal guisp=#00afaf ctermbg=0 + hi Pmenu guifg=#00ffff guibg=#000000 ctermfg=51 ctermbg=0 + hi PmenuSel guifg=#ffff00 guibg=#000000 gui=bold ctermfg=226 cterm=bold + hi PmenuSbar guibg=#204d40 ctermbg=6 + hi PmenuThumb guifg=#38ff56 ctermfg=3 + hi CursorColumn guibg=#096354 ctermbg=29 + hi CursorLine guibg=#096354 ctermbg=29 + hi Tabline guifg=bg guibg=fg gui=NONE ctermfg=NONE ctermbg=NONE cterm=reverse,bold + hi TablineSel guifg=#20012e guibg=#00a675 gui=bold + hi TablineFill guifg=#689C7C + hi MatchParen guifg=#38ff56 guibg=#0000ff gui=bold ctermfg=14 ctermbg=21 cterm=bold +endif +"------------------------------------------------------------------------------ + +"hi Comment guifg=#00C5E7 ctermfg=39 +hi Comment guifg=#00C5E7 ctermfg=51 + +"------------------------------------------------------------------------------ +" Constant Colors: +"------------------------------------------------------------------------------ +" +if s:FlatConstants + hi Constant guifg=#7DDCDB ctermfg=123 +else + hi Boolean guifg=#7EDBD8 ctermfg=123 + hi Character guifg=#AFD000 ctermfg=148 + hi Float guifg=#AF87DF ctermfg=141 + hi Number guifg=#00A7F7 ctermfg=39 + hi String guifg=#00DF00 ctermfg=46 +endif + +"------------------------------------------------------------------------------ +" Cursor Colors: +"------------------------------------------------------------------------------ +" +if s:CurColor == "yellow" + hi Cursor guifg=#000000 guibg=#EFEF00 +elseif s:CurColor == "red" + " Note: Input cursor will be invisible on Error Group + hi Cursor guifg=#00007F guibg=#F70000 +elseif s:CurColor == "blue" + hi Cursor guifg=#00007F guibg=#00EFEF +elseif s:CurColor == "white" + hi Cursor guifg=#000000 guibg=#FFFFFF +endif +"------------------------------------------------------------------------------ + +hi DiffAdd guifg=NONE guibg=#136769 ctermfg=4 ctermbg=7 cterm=NONE +hi DiffDelete guifg=NONE guibg=#50694A ctermfg=1 ctermbg=7 cterm=NONE +hi DiffChange guifg=fg guibg=#00463c gui=None ctermfg=4 ctermbg=2 cterm=NONE +hi DiffText guifg=#7CFC94 guibg=#00463c gui=bold ctermfg=4 ctermbg=3 cterm=NONE +hi Directory guifg=#25B9F8 guibg=NONE ctermfg=2 + +"------------------------------------------------------------------------------ +" Error Colors: +"------------------------------------------------------------------------------ +" +if s:DarkError +" hi Error guifg=#FF0000 guibg=#303800 gui=NONE ctermfg=9 ctermbg=236 cterm=NONE + hi Error guifg=NONE guibg=#303800 gui=NONE ctermfg=NONE ctermbg=236 cterm=NONE +else + if s:CurColor == "red" + " Note: We need another background in this case to keep the cursor visible. + hi Error guifg=#FF0000 guibg=#FFFF00 gui=bold ctermfg=11 ctermbg=9 cterm=NONE + else + hi Error guifg=#FFFF00 guibg=#FF0000 gui=NONE ctermfg=11 ctermbg=9 cterm=NONE + endif +endif +"------------------------------------------------------------------------------ + +hi ErrorMsg guifg=#FFFFFF guibg=#FF0000 ctermfg=7 ctermbg=1 +hi FoldColumn guifg=#00BBBB guibg=#4E4E4E ctermfg=14 ctermbg=240 +hi Folded guifg=#44DDDD guibg=#4E4E4E ctermfg=14 ctermbg=240 +hi Identifier guifg=#FDAE5A ctermfg=215 cterm=NONE + +"------------------------------------------------------------------------------ +" Ignore Variants: +"------------------------------------------------------------------------------ +" +if s:InvisibleIgnore + " completely invisible + hi Ignore guifg=bg guibg=NONE ctermfg=23 + hi NonText guifg=bg guibg=NONE ctermfg=23 +else + " nearly invisible + hi Ignore guifg=#005FAF guibg=NONE ctermfg=26 + hi NonText guifg=#005FAF guibg=NONE ctermfg=26 +endif +"------------------------------------------------------------------------------ + +"------------------------------------------------------------------------------ +" Line Number Variants: +" Lines can sometimes be more precisely identified if the line numbers are +" underlined. +"------------------------------------------------------------------------------ +" +if s:LNumUnderline + hi LineNr guifg=#00FF00 guibg=#005080 gui=underline ctermfg=84 ctermbg=24 cterm=underline +else + hi LineNr guifg=#00FF00 guibg=#005080 ctermfg=84 ctermbg=24 +endif +"------------------------------------------------------------------------------ + +hi ModeMsg guifg=#FFFFFF guibg=#0000FF gui=NONE ctermfg=7 ctermbg=4 cterm=NONE +hi MoreMsg guifg=#FFFFFF guibg=#00A261 gui=NONE ctermfg=7 ctermbg=28 cterm=NONE + +hi Normal guifg=#71D289 guibg=#004A41 ctermfg=84 ctermbg=23 + +"------------------------------------------------------------------------------ +" Preprocessor Variants: +"------------------------------------------------------------------------------ +" +if s:ColorPre == "red" + hi PreProc guifg=#FF5F5F guibg=bg ctermfg=203 +elseif s:ColorPre == "yellow" + hi PreProc guifg=#AFFF00 guibg=bg ctermfg=154 +elseif s:ColorPre == "blue" + hi PreProc guifg=#918EE4 guibg=bg ctermfg=105 +endif +"------------------------------------------------------------------------------ + +hi Question guifg=#E5E500 guibg=NONE gui=NONE ctermfg=11 ctermbg=NONE cterm=NONE + +"------------------------------------------------------------------------------ +" Search Stand Out Variants: +"------------------------------------------------------------------------------ +" +if s:SearchStandOut == 0 + hi IncSearch guifg=#D0D0D0 guibg=#206828 gui=NONE ctermfg=NONE ctermbg=22 cterm=NONE + hi Search guifg=NONE guibg=#212a81 ctermfg=NONE ctermbg=18 +elseif s:SearchStandOut == 1 + hi IncSearch guifg=#D0D0D0 guibg=#206828 gui=underline ctermfg=252 ctermbg=22 cterm=underline + hi Search guifg=#FDAD5D guibg=#202880 gui=underline ctermfg=215 ctermbg=18 cterm=underline +elseif s:SearchStandOut == 2 + hi IncSearch guibg=#D0D0D0 guifg=#206828 gui=underline ctermbg=252 ctermfg=22 cterm=underline + hi Search guibg=#FDAD5D guifg=#202880 gui=underline ctermbg=215 ctermfg=18 cterm=underline +endif +"------------------------------------------------------------------------------ + +hi SignColumn guifg=#00BBBB guibg=#204d40 +hi Special guifg=#00E0F2 guibg=NONE gui=NONE ctermfg=45 +hi SpecialKey guifg=#00F4F4 guibg=#266955 + +"------------------------------------------------------------------------------ +" Statement Variants: +"------------------------------------------------------------------------------ +" +if s:BoldStatement + hi Statement guifg=#DEDE00 gui=bold ctermfg=11 cterm=bold +else + hi Statement guifg=#E4E300 gui=NONE ctermfg=11 +endif +"------------------------------------------------------------------------------ + +hi StatusLine guifg=#000000 guibg=#7DCEAD gui=NONE ctermbg=00 cterm=reverse +hi StatusLineNC guifg=#245748 guibg=#689C7C gui=NONE ctermfg=72 ctermbg=23 cterm=reverse +hi Title guifg=#7CFC94 guibg=NONE gui=bold ctermfg=2 cterm=bold + +"------------------------------------------------------------------------------ +" Todo Variants: +"------------------------------------------------------------------------------ +" +if s:TodoUnderline + " Underlined + hi Todo guifg=#AFD7D7 guibg=NONE gui=underline ctermfg=159 ctermbg=NONE cterm=underline +else + " Blue background + hi Todo guifg=#00FFFF guibg=#0000FF ctermfg=51 ctermbg=4 +endif +"------------------------------------------------------------------------------ + +hi Type guifg=#F269E4 guibg=bg gui=NONE ctermfg=213 +hi Underlined gui=underline cterm=underline +hi VertSplit guifg=#245748 guibg=#689C7C gui=NONE ctermfg=72 ctermbg=23 cterm=reverse +hi Visual guibg=#0B7260 gui=NONE +hi WarningMsg guifg=#000087 guibg=#FFFF00 ctermfg=18 ctermbg=11 +hi WildMenu guifg=#20012e guibg=#00a675 gui=bold ctermfg=NONE ctermbg=NONE cterm=bold +" +hi pythonPreCondit ctermfg=2 cterm=NONE +hi tkWidget guifg=#D5B11C guibg=bg gui=bold ctermfg=7 cterm=bold +hi tclBookends guifg=#7CFC94 guibg=NONE gui=bold ctermfg=2 cterm=bold + +" ------------------------------------------------------------------------------------------------ +" Custom HTML Groups: +" (see ':help html.vim' for more info) +"------------------------------------------------------------------------------ + +let html_my_rendering=1 + +hi htmlBold guifg=#87FFD7 gui=bold ctermfg=122 cterm=bold +hi htmlBoldItalic guifg=#87D7EF gui=bold ctermfg=117 cterm=bold +hi htmlBoldUnderline guifg=#87FFD7 gui=bold,underline ctermfg=122 cterm=bold,underline +hi htmlBoldUnderlineItalic guifg=#87D7EF gui=bold,underline ctermfg=117 cterm=bold,underline +hi htmlH1 guifg=#00FF00 guibg=NONE gui=bold,underline ctermfg=2 cterm=bold,underline +hi htmlH2 guifg=#00FF00 guibg=NONE gui=bold ctermfg=2 cterm=bold +hi htmlH3 guifg=#00FF00 guibg=NONE gui=NONE ctermfg=2 +hi htmlH4 guifg=#00C700 guibg=NONE gui=underline ctermfg=34 cterm=underline +hi htmlH5 guifg=#00C700 guibg=NONE gui=NONE ctermfg=34 +hi htmlH6 guifg=#00A700 guibg=NONE gui=underline ctermfg=28 cterm=underline +hi htmlItalic guifg=#87D7D7 gui=NONE ctermfg=116 +hi htmlLink guifg=#8787D7 gui=underline ctermfg=105 cterm=underline +hi htmlUnderline gui=underline cterm=underline +hi htmlUnderlineItalic guifg=#87D7D7 gui=underline ctermfg=116 cterm=underline + +"------------------------------------------------------------------------------ +" VimOutliner Groups: +" (see http://www.vimoutliner.org) +" Note: Make sure to add "colorscheme tabula" to the .vimoutlinerrc file. +"------------------------------------------------------------------------------ +" +" Indent level colors + +hi OL1 guifg=#02AAFF ctermfg=33 +hi OL2 guifg=#02CAE9 ctermfg=39 +hi OL3 guifg=#87D7D7 ctermfg=44 +hi OL4 guifg=#87D7D7 ctermfg=44 +hi OL5 guifg=#87D7D7 ctermfg=44 +hi OL6 guifg=#87D7D7 ctermfg=44 +hi OL7 guifg=#87D7D7 ctermfg=44 +hi OL8 guifg=#87D7D7 ctermfg=44 +hi OL9 guifg=#87D7D7 ctermfg=44 + +" colors for tags +hi outlTags guifg=#F269E4 ctermfg=213 + +" color for body text +hi BT1 guifg=#71D289 ctermfg=84 +hi BT2 guifg=#71D289 ctermfg=84 +hi BT3 guifg=#71D289 ctermfg=84 +hi BT4 guifg=#71D289 ctermfg=84 +hi BT5 guifg=#71D289 ctermfg=84 +hi BT6 guifg=#71D289 ctermfg=84 +hi BT7 guifg=#71D289 ctermfg=84 +hi BT8 guifg=#71D289 ctermfg=84 +hi BT9 guifg=#71D289 ctermfg=84 + +" color for pre-formatted text +hi PT1 guifg=#7DDCDB ctermfg=123 +hi PT2 guifg=#7DDCDB ctermfg=123 +hi PT3 guifg=#7DDCDB ctermfg=123 +hi PT4 guifg=#7DDCDB ctermfg=123 +hi PT5 guifg=#7DDCDB ctermfg=123 +hi PT6 guifg=#7DDCDB ctermfg=123 +hi PT7 guifg=#7DDCDB ctermfg=123 +hi PT8 guifg=#7DDCDB ctermfg=123 +hi PT9 guifg=#7DDCDB ctermfg=123 + +" color for tables +hi TA1 guifg=#918EE4 ctermfg=105 +hi TA2 guifg=#918EE4 ctermfg=105 +hi TA3 guifg=#918EE4 ctermfg=105 +hi TA4 guifg=#918EE4 ctermfg=105 +hi TA5 guifg=#918EE4 ctermfg=105 +hi TA6 guifg=#918EE4 ctermfg=105 +hi TA7 guifg=#918EE4 ctermfg=105 +hi TA8 guifg=#918EE4 ctermfg=105 +hi TA9 guifg=#918EE4 ctermfg=105 + +" color for user text (wrapping) +hi UT1 guifg=#71D289 ctermfg=84 +hi UT2 guifg=#71D289 ctermfg=84 +hi UT3 guifg=#71D289 ctermfg=84 +hi UT4 guifg=#71D289 ctermfg=84 +hi UT5 guifg=#71D289 ctermfg=84 +hi UT6 guifg=#71D289 ctermfg=84 +hi UT7 guifg=#71D289 ctermfg=84 +hi UT8 guifg=#71D289 ctermfg=84 +hi UT9 guifg=#71D289 ctermfg=84 + +" color for user text (non-wrapping) +hi UT1 guifg=#71D289 ctermfg=84 +hi UT2 guifg=#71D289 ctermfg=84 +hi UT3 guifg=#71D289 ctermfg=84 +hi UT4 guifg=#71D289 ctermfg=84 +hi UT5 guifg=#71D289 ctermfg=84 +hi UT6 guifg=#71D289 ctermfg=84 +hi UT7 guifg=#71D289 ctermfg=84 +hi UT8 guifg=#71D289 ctermfg=84 +hi UT9 guifg=#71D289 ctermfg=84 + +" colors for experimental spelling error highlighting +" this only works for spellfix.vim with will be cease to exist soon +hi spellErr guifg=#E4E300 gui=underline ctermfg=11 cterm=underline +hi BadWord guifg=#E4E300 gui=underline ctermfg=11 cterm=underline + + +"============================================================================== +" Options Processor {{{1 +"============================================================================== +" +"------------------------------------------------------------------------------ +" Main Dialog: {{{2 +"------------------------------------------------------------------------------ +" +function! Tabula() + call inputsave() + let thisOption = 1 + while thisOption >= 1 && thisOption <= 9 + redraw + let thisOption = inputlist([ + \ "Select a 'Tabula_' option:", + \ "1. BoldStatement Display statements in bold", + \ "2. ColorPre Set Color for preprocessor statements", + \ "3. CurColor Set GUI cursor color", + \ "4. DarkError Use dark error background", + \ "5. FlatConstants Use multiple colors for constant values", + \ "6. InvisibleIgnore Display of Ignore and NonText characters", + \ "7. LNumUnderline Show line numbers underlined", + \ "8. SearchStandOut Display of search occurrences", + \ "9. TodoUnderline Display of TODOs and similar" + \ ]) + + redraw + if thisOption >= 1 && thisOption <= 9 + call Tabula_{thisOption}() + "let g:Tabula_setOptions = 1 + endif + endwhile + call inputrestore() +endfunction + +"------------------------------------------------------------------------------ +" Bold Statements: {{{2 +"------------------------------------------------------------------------------ +" +function! Tabula_1() + let curOption = "" + if s:BoldStatement == 0 + let curOption = "not " + endif + let optionValue = inputlist([ + \ "How to display statements (currently ".curOption."bold)?", + \ "1. bold", + \ "2. not bold" + \ ]) + if optionValue == 1 + let g:Tabula_BoldStatement = 1 + elseif optionValue == 2 + let g:Tabula_BoldStatement = 0 + endif +endfunction + +"------------------------------------------------------------------------------ +" Color For Preprocessor Statements: {{{2 +"------------------------------------------------------------------------------ +" +function! Tabula_2() + let optionValue = inputlist([ + \ "How to display preprocessor statements (currently ".s:ColorPre.")?", + \ "1. blue", + \ "2. red", + \ "3. yellow" + \ ]) + if optionValue == 1 + let g:Tabula_ColorPre = "blue" + elseif optionValue == 2 + let g:Tabula_ColorPre = "red" + elseif optionValue == 3 + let g:Tabula_ColorPre = "yellow" + endif +endfunction + +"------------------------------------------------------------------------------ +" GUI Cursor Color: {{{2 +"------------------------------------------------------------------------------ +" +function! Tabula_3() + let optionValue = inputlist([ + \ "Use which cursor color (currently ".s:CurColor.")?", + \ "1. blue", + \ "2. red", + \ "3. yellow", + \ "4. white" + \ ]) + if optionValue == 1 + let g:Tabula_CurColor = "blue" + elseif optionValue == 2 + let g:Tabula_CurColor = "red" + elseif optionValue == 3 + let g:Tabula_CurColor = "yellow" + elseif optionValue == 4 + let g:Tabula_CurColor = "white" + endif +endfunction + +"------------------------------------------------------------------------------ +" Use Dark Error Background: {{{2 +"------------------------------------------------------------------------------ +" +function! Tabula_4() + let curOption = "light " + if s:DarkError + let curOption = "dark " + endif + let optionValue = inputlist([ + \ "How to display errors in the text (currently ".curOption."background)?", + \ "1. light background", + \ "2. dark background" + \ ]) + if optionValue == 1 + let g:Tabula_DarkError = 0 + elseif optionValue == 2 + let g:Tabula_DarkError = 1 + endif +endfunction + +"------------------------------------------------------------------------------ +" Multiple Constant Colors: {{{2 +"------------------------------------------------------------------------------ +" +function! Tabula_5() + let curOption = "one color" + if s:FlatConstants == 0 + let curOption = "multiple colors" + endif + let optionValue = inputlist([ + \ "How to display constant values (currently ".curOption.")?", + \ "1. use one common color for all", + \ "2. use different color for each type" + \ ]) + if optionValue == 1 + let g:Tabula_FlatConstants = 1 + elseif optionValue == 2 + let g:Tabula_FlatConstants = 0 + endif +endfunction + +"------------------------------------------------------------------------------ +" Ignore And NonText Characters: {{{2 +"------------------------------------------------------------------------------ +" +function! Tabula_6() + let curOption = "invisible" + if s:InvisibleIgnore == 0 + let curOption = "slightly visible" + endif + let optionValue = inputlist([ + \ "Show Ignore and NonText characters (currently ".curOption.")?", + \ "1. invisible", + \ "2. slightly visible" + \ ]) + if optionValue == 1 + let g:Tabula_InvisibleIgnore = 1 + elseif optionValue == 2 + let g:Tabula_InvisibleIgnore = 0 + endif +endfunction + +"------------------------------------------------------------------------------ +" Underlined Line Numbers: {{{2 +"------------------------------------------------------------------------------ +" +function! Tabula_7() + let curOption = "" + if s:LNumUnderline == 0 + let curOption = "not " + endif + let optionValue = inputlist([ + \ "How to display line numbers(currently ".curOption."underlined)?", + \ "1. underlined", + \ "2. not underlined" + \ ]) + if optionValue == 1 + let g:Tabula_LNumUnderline = 1 + elseif optionValue == 2 + let g:Tabula_LNumUnderline = 0 + endif +endfunction + +"------------------------------------------------------------------------------ +" Let Search Occurrences Stand Out More Prominently: {{{2 +"------------------------------------------------------------------------------ +" +function! Tabula_8() + if s:SearchStandOut == 0 + let curOption = "normal" + elseif s:SearchStandOut == 1 + let curOption = "prominent" + elseif s:SearchStandOut == 2 + let curOption = "very prominent" + endif + let optionValue = inputlist([ + \ "How to display search occurrences (currently ".curOption.")?", + \ "1. normal", + \ "2. prominent", + \ "3. very prominent" + \ ]) + if optionValue == 1 + let g:Tabula_SearchStandOut = 0 + elseif optionValue == 2 + let g:Tabula_SearchStandOut = 1 + elseif optionValue == 3 + let g:Tabula_SearchStandOut = 2 + endif +endfunction + +"------------------------------------------------------------------------------ +" TODOs Display: {{{2 +"------------------------------------------------------------------------------ +" +function! Tabula_9() + let curOption = "" + if s:TodoUnderline == 0 + let curOption = "not " + endif + let optionValue = inputlist([ + \ "How to display TODOs and similar (currently ".curOption."underlined)?", + \ "1. underlined", + \ "2. not underlined" + \ ]) + if optionValue == 1 + let g:Tabula_TodoUnderline = 1 + elseif optionValue == 2 + let g:Tabula_TodoUnderline = 0 + endif +endfunction + +"==========================================================================}}}1 +" +" FIXME: This can't work! +" +"if g:Tabula_setOptions +" :exe "color tabula" +" let g:Tabula_setOptions = 0 +"endif + +" vim:tw=0:fdm=marker:fdl=0:fdc=3:fen diff --git a/colors/tango.vim b/colors/tango.vim new file mode 100755 index 0000000..cdb6c9c --- /dev/null +++ b/colors/tango.vim @@ -0,0 +1,78 @@ +" +" Tango Vim Color Scheme +" ======================= +" +" For best results, set up your terminal with a Tango palette. +" Instructions for GNOME Terminal: +" http://uwstopia.nl/blog/2006/07/tango-terminal +" +" author: Michele Campeotto +" +set background=dark + +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "tango" + +" Default Colors +hi Normal guifg=#eeeeec guibg=#000000 +hi NonText guifg=#555753 guibg=#000000 gui=none +hi NonText ctermfg=darkgray +hi Cursor guibg=#d3d7cf +hi lCursor guibg=#d3d7cf + +" Search +hi Search guifg=#eeeeec guibg=#c4a000 +hi Search cterm=none ctermfg=grey ctermbg=blue +hi IncSearch guibg=#eeeeec guifg=#729fcf +hi IncSearch cterm=none ctermfg=yellow ctermbg=green + +" Window Elements +hi StatusLine guifg=#eeeeec guibg=#4e9a06 gui=bold +hi StatusLine ctermfg=white ctermbg=green cterm=bold +hi StatusLineNC guifg=#d3d7df guibg=#4e9a06 +hi StatusLineNC ctermfg=lightgray ctermbg=darkgreen +hi VertSplit guifg=#eeeeec guibg=#eeeeec +hi Folded guifg=#eeeeec guibg=#75507b +hi Folded ctermfg=white ctermbg=magenta +hi Visual guifg=#d3d7cf guibg=#4e9a06 +hi Visual ctermbg=white ctermfg=lightgreen cterm=reverse + +" Specials +hi Todo guifg=#8ae234 guibg=#4e9a06 gui=bold +hi Todo ctermfg=white ctermbg=green +hi Title guifg=#eeeeec gui=bold +hi Title ctermfg=white cterm=bold + +" Syntax +hi Constant guifg=#c4a000 +hi Constant ctermfg=darkyellow +hi Number guifg=#729fcf +hi Number ctermfg=darkblue +hi Statement guifg=#4e9a06 gui=bold +hi Statement ctermfg=green +hi Identifier guifg=#8ae234 +hi Identifier ctermfg=darkgreen +hi PreProc guifg=#cc0000 +hi PreProc ctermfg=darkred +hi Comment guifg=#06989a gui=italic +hi Comment ctermfg=cyan cterm=none +hi Type guifg=#d3d7cf gui=bold +hi Type ctermfg=gray cterm=bold +hi Special guifg=#75507b +hi Special ctermfg=magenta cterm=none +hi Error guifg=#eeeeec guibg=#ef2929 +hi Error ctermfg=white ctermbg=red + +" Diff +hi DiffAdd guifg=fg guibg=#3465a4 gui=none +hi DiffAdd ctermfg=gray ctermbg=blue cterm=none +hi DiffChange guifg=fg guibg=#555753 gui=none +hi DiffChange ctermfg=gray ctermbg=darkgray cterm=none +hi DiffDelete guibg=bg +hi DiffDelete ctermfg=gray ctermbg=none cterm=none +hi DiffText guifg=fg guibg=#c4a000 gui=none +hi DiffText ctermfg=gray ctermbg=yellow cterm=none diff --git a/colors/tango2.vim b/colors/tango2.vim new file mode 100755 index 0000000..330fe89 --- /dev/null +++ b/colors/tango2.vim @@ -0,0 +1,62 @@ +" ============================================================================= +" Name: Tango2 +" Purpose: Another colour scheme using the Tango colour palette +" Maintainer: Pranesh Srinivasan +" Last Modified: Saturday 04 October 2008 02:06:26 AM IST +" ============================================================================= + +" Inspired from some Gnome renditions of the Tango colour scheme. + +" ============================================================================= +" Preamble +" ============================================================================= + +set background=dark + +hi clear + +if exists("syntax-on") +syntax reset +endif + +let colors_name = "tango2" + +" ============================================================================= +" Vim >= 7.0 specific colours +" ============================================================================= + +if version >= 700 +" No support for cursor line yet +" hi CursorLine term=underline cterm=underline guibg=#111133 +" hi CursorColoumn +" hi MatchParen +" hi Pmenu +" hi PmenuSel +endif + +" ============================================================================= +" General colours +" ============================================================================= + +hi Normal guibg=#2E3436 guifg=#eeeeec +hi Cursor gui=none guibg=White guifg=Black + +hi Folded guibg=#4D585B guibg=#d2d2d2 +" No fold column support yet +" hi FoldColumn guifg=Orange guibg=DarkBlue +" ============================================================================= +" Syntax highlighting +" ============================================================================= + +hi Comment gui=italic guifg=#6d7e8a ctermfg=Grey +hi Todo term=bold guifg=#EBC450 +hi Constant guifg=#8ae234 +hi Type guifg=#8AE234 +hi Function gui=bold guifg=#9BCF8D +hi Statement guifg=#729FCF +hi Identifier guifg=#AD7FA8 +hi PreProc guifg=#e9ba6e +hi Special term=underline guifg=#5EAFE5 + +hi Search guibg=#81ABBD +" hi QtClass guifg=Orange ctermfg=LightBlue diff --git a/colors/taqua.vim b/colors/taqua.vim new file mode 100755 index 0000000..51e7039 --- /dev/null +++ b/colors/taqua.vim @@ -0,0 +1,84 @@ +" Vim color file +" Maintainer: TaQ +" Last Change: 18 March 2003 +" URL: http://taq.cjb.net + +" cool help screens +" :he group-name +" :he highlight-groups +" :he cterm-colors + +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif +let colors_name="taqua" + +hi Normal gui=NONE guifg=#303030 guibg=#FFFFFF +hi NonText gui=BOLD guifg=#303030 guibg=#FFFFFF + +" Search +hi IncSearch gui=BOLD guifg=#008000 guibg=#CCFF00 +hi Search gui=BOLD guifg=#008000 guibg=#CCFF00 + +" Messages +hi ErrorMsg gui=BOLD guifg=#FFFFFF guibg=#FF0000 +hi WarningMsg gui=BOLD guifg=#008000 guibg=#CCFF00 + +" Split area +hi StatusLine gui=BOLD guifg=#FFFFFF guibg=#0E8ED3 +hi StatusLineNC gui=BOLD guifg=#FFFFFF guibg=#0A6799 + +" Diff +hi DiffText gui=BOLD guifg=#FF0000 guibg=#FFEAE0 +hi DiffChange gui=BOLD guifg=#303030 guibg=#FFFFFF +hi DiffDelete gui=NONE guifg=#FFFFFF guibg=#FF0000 +hi DiffAdd gui=NONE guifg=#008000 guibg=#00FF00 + +" Cursor +hi Cursor gui=BOLD guifg=#FFFFFF guibg=#000000 +hi lCursor gui=BOLD guifg=#f8f8f8 guibg=#162CF7 +hi CursorIM gui=NONE guifg=#f8f8f8 guibg=#162CF7 + +" Fold +hi Folded gui=BOLD guifg=#0E8ED3 guibg=#DBF2FF +hi FoldColumn gui=NONE guifg=#0E8ED3 guibg=#DBF2FF + +" Other +hi LineNr gui=BOLD guifg=#00A0FF guibg=#DBF2FF +hi Directory gui=BOLD guifg=#0A6799 guibg=#FFFFFF +hi NonText gui=BOLD guifg=#009999 guibg=#FFFFFF +hi SpecialKey gui=BOLD guifg=#2020FF guibg=#FFFFFF +hi Title gui=BOLD guifg=#0000A0 guibg=#FFFFFF +hi Visual gui=NONE guifg=#404060 guibg=#dddde8 + +" Syntax group +" purple was #8000FF +hi Comment gui=NONE guifg=#0E8ED3 guibg=#DBF2FF +hi Constant gui=BOLD guifg=#0384F6 guibg=#DBF2FF +hi Error gui=BOLD guifg=#FF0000 guibg=#FFFFFF +" hi Identifier gui=NONE guifg=#1F89E0 guibg=#FFFFFF +hi Identifier gui=NONE guifg=#000000 guibg=#FFFFFF +hi Ignore gui=NONE guifg=#f8f8f8 guibg=#FFFFFF +hi PreProc gui=BOLD guifg=#0BBF20 guibg=#FFFFFF +hi Special gui=NONE guifg=#0E8ED3 guibg=#DBF2FF +hi Statement gui=BOLD guifg=#F36CE5 guibg=#FFFFFF +hi Todo gui=NONE guifg=#FF0070 guibg=#FFE0F4 +hi Type gui=BOLD guifg=#0971F9 guibg=#FFFFFF +hi Underlined gui=UNDERLINE guifg=#0000ff guibg=NONE + +" HTML +hi htmlLink gui=UNDERLINE guifg=#0000ff guibg=NONE +hi htmlBold gui=BOLD +hi htmlBoldItalic gui=BOLD,ITALIC +hi htmlBoldUnderline gui=BOLD,UNDERLINE +hi htmlBoldUnderlineItalic gui=BOLD,UNDERLINE,ITALIC +hi htmlItalic gui=ITALIC +hi htmlUnderline gui=UNDERLINE +hi htmlUnderlineItalic gui=UNDERLINE,ITALIC + +" Scrollbar +hi Scrollbar gui=BOLD guifg=#00C0FF guibg=#FFFFFF +hi VertSplit gui=BOLD guifg=#FFFFFF guibg=#0E8ED3 +hi Visual gui=BOLD guifg=#FFFFFF guibg=#1679F9 diff --git a/colors/tcsoft.vim b/colors/tcsoft.vim new file mode 100755 index 0000000..3198341 --- /dev/null +++ b/colors/tcsoft.vim @@ -0,0 +1,83 @@ +" Vim Farben-Datei +" Ersteller: Ingo Fabbri +" Letzte nderung: 2007 Jan 19 + +" Mein persnliches Farbschema. Es schont die Augen, da es keine grellen Farben verwendet. +" Am Besten geignet fr PHP + +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif +let colors_name = "TCSoft" + +if version >= 700 + hi CursorLine guibg=#FFFF33 gui=NONE "hellgelb + hi CursorColumn guibg=#EAEAEA + hi MatchParen guifg=white guibg=#99CC00 gui=bold + + "Tabpages + hi TabLine guifg=black guibg=#B0B8C0 gui=italic + hi TabLineFill guifg=#9098A0 + hi TabLineSel guifg=black guibg=#F0F0F0 gui=italic,bold + + "P-Menu (auto-completion) + hi Pmenu guifg=white guibg=#808080 + "PmenuSel + "PmenuSbar + "PmenuThumb +endif + +" Farb-Einstellungen fr das GUI +hi Normal guifg=#000000 guibg=#FFFFFF "Schwarze Schrift auf weiem Hintergrund + +hi Ignore guifg=bg + +hi Comment guifg=#000099 gui=italic "dunkelblau +hi Constant guifg=#666666 gui=NONE "grau +hi Special guifg=#FF0000 gui=NONE "rot +hi Identifier guifg=#993300 gui=NONE "rostfarbig +hi Statement guifg=#FF9900 gui=NONE "orange +hi PreProc guifg=#009900 gui=NONE "dunkelgrn +hi Type guifg=#FF9900 gui=bold "orange +hi Cursor guifg=#000000 gui=reverse "schwarz +hi LineNr guifg=#000000 guibg=#EFEFEF gui=NONE "schwarz +hi StatusLine guifg=#000000 gui=reverse,bold "schwarz + +hi Todo guifg=Blue guibg=Yellow +syn keyword Todo TODO FIXME XXX +syn keyword Error FEHLER + +hi link Function PreProc +hi link String Constant +hi link Character Constant + +hi! link MoreMsg Comment +hi! link ErrorMsg Visual +hi! link WarningMsg ErrorMsg +hi! link Question Comment + +hi link Number Special +hi link Boolean Constant +hi link Float Number + +hi link Operator Identifier +hi link Keyword Statement +hi link Exception Statement +hi link Include PreProc +hi link Define PreProc +hi link Macro PreProc + +hi link Conditional Statement +hi link Repeat Statement +hi link Label Statement + +hi link PreCondit PreProc +hi link StorageClass Type +hi link Structure Type +hi link Typedef Type +hi link SpecialChar Special +hi link Delimiter Special +hi link SpecialComment Comment +hi link Debug Special diff --git a/colors/tir_black.vim b/colors/tir_black.vim new file mode 100755 index 0000000..802dec1 --- /dev/null +++ b/colors/tir_black.vim @@ -0,0 +1,130 @@ +" tir_black color scheme +" Based on ir_black from: http://blog.infinitered.com/entries/show/8 +" adds 256 color console support +" changed WildMenu color to be the same as PMenuSel + +set background=dark +hi clear + +if exists("syntax_on") + syntax reset +endif + +let colors_name = "tir_black" + +" General colors +hi Normal guifg=#f6f3e8 guibg=black ctermfg=white ctermbg=0 +hi NonText guifg=#070707 guibg=black ctermfg=232 ctermbg=0 + +hi Cursor guifg=black guibg=white ctermfg=0 ctermbg=15 +hi LineNr guifg=#3D3D3D guibg=black ctermfg=239 ctermbg=0 + +hi VertSplit guifg=#202020 guibg=#202020 ctermfg=235 ctermbg=235 +hi StatusLine guifg=#CCCCCC guibg=#202020 gui=italic ctermfg=235 ctermbg=254 +hi StatusLineNC guifg=black guibg=#202020 ctermfg=0 ctermbg=235 + +hi Folded guifg=#a0a8b0 guibg=#384048 ctermfg=103 ctermbg=60 +hi Title guifg=#f6f3e8 gui=bold ctermfg=187 cterm=bold +hi Visual guibg=#262D51 ctermbg=60 + +hi SpecialKey guifg=#808080 guibg=#343434 ctermfg=8 ctermbg=236 + +hi WildMenu guifg=black guibg=#cae682 ctermfg=0 ctermbg=195 +hi PmenuSbar guifg=black guibg=white ctermfg=0 ctermbg=15 + +hi Error gui=undercurl ctermfg=203 ctermbg=none cterm=underline guisp=#FF6C60 +hi ErrorMsg guifg=white guibg=#FF6C60 gui=bold ctermfg=white ctermbg=203 cterm=bold +hi WarningMsg guifg=white guibg=#FF6C60 gui=bold ctermfg=white ctermbg=203 cterm=bold + +hi ModeMsg guifg=black guibg=#C6C5FE gui=bold ctermfg=0 ctermbg=189 cterm=bold + +if version >= 700 " Vim 7.x specific colors + hi CursorLine guibg=#121212 gui=none ctermbg=234 cterm=none + hi CursorColumn guibg=#121212 gui=none ctermbg=234 cterm=none + hi MatchParen guifg=#f6f3e8 guibg=#857b6f gui=bold ctermfg=white ctermbg=darkgray + hi Pmenu guifg=#f6f3e8 guibg=#444444 ctermfg=white ctermbg=242 + hi PmenuSel guifg=#000000 guibg=#cae682 ctermfg=0 ctermbg=195 + hi Search guifg=#000000 guibg=#cae682 ctermfg=0 ctermbg=195 +endif + +" Syntax highlighting +hi Comment guifg=#7C7C7C ctermfg=8 +hi String guifg=#A8FF60 ctermfg=155 +hi Number guifg=#FF73FD ctermfg=207 + +hi Keyword guifg=#96CBFE ctermfg=117 +hi PreProc guifg=#96CBFE ctermfg=117 +hi Conditional guifg=#6699CC ctermfg=110 + +hi Todo guifg=#000000 guibg=#cae682 ctermfg=0 ctermbg=195 +hi Constant guifg=#99CC99 ctermfg=151 + +hi Identifier guifg=#C6C5FE ctermfg=189 +hi Function guifg=#FFD2A7 ctermfg=223 +hi Type guifg=#FFFFB6 ctermfg=229 +hi Statement guifg=#6699CC ctermfg=110 + +hi Special guifg=#E18964 ctermfg=173 +hi Delimiter guifg=#00A0A0 ctermfg=37 +hi Operator guifg=white ctermfg=white + +hi link Character Constant +hi link Boolean Constant +hi link Float Number +hi link Repeat Statement +hi link Label Statement +hi link Exception Statement +hi link Include PreProc +hi link Define PreProc +hi link Macro PreProc +hi link PreCondit PreProc +hi link StorageClass Type +hi link Structure Type +hi link Typedef Type +hi link Tag Special +hi link SpecialChar Special +hi link SpecialComment Special +hi link Debug Special + +" Special for Ruby +hi rubyRegexp guifg=#B18A3D ctermfg=brown +hi rubyRegexpDelimiter guifg=#FF8000 ctermfg=brown +hi rubyEscape guifg=white ctermfg=cyan +hi rubyInterpolationDelimiter guifg=#00A0A0 ctermfg=blue +hi rubyControl guifg=#6699CC ctermfg=blue "and break, etc +hi rubyStringDelimiter guifg=#336633 ctermfg=lightgreen +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 + +" Special for Java +hi link javaScopeDecl Identifier +hi link javaCommentTitle javaDocSeeTag +hi link javaDocTags javaDocSeeTag +hi link javaDocParam javaDocSeeTag +hi link javaDocSeeTagParam javaDocSeeTag + +hi javaDocSeeTag guifg=#CCCCCC ctermfg=darkgray +hi javaDocSeeTag guifg=#CCCCCC ctermfg=darkgray + +" Special for XML +hi link xmlTag Keyword +hi link xmlTagName Conditional +hi link xmlEndTag Identifier + +" Special for HTML +hi link htmlTag Keyword +hi link htmlTagName Conditional +hi link htmlEndTag Identifier + +" Special for Javascript +hi link javaScriptNumber Number + +" Special for CSharp +hi link csXmlTag Keyword diff --git a/colors/tolerable.vim b/colors/tolerable.vim new file mode 100755 index 0000000..7b97b9a --- /dev/null +++ b/colors/tolerable.vim @@ -0,0 +1,43 @@ +" Vim color file +" Maintainer: Ian Langworth +" Last Change: 2004 Dec 24 +" Email: + +" Color settings inspired by BBEdit for Mac OS, plus I liked +" the low-contrast comments from the 'oceandeep' colorscheme + +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="tolerable" + +hi Cursor guifg=white guibg=darkgreen + +hi Normal gui=none guifg=black guibg=white +hi NonText gui=none guifg=orange guibg=white + +hi Statement gui=none guifg=blue +hi Special gui=none guifg=red +hi Constant gui=none guifg=darkred +hi Comment gui=none guifg=#555555 +hi Preproc gui=none guifg=darkcyan +hi Type gui=none guifg=darkmagenta +hi Identifier gui=none guifg=darkgreen +hi Title gui=none guifg=black + +hi StatusLine gui=none guibg=#333333 guifg=white +hi StatusLineNC gui=none guibg=#333333 guifg=white +hi VertSplit gui=none guibg=#333333 guifg=white + +hi Visual gui=none guibg=green guifg=black +hi Search gui=none guibg=yellow +hi Directory gui=none guifg=darkblue +hi WarningMsg gui=none guifg=red +hi Error gui=none guifg=white guibg=red +hi Todo gui=none guifg=black guibg=yellow + +hi MoreMsg gui=none +hi ModeMsg gui=none + diff --git a/colors/torte.vim b/colors/torte.vim new file mode 100755 index 0000000..2971360 --- /dev/null +++ b/colors/torte.vim @@ -0,0 +1,51 @@ +" Vim color file +" Maintainer: Thorsten Maerz +" Last Change: 2001 Jul 23 +" grey on black +" optimized for TFT panels +" $Revision: 1.1 $ + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +"colorscheme default +let g:colors_name = "torte" + +" hardcoded colors : +" GUI Comment : #80a0ff = Light blue + +" GUI +highlight Normal guifg=Grey80 guibg=Black +highlight Search guifg=Black guibg=Red gui=bold +highlight Visual guifg=Grey25 gui=bold +highlight Cursor guifg=Black guibg=Green gui=bold +highlight Special guifg=Orange +highlight Comment guifg=#80a0ff +highlight StatusLine guifg=blue guibg=white +highlight Statement guifg=Yellow gui=NONE +highlight Type gui=NONE + +" Console +highlight Normal ctermfg=LightGrey ctermbg=Black +highlight Search ctermfg=Black ctermbg=Red cterm=NONE +highlight Visual cterm=reverse +highlight Cursor ctermfg=Black ctermbg=Green cterm=bold +highlight Special ctermfg=Brown +highlight Comment ctermfg=Blue +highlight StatusLine ctermfg=blue ctermbg=white +highlight Statement ctermfg=Yellow cterm=NONE +highlight Type cterm=NONE + +" only for vim 5 +if has("unix") + if v:version<600 + highlight Normal ctermfg=Grey ctermbg=Black cterm=NONE guifg=Grey80 guibg=Black gui=NONE + highlight Search ctermfg=Black ctermbg=Red cterm=bold guifg=Black guibg=Red gui=bold + highlight Visual ctermfg=Black ctermbg=yellow cterm=bold guifg=Grey25 gui=bold + highlight Special ctermfg=LightBlue cterm=NONE guifg=LightBlue gui=NONE + highlight Comment ctermfg=Cyan cterm=NONE guifg=LightBlue gui=NONE + endif +endif + diff --git a/colors/twilight.vim b/colors/twilight.vim new file mode 100755 index 0000000..f2ccdd3 --- /dev/null +++ b/colors/twilight.vim @@ -0,0 +1,114 @@ + +set background=dark + +hi clear + +if exists("syntax_on") + syntax reset +endif + +let colors_name = "twilight" + +let s:grey_blue = '#8a9597' +let s:light_grey_blue = '#a0a8b0' +let s:dark_grey_blue = '#34383c' +let s:mid_grey_blue = '#64686c' +let s:beige = '#ceb67f' +let s:light_orange = '#ebc471' +let s:yellow = '#e3d796' +let s:violet = '#a999ac' +let s:green = '#a2a96f' +let s:lightgreen = '#c2c98f' +let s:red = '#d08356' +let s:cyan = '#74dad9' +let s:darkgrey = '#1a1a1a' +let s:grey = '#303030' +let s:lightgrey = '#605958' +let s:white = '#fffedc' + +if version >= 700 + hi CursorLine guibg=#262626 + hi CursorColumn guibg=#262626 + hi MatchParen guifg=white guibg=#80a090 gui=bold + + "Tabpages + hi TabLine guifg=#a09998 guibg=#202020 gui=underline + hi TabLineFill guifg=#a09998 guibg=#202020 gui=underline + hi TabLineSel guifg=#a09998 guibg=#404850 gui=underline + + "P-Menu (auto-completion) + hi Pmenu guifg=#605958 guibg=#303030 gui=underline + hi PmenuSel guifg=#a09998 guibg=#404040 gui=underline + "PmenuSbar + "PmenuThumb +endif + +hi Visual guibg=#404040 + +"hi Cursor guifg=NONE guibg=#586068 +hi Cursor guibg=#b0d0f0 + + +exe 'hi Normal guifg='.s:white .' guibg='.s:darkgrey +exe 'hi Underlined guifg='.s:white .' guibg='.s:darkgrey .' gui=underline' +exe 'hi NonText guifg='.s:lightgrey .' guibg='.s:grey +exe 'hi SpecialKey guifg='.s:grey .' guibg='.s:darkgrey + +exe 'hi LineNr guifg='.s:mid_grey_blue .' guibg='.s:dark_grey_blue .' gui=none' +exe 'hi StatusLine guifg='.s:white .' guibg='.s:grey .' gui=italic,underline' +exe 'hi StatusLineNC guifg='.s:lightgrey .' guibg='.s:grey .' gui=italic,underline' +exe 'hi VertSplit guifg='.s:grey .' guibg='.s:grey .' gui=none' + +exe 'hi Folded guifg='.s:grey_blue .' guibg='.s:dark_grey_blue .' gui=none' +exe 'hi FoldColumn guifg='.s:grey_blue .' guibg='.s:dark_grey_blue .' gui=none' +exe 'hi SignColumn guifg='.s:grey_blue .' guibg='.s:dark_grey_blue .' gui=none' + +exe 'hi Comment guifg='.s:mid_grey_blue .' guibg='.s:darkgrey .' gui=italic' +exe 'hi TODO guifg='.s:grey_blue .' guibg='.s:darkgrey .' gui=italic,bold' + +exe 'hi Title guifg='.s:red .' guibg='.s:darkgrey .' gui=underline' + +exe 'hi Constant guifg='.s:red .' guibg='.s:darkgrey .' gui=none' +exe 'hi String guifg='.s:green .' guibg='.s:darkgrey .' gui=none' +exe 'hi Special guifg='.s:lightgreen .' guibg='.s:darkgrey .' gui=none' + +exe 'hi Identifier guifg='.s:grey_blue .' guibg='.s:darkgrey .' gui=none' +exe 'hi Statement guifg='.s:beige .' guibg='.s:darkgrey .' gui=none' +exe 'hi Conditional guifg='.s:beige .' guibg='.s:darkgrey .' gui=none' +exe 'hi Repeat guifg='.s:beige .' guibg='.s:darkgrey .' gui=none' +exe 'hi Structure guifg='.s:beige .' guibg='.s:darkgrey .' gui=none' +exe 'hi Function guifg='.s:violet .' guibg='.s:darkgrey .' gui=none' + +exe 'hi PreProc guifg='.s:grey_blue .' guibg='.s:darkgrey .' gui=none' +exe 'hi Operator guifg='.s:light_orange .' guibg='.s:darkgrey .' gui=none' +exe 'hi Type guifg='.s:yellow .' guibg='.s:darkgrey .' gui=italic' + +"hi Identifier guifg=#7587a6 +" Type d: 'class' +"hi Structure guifg=#9B859D gui=underline +"hi Function guifg=#dad085 +" dylan: method, library, ... d: if, return, ... +"hi Statement guifg=#7187a1 gui=NONE +" Keywords d: import, module... +"hi PreProc guifg=#8fbfdc +"gui=underline +"hi Operator guifg=#a07020 +"hi Repeat guifg=#906040 gui=underline +"hi Type guifg=#708090 + +"hi Type guifg=#f9ee98 gui=NONE + +"hi NonText guifg=#808080 guibg=#303030 + +"hi Macro guifg=#a0b0c0 gui=underline + +"Tabs, trailing spaces, etc (lcs) +"hi SpecialKey guifg=#808080 guibg=#343434 + +"hi TooLong guibg=#ff0000 guifg=#f8f8f8 + +hi Search guifg=#606000 guibg=#c0c000 gui=bold + +hi Directory guifg=#dad085 gui=NONE +hi Error guibg=#602020 + diff --git a/colors/two2tango.vim b/colors/two2tango.vim new file mode 100755 index 0000000..8fa42be --- /dev/null +++ b/colors/two2tango.vim @@ -0,0 +1,101 @@ +" Vim color file +" Name: two2tango +" Maintainer: Erik Falor +" Version: 1.1 +" +" Big props to Panos Laganakos +" for the original darktango.vim colorscheme upon which +" this scheme is based. + +set background=dark +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="two2tango" + +"Tango palette +"http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines +" {{{ +let s:Butter = ['#fce94f', '#edd400', '#c4a000'] +let s:Chameleon = ['#8ae234', '#73d216', '#4e9a06'] +let s:Orange = ['#fcaf3e', '#f57900', '#ce5c00'] +let s:SkyBlue = ['#729fcf', '#3465a4', '#204a87'] +let s:Plum = ['#ad7fa8', '#75507b', '#5c3566'] +let s:Chocolate = ['#e9b96e', '#c17d11', '#8f5902'] +let s:ScarletRed = ['#ef2929', '#cc0000', '#a40000'] +let s:Aluminium = ['#eeeeec', '#d3d7cf', '#babdb6', + \'#888a85', '#555753', '#2e3436'] +"This color isn't part of the Tango Palette; I use it because there +"isn't a Tango color that provides enough contrast +let s:Background = '#212628' +" }}} + +hi Normal guibg=#2e3436 guifg=#d3d7cf +execute "hi Normal guibg=" . s:Aluminium[5] . " guifg=" . s:Aluminium[1] + +" {{{ syntax +execute "hi Comment gui=italic guifg=" . s:Aluminium[4] +execute "hi Conditional gui=bold guifg=" . s:Butter[2] +execute "hi Constant guifg=" . s:Chocolate[1] +execute "hi Error guifg=" . s:Aluminium[0] . " guibg=" . s:ScarletRed[2] +execute "hi Identifier guifg=" . s:Orange[2] +execute "hi Ignore guifg=" . s:Aluminium[5] . " guibg=" . s:Aluminium[5] +execute "hi Operator guifg=" . s:Butter[1] +execute "hi PreProc guifg=" . s:Chocolate[0] +execute "hi Repeat gui=bold guifg=" . s:Butter[2] +execute "hi Special guifg=" . s:SkyBlue[1] +execute "hi Statement guifg=" . s:Aluminium[3] +execute "hi String guifg=" . s:SkyBlue[0] +execute "hi Title guifg=" . s:Aluminium[0] +execute "hi Todo gui=bold guisp=NONE guibg=" . s:Orange[2] + \. " guifg=" . s:Aluminium[0] +execute "hi Type guifg=" . s:Orange[2] +execute "hi Underlined gui=underline guifg=" . s:SkyBlue[0] +" }}} + +" {{{ groups +execute "hi Cursor guibg=" . s:ScarletRed[0] . " guifg=" . s:Aluminium[5] +execute "hi CursorLine guibg=" . s:Background +execute "hi CursorColumn guibg=" . s:Background +"hi CursorIM TODO +execute "hi Directory guifg=" . s:SkyBlue[0] +execute "hi ErrorMsg guifg=" . s:Aluminium[0] . " guibg=" . s:ScarletRed[2] +execute "hi FoldColumn guibg=" . s:Aluminium[5] . " guifg=" . s:Aluminium[4] +execute "hi Folded guibg=" . s:Aluminium[4] . " guifg=" . s:Aluminium[2] +execute "hi IncSearch gui=none guibg=" . s:Butter[0] . " guifg=" . s:Butter[2] +execute "hi LineNr guibg=" . s:Aluminium[5] . " guifg=" . s:Aluminium[4] +execute "hi MatchParen guibg=" . s:Aluminium[2] . " guifg=" . s:Aluminium[5] +"hi Menu TODO +execute "hi ModeMsg guifg=" . s:Orange[2] +execute "hi MoreMsg guifg=" . s:Orange[2] +execute "hi NonText guibg=" . s:Aluminium[5] . " guifg=" . s:Aluminium[4] +execute "hi Pmenu guibg=" . s:Aluminium[2] . " guifg=" . s:Aluminium[4] +execute "hi PmenuSel guibg=" . s:Aluminium[0] . " guifg=" . s:Aluminium[5] +execute "hi Question guifg=" . s:Plum[0] +"hi Scrollbar TODO +execute "hi Search guibg=" . s:Butter[0] . " guifg=" . s:Butter[2] +execute "hi SpecialKey guifg=" . s:Orange[2] +execute "hi StatusLine gui=none guibg=" . s:Orange[2] . " guifg=" . s:Aluminium[0] +execute "hi StatusLineNC gui=none guibg=" . s:Aluminium[3] . " guifg=" . s:Aluminium[5] +"hi TabLine TODO - non-active tab page label +"hi TabLineFill TODO - fill color where there are no tabs +"hi TabLineSel TODO - active tab page label +execute "hi Tooltip gui=none guibg=" . s:SkyBlue[0] . " guifg=" . s:Aluminium[0] +execute "hi VertSplit gui=none guibg=" . s:Aluminium[3] . " guifg=" . s:Aluminium[5] +execute "hi Visual guibg=" . s:Orange[0] . " guifg=" . s:Orange[2] +"hi VisualNOS TODO - Visual mode selection when vim is "Not Owning the Selection". +execute "hi WarningMsg guifg=" . s:Orange[0] +execute "hi WildMenu guifg=" . s:Butter[2] . " guibg=" . s:Butter[0] +" }}} + +" {{{ terminal +" TODO +" }}} + +" vim: sw=4 foldmethod=marker diff --git a/colors/vc.vim b/colors/vc.vim new file mode 100755 index 0000000..53ecc22 --- /dev/null +++ b/colors/vc.vim @@ -0,0 +1,24 @@ +" Vim color file +" Maintainer: Vladimir Vrzic +" Last Change: 28. june 2003. +" URL: http://galeb.etf.bg.ac.yu/~random/pub/vim/ + +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="vc" + +hi Comment gui=NONE guifg=SeaGreen guibg=NONE +hi Constant gui=NONE guifg=#004488 guibg=NONE +"hi Identifier gui=NONE guifg=Blue guibg=NONE +hi Statement gui=NONE guifg=Blue guibg=NONE +hi PreProc gui=NONE guifg=Blue guibg=NONE +hi Type gui=NONE guifg=Blue guibg=NONE +hi Special gui=NONE guifg=SteelBlue guibg=NONE +"hi Underlined +"hi Ignore +"hi Error +"hi Todo + diff --git a/colors/vibrantink.vim b/colors/vibrantink.vim new file mode 100755 index 0000000..46aa23f --- /dev/null +++ b/colors/vibrantink.vim @@ -0,0 +1,68 @@ +" Vim color scheme +" +" Name: vibrantink.vim +" Maintainer: Jo Vermeulen +" Last Change: 5 Mar 2009 +" License: public domain +" Version: 1.3 +" +" This scheme should work in the GUI and in xterm's 256 color mode. It +" won't work in 8/16 color terminals. +" +" I based it on John Lam's initial Vibrant Ink port to Vim [1]. Thanks +" to a great tutorial [2], I was able to convert it to xterm 256 color +" mode. And of course, credits go to Justin Palmer for creating the +" original Vibrant Ink TextMate color scheme [3]. +" +" [1] http://www.iunknown.com/articles/2006/09/04/vim-can-save-your-hands-too +" [2] http://frexx.de/xterm-256-notes/ +" [3] http://encytemedia.com/blog/articles/2006/01/03/textmate-vibrant-ink-theme-and-prototype-bundle + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = "vibrantink" + +if has("gui_running") + highlight Normal guifg=White guibg=Black + highlight Cursor guifg=Black guibg=Yellow + highlight Keyword guifg=#FF6600 + highlight Define guifg=#FF6600 + highlight Comment guifg=#9933CC + highlight Type guifg=White gui=NONE + highlight rubySymbol guifg=#339999 gui=NONE + highlight Identifier guifg=White gui=NONE + highlight rubyStringDelimiter guifg=#66FF00 + highlight rubyInterpolation guifg=White + highlight rubyPseudoVariable guifg=#339999 + highlight Constant guifg=#FFEE98 + highlight Function guifg=#FFCC00 gui=NONE + highlight Include guifg=#FFCC00 gui=NONE + highlight Statement guifg=#FF6600 gui=NONE + highlight String guifg=#66FF00 + highlight Search guibg=White + highlight CursorLine guibg=#323300 +else + set t_Co=256 + highlight Normal ctermfg=White ctermbg=Black + highlight Cursor ctermfg=Black ctermbg=Yellow + highlight Keyword ctermfg=202 + highlight Define ctermfg=202 + highlight Comment ctermfg=98 + highlight Type ctermfg=White + highlight rubySymbol ctermfg=66 + highlight Identifier ctermfg=White + highlight rubyStringDelimiter ctermfg=82 + highlight rubyInterpolation ctermfg=White + highlight rubyPseudoVariable ctermfg=66 + highlight Constant ctermfg=228 + highlight Function ctermfg=220 + highlight Include ctermfg=220 + highlight Statement ctermfg=202 + highlight String ctermfg=82 + highlight Search ctermbg=White + highlight CursorLine cterm=NONE ctermbg=235 +endif diff --git a/colors/vividchalk.vim b/colors/vividchalk.vim new file mode 100755 index 0000000..44488b4 --- /dev/null +++ b/colors/vividchalk.vim @@ -0,0 +1,172 @@ +" Vim color scheme +" Name: vividchalk.vim +" Author: Tim Pope +" GetLatestVimScripts: 1891 1 :AutoInstall: vividchalk.vim +" $Id: vividchalk.vim,v 1.8 2007-07-11 18:50:16 tpope Exp $ + +" Based on the Vibrank Ink theme for TextMate +" Distributable under the same terms as Vim itself (see :help license) + +if has("gui_running") + set background=dark +endif +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "vividchalk" + +" First two functions adapted from inkpot.vim + +" map a urxvt cube number to an xterm-256 cube number +fun! s:M(a) + return strpart("0245", a:a, 1) + 0 +endfun + +" map a urxvt colour to an xterm-256 colour +fun! s:X(a) + if &t_Co == 88 + return a:a + else + if a:a == 8 + return 237 + elseif a:a < 16 + return a:a + elseif a:a > 79 + return 232 + (3 * (a:a - 80)) + else + let l:b = a:a - 16 + let l:x = l:b % 4 + let l:y = (l:b / 4) % 4 + let l:z = (l:b / 16) + return 16 + s:M(l:x) + (6 * s:M(l:y)) + (36 * s:M(l:z)) + endif + endif +endfun + +function! E2T(a) + return s:X(a:a) +endfunction + +function! s:choose(mediocre,good) + if &t_Co != 88 && &t_Co != 256 + return a:mediocre + else + return s:X(a:good) + endif +endfunction + +function! s:hifg(group,guifg,first,second,...) + if a:0 && &t_Co == 256 + let ctermfg = a:1 + else + let ctermfg = s:choose(a:first,a:second) + endif + exe "highlight ".a:group." guifg=".a:guifg." ctermfg=".ctermfg +endfunction + +function! s:hibg(group,guibg,first,second) + let ctermbg = s:choose(a:first,a:second) + exe "highlight ".a:group." guibg=".a:guibg." ctermbg=".ctermbg +endfunction + +hi link railsMethod PreProc +hi link rubyDefine Keyword +hi link rubySymbol Constant +hi link rubyAccess rubyMethod +hi link rubyAttribute rubyMethod +hi link rubyEval rubyMethod +hi link rubyException rubyMethod +hi link rubyInclude rubyMethod +hi link rubyStringDelimiter rubyString +hi link rubyRegexp Regexp +hi link rubyRegexpDelimiter rubyRegexp +"hi link rubyConstant Variable +"hi link rubyGlobalVariable Variable +"hi link rubyClassVariable Variable +"hi link rubyInstanceVariable Variable +hi link javascriptRegexpString Regexp +hi link javascriptNumber Number +hi link javascriptNull Constant + +call s:hifg("Normal","#EEEEEE","White",87) +if &background == "light" || has("gui_running") + hi Normal guibg=Black ctermbg=Black +else + hi Normal guibg=Black ctermbg=NONE +endif +highlight StatusLine guifg=Black guibg=#aabbee gui=bold ctermfg=Black ctermbg=White cterm=bold +highlight StatusLineNC guifg=#444444 guibg=#aaaaaa gui=none ctermfg=Black ctermbg=Grey cterm=none +"if &t_Co == 256 + "highlight StatusLine ctermbg=117 +"else + "highlight StatusLine ctermbg=43 +"endif +highlight WildMenu guifg=Black guibg=#ffff00 gui=bold ctermfg=Black ctermbg=Yellow cterm=bold +highlight Cursor guifg=Black guibg=White ctermfg=Black ctermbg=White +highlight CursorLine guibg=#333333 guifg=NONE +highlight CursorColumn guibg=#333333 guifg=NONE +highlight NonText guifg=#404040 ctermfg=8 +highlight SpecialKey guifg=#404040 ctermfg=8 +highlight Directory none +high link Directory Identifier +highlight ErrorMsg guibg=Red ctermbg=DarkRed guifg=NONE ctermfg=NONE +highlight Search guifg=NONE ctermfg=NONE gui=none cterm=none +call s:hibg("Search" ,"#555555","Black",81) +highlight IncSearch guifg=White guibg=Black ctermfg=White ctermbg=Black +highlight MoreMsg guifg=#00AA00 ctermfg=Green +highlight LineNr guifg=#DDEEFF ctermfg=White +call s:hibg("LineNr" ,"#222222","DarkBlue",80) +highlight Question none +high link Question MoreMsg +highlight Title guifg=Magenta ctermfg=Magenta +highlight VisualNOS gui=none cterm=none +call s:hibg("Visual" ,"#555577","LightBlue",83) +call s:hibg("VisualNOS" ,"#444444","DarkBlue",81) +highlight WarningMsg guifg=Red ctermfg=Red +highlight Folded guibg=#1100aa ctermbg=DarkBlue +call s:hibg("Folded" ,"#110077","DarkBlue",17) +call s:hifg("Folded" ,"#aaddee","LightCyan",63) +highlight FoldColumn none +high link FoldColumn Folded +highlight Pmenu guifg=White ctermfg=White gui=bold cterm=bold +highlight PmenuSel guifg=White ctermfg=White gui=bold cterm=bold +call s:hibg("Pmenu" ,"#000099","Blue",18) +call s:hibg("PmenuSel" ,"#5555ff","DarkCyan",39) +highlight PmenuSbar guibg=Grey ctermbg=Grey +highlight PmenuThumb guibg=White ctermbg=White +highlight TabLine gui=underline cterm=underline +call s:hifg("TabLine" ,"#bbbbbb","LightGrey",85) +call s:hibg("TabLine" ,"#333333","DarkGrey",80) +highlight TabLineSel guifg=White guibg=Black ctermfg=White ctermbg=Black +highlight TabLineFill gui=underline cterm=underline +call s:hifg("TabLineFill","#bbbbbb","LightGrey",85) +call s:hibg("TabLineFill","#808080","Grey",83) + +hi Type gui=none +hi Statement gui=none +if !has("gui_mac") + " Mac GUI degrades italics to ugly underlining. + hi Comment gui=italic + hi railsUserClass gui=italic + hi railsUserMethod gui=italic +endif +hi Identifier cterm=none +" Commented numbers at the end are *old* 256 color values +"highlight PreProc guifg=#EDF8F9 +call s:hifg("Comment" ,"#9933CC","DarkMagenta",34) " 92 +" 26 instead? +call s:hifg("Constant" ,"#339999","DarkCyan",21) " 30 +call s:hifg("rubyNumber" ,"#CCFF33","Yellow",60) " 190 +call s:hifg("String" ,"#66FF00","LightGreen",44,82) " 82 +call s:hifg("Identifier" ,"#FFCC00","Yellow",72) " 220 +call s:hifg("Statement" ,"#FF6600","Brown",68) " 202 +call s:hifg("PreProc" ,"#AAFFFF","LightCyan",47) " 213 +call s:hifg("railsUserMethod","#AACCFF","LightCyan",27) +call s:hifg("Type" ,"#AAAA77","Grey",57) " 101 +call s:hifg("railsUserClass" ,"#AAAAAA","Grey",7) " 101 +call s:hifg("Special" ,"#33AA00","DarkGreen",24) " 7 +call s:hifg("Regexp" ,"#44B4CC","DarkCyan",21) " 74 +call s:hifg("rubyMethod" ,"#DDE93D","Yellow",77) " 191 +"highlight railsMethod guifg=#EE1122 ctermfg=1 diff --git a/colors/vylight.vim b/colors/vylight.vim new file mode 100755 index 0000000..156adf3 --- /dev/null +++ b/colors/vylight.vim @@ -0,0 +1,81 @@ +" +" Vim colour file +" +" Maintainer: Vy-Shane Sin Fat +" Last Change: 20 November 2009 +" Version: 1.1 +" +" This colour file is meant for GUI use. +" + +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="vylight" + + +hi Normal guifg=#1a1a1a guibg=white +hi Title guifg=black guibg=white +hi Cursor guibg=#111111 +hi LineNr guifg=#aaaaaa guibg=#f8f8f8 +hi Visual guibg=#bbddff +hi NonText guifg=#cccccc guibg=#fafafa +hi StatusLine guifg=#222222 guibg=#eeeeee gui=none +hi StatusLineNC guifg=#666666 guibg=#eeeeee gui=none +hi VertSplit guifg=#eeeeee guibg=#eeeeee gui=none +hi ModeMsg guifg=#007050 guibg=#eeeeee gui=none +hi ErrorMsg guifg=#f03050 guibg=#eeeeee gui=none +hi Error guifg=#bb3355 guibg=white gui=none + + +" Vim 7.x specific +if version >= 700 + hi CursorLine guibg=#eeeeee gui=none + hi MatchParen guibg=#ccffdd gui=none + hi Pmenu guifg=#60656f guibg=#f0f5ff gui=none + hi PmenuSel guifg=white guibg=#3585ef gui=bold + hi PmenuSbar guifg=#d0d5dd guibg=#e0e5ee gui=bold + hi PmenuThumb guifg=#e0e5ee guibg=#c0c5dd gui=bold + hi Search guibg=#fcfcaa gui=none + hi IncSearch guibg=#ffff33 gui=bold +endif + + +" Syntax highlighting +hi Comment guifg=#668866 gui=none +"hi Todo guifg=#225522 guibg=white gui=italic +hi Todo guifg=#446644 guibg=#ddeecc gui=italic +hi Operator guifg=#1a1a1a gui=none +hi Identifier guifg=#1a1a1a gui=none +hi Statement guifg=#0050b0 gui=none +hi Type guifg=#0050b0 gui=none +hi Constant guifg=#204070 gui=none +hi Conditional guifg=#006040 gui=none +hi Delimiter guifg=#1a1a1a gui=none +hi PreProc guifg=#007050 gui=none +hi Special guifg=#a05050 gui=none +hi Keyword guifg=#007050 gui=none + +hi link Function Normal +hi link Character Constant +hi link String Constant +hi link Boolean Constant +hi link Number Constant +hi link Float Number +hi link Repeat Conditional +hi link Label Statement +hi link Exception Statement +hi link Include PreProc +hi link Define PreProc +hi link Macro PreProc +hi link PreCondit PreProc +hi link StorageClass Type +hi link Structure Type +hi link Typedef Type +hi link Tag Special +hi link SpecialChar Special +hi link SpecialComment Special +hi link Debug Special + diff --git a/colors/winter.vim b/colors/winter.vim new file mode 100755 index 0000000..4212187 --- /dev/null +++ b/colors/winter.vim @@ -0,0 +1,87 @@ + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" " +" File_Name__: winter.vim " +" Abstract___: A color sheme file (only for GVIM) which uses a light grey " +" background makes the VIM look like the scenes of winter. " +" Author_____: CHE Wenlong " +" Version____: 1.3 " +" Last_Change: February 26, 2009 " +" " +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +" Preprocess {{{ + +if !has("gui_running") + runtime! colors/default.vim + finish +endif + +set background=light + +hi clear + +if version > 580 + hi clear + if exists("syntax_on") + syntax reset + endif +endif + +let colors_name = "winter" + +" }}} + +" Common {{{ + +hi Normal guifg=#000000 guibg=#D4D0C8 gui=NONE +hi Visual guifg=#FFFFFF guibg=#000080 gui=NONE +hi Cursor guifg=#D4D0C8 guibg=#FF0000 gui=NONE +hi LineNr guifg=#707070 guibg=NONE gui=NONE +hi Title guifg=#202020 guibg=NONE gui=NONE +hi Underlined guifg=#202020 guibg=NONE gui=UNDERLINE + +" }}} + +" Split {{{ + +hi StatusLine guifg=#E0E0E0 guibg=#707070 gui=NONE +hi StatusLineNC guifg=#E0E0E0 guibg=#909090 gui=NONE +hi VertSplit guifg=#909090 guibg=#909090 gui=NONE + +" }}} + +" Folder {{{ + +hi Folded guifg=#707070 guibg=#E0E0E0 gui=NONE + +" }}} + +" Syntax {{{ + +hi Type guifg=#0000FF guibg=NONE gui=NONE +hi Define guifg=#0000FF guibg=NONE gui=NONE +hi Comment guifg=#008000 guibg=NONE gui=NONE +hi Constant guifg=#A000A0 guibg=NONE gui=NONE +hi String guifg=#008080 guibg=NONE gui=NONE +hi Number guifg=#FF0000 guibg=NONE gui=NONE +hi Statement guifg=#0000FF guibg=NONE gui=NONE + +" }}} + +" Others {{{ + +hi PreProc guifg=#A000A0 guibg=NONE gui=NONE +hi Special guifg=#A000A0 guibg=NONE gui=NONE +hi SpecialKey guifg=#707070 guibg=#E0E0E0 gui=NONE +hi Error guifg=#FF0000 guibg=#FFFFFF gui=UNDERLINE +hi Todo guifg=#FF0000 guibg=#FFFF00 gui=UNDERLINE + +" }}} + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" " +" vim:foldmethod=marker:tabstop=4 +" " +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + diff --git a/colors/wombat.vim b/colors/wombat.vim new file mode 100755 index 0000000..9ad1e56 --- /dev/null +++ b/colors/wombat.vim @@ -0,0 +1,51 @@ +" Maintainer: Lars H. Nielsen (dengmao@gmail.com) +" Last Change: January 22 2007 + +set background=dark + +hi clear + +if exists("syntax_on") + syntax reset +endif + +let colors_name = "wombat" + + +" Vim >= 7.0 specific colors +if version >= 700 + hi CursorLine guibg=#2d2d2d + hi CursorColumn guibg=#2d2d2d + hi MatchParen guifg=#f6f3e8 guibg=#857b6f gui=bold + hi Pmenu guifg=#f6f3e8 guibg=#444444 + hi PmenuSel guifg=#000000 guibg=#cae682 +endif + +" General colors +hi Cursor guifg=NONE guibg=#656565 gui=none +hi Normal guifg=#f6f3e8 guibg=#242424 gui=none +hi NonText guifg=#808080 guibg=#303030 gui=none +hi LineNr guifg=#857b6f guibg=#000000 gui=none +hi StatusLine guifg=#f6f3e8 guibg=#444444 gui=italic +hi StatusLineNC guifg=#857b6f guibg=#444444 gui=none +hi VertSplit guifg=#444444 guibg=#444444 gui=none +hi Folded guibg=#384048 guifg=#a0a8b0 gui=none +hi Title guifg=#f6f3e8 guibg=NONE gui=bold +hi Visual guifg=#f6f3e8 guibg=#444444 gui=none +hi SpecialKey guifg=#808080 guibg=#343434 gui=none + +" Syntax highlighting +hi Comment guifg=#99968b gui=italic +hi Todo guifg=#8f8f8f gui=italic +hi Constant guifg=#e5786d gui=none +hi String guifg=#95e454 gui=italic +hi Identifier guifg=#cae682 gui=none +hi Function guifg=#cae682 gui=none +hi Type guifg=#cae682 gui=none +hi Statement guifg=#8ac6f2 gui=none +hi Keyword guifg=#8ac6f2 gui=none +hi PreProc guifg=#e5786d gui=none +hi Number guifg=#e5786d gui=none +hi Special guifg=#e7f6da gui=none + + diff --git a/colors/wombat256.vim b/colors/wombat256.vim new file mode 100755 index 0000000..73be6db --- /dev/null +++ b/colors/wombat256.vim @@ -0,0 +1,302 @@ +" Vim color file +" Maintainer: David Liang (bmdavll at gmail dot com) +" Last Change: November 28 2008 +" +" wombat256.vim - a modified version of Wombat by Lars Nielsen that also +" works on xterms with 88 or 256 colors. The algorithm for approximating the +" GUI colors with the xterm palette is from desert256.vim by Henry So Jr. + +set background=dark + +if version > 580 + hi clear + if exists("syntax_on") + syntax reset + endif +endif + +let g:colors_name = "wombat256" + +if !has("gui_running") && &t_Co != 88 && &t_Co != 256 + finish +endif + +" functions {{{ +" 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_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 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 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 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 color(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 color + 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_color(l:gx) + else + " use the color + return rgb_color(l:x, l:y, l:z) + endif + else + " only one possibility + return rgb_color(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 color(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 != "" + if a:attr == 'italic' + exec "hi ".a:group." gui=".a:attr." cterm=none" + else + exec "hi ".a:group." gui=".a:attr." cterm=".a:attr + endif + endif +endfun +" }}} + +call X("Normal", "cccccc", "242424", "none") +call X("Cursor", "222222", "ecee90", "none") +call X("CursorLine", "", "32322e", "none") +call X("CursorColumn", "", "2d2d2d", "") + "CursorIM + "Question + "IncSearch +call X("Search", "444444", "af87d7", "") +call X("MatchParen", "ecee90", "857b6f", "bold") +call X("SpecialKey", "6c6c6c", "2d2d2d", "none") +call X("Visual", "ecee90", "597418", "none") +call X("LineNr", "857b6f", "121212", "none") +call X("Folded", "a0a8b0", "404048", "none") +call X("Title", "f6f3e8", "", "bold") +call X("VertSplit", "444444", "444444", "none") +call X("StatusLine", "f6f3e8", "444444", "italic") +call X("StatusLineNC", "857b6f", "444444", "none") + "Scrollbar + "Tooltip + "Menu + "WildMenu +call X("Pmenu", "f6f3e8", "444444", "") +call X("PmenuSel", "121212", "caeb82", "") +call X("WarningMsg", "ff0000", "", "") + "ErrorMsg + "ModeMsg + "MoreMsg + "Directory + "DiffAdd + "DiffChange + "DiffDelete + "DiffText + +" syntax highlighting +call X("Number", "e5786d", "", "none") +call X("Constant", "e5786d", "", "none") +call X("String", "95e454", "", "italic") +call X("Comment", "c0bc6c", "", "italic") +call X("Identifier", "caeb82", "", "none") +call X("Keyword", "87afff", "", "none") +call X("Statement", "87afff", "", "none") +call X("Function", "caeb82", "", "none") +call X("PreProc", "e5786d", "", "none") +call X("Type", "caeb82", "", "none") +call X("Special", "ffdead", "", "none") +call X("Todo", "857b6f", "", "italic") + "Underlined + "Error + "Ignore + +hi! link VisualNOS Visual +hi! link NonText LineNr +hi! link FoldColumn Folded + +" delete functions {{{ +delf X +delf rgb +delf color +delf rgb_color +delf rgb_level +delf rgb_number +delf grey_color +delf grey_level +delf grey_number +" }}} + +" vim:set ts=4 sw=4 noet fdm=marker: diff --git a/colors/wood.vim b/colors/wood.vim new file mode 100755 index 0000000..2f6059e --- /dev/null +++ b/colors/wood.vim @@ -0,0 +1,39 @@ +" Vim color file +" Maintainer: freddydaoud@netscape.net +" Last Change: 09 Apr 2005 + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="wood" + +hi Normal guibg=#81816A guifg=linen +hi Cursor guibg=#CFCFC6 guifg=black gui=bold +hi VertSplit guifg=#81816A guibg=#CCCCAA gui=none +hi Folded guibg=black guifg=white +hi FoldColumn guibg=lightgray guifg=#292926 +hi ModeMsg guifg=black guibg=#CFCFC6 +hi MoreMsg guifg=black guibg=#CFCFC6 +hi NonText guifg=white guibg=#61614A gui=none +hi Question guifg=snow +hi Search guibg=#CFCFC6 guifg=black gui=bold +hi SpecialKey guifg=yellow +hi StatusLine guibg=#DFDFD6 guifg=black gui=none +hi StatusLineNC guibg=#BFBFB6 guifg=black gui=none +hi Title guifg=bisque3 +hi Subtitle guifg=black +hi Visual guifg=#292926 guibg=#CFCFC6 gui=none +hi WarningMsg guifg=salmon4 guibg=gray60 gui=bold +hi Comment guifg=#D1D1BA +hi Constant guifg=#FFFFCC gui=bold +hi Identifier guifg=#FFFFCC +hi Statement guifg=#000000 +hi PreProc guifg=black gui=bold +hi Type guifg=#FFE0C0 +hi Special guifg=navajowhite +hi Ignore guifg=grey29 +hi Todo guibg=black guifg=white +hi WildMenu guibg=brown +hi LineNr guifg=#CCCCAA guibg=#61614A diff --git a/colors/wuye.vim b/colors/wuye.vim new file mode 100755 index 0000000..88a6126 --- /dev/null +++ b/colors/wuye.vim @@ -0,0 +1,82 @@ +" Vim color file +" Name: WuYe +" Maintainer: Yeii +" Last Change: 2009-08-12 +" Version: 1.2.1 +" URL: http://www.vim.org/scripts/script.php?script_id=2088 + +" Init +highlight clear +set background=dark +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "wuye" + +""""""""\ Highlighting groups for various occasions \"""""""" +hi SpecialKey guifg=SlateBlue ctermfg=Blue +hi NonText guifg=MidnightBlue ctermfg=DarkBlue +hi Directory gui=BOLD guifg=LightSeaGreen ctermfg=DarkCyan +hi ErrorMsg guifg=Yellow guibg=Firebrick ctermfg=Yellow ctermbg=DarkRed +hi IncSearch gui=BOLD guifg=Red cterm=BOLD ctermfg=Red +hi Search gui=BOLD guifg=MintCream guibg=Red cterm=BOLD ctermfg=White ctermbg=Red +hi MoreMsg gui=BOLD guifg=MediumSpringGreen cterm=BOLD ctermfg=DarkCyan +hi ModeMsg guifg=LawnGreen guibg=DeepSkyBlue4 ctermfg=Yellow ctermbg=DarkCyan +hi LineNr gui=UNDERLINE guifg=LightSkyBlue3 guibg=Gray10 cterm=UNDERLINE ctermfg=DarkGray +hi Question gui=BOLD guifg=green cterm=BOLD ctermfg=green +hi StatusLine gui=BOLD guifg=White guibg=RoyalBlue4 cterm=BOLD ctermfg=White ctermbg=DarkBlue +hi StatusLineNC gui=BOLD guifg=Bisque guibg=DimGray cterm=BOLD ctermfg=Black ctermbg=Gray +hi VertSplit gui=BOLD guifg=Bisque guibg=DimGray cterm=BOLD ctermfg=Black ctermbg=Gray +hi Title gui=BOLD guifg=DodgerBlue cterm=BOLD ctermfg=LightBlue +hi Visual gui=REVERSE guibg=Yellow guifg=SlateBlue4 cterm=REVERSE ctermbg=Yellow ctermfg=DarkBlue +hi WarningMsg guifg=Gold ctermfg=Yellow +hi WildMenu gui=BOLD guifg=Black guibg=Chartreuse cterm=BOLD ctermfg=Black ctermbg=Darkgreen +hi Folded guifg=LightCyan guibg=DodgerBlue4 ctermfg=White ctermbg=DarkBlue +hi FoldColumn gui=BOLD guifg=DodgerBlue guibg=Gray16 cterm=BOLD ctermfg=Blue ctermbg=DarkGray +hi DiffAdd guifg=White guibg=Turquoise4 ctermfg=White ctermbg=Darkcyan +hi DiffChange guifg=White guibg=ForestGreen ctermbg=Darkgreen +hi DiffDelete guifg=HotPink4 guibg=SlateGray4 ctermfg=DarkMagenta ctermbg=DarkGray +hi DiffText gui=BOLD guifg=Tomato guibg=DarkBlue cterm=BOLD ctermfg=Magenta ctermbg=DarkBlue +hi Cursor guifg=Black guibg=Green ctermfg=Black ctermbg=Green +hi CursorIM guifg=Black guibg=Red ctermfg=Black ctermbg=Red +hi CursorLine gui=BOLD guibg=Black +hi CursorColumn gui=BOLD guibg=Black + +""""""\ Syntax highlighting groups \"""""" +hi Normal gui=NONE guifg=GhostWhite guibg=Gray8 cterm=NONE ctermfg=LightGray ctermbg=NONE +hi MatchParen gui=BOLD guifg=Gold cterm=BOLD ctermfg=Yellow +hi Comment guifg=LightSlateGray ctermfg=DarkGray +hi Constant guifg=CornflowerBlue ctermfg=DarkCyan + hi String guifg=SteelBlue1 ctermfg=DarkCyan + hi Character guifg=SteelBlue ctermfg=DarkCyan + hi Number guifg=Turquoise ctermfg=DarkCyan + hi Boolean gui=BOLD guifg=DarkTurquoise cterm=BOLD ctermfg=DarkCyan + hi Float guifg=Turquoise ctermfg=DarkCyan +hi Identifier guifg=DeepSkyBlue ctermfg=lightcyan + hi Function gui=BOLD guifg=DeepSkyBlue cterm=BOLD ctermfg=lightcyan +hi Statement guifg=SpringGreen ctermfg=LightGreen + hi Conditional guifg=SeaGreen1 ctermfg=LightGreen + hi Repeat guifg=SpringGreen ctermfg=LightGreen + hi Label guifg=MediumSpringGreen ctermfg=LightGreen + hi Operator guifg=Green2 ctermfg=LightGreen + hi Keyword gui=BOLD guifg=SpringGreen cterm=BOLD ctermfg=LightGreen + hi Exception gui=BOLD guifg=SpringGreen2 cterm=BOLD ctermfg=LightGreen +hi PreProc guifg=Purple ctermfg=DarkMagenta + hi Include guifg=Purple2 ctermfg=DarkMagenta + hi Define guifg=BlueViolet ctermfg=DarkMagenta + hi Macro guifg=DarkViolet ctermfg=DarkMagenta + hi PreCondit guifg=DarkOrchid ctermfg=DarkMagenta +hi Type gui=BOLD guifg=RoyalBlue cterm=BOLD ctermfg=LightBlue + hi StorageClass gui=BOLD guifg=RoyalBlue2 cterm=BOLD ctermfg=LightBlue + hi Structure gui=BOLD guifg=DodgerBlue3 cterm=BOLD ctermfg=LightBlue + hi Typedef gui=BOLD guifg=RoyalBlue1 cterm=BOLD ctermfg=LightBlue +hi Special guifg=BurlyWood ctermfg=DarkYellow + hi Tag guifg=Moccasin ctermfg=DarkYellow + hi Specialchar guifg=Tan ctermfg=DarkYellow + hi Delimiter guifg=Wheat3 ctermfg=DarkYellow + hi Debug guifg=peru ctermfg=DarkYellow +hi Underlined gui=UNDERLINE cterm=UNDERLINE +hi Ignore guifg=Gray75 ctermfg=DarkGray +hi Error guifg=Khaki guibg=VioletRed ctermfg=Yellow ctermbg=LightMagenta +hi Todo guifg=Yellow guibg=NavyBlue ctermfg=Yellow ctermbg=DarkBlue + diff --git a/colors/xemacs.vim b/colors/xemacs.vim new file mode 100755 index 0000000..fcd8761 --- /dev/null +++ b/colors/xemacs.vim @@ -0,0 +1,46 @@ + +" Vim color file +" Maintainer: tranquility@portugalmail.pt +" Last Change: 5 June 2002 + + +" cool help screens +" :he group-name +" :he highlight-groups +" :he cterm-colors + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="xemacs" + +hi Normal guibg=#cdcecd guifg=black +hi Cursor guibg=red guifg=grey gui=bold +hi VertSplit guibg=grey60 guifg=black gui=none +hi Folded guibg=royalblue3 guifg=white +hi FoldColumn guibg=royalblue4 guifg=white +hi ModeMsg guifg=#cdcecd guibg=black +hi MoreMsg guifg=#cdcecd guibg=black +hi NonText guifg=black guibg=#cdcecd gui=none +hi Question guifg=black +hi Search guibg=#aceeee +hi SpecialKey guifg=navyblue +hi Special guifg=navyblue +hi StatusLine guibg=#b7b7b7 guifg=black gui=none +hi StatusLineNC guibg=#a6b7b7 guifg=black gui=none +hi Title guifg=bisque3 +hi Subtitle guifg=black +hi Visual guibg=#a4a5a3 guifg=black gui=none +hi WarningMsg guibg=#cdcecd guifg=black gui=bold +hi Comment guifg=#00008b +hi Constant guifg=#008900 +hi Identifier guibg=#cdcecd guifg=black +hi Statement guifg=royalblue4 +hi PreProc guifg=#0000cd +hi Type guifg=#4a81b4 gui=NONE +hi Ignore guifg=grey29 +hi Todo guibg=gold guifg=black +hi WildMenu guibg=#b7b7b7 guibg=grey91 +hi Directory guibg=#cdcecd guifg=navyblue diff --git a/colors/xoria256.vim b/colors/xoria256.vim new file mode 100755 index 0000000..bb7c3be --- /dev/null +++ b/colors/xoria256.vim @@ -0,0 +1,94 @@ +" Vim color file +" +" Name: xoria256.vim +" Version: 1.1 +" Maintainer: Dmitriy Y. Zotikov (xio) +" +" Should work in recent 256 color terminals. 88-color terms like urxvt are +" unsupported. +" +" Don't forget to install 'ncurses-term' and set TERM to xterm-256color or +" similar value. +" +" Color numbers (0-255) see: +" http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html + + + +" Bla-bla ---------------------------------------------------------------------- + +if &t_Co != 256 && ! has("gui_running") + echomsg "" + echomsg "err: please use GUI or a 256-color terminal (so that t_Co=256 could be set)" + echomsg "" + finish +endif + +set background=dark + +hi clear + +if exists("syntax_on") + syntax reset +endif + +let colors_name = "xoria256" + + + +" The real part ---------------------------------------------------------------- + +"" General colors +hi Normal ctermfg=252 guifg=#d0d0d0 ctermbg=234 guibg=#1c1c1c cterm=none gui=none +hi CursorColumn ctermbg=238 guibg=#444444 +hi Cursor ctermbg=214 guibg=#ffaf00 +hi CursorLine ctermbg=238 guibg=#444444 +hi FoldColumn ctermfg=248 guifg=#a8a8a8 ctermbg=bg guibg=bg +hi Folded ctermfg=255 guifg=#eeeeee ctermbg=60 guibg=#5f5f87 +hi IncSearch ctermfg=0 guifg=#000000 ctermbg=223 guibg=#ffdfaf cterm=none gui=none +hi NonText ctermfg=248 guifg=#a8a8a8 cterm=bold gui=bold +hi Pmenu ctermfg=0 guifg=#000000 ctermbg=246 guibg=#949494 +hi PmenuSbar ctermbg=243 guibg=#767676 +hi PmenuSel ctermfg=0 guifg=#000000 ctermbg=243 guibg=#767676 +hi PmenuThumb ctermbg=252 guibg=#d0d0d0 +hi Search ctermfg=0 guifg=#000000 ctermbg=149 guibg=#afdf5f +hi SignColumn ctermfg=248 guifg=#a8a8a8 +hi SpecialKey ctermfg=77 guifg=#5fdf5f +hi StatusLine ctermbg=239 guibg=#4e4e4e cterm=bold gui=bold +hi StatusLineNC ctermbg=237 guibg=#3a3a3a cterm=none gui=none +hi TabLine ctermfg=fg guifg=fg ctermbg=242 guibg=#666666 cterm=underline gui=underline +hi TabLineFill ctermfg=fg guifg=fg ctermbg=242 guibg=#666666 cterm=underline gui=underline +hi VertSplit ctermfg=237 guifg=#3a3a3a ctermbg=237 guibg=#3a3a3a cterm=none gui=none +hi Visual ctermfg=24 guifg=#005f87 ctermbg=153 guibg=#afdfff +hi VIsualNOS ctermfg=24 guifg=#005f87 ctermbg=153 guibg=#afdfff cterm=none gui=none +hi WildMenu ctermfg=0 guifg=#000000 ctermbg=184 guibg=#dfdf00 cterm=bold gui=bold + +"" Syntax highlighting +hi Comment ctermfg=244 guifg=#808080 +hi Constant ctermfg=229 guifg=#ffffaf +hi Error ctermfg=15 guifg=#ffffff ctermbg=1 guibg=#800000 +hi ErrorMsg ctermfg=15 guifg=#ffffff ctermbg=1 guibg=#800000 +hi Identifier ctermfg=182 guifg=#dfafdf cterm=none +hi Ignore ctermfg=238 guifg=#444444 +hi LineNr ctermfg=248 guifg=#a8a8a8 +hi MatchParen ctermfg=188 guifg=#dfdfdf ctermbg=68 guibg=#5f87df cterm=bold gui=bold +hi Number ctermfg=180 guifg=#dfaf87 +hi PreProc ctermfg=150 guifg=#afdf87 +hi Special ctermfg=174 guifg=#df8787 +hi Statement ctermfg=110 guifg=#87afdf cterm=none gui=none +hi Todo ctermfg=0 guifg=#000000 ctermbg=184 guibg=#dfdf00 +hi Type ctermfg=146 guifg=#afafdf cterm=none gui=none +hi Underlined ctermfg=39 guifg=#00afff cterm=underline gui=underline + +"" Special +""" .diff +hi diffAdded ctermfg=150 guifg=#afdf87 +hi diffRemoved ctermfg=174 guifg=#df8787 +""" vimdiff +hi diffAdd ctermfg=bg guifg=bg ctermbg=151 guibg=#afdfaf +"hi diffDelete ctermfg=bg guifg=bg ctermbg=186 guibg=#dfdf87 cterm=none gui=none +hi diffDelete ctermfg=bg guifg=bg ctermbg=246 guibg=#949494 cterm=none gui=none +hi diffChange ctermfg=bg guifg=bg ctermbg=181 guibg=#dfafaf +hi diffText ctermfg=bg guifg=bg ctermbg=174 guibg=#df8787 cterm=none gui=none + +" vim: set expandtab tabstop=2 shiftwidth=2 smarttab softtabstop=2: diff --git a/colors/zenburn.vim b/colors/zenburn.vim new file mode 100755 index 0000000..edbd6d7 --- /dev/null +++ b/colors/zenburn.vim @@ -0,0 +1,351 @@ +" Vim color file +" Maintainer: Jani Nurminen +" Last Change: $Id: zenburn.vim,v 2.13 2009/10/24 10:16:01 slinky Exp $ +" URL: http://slinky.imukuppi.org/zenburnpage/ +" License: GPL +" +" Nothing too fancy, just some alien fruit salad to keep you in the zone. +" This syntax file was designed to be used with dark environments and +" low light situations. Of course, if it works during a daybright office, go +" ahead :) +" +" Owes heavily to other Vim color files! With special mentions +" to "BlackDust", "Camo" and "Desert". +" +" To install, copy to ~/.vim/colors directory. +" +" Alternatively, you can use Vimball installation: +" vim zenburn.vba +" :so % +" :q +" +" For details, see :help vimball +" +" After installation, use it with :colorscheme zenburn. +" See also :help syntax +" +" Credits: +" - Jani Nurminen - original Zenburn +" - Steve Hall & Cream posse - higher-contrast Visual selection +" - Kurt Maier - 256 color console coloring, low and high contrast toggle, +" bug fixing +" - Charlie - spotted too bright StatusLine in non-high contrast mode +" - Pablo Castellazzi - CursorLine fix for 256 color mode +" - Tim Smith - force dark background +" - John Gabriele - spotted bad Ignore-group handling +" - Zac Thompson - spotted invisible NonText in low contrast mode +" - Christophe-Marie Duquesne - suggested making a Vimball +" +" CONFIGURABLE PARAMETERS: +" +" You can use the default (don't set any parameters), or you can +" set some parameters to tweak the Zenburn colours. +" +" To use them, put them into your .vimrc file before loading the color scheme, +" example: +" let g:zenburn_high_Contrast=1 +" colors zenburn +" +" * You can now set a darker background for bright environments. To activate, use: +" contrast Zenburn, use: +" +" let g:zenburn_high_Contrast = 1 +" +" * For example, Vim help files uses the Ignore-group for the pipes in tags +" like "|somelink.txt|". By default, the pipes are not visible, as they +" map to Ignore group. If you wish to enable coloring of the Ignore group, +" set the following parameter to 1. Warning, it might make some syntax files +" look strange. +" +" let g:zenburn_color_also_Ignore = 1 +" +" * To get more contrast to the Visual selection, use +" +" let g:zenburn_alternate_Visual = 1 +" +" * To use alternate colouring for Error message, use +" +" let g:zenburn_alternate_Error = 1 +" +" * The new default for Include is a duller orange. To use the original +" colouring for Include, use +" +" let g:zenburn_alternate_Include = 1 +" +" * Work-around to a Vim bug, it seems to misinterpret ctermfg and 234 and 237 +" as light values, and sets background to light for some people. If you have +" this problem, use: +" +" let g:zenburn_force_dark_Background = 1 +" +" NOTE: +" +" * To turn the parameter(s) back to defaults, use UNLET: +" +" unlet g:zenburn_alternate_Include +" +" Setting to 0 won't work! +" +" That's it, enjoy! +" +" TODO +" - Visual alternate color is broken? Try GVim >= 7.0.66 if you have trouble +" - IME colouring (CursorIM) + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name="zenburn" + +hi Boolean guifg=#dca3a3 +hi Character guifg=#dca3a3 gui=bold +hi Comment guifg=#7f9f7f gui=italic +hi Conditional guifg=#f0dfaf gui=bold +hi Constant guifg=#dca3a3 gui=bold +hi Cursor guifg=#000d18 guibg=#8faf9f gui=bold +hi Debug guifg=#bca3a3 gui=bold +hi Define guifg=#ffcfaf gui=bold +hi Delimiter guifg=#8f8f8f +hi DiffAdd guifg=#709080 guibg=#313c36 gui=bold +hi DiffChange guibg=#333333 +hi DiffDelete guifg=#333333 guibg=#464646 +hi DiffText guifg=#ecbcbc guibg=#41363c gui=bold +hi Directory guifg=#dcdccc gui=bold +hi ErrorMsg guifg=#80d4aa guibg=#2f2f2f gui=bold +hi Exception guifg=#c3bf9f gui=bold +hi Float guifg=#c0bed1 +hi FoldColumn guifg=#93b3a3 guibg=#3f4040 +hi Folded guifg=#93b3a3 guibg=#3f4040 +hi Function guifg=#efef8f +hi Identifier guifg=#efdcbc +hi IncSearch guibg=#f8f893 guifg=#385f38 +hi Keyword guifg=#f0dfaf gui=bold +hi Label guifg=#dfcfaf gui=underline +hi LineNr guifg=#9fafaf guibg=#262626 +hi Macro guifg=#ffcfaf gui=bold +hi ModeMsg guifg=#ffcfaf gui=none +hi MoreMsg guifg=#ffffff gui=bold +hi Number guifg=#8cd0d3 +hi Operator guifg=#f0efd0 +hi PreCondit guifg=#dfaf8f gui=bold +hi PreProc guifg=#ffcfaf gui=bold +hi Question guifg=#ffffff gui=bold +hi Repeat guifg=#ffd7a7 gui=bold +hi Search guifg=#ffffe0 guibg=#284f28 +hi SpecialChar guifg=#dca3a3 gui=bold +hi SpecialComment guifg=#82a282 gui=bold +hi Special guifg=#cfbfaf +hi SpecialKey guifg=#9ece9e +hi Statement guifg=#e3ceab gui=none +hi StatusLine guifg=#313633 guibg=#ccdc90 +hi StatusLineNC guifg=#2e3330 guibg=#88b090 +hi StorageClass guifg=#c3bf9f gui=bold +hi String guifg=#cc9393 +hi Structure guifg=#efefaf gui=bold +hi Tag guifg=#e89393 gui=bold +hi Title guifg=#efefef gui=bold +hi Todo guifg=#dfdfdf guibg=bg gui=bold +hi Typedef guifg=#dfe4cf gui=bold +hi Type guifg=#dfdfbf gui=bold +hi Underlined guifg=#dcdccc gui=underline +hi VertSplit guifg=#2e3330 guibg=#688060 +hi VisualNOS guifg=#333333 guibg=#f18c96 gui=bold,underline +hi WarningMsg guifg=#ffffff guibg=#333333 gui=bold +hi WildMenu guibg=#2c302d guifg=#cbecd0 gui=underline + +hi SpellBad guisp=#bc6c4c guifg=#dc8c6c +hi SpellCap guisp=#6c6c9c guifg=#8c8cbc +hi SpellRare guisp=#bc6c9c guifg=#bc8cbc +hi SpellLocal guisp=#7cac7c guifg=#9ccc9c + +" Entering Kurt zone +if &t_Co > 255 + hi Boolean ctermfg=181 + hi Character ctermfg=181 cterm=bold + hi Comment ctermfg=108 + hi Conditional ctermfg=223 cterm=bold + hi Constant ctermfg=181 cterm=bold + hi Cursor ctermfg=233 ctermbg=109 cterm=bold + hi Debug ctermfg=181 cterm=bold + hi Define ctermfg=223 cterm=bold + hi Delimiter ctermfg=245 + hi DiffAdd ctermfg=66 ctermbg=237 cterm=bold + hi DiffChange ctermbg=236 + hi DiffDelete ctermfg=236 ctermbg=238 + hi DiffText ctermfg=217 ctermbg=237 cterm=bold + hi Directory ctermfg=188 cterm=bold + hi ErrorMsg ctermfg=115 ctermbg=236 cterm=bold + hi Exception ctermfg=249 cterm=bold + hi Float ctermfg=251 + hi FoldColumn ctermfg=109 ctermbg=238 + hi Folded ctermfg=109 ctermbg=238 + hi Function ctermfg=228 + hi Identifier ctermfg=223 + hi IncSearch ctermbg=228 ctermfg=238 + hi Keyword ctermfg=223 cterm=bold + hi Label ctermfg=187 cterm=underline + hi LineNr ctermfg=248 ctermbg=235 + hi Macro ctermfg=223 cterm=bold + hi ModeMsg ctermfg=223 cterm=none + hi MoreMsg ctermfg=15 cterm=bold + hi Number ctermfg=116 + hi Operator ctermfg=230 + hi PreCondit ctermfg=180 cterm=bold + hi PreProc ctermfg=223 cterm=bold + hi Question ctermfg=15 cterm=bold + hi Repeat ctermfg=223 cterm=bold + hi Search ctermfg=230 ctermbg=236 + hi SpecialChar ctermfg=181 cterm=bold + hi SpecialComment ctermfg=108 cterm=bold + hi Special ctermfg=181 + hi SpecialKey ctermfg=151 + hi Statement ctermfg=187 ctermbg=234 cterm=none + hi StatusLine ctermfg=236 ctermbg=186 + hi StatusLineNC ctermfg=235 ctermbg=108 + hi StorageClass ctermfg=249 cterm=bold + hi String ctermfg=174 + hi Structure ctermfg=229 cterm=bold + hi Tag ctermfg=181 cterm=bold + hi Title ctermfg=7 ctermbg=234 cterm=bold + hi Todo ctermfg=108 ctermbg=234 cterm=bold + hi Typedef ctermfg=253 cterm=bold + hi Type ctermfg=187 cterm=bold + hi Underlined ctermfg=188 ctermbg=234 cterm=bold + hi VertSplit ctermfg=236 ctermbg=65 + hi VisualNOS ctermfg=236 ctermbg=210 cterm=bold + hi WarningMsg ctermfg=15 ctermbg=236 cterm=bold + hi WildMenu ctermbg=236 ctermfg=194 cterm=bold + hi CursorLine ctermbg=236 cterm=none + + " spellchecking, always "bright" background + hi SpellLocal ctermfg=14 ctermbg=237 + hi SpellBad ctermfg=9 ctermbg=237 + hi SpellCap ctermfg=12 ctermbg=237 + hi SpellRare ctermfg=13 ctermbg=237 + + " pmenu + hi PMenu ctermfg=248 ctermbg=0 + hi PMenuSel ctermfg=223 ctermbg=235 + + if exists("g:zenburn_high_Contrast") + hi Normal ctermfg=188 ctermbg=234 + hi NonText ctermfg=238 + + if exists("g:zenburn_color_also_Ignore") + hi Ignore ctermfg=238 + endif + else + hi Normal ctermfg=188 ctermbg=237 + hi Cursor ctermbg=109 + hi diffadd ctermbg=237 + hi diffdelete ctermbg=238 + hi difftext ctermbg=237 + hi errormsg ctermbg=237 + hi foldcolumn ctermbg=238 + hi folded ctermbg=238 + hi incsearch ctermbg=228 + hi linenr ctermbg=238 + hi search ctermbg=238 + hi statement ctermbg=237 + hi statusline ctermbg=144 + hi statuslinenc ctermbg=108 + hi title ctermbg=237 + hi todo ctermbg=237 + hi underlined ctermbg=237 + hi vertsplit ctermbg=65 + hi visualnos ctermbg=210 + hi warningmsg ctermbg=236 + hi wildmenu ctermbg=236 + hi NonText ctermfg=240 + + if exists("g:zenburn_color_also_Ignore") + hi Ignore ctermfg=240 + endif + endif + + if exists("g:zenburn_alternate_Error") + " use more jumpy Error + hi Error ctermfg=210 ctermbg=52 gui=bold + else + " default is something more zenburn-compatible + hi Error ctermfg=228 ctermbg=95 gui=bold + endif +endif + +if exists("g:zenburn_force_dark_Background") + " Force dark background, because of a bug in VIM: VIM sets background + " automatically during "hi Normal ctermfg=X"; it misinterprets the high + " value (234 or 237 above) as a light color, and wrongly sets background to + " light. See ":help highlight" for details. + set background=dark +endif + +if exists("g:zenburn_high_Contrast") + " use new darker background + hi Normal guifg=#dcdccc guibg=#1f1f1f + hi CursorLine guibg=#121212 gui=bold + hi Pmenu guibg=#242424 guifg=#ccccbc + hi PMenuSel guibg=#353a37 guifg=#ccdc90 gui=bold + hi PmenuSbar guibg=#2e3330 guifg=#000000 + hi PMenuThumb guibg=#a0afa0 guifg=#040404 + hi MatchParen guifg=#f0f0c0 guibg=#383838 gui=bold + hi SignColumn guifg=#9fafaf guibg=#181818 gui=bold + hi TabLineFill guifg=#cfcfaf guibg=#181818 gui=bold + hi TabLineSel guifg=#efefef guibg=#1c1c1b gui=bold + hi TabLine guifg=#b6bf98 guibg=#181818 gui=bold + hi CursorColumn guifg=#dcdccc guibg=#2b2b2b + hi NonText guifg=#404040 gui=bold +else + " Original, lighter background + hi Normal guifg=#dcdccc guibg=#3f3f3f + hi CursorLine guibg=#434443 + hi Pmenu guibg=#2c2e2e guifg=#9f9f9f + hi PMenuSel guibg=#242424 guifg=#d0d0a0 gui=bold + hi PmenuSbar guibg=#2e3330 guifg=#000000 + hi PMenuThumb guibg=#a0afa0 guifg=#040404 + hi MatchParen guifg=#b2b2a0 guibg=#2e2e2e gui=bold + hi SignColumn guifg=#9fafaf guibg=#343434 gui=bold + hi TabLineFill guifg=#cfcfaf guibg=#353535 gui=bold + hi TabLineSel guifg=#efefef guibg=#3a3a39 gui=bold + hi TabLine guifg=#b6bf98 guibg=#353535 gui=bold + hi CursorColumn guifg=#dcdccc guibg=#4f4f4f + hi NonText guifg=#5b605e gui=bold +endif + + +if exists("g:zenburn_alternate_Visual") + " Visual with more contrast, thanks to Steve Hall & Cream posse + " gui=none fixes weird highlight problem in at least GVim 7.0.66, thanks to Kurt Maier + hi Visual guifg=#000000 guibg=#71d3b4 gui=none + hi VisualNOS guifg=#000000 guibg=#71d3b4 gui=none +else + " use default visual + hi Visual guifg=#233323 guibg=#71d3b4 gui=none + hi VisualNOS guifg=#233323 guibg=#71d3b4 gui=none +endif + +if exists("g:zenburn_alternate_Error") + " use more jumpy Error + hi Error guifg=#e37170 guibg=#664040 gui=bold +else + " default is something more zenburn-compatible + hi Error guifg=#e37170 guibg=#3d3535 gui=none +endif + +if exists("g:zenburn_alternate_Include") + " original setting + hi Include guifg=#ffcfaf gui=bold +else + " new, less contrasted one + hi Include guifg=#dfaf8f gui=bold +endif + +if exists("g:zenburn_color_also_Ignore") + " color the Ignore groups + " note: if you get strange coloring for your files, turn this off (unlet) + hi Ignore guifg=#545a4f +endif + +" TODO check for more obscure syntax groups that they're ok diff --git a/colors/zmrok.vim b/colors/zmrok.vim new file mode 100755 index 0000000..122b051 --- /dev/null +++ b/colors/zmrok.vim @@ -0,0 +1,59 @@ +" Maintainer: Krzysztof Goj +" Last Change: 27th March 2009 + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name="zmrok" + +" general colors +hi Normal guifg=#F8F8F8 guibg=#141414 +hi Cursor guifg=Black guibg=Green gui=none +hi LineNr guifg=#777777 guibg=Black +hi NonText guifg=#808080 guibg=#202020 + +hi StatusLine guifg=#F8F8F8 guibg=#202020 gui=bold +hi StatusLineNC guifg=#777777 guibg=#202020 gui=none +hi VertSplit guifg=#202020 guibg=#202020 gui=none + +" Vim >= 7.0 specific colors +if version >= 700 + hi CursorLine guibg=#0d0d0d + hi CursorColumn guibg=#0d0d0d + hi MatchParen guifg=Black guibg=#FFCC20 gui=bold + + hi Pmenu guifg=#141414 guibg=#CDA869 + hi PmenuSel guifg=#F8F8F8 guibg=#9B703F + hi PmenuSbar guibg=#DAEFA3 + hi PmenuThumb guifg=#8F9D6A +endif + +"Syntax hilighting + +hi Comment guifg=#888888 +hi Error guifg=red guibg=#141414 +hi Todo guifg=red guibg=#141414 gui=bold + +hi Constant guifg=#CF593C +hi Exception guifg=#CF593C +hi Operator guifg=#DFCC77 + +hi Special guifg=orange +hi SpecialChar guifg=orange +hi String guifg=#D9FF77 +hi Character guifg=#FFCE43 +hi Number guifg=#FACE43 + +hi Statement guifg=#A56A30 gui=bold +hi Keyword guifg=#A56A30 gui=bold +hi Label guifg=#A56A30 gui=bold + +hi Identifier guifg=#C7CA87 gui=none +hi Type guifg=#C7CA87 gui=none +hi Function guifg=#C7CA87 gui=none +hi StorageClass guifg=#C7CA87 gui=none + +hi PreProc guifg=khaki4 diff --git a/dict.txt b/dict.txt new file mode 100644 index 0000000..5575488 --- /dev/null +++ b/dict.txt @@ -0,0 +1,6 @@ +getElementById +getElementsByTagName +document +getElementsByClassName +console.log( + diff --git a/doc/NERD_tree.txt b/doc/NERD_tree.txt new file mode 100644 index 0000000..174229d --- /dev/null +++ b/doc/NERD_tree.txt @@ -0,0 +1,1291 @@ +*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/Tabular.txt b/doc/Tabular.txt new file mode 100755 index 0000000..34f4765 --- /dev/null +++ b/doc/Tabular.txt @@ -0,0 +1,258 @@ +*Tabular.txt* Configurable, flexible, intuitive text aligning + + *tabular* *tabular.vim* + + #|#|#|#|#| #| #| ~ + #| #|#|#| #|#|#| #| #| #| #|#|#| #| #|#| ~ + #| #| #| #| #| #| #| #| #| #| #|#| ~ + #| #| #| #| #| #| #| #| #| #| #| ~ + #| #|#|#| #|#|#| #|#|#| #| #|#|#| #| ~ + + For Vim version 7.0 or newer + + By Matt Wozniski + mjw@drexel.edu + + Reference Manual ~ + + *tabular-toc* + +1. Description |tabular-intro| +2. Walkthrough |tabular-walkthrough| +3. Scripting |tabular-scripting| + +The functionality mentioned here is a plugin, see |add-plugin|. +You can avoid loading this plugin by setting the "Tabular_loaded" global +variable in your |vimrc| file: > + :let g:tabular_loaded = 1 + +============================================================================== +1. Description *tabular-intro* + +Sometimes, it's useful to line up text. Naturally, it's nicer to have the +computer do this for you, since aligning things by hand quickly becomes +unpleasant. While there are other plugins for aligning text, the ones I've +tried are either impossibly difficult to understand and use, or too simplistic +to handle complicated tasks. This plugin aims to make the easy things easy +and the hard things possible, without providing an unnecessarily obtuse +interface. It's still a work in progress, and criticisms are welcome. + +============================================================================== +2. Walkthrough *tabular-walkthrough* + +Tabular's commands are based largely on regular expressions. The basic +technique used by Tabular is taking some regex to match field delimiters, +splitting the input lines at those delimiters, trimming unnecessary spaces +from the non-delimiter parts, padding the non-delimiter parts of the lines +with spaces to make them the same length, and joining things back together +again. + +For instance, consider starting with the following lines: +> + Some short phrase,some other phrase + A much longer phrase here,and another long phrase +< +Let's say we want to line these lines up at the commas. We can tell +Tabularize to do this by passing a pattern matching , to the Tabularize +command: +> + :Tabularize /, + + Some short phrase , some other phrase + A much longer phrase here , and another long phrase +< +I encourage you to try copying those lines to another buffer and trying to +call :Tabularize. You'll want to take notice of two things quickly: First, +instead of requiring a range, Tabularize tries to figure out what you want to +happen. Since it knows that you want to act on lines matching a comma, it +will look upwards and downwards for lines around the current line that match a +comma, and consider all contiguous lines matching the pattern to be the range +to be acted upon. You can always override this by specifying a range, though. + +The second thing you should notice is that you'll almost certainly be able to +abbreviate :Tabularize to :Tab - using this form in mappings and scripts is +discouraged as it will make conflicts with other scripts more likely, but for +interactive use it's a nice timesaver. + +So, anyway, now the commas line up. Splitting the lines on commas, Tabular +realized that 'Some short phrase' would need to be padded with spaces to match +the length of 'A much longer phrase here', and it did that before joining the +lines back together. You'll also notice that, in addition to the spaces +inserting for padding, extra spaces were inserted between fields. That's +because by default, Tabular prints things left-aligned with one space between +fields. If you wanted to print things right-aligned with no spaces between +fields, you would provide a different format to the Tabularize command: +> + :Tabularize /,/r0 + + Some short phrase, some other phrase + A much longer phrase here,and another long phrase +< +A format specifier is either l, r, or c, followed by one or more digits. If +the letter is l, the field will be left aligned, similarly for r and right +aligning and c and center aligning. The number following the letter is the +number of spaces padding to insert before the start of the next field. +Multiple format specifiers can be added to the same command - each field will +be printed with the next format specifier in the list; when they all have been +used the first will be used again, and so on. So, the last command right +aligned every field, then inserted 0 spaces of padding before the next field. +What if we wanted to right align the text before the comma, and left align the +text after the comma? The command would look like this: +> + :Tabularize /,/r1c1l0 + + Some short phrase , some other phrase + A much longer phrase here , and another long phrase +< +That command would be read as "Align the matching text, splitting fields on +commas. Print everything before the first comma right aligned, then 1 space, +then the comma center aligned, then 1 space, then everything after the comma +left aligned." Notice that the alignment of the field the comma is in is +irrelevant - since it's only 1 cell wide, it looks the same whether it's right, +left, or center aligned. Also notice that the 0 padding spaces specified for +the 3rd field are unused - but they would be used if there were enough fields +to require looping through the fields again. For instance: +> + abc,def,ghi + a,b + a,b,c + + :Tabularize /,/r1c1l0 + + abc , def, ghi + a , b + a , b , c +< +Notice that now, the format pattern has been reused; field 4 (the second comma) +is right aligned, field 5 is center aligned. No spaces were inserted between +the 3rd field (containing "def") and the 4th field (the second comma) because +the format specified 'l0'. + +But, what if you only wanted to act on the first comma on the line, rather than +all of the commas on the line? Let's say we want everything before the first +comma right aligned, then the comma, then everything after the comma left +aligned: +> + abc,def,ghi + a,b + a,b,c + + :Tabularize /^[^,]*\zs,/r0c0l0 + + abc,def,ghi + a,b + a,b,c +< +Here, we used a Vim regex that would only match the first comma on the line. +It matches the beginning of the line, followed by all the non-comma characters +up to the first comma, and then forgets about what it matched so far and +pretends that the match starts exactly at the comma. + +But, now that this command does exactly what we want it to, it's become pretty +unwieldy. It would be unpleasant to need to type that more than once or +twice. The solution is to assign a name to it. +> + :AddTabularPattern first_comma /^[^,]*\zs,/r0c0l0 +< +Now, typing ":Tabularize first_comma" will do the same thing as typing the +whole pattern out each time. Of course this is more useful if you store the +name in a file to be used later. + +NOTE: In order to make these new commands available every time vim starts, +you'll need to put those new commands into a .vim file in a plugin directory +somewhere in your 'runtimepath'. In order to make sure that Tabular.vim has +already been loaded before your file tries to use :AddTabularPattern or +:AddTabularPipeline, the new file should be installed in an after/plugin +directory in 'runtimepath'. In general, it will be safe to find out where the +TabularMaps.vim plugin was installed, and place other files extending +Tabular.vim in the same directory as TabularMaps.vim. For more information, +and some suggested best practices, check out the |tabular-scripting| section. + +Lastly, we'll approach the case where tabular cannot achieve your desired goal +just by splitting lines appart, trimming whitespace, padding with whitespace, +and rejoining the lines. As an example, consider the multiple_spaces command +from TabularMaps.vim. The goal is to split using two or more spaces as a +field delimiter, and join fields back together, properly lined up, with only +two spaces between the end of each field and the beginning of the next. +Unfortunately, Tabular can't do this with only the commands we know so far: +> + :Tabularize / / +< +The above function won't work, because it will consider "a b" as 5 fields +delimited by two pairs of 2 spaces ( 'a', ' ', '', ' ', 'b' ) instead of as +3 fields delimited by one set of 2 or more spaces ( 'a', ' ', 'b' ). +> + :Tabularize / \+/ +< +The above function won't work either, because it will leave the delimiter as 4 +spaces when used against "a b", meaning that we would fail at our goal of +collapsing everything down to two spaces between fields. So, we need a new +command to get around this: +> + :AddTabularPipeline multiple_spaces / \{2,}/ + \ map(a:lines, "substitute(v:val, ' \{2,}', ' ', 'g')") + \ | tabular#TabularizeStrings(a:lines, ' ', 'l0') +< +Yeah. I know it looks complicated. Bear with me. I probably will try to add +in some shortcuts for this syntax, but this verbose will be guaranteed to +always work. + +You should already recognize the name being assigned. The next thing to +happen is / \{2,}/ which is a pattern specifying which lines should +automatically be included in the range when no range is given. Without this, +there would be no pattern to use for extending the range. Everything after +that is a | separated list of expressions to be evaluated. In the context in +which they will be evaluated, a:lines will be set to a List of Strings +containing the text of the lines being filtered as they procede through the +pipeline you've set up. The \ at the start of the lines are just vim's line +continuation marker; you needn't worry much about them. So, the first +expression in the pipeline transforms each line by replacing every instance of +2 or more spaces with exactly two spaces. The second command in the pipeline +performs the equivalent of ":Tabularize / /l0"; the only difference is that +it is operating on a List of Strings rather than text in the buffer. At the +end of the pipeline, the Strings in the modified a:lines (or the return value +of the last expression in the pipeline, if it returns a List) will replace the +chosen range. + +============================================================================== +3. Extending *tabular-scripting* + +As mentioned above, the most important consideration when extending Tabular +with new maps or commands is that your plugin must be loaded after Tabular.vim +has finished loading, and only if Tabular.vim has loaded successfully. The +easiest approach to making sure it loads after Tabular.vim is simply putting +the new file (we'll call it "tabular_extra.vim" as an example) into an +"after/plugin/" directory in 'runtimepath', for instance: +> + ~/.vim/after/plugin/tabular_extra.vim +< +The default set of mappings, found in "TabularMaps.vim", is installed in +the after/plugin/ subdirectory of whatever directory Tabular was installed to. + +The other important consideration is making sure that your commands are only +called if Tabular.vim was actually loaded. The easiest way to do this is by +checking for the existence of the :Tabularize command at the start of your +plugin. A short example plugin would look like this: +> + " after/plugin/my_tabular_commands.vim + " Provides extra :Tabularize commands + + if !exists(':Tabularize') + finish " Give up here; the Tabular plugin musn't have been loaded + endif + + " Make line wrapping possible by resetting the 'cpo' option, first saving it + let s:save_cpo = &cpo + set cpo&vim + + AddTabularPattern! asterisk /*/l1 + + AddTabularPipeline! remove_leading_spaces /^ / + \ map(a:lines, "substitute(v:val, '^ *', '', '')") + + " Restore the saved value of 'cpo' + let &cpo = s:save_cpo + unlet s:save_cpo +< +============================================================================== +vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:ft=help:norl: diff --git a/doc/acp.txt b/doc/acp.txt new file mode 100644 index 0000000..324c88b --- /dev/null +++ b/doc/acp.txt @@ -0,0 +1,512 @@ +*acp.txt* Automatically opens popup menu for completions. + + Copyright (c) 2007-2009 Takeshi NISHIDA + +AutoComplPop *autocomplpop* *acp* + +INTRODUCTION |acp-introduction| +INSTALLATION |acp-installation| +USAGE |acp-usage| +COMMANDS |acp-commands| +OPTIONS |acp-options| +SPECIAL THANKS |acp-thanks| +CHANGELOG |acp-changelog| +ABOUT |acp-about| + + +============================================================================== +INTRODUCTION *acp-introduction* + +With this plugin, your vim comes to automatically opens popup menu for +completions when you enter characters or move the cursor in Insert mode. It +won't prevent you continuing entering characters. + + +============================================================================== +INSTALLATION *acp-installation* + +Put all files into your runtime directory. If you have the zip file, extract +it to your runtime directory. + +You should place the files as follows: +> + /plugin/acp.vim + /doc/acp.txt + ... +< +If you disgust to jumble up this plugin and other plugins in your runtime +directory, put the files into new directory and just add the directory path to +'runtimepath'. It's easy to uninstall the plugin. + +And then update your help tags files to enable fuzzyfinder help. See +|add-local-help| for details. + + +============================================================================== +USAGE *acp-usage* + +Once this plugin is installed, auto-popup is enabled at startup by default. + +Which completion method is used depends on the text before the cursor. The +default behavior is as follows: + + kind filetype text before the cursor ~ + Keyword * two keyword characters + Filename * a filename character + a path separator + + 0 or more filename character + Omni ruby ".", "::" or non-word character + ":" + (|+ruby| required.) + Omni python "." (|+python| required.) + Omni xml "<", "" characters + " ") + Omni html/xhtml "<", "" characters + " ") + Omni css (":", ";", "{", "^", "@", or "!") + + 0 or 1 space + +Also, you can make user-defined completion and snipMate's trigger completion +(|acp-snipMate|) auto-popup if the options are set. + +These behavior are customizable. + + *acp-snipMate* +snipMate's Trigger Completion ~ + +snipMate's trigger completion enables you to complete a snippet trigger +provided by snipMate plugin +(http://www.vim.org/scripts/script.php?script_id=2540) and expand it. + + +To enable auto-popup for this completion, add following function to +plugin/snipMate.vim: +> + fun! GetSnipsInCurrentScope() + let snips = {} + for scope in [bufnr('%')] + split(&ft, '\.') + ['_'] + call extend(snips, get(s:snippets, scope, {}), 'keep') + call extend(snips, get(s:multi_snips, scope, {}), 'keep') + endfor + return snips + endf +< +And set |g:acp_behaviorSnipmateLength| option to 1. + +There is the restriction on this auto-popup, that the word before cursor must +consist only of uppercase characters. + + *acp-perl-omni* +Perl Omni-Completion ~ + +AutoComplPop supports perl-completion.vim +(http://www.vim.org/scripts/script.php?script_id=2852). + +To enable auto-popup for this completion, set |g:acp_behaviorPerlOmniLength| +option to 0 or more. + + +============================================================================== +COMMANDS *acp-commands* + + *:AcpEnable* +:AcpEnable + enables auto-popup. + + *:AcpDisable* +:AcpDisable + disables auto-popup. + + *:AcpLock* +:AcpLock + suspends auto-popup temporarily. + + For the purpose of avoiding interruption to another script, it is + recommended to insert this command and |:AcpUnlock| than |:AcpDisable| + and |:AcpEnable| . + + *:AcpUnlock* +:AcpUnlock + resumes auto-popup suspended by |:AcpLock| . + + +============================================================================== +OPTIONS *acp-options* + + *g:acp_enableAtStartup* > + let g:acp_enableAtStartup = 1 +< + If non-zero, auto-popup is enabled at startup. + + *g:acp_mappingDriven* > + let g:acp_mappingDriven = 0 +< + If non-zero, auto-popup is triggered by key mappings instead of + |CursorMovedI| event. This is useful to avoid auto-popup by moving + cursor in Insert mode. + + *g:acp_ignorecaseOption* > + let g:acp_ignorecaseOption = 1 +< + Value set to 'ignorecase' temporarily when auto-popup. + + *g:acp_completeOption* > + let g:acp_completeOption = '.,w,b,k' +< + Value set to 'complete' temporarily when auto-popup. + + *g:acp_completeoptPreview* > + let g:acp_completeoptPreview = 0 +< + If non-zero, "preview" is added to 'completeopt' when auto-popup. + + *g:acp_behaviorUserDefinedFunction* > + let g:acp_behaviorUserDefinedFunction = '' +< + |g:acp_behavior-completefunc| for user-defined completion. If empty, + this completion will be never attempted. + + *g:acp_behaviorUserDefinedMeets* > + let g:acp_behaviorUserDefinedMeets = '' +< + |g:acp_behavior-meets| for user-defined completion. If empty, this + completion will be never attempted. + + *g:acp_behaviorSnipmateLength* > + let g:acp_behaviorSnipmateLength = -1 +< + Pattern before the cursor, which are needed to attempt + snipMate-trigger completion. + + *g:acp_behaviorKeywordCommand* > + let g:acp_behaviorKeywordCommand = "\" +< + Command for keyword completion. This option is usually set "\" or + "\". + + *g:acp_behaviorKeywordLength* > + let g:acp_behaviorKeywordLength = 2 +< + Length of keyword characters before the cursor, which are needed to + attempt keyword completion. If negative value, this completion will be + never attempted. + + *g:acp_behaviorKeywordIgnores* > + let g:acp_behaviorKeywordIgnores = [] +< + List of string. If a word before the cursor matches to the front part + of one of them, keyword completion won't be attempted. + + E.g., when there are too many keywords beginning with "get" for the + completion and auto-popup by entering "g", "ge", or "get" causes + response degradation, set ["get"] to this option and avoid it. + + *g:acp_behaviorFileLength* > + let g:acp_behaviorFileLength = 0 +< + Length of filename characters before the cursor, which are needed to + attempt filename completion. If negative value, this completion will + be never attempted. + + *g:acp_behaviorRubyOmniMethodLength* > + let g:acp_behaviorRubyOmniMethodLength = 0 +< + Length of keyword characters before the cursor, which are needed to + attempt ruby omni-completion for methods. If negative value, this + completion will be never attempted. + + *g:acp_behaviorRubyOmniSymbolLength* > + let g:acp_behaviorRubyOmniSymbolLength = 1 +< + Length of keyword characters before the cursor, which are needed to + attempt ruby omni-completion for symbols. If negative value, this + completion will be never attempted. + + *g:acp_behaviorPythonOmniLength* > + let g:acp_behaviorPythonOmniLength = 0 +< + Length of keyword characters before the cursor, which are needed to + attempt python omni-completion. If negative value, this completion + will be never attempted. + + *g:acp_behaviorPerlOmniLength* > + let g:acp_behaviorPerlOmniLength = -1 +< + Length of keyword characters before the cursor, which are needed to + attempt perl omni-completion. If negative value, this completion will + be never attempted. + + See also: |acp-perl-omni| + + *g:acp_behaviorXmlOmniLength* > + let g:acp_behaviorXmlOmniLength = 0 +< + Length of keyword characters before the cursor, which are needed to + attempt XML omni-completion. If negative value, this completion will + be never attempted. + + *g:acp_behaviorHtmlOmniLength* > + let g:acp_behaviorHtmlOmniLength = 0 +< + Length of keyword characters before the cursor, which are needed to + attempt HTML omni-completion. If negative value, this completion will + be never attempted. + + *g:acp_behaviorCssOmniPropertyLength* > + let g:acp_behaviorCssOmniPropertyLength = 1 +< + Length of keyword characters before the cursor, which are needed to + attempt CSS omni-completion for properties. If negative value, this + completion will be never attempted. + + *g:acp_behaviorCssOmniValueLength* > + let g:acp_behaviorCssOmniValueLength = 0 +< + Length of keyword characters before the cursor, which are needed to + attempt CSS omni-completion for values. If negative value, this + completion will be never attempted. + + *g:acp_behavior* > + let g:acp_behavior = {} +< + This option is for advanced users. This setting overrides other + behavior options. This is a |Dictionary|. Each key corresponds to a + filetype. '*' is default. Each value is a list. These are attempted in + sequence until completion item is found. Each element is a + |Dictionary| which has following items: + + "command": *g:acp_behavior-command* + Command to be fed to open popup menu for completions. + + "completefunc": *g:acp_behavior-completefunc* + 'completefunc' will be set to this user-provided function during the + completion. Only makes sense when "command" is "". + + "meets": *g:acp_behavior-meets* + Name of the function which dicides whether or not to attempt this + completion. It will be attempted if this function returns non-zero. + This function takes a text before the cursor. + + "onPopupClose": *g:acp_behavior-onPopupClose* + Name of the function which is called when popup menu for this + completion is closed. Following completions will be suppressed if + this function returns zero. + + "repeat": *g:acp_behavior-repeat* + If non-zero, the last completion is automatically repeated. + + +============================================================================== +SPECIAL THANKS *acp-thanks* + +- Daniel Schierbeck +- Ingo Karkat + + +============================================================================== +CHANGELOG *acp-changelog* + +2.14.1 + - Changed the way of auto-popup for avoiding an issue about filename + completion. + - Fixed a bug that popup menu was opened twice when auto-popup was done. + +2.14 + - Added the support for perl-completion.vim. + +2.13 + - Changed to sort snipMate's triggers. + - Fixed a bug that a wasted character was inserted after snipMate's trigger + completion. + +2.12.1 + - Changed to avoid a strange behavior with Microsoft IME. + +2.12 + - Added g:acp_behaviorKeywordIgnores option. + - Added g:acp_behaviorUserDefinedMeets option and removed + g:acp_behaviorUserDefinedPattern. + - Changed to do auto-popup only when a buffer is modified. + - Changed the structure of g:acp_behavior option. + - Changed to reflect a change of behavior options (named g:acp_behavior*) + any time it is done. + - Fixed a bug that completions after omni completions or snipMate's trigger + completion were never attempted when no candidate for the former + completions was found. + +2.11.1 + - Fixed a bug that a snipMate's trigger could not be expanded when it was + completed. + +2.11 + - Implemented experimental feature which is snipMate's trigger completion. + +2.10 + - Improved the response by changing not to attempt any completion when + keyword characters are entered after a word which has been found that it + has no completion candidate at the last attempt of completions. + - Improved the response by changing to close popup menu when was + pressed and the text before the cursor would not match with the pattern of + current behavior. + +2.9 + - Changed default behavior to support XML omni completion. + - Changed default value of g:acp_behaviorKeywordCommand option. + The option with "\" cause a problem which inserts a match without + when 'dictionary' has been set and keyword completion is done. + - Changed to show error message when incompatible with a installed vim. + +2.8.1 + - Fixed a bug which inserted a selected match to the next line when + auto-wrapping (enabled with 'formatoptions') was performed. + +2.8 + - Added g:acp_behaviorUserDefinedFunction option and + g:acp_behaviorUserDefinedPattern option for users who want to make custom + completion auto-popup. + - Fixed a bug that setting 'spell' on a new buffer made typing go crazy. + +2.7 + - Changed naming conventions for filenames, functions, commands, and options + and thus renamed them. + - Added g:acp_behaviorKeywordCommand option. If you prefer the previous + behavior for keyword completion, set this option "\". + - Changed default value of g:acp_ignorecaseOption option. + + The following were done by Ingo Karkat: + + - ENH: Added support for setting a user-provided 'completefunc' during the + completion, configurable via g:acp_behavior. + - BUG: When the configured completion is or , the command to + restore the original text (in on_popup_post()) must be reverted, too. + - BUG: When using a custom completion function () that also uses + an s:...() function name, the s:GetSidPrefix() function dynamically + determines the wrong SID. Now calling s:DetermineSidPrefix() once during + sourcing and caching the value in s:SID. + - BUG: Should not use custom defined completion mappings. Now + consistently using unmapped completion commands everywhere. (Beforehand, + s:PopupFeeder.feed() used mappings via feedkeys(..., 'm'), but + s:PopupFeeder.on_popup_post() did not due to its invocation via + :map-expr.) + +2.6: + - Improved the behavior of omni completion for HTML/XHTML. + +2.5: + - Added some options to customize behavior easily: + g:AutoComplPop_BehaviorKeywordLength + g:AutoComplPop_BehaviorFileLength + g:AutoComplPop_BehaviorRubyOmniMethodLength + g:AutoComplPop_BehaviorRubyOmniSymbolLength + g:AutoComplPop_BehaviorPythonOmniLength + g:AutoComplPop_BehaviorHtmlOmniLength + g:AutoComplPop_BehaviorCssOmniPropertyLength + g:AutoComplPop_BehaviorCssOmniValueLength + +2.4: + - Added g:AutoComplPop_MappingDriven option. + +2.3.1: + - Changed to set 'lazyredraw' while a popup menu is visible to avoid + flickering. + - Changed a behavior for CSS. + - Added support for GetLatestVimScripts. + +2.3: + - Added a behavior for Python to support omni completion. + - Added a behavior for CSS to support omni completion. + +2.2: + - Changed not to work when 'paste' option is set. + - Fixed AutoComplPopEnable command and AutoComplPopDisable command to + map/unmap "i" and "R". + +2.1: + - Fixed the problem caused by "." command in Normal mode. + - Changed to map "i" and "R" to feed completion command after starting + Insert mode. + - Avoided the problem caused by Windows IME. + +2.0: + - Changed to use CursorMovedI event to feed a completion command instead of + key mapping. Now the auto-popup is triggered by moving the cursor. + - Changed to feed completion command after starting Insert mode. + - Removed g:AutoComplPop_MapList option. + +1.7: + - Added behaviors for HTML/XHTML. Now supports the omni completion for + HTML/XHTML. + - Changed not to show expressions for CTRL-R =. + - Changed not to set 'nolazyredraw' while a popup menu is visible. + +1.6.1: + - Changed not to trigger the filename completion by a text which has + multi-byte characters. + +1.6: + - Redesigned g:AutoComplPop_Behavior option. + - Changed default value of g:AutoComplPop_CompleteOption option. + - Changed default value of g:AutoComplPop_MapList option. + +1.5: + - Implemented continuous-completion for the filename completion. And added + new option to g:AutoComplPop_Behavior. + +1.4: + - Fixed the bug that the auto-popup was not suspended in fuzzyfinder. + - Fixed the bug that an error has occurred with Ruby-omni-completion unless + Ruby interface. + +1.3: + - Supported Ruby-omni-completion by default. + - Supported filename completion by default. + - Added g:AutoComplPop_Behavior option. + - Added g:AutoComplPop_CompleteoptPreview option. + - Removed g:AutoComplPop_MinLength option. + - Removed g:AutoComplPop_MaxLength option. + - Removed g:AutoComplPop_PopupCmd option. + +1.2: + - Fixed bugs related to 'completeopt'. + +1.1: + - Added g:AutoComplPop_IgnoreCaseOption option. + - Added g:AutoComplPop_NotEnableAtStartup option. + - Removed g:AutoComplPop_LoadAndEnable option. +1.0: + - g:AutoComplPop_LoadAndEnable option for a startup activation is added. + - AutoComplPopLock command and AutoComplPopUnlock command are added to + suspend and resume. + - 'completeopt' and 'complete' options are changed temporarily while + completing by this script. + +0.4: + - The first match are selected when the popup menu is Opened. You can insert + the first match with CTRL-Y. + +0.3: + - Fixed the problem that the original text is not restored if 'longest' is + not set in 'completeopt'. Now the plugin works whether or not 'longest' is + set in 'completeopt', and also 'menuone'. + +0.2: + - When completion matches are not found, insert CTRL-E to stop completion. + - Clear the echo area. + - Fixed the problem in case of dividing words by symbols, popup menu is + not opened. + +0.1: + - First release. + + +============================================================================== +ABOUT *acp-about* *acp-contact* *acp-author* + +Author: Takeshi NISHIDA +Licence: MIT Licence +URL: http://www.vim.org/scripts/script.php?script_id=1879 + http://bitbucket.org/ns9tks/vim-autocomplpop/ + +Bugs/Issues/Suggestions/Improvements ~ + +Please submit to http://bitbucket.org/ns9tks/vim-autocomplpop/issues/ . + +============================================================================== + vim:tw=78:ts=8:ft=help:norl: + diff --git a/doc/command-t.txt b/doc/command-t.txt new file mode 100644 index 0000000..bb0b8ef --- /dev/null +++ b/doc/command-t.txt @@ -0,0 +1,710 @@ +*command-t.txt* Command-T plug-in for Vim *command-t* + +CONTENTS *command-t-contents* + + 1. Introduction |command-t-intro| + 2. Requirements |command-t-requirements| + 3. Installation |command-t-installation| + 3. Managing using Pathogen |command-t-pathogen| + 4. Trouble-shooting |command-t-trouble-shooting| + 5. Usage |command-t-usage| + 6. Commands |command-t-commands| + 7. Mappings |command-t-mappings| + 8. Options |command-t-options| + 9. Authors |command-t-authors| +10. Website |command-t-website| +11. Donations |command-t-donations| +12. License |command-t-license| +13. History |command-t-history| + + +INTRODUCTION *command-t-intro* + +The Command-T plug-in provides an extremely fast, intuitive mechanism for +opening files with a minimal number of keystrokes. It's named "Command-T" +because it is inspired by the "Go to File" window bound to Command-T in +TextMate. + +Files are selected by typing characters that appear in their paths, and are +ordered by an algorithm which knows that characters that appear in certain +locations (for example, immediately after a path separator) should be given +more weight. + +To search efficiently, especially in large projects, you should adopt a +"path-centric" rather than a "filename-centric" mentality. That is you should +think more about where the desired file is found rather than what it is +called. This means narrowing your search down by including some characters +from the upper path components rather than just entering characters from the +filename itself. + +Screencasts demonstrating the plug-in can be viewed at: + + https://wincent.com/products/command-t + + +REQUIREMENTS *command-t-requirements* + +The plug-in requires Vim compiled with Ruby support, a compatible Ruby +installation at the operating system level, and a C compiler to build +the Ruby extension. + + +1. Vim compiled with Ruby support + +You can check for Ruby support by launching Vim with the --version switch: + + vim --version + +If "+ruby" appears in the version information then your version of Vim has +Ruby support. + +Another way to check is to simply try using the :ruby command from within Vim +itself: + + :ruby 1 + +If your Vim lacks support you'll see an error message like this: + + E319: Sorry, the command is not available in this version + +The version of Vim distributed with Mac OS X does not include Ruby support, +while MacVim does; it is available from: + + http://github.com/b4winckler/macvim/downloads + +For Windows users, the Vim 7.2 executable available from www.vim.org does +include Ruby support, and is recommended over version 7.3 (which links against +Ruby 1.9, but apparently has some bugs that need to be resolved). + + +2. Ruby + +In addition to having Ruby support in Vim, your system itself must have a +compatible Ruby install. "Compatible" means the same version as Vim itself +links against. If you use a different version then Command-T is unlikely +to work (see TROUBLE-SHOOTING below). + +On Mac OS X Snow Leopard, the system comes with Ruby 1.8.7 and all recent +versions of MacVim (the 7.2 snapshots and 7.3) are linked against it. + +On Linux and similar platforms, the linked version of Ruby will depend on +your distribution. You can usually find this out by examining the +compilation and linking flags displayed by the |:version| command in Vim, and +by looking at the output of: + + :ruby puts RUBY_VERSION + +A suitable Ruby environment for Windows can be installed using the Ruby +1.8.7-p299 RubyInstaller available at: + + http://rubyinstaller.org/downloads/archives + +If using RubyInstaller be sure to download the installer executable, not the +7-zip archive. When installing mark the checkbox "Add Ruby executables to your +PATH" so that Vim can find them. + + +3. C compiler + +Part of Command-T is implemented in C as a Ruby extension for speed, allowing +it to work responsively even on directory hierarchies containing enormous +numbers of files. As such, a C compiler is required in order to build the +extension and complete the installation. + +On Mac OS X, this can be obtained by installing the Xcode Tools that come on +the Mac OS X install disc. + +On Windows, the RubyInstaller Development Kit can be used to conveniently +install the necessary tool chain: + + http://rubyinstaller.org/downloads/archives + +At the time of writing, the appropriate development kit for use with Ruby +1.8.7 is DevKit-3.4.5r3-20091110. + +To use the Development Kit extract the archive contents to your C:\Ruby +folder. + + +INSTALLATION *command-t-installation* + +Command-T is distributed as a "vimball" which means that it can be installed +by opening it in Vim and then sourcing it: + + :e command-t.vba + :so % + +The files will be installed in your |'runtimepath'|. To check where this is +you can issue: + + :echo &rtp + +The C extension must then be built, which can be done from the shell. If you +use a typical |'runtimepath'| then the files were installed inside ~/.vim and +you can build the extension with: + + cd ~/.vim/ruby/command-t + ruby extconf.rb + make + +Note: If you are an RVM user, you must perform the build using the same +version of Ruby that Vim itself is linked against. This will often be the +system Ruby, which can be selected before issuing the "make" command with: + + rvm use system + + +MANAGING USING PATHOGEN *command-t-pathogen* + +Pathogen is a plugin that allows you to maintain plugin installations in +separate, isolated subdirectories under the "bundle" directory in your +|'runtimepath'|. The following examples assume that you already have +Pathogen installed and configured, and that you are installing into +~/.vim/bundle. For more information about Pathogen, see: + + http://www.vim.org/scripts/script.php?script_id=2332 + +If you manage your entire ~/.vim folder using Git then you can add the +Command-T repository as a submodule: + + cd ~/.vim + git submodule add git://git.wincent.com/command-t.git bundle/command-t + git submodule init + +Or if you just wish to do a simple clone instead of using submodules: + + cd ~/.vim + git clone git://git.wincent.com/command-t.git bundle/command-t + +Once you have a local copy of the repository you can update it at any time +with: + + cd ~/.vim/bundle/command-t + git pull + +Or you can switch to a specific release with: + + cd ~/.vim/bundle/command-t + git checkout 0.8b + +After installing or updating you must build the extension: + + cd ~/.vim/bundle/command-t + rake make + +While the Vimball installation automatically generates the help tags, under +Pathogen it is necessary to do so explicitly from inside Vim: + + :call pathogen#helptags() + + +TROUBLE-SHOOTING *command-t-trouble-shooting* + +Most installation problems are caused by a mismatch between the version of +Ruby on the host operating system, and the version of Ruby that Vim itself +linked against at compile time. For example, if one is 32-bit and the other is +64-bit, or one is from the Ruby 1.9 series and the other is from the 1.8 +series, then the plug-in is not likely to work. + +As such, on Mac OS X, I recommend using the standard Ruby that comes with the +system (currently 1.8.7) along with the latest version of MacVim (currently +version 7.3). If you wish to use custom builds of Ruby or of MacVim (not +recommmended) then you will have to take extra care to ensure that the exact +same Ruby environment is in effect when building Ruby, Vim and the Command-T +extension. + +For Windows, the following combination is known to work: + + - Vim 7.2 from http://www.vim.org/download.php: + ftp://ftp.vim.org/pub/vim/pc/gvim72.exe + - Ruby 1.8.7-p299 from http://rubyinstaller.org/downloads/archives: + http://rubyforge.org/frs/download.php/71492/rubyinstaller-1.8.7-p299.exe + - DevKit 3.4.5r3-20091110 from http://rubyinstaller.org/downloads/archives: + http://rubyforge.org/frs/download.php/66888/devkit-3.4.5r3-20091110.7z + +If a problem occurs the first thing you should do is inspect the output of: + + ruby extconf.rb + make + +During the installation, and: + + vim --version + +And compare the compilation and linker flags that were passed to the +extension and to Vim itself when they were built. If the Ruby-related +flags or architecture flags are different then it is likely that something +has changed in your Ruby environment and the extension may not work until +you eliminate the discrepancy. + + +USAGE *command-t-usage* + +Bring up the Command-T match window by typing: + + t + +This mapping is set up automatically for you, provided you do not already have +a mapping for t or |:CommandT|. You can also bring up the match window +by issuing the command: + + :CommandT + +A prompt will appear at the bottom of the screen along with a match window +showing all of the files in the current directory (as returned by the +|:pwd| command). + +For the most efficient file navigation within a project it's recommended that +you |:cd| into the root directory of your project when starting to work on it. +If you wish to open a file from outside of the project folder you can pass in +an optional path argument (relative or absolute) to |:CommandT|: + + :CommandT ../path/to/other/files + +Type letters in the prompt to narrow down the selection, showing only the +files whose paths contain those letters in the specified order. Letters do not +need to appear consecutively in a path in order for it to be classified as a +match. + +Once the desired file has been selected it can be opened by pressing . +(By default files are opened in the current window, but there are other +mappings that you can use to open in a vertical or horizontal split, or in +a new tab.) Note that if you have |'nohidden'| set and there are unsaved +changes in the current window when you press then opening in the current +window would fail; in this case Command-T will open the file in a new split. + +The following mappings are active when the prompt has focus: + + delete the character to the left of the cursor + delete the character at the cursor + move the cursor one character to the left + move the cursor one character to the left + move the cursor one character to the right + move the cursor one character to the right + move the cursor to the start (left) + move the cursor to the end (right) + clear the contents of the prompt + change focus to the match listing + +The following mappings are active when the match listing has focus: + + change focus to the prompt + +The following mappings are active when either the prompt or the match listing +has focus: + + open the selected file + open the selected file in a new split window + open the selected file in a new split window + open the selected file in a new vertical split window + open the selected file in a new tab + select next file in the match listing + select next file in the match listing + select next file in the match listing + select previous file in the match listing + select previous file in the match listing + select previous file in the match listing + cancel (dismisses match listing) + +The following is also available on terminals which support it: + + cancel (dismisses match listing) + +Note that the default mappings can be overriden by setting options in your +~/.vimrc file (see the OPTIONS section for a full list of available options). + +In addition, when the match listing has focus, typing a character will cause +the selection to jump to the first path which begins with that character. +Typing multiple characters consecutively can be used to distinguish between +paths which begin with the same prefix. + + +COMMANDS *command-t-commands* + + *:CommandT* +|:CommandT| Brings up the Command-T match window, starting in the + current working directory as returned by the|:pwd| + command. + + *:CommandTFlush* +|:CommandTFlush|Instructs the plug-in to flush its path cache, causing + the directory to be rescanned for new or deleted paths + the next time the match window is shown. In addition, all + configuration settings are re-evaluated, causing any + changes made to settings via the |:let| command to be picked + up. + + +MAPPINGS *command-t-mappings* + +By default Command-T comes with only one mapping: + + t bring up the Command-T match window + +However, Command-T won't overwrite a pre-existing mapping so if you prefer +to define a different mapping use a line like this in your ~/.vimrc: + + nmap t :CommandT + +Replacing "t" with your mapping of choice. + +Note that in the case of MacVim you actually can map to Command-T (written +as in Vim) in your ~/.gvimrc file if you first unmap the existing menu +binding of Command-T to "New Tab": + + if has("gui_macvim") + macmenu &File.New\ Tab key= + map :CommandT + endif + +When the Command-T window is active a number of other additional mappings +become available for doing things like moving between and selecting matches. +These are fully described above in the USAGE section, and settings for +overriding the mappings are listed below under OPTIONS. + + +OPTIONS *command-t-options* + +A number of options may be set in your ~/.vimrc to influence the behaviour of +the plug-in. To set an option, you include a line like this in your ~/.vimrc: + + let g:CommandTMaxFiles=20000 + +To have Command-T pick up new settings immediately (that is, without having +to restart Vim) you can issue the |:CommandTFlush| command after making +changes via |:let|. + +Following is a list of all available options: + + *g:CommandTMaxFiles* + |g:CommandTMaxFiles| number (default 10000) + + The maximum number of files that will be considered when scanning the + current directory. Upon reaching this number scanning stops. + + *g:CommandTMaxDepth* + |g:CommandTMaxDepth| number (default 15) + + The maximum depth (levels of recursion) to be explored when scanning the + current directory. Any directories at levels beyond this depth will be + skipped. + + *g:CommandTMaxHeight* + |g:CommandTMaxHeight| number (default: 0) + + The maximum height in lines the match window is allowed to expand to. + If set to 0, the window will occupy as much of the available space as + needed to show matching entries. + + *g:CommandTAlwaysShowDotFiles* + |g:CommandTAlwaysShowDotFiles| boolean (default: 0) + + By default Command-T will show dot-files only if the entered search + string contains a dot that could cause a dot-file to match. When set to + a non-zero value, this setting instructs Command-T to always include + matching dot-files in the match list regardless of whether the search + string contains a dot. See also |g:CommandTNeverShowDotFiles|. + + *g:CommandTNeverShowDotFiles* + |g:CommandTNeverShowDotFiles| boolean (default: 0) + + By default Command-T will show dot-files if the entered search string + contains a dot that could cause a dot-file to match. When set to a + non-zero value, this setting instructs Command-T to never show dot-files + under any circumstances. Note that it is contradictory to set both this + setting and |g:CommandTAlwaysShowDotFiles| to true, and if you do so Vim + will suffer from headaches, nervous twitches, and sudden mood swings. + + *g:CommandTScanDotDirectories* + |g:CommandTScanDotDirectories| boolean (default: 0) + + Normally Command-T will not recurse into "dot-directories" (directories + whose names begin with a dot) while performing its initial scan. Set + this setting to a non-zero value to override this behavior and recurse. + Note that this setting is completely independent of the + |g:CommandTAlwaysShowDotFiles| and |g:CommandTNeverShowDotFiles| + settings; those apply only to the selection and display of matches + (after scanning has been performed), whereas + |g:CommandTScanDotDirectories| affects the behaviour at scan-time. + + Note also that even with this setting on you can still use Command-T to + open files inside a "dot-directory" such as ~/.vim, but you have to use + the |:cd| command to change into that directory first. For example: + + :cd ~/.vim + :CommandT + + *g:CommandTMatchWindowAtTop* + |g:CommandTMatchWindowAtTop| boolean (default: 0) + + When this settings is off (the default) the match window will appear at + the bottom so as to keep it near to the prompt. Turning it on causes the + match window to appear at the top instead. This may be preferable if you + want the best match (usually the first one) to appear in a fixed location + on the screen rather than moving as the number of matches changes during + typing. + +As well as the basic options listed above, there are a number of settings that +can be used to override the default key mappings used by Command-T. For +example, to set as the mapping for cancelling (dismissing) the Command-T +window, you would add the following to your ~/.vimrc: + + let g:CommandTCancelMap='' + +Multiple, alternative mappings may be specified using list syntax: + + let g:CommandTCancelMap=['', ''] + +Following is a list of all map settings and their defaults: + + Setting Default mapping(s) + + *g:CommandTBackspaceMap* + |g:CommandTBackspaceMap| + + *g:CommandTDeleteMap* + |g:CommandTDeleteMap| + + *g:CommandTAcceptSelectionMap* + |g:CommandTAcceptSelectionMap| + + *g:CommandTAcceptSelectionSplitMap* + |g:CommandTAcceptSelectionSplitMap| + + + *g:CommandTAcceptSelectionTabMap* + |g:CommandTAcceptSelectionTabMap| + + *g:CommandTAcceptSelectionVSplitMap* + |g:CommandTAcceptSelectionVSplitMap| + + *g:CommandTToggleFocusMap* + |g:CommandTToggleFocusMap| + + *g:CommandTCancelMap* + |g:CommandTCancelMap| + (not on all terminals) + + *g:CommandTSelectNextMap* + |g:CommandTSelectNextMap| + + + + *g:CommandTSelectPrevMap* + |g:CommandTSelectPrevMap| + + + + *g:CommandTClearMap* + |g:CommandTClearMap| + + *g:CommandTCursorLeftMap* + |g:CommandTCursorLeftMap| + + + *g:CommandTCursorRightMap* + |g:CommandTCursorRightMap| + + + *g:CommandTCursorEndMap* + |g:CommandTCursorEndMap| + + *g:CommandTCursorStartMap* + |g:CommandTCursorStartMap| + +In addition to the options provided by Command-T itself, some of Vim's own +settings can be used to control behavior: + + *command-t-wildignore* + |'wildignore'| string (default: '') + + Vim's |'wildignore'| setting is used to determine which files should be + excluded from listings. This is a comma-separated list of glob patterns. + It defaults to the empty string, but common settings include "*.o,*.obj" + (to exclude object files) or ".git,.svn" (to exclude SCM metadata + directories). For example: + + :set wildignore+=*.o,*.obj,.git + + A pattern such as "vendor/rails/**" would exclude all files and + subdirectories inside the "vendor/rails" directory (relative to + directory Command-T starts in). + + See the |'wildignore'| documentation for more information. + + +AUTHORS *command-t-authors* + +Command-T is written and maintained by Wincent Colaiuta . +Other contributors that have submitted patches include (in alphabetical +order): + + Lucas de Vries + Mike Lundy + Scott Bronson + Sung Pae + Zak Johnson + +As this was the first Vim plug-in I had ever written I was heavily influenced +by the design of the LustyExplorer plug-in by Stephen Bach, which I understand +is one of the largest Ruby-based Vim plug-ins to date. + +While the Command-T codebase doesn't contain any code directly copied from +LustyExplorer, I did use it as a reference for answers to basic questions (like +"How do you do 'X' in a Ruby-based Vim plug-in?"), and also copied some basic +architectural decisions (like the division of the code into Prompt, Settings +and MatchWindow classes). + +LustyExplorer is available from: + + http://www.vim.org/scripts/script.php?script_id=1890 + + +WEBSITE *command-t-website* + +The official website for Command-T is: + + https://wincent.com/products/command-t + +The latest release will always be available from there. + +Development in progress can be inspected via the project's Git repository +browser at: + + http://git.wincent.com/command-t.git + +A copy of each release is also available from the official Vim scripts site +at: + + http://www.vim.org/scripts/script.php?script_id=3025 + +Bug reports should be submitted to the issue tracker at: + + https://wincent.com/issues + + +DONATIONS *command-t-donations* + +Command-T itself is free software released under the terms of the BSD license. +If you would like to support further development you can make a donation via +PayPal to win@wincent.com: + + https://wincent.com/products/command-t/donations + + +LICENSE *command-t-license* + +Copyright 2010 Wincent Colaiuta. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + +HISTORY *command-t-history* + +0.8.1 (14 September 2010) + +- fix mapping issues for users who have set |'notimeout'| (patch from Sung + Pae) + +0.8 (19 August 2010) + +- overrides for the default mappings can now be lists of strings, allowing + multiple mappings to be defined for any given action +- t mapping only set up if no other map for |:CommandT| exists + (patch from Scott Bronson) +- prevent folds from appearing in the match listing +- tweaks to avoid the likelihood of "Not enough room" errors when trying to + open files +- watch out for "nil" windows when restoring window dimensions +- optimizations (avoid some repeated downcasing) +- move all Ruby files under the "command-t" subdirectory and avoid polluting + the "Vim" module namespace + +0.8b (11 July 2010) + +- large overhaul of the scoring algorithm to make the ordering of returned + results more intuitive; given the scope of the changes and room for + optimization of the new algorithm, this release is labelled as "beta" + +0.7 (10 June 2010) + +- handle more |'wildignore'| patterns by delegating to Vim's own |expand()| + function; with this change it is now viable to exclude patterns such as + 'vendor/rails/**' in addition to filename-only patterns like '*.o' and + '.git' (patch from Mike Lundy) +- always sort results alphabetically for empty search strings; this eliminates + filesystem-specific variations (patch from Mike Lundy) + +0.6 (28 April 2010) + +- |:CommandT| now accepts an optional parameter to specify the starting + directory, temporarily overriding the usual default of Vim's |:pwd| +- fix truncated paths when operating from root directory + +0.5.1 (11 April 2010) + +- fix for Ruby 1.9 compatibility regression introduced in 0.5 +- documentation enhancements, specifically targetted at Windows users + +0.5 (3 April 2010) + +- |:CommandTFlush| now re-evaluates settings, allowing changes made via |let| + to be picked up without having to restart Vim +- fix premature abort when scanning very deep directory hierarchies +- remove broken || key mapping on vt100 and xterm terminals +- provide settings for overriding default mappings +- minor performance optimization + +0.4 (27 March 2010) + +- add |g:CommandTMatchWindowAtTop| setting (patch from Zak Johnson) +- documentation fixes and enhancements +- internal refactoring and simplification + +0.3 (24 March 2010) + +- add |g:CommandTMaxHeight| setting for controlling the maximum height of the + match window (patch from Lucas de Vries) +- fix bug where |'list'| setting might be inappropriately set after dismissing + Command-T +- compatibility fix for different behaviour of "autoload" under Ruby 1.9.1 +- avoid "highlight group not found" warning when run under a version of Vim + that does not have syntax highlighting support +- open in split when opening normally would fail due to |'hidden'| and + |'modified'| values + +0.2 (23 March 2010) + +- compatibility fixes for compilation under Ruby 1.9 series +- compatibility fixes for compilation under Ruby 1.8.5 +- compatibility fixes for Windows and other non-UNIX platforms +- suppress "mapping already exists" message if t mapping is already + defined when plug-in is loaded +- exclude paths based on |'wildignore'| setting rather than a hardcoded + regular expression + +0.1 (22 March 2010) + +- initial public release + +------------------------------------------------------------------------------ +vim:tw=78:ft=help: diff --git a/doc/easymotion.txt b/doc/easymotion.txt new file mode 100755 index 0000000..13cc696 --- /dev/null +++ b/doc/easymotion.txt @@ -0,0 +1,163 @@ +*easymotion.txt* Version 1.0.8. Last change: 2011 Mar 30 + + + ______ __ ___ __ _ + / ____/____ ________ __/ |/ /____ / /_(_)____ ____ + / __/ / __ `/ ___/ / / / /|_/ // __ \/ __/ // __ \/ __ \ + / /___ / /_/ (__ ) /_/ / / / // /_/ / /_/ // /_/ / / / / + /_____/ \__,_/____/\__, /_/ /_/ \____/\__/_/ \____/_/ /_/ + /____/ + - Vim motions on speed! + + +============================================================================== +CONTENTS *easymotion-contents* + + 1. Introduction ....................... |easymotion-introduction| + 2. Usage .............................. |easymotion-usage| + 3. Requirements ....................... |easymotion-requirements| + 4. Configuration ...................... |easymotion-configuration| + 4.1 EasyMotion_keys ................ |EasyMotion_keys| + 4.2 EasyMotion_target_hl ........... |EasyMotion_target_hl| + 4.3 EasyMotion_shade_hl ............ |EasyMotion_shade_hl| + 4.4 EasyMotion_do_shade ............ |EasyMotion_do_shade| + 4.5 EasyMotion_do_mapping .......... |EasyMotion_do_mapping| + 5. License ............................ |easymotion-license| + 6. Known bugs ......................... |easymotion-known-bugs| + 7. Contributing ....................... |easymotion-contributing| + 8. Credits ............................ |easymotion-credits| + +============================================================================== +1. Introduction *easymotion* *easymotion-introduction* + +EasyMotion provides a much simpler way to use some motions in vim. It takes +the out of w or f{char} by highlighting all possible +choices and allowing you to press one key to jump directly to the target. + +When one of the available motions is triggered, all visible text preceding or +following the cursor is faded, and motion targets are highlighted. + +============================================================================== +2. Usage *easymotion-usage* + +EasyMotion is triggered manually or by one of the provided mappings (see +|EasyMotion_do_mapping| for details). + +Example: > + + Lorem ipsum dolor sit amet. + +If the word motion |w| is triggered with the default mapping w, the +text is updated like this (no braces are actually added, the letters are +highlighted in red by default): > + + Lorem {a}psum {b}olor {c}it {d}met. + +Press "c" to jump to the beginning of the word "sit": > + + Lorem ipsum dolor sit amet. + +And that's it! + +============================================================================== +3. Requirements *easymotion-requirements* + +EasyMotion has been developed and tested in vim 7.3, but it should run without +any problems in vim 7.2. + +Vi-compatible mode must be disabled. + +============================================================================== +4. Configuration *easymotion-configuration* + +Set the configuration variables globally in your vimrc file. + +Example: > + + let g:EasyMotion_keys = '1234567890' + let g:EasyMotion_do_shade = 0 + +------------------------------------------------------------------------------ +4.1 EasyMotion_keys *EasyMotion_keys* + +Set the keys which will be used for motion targets. Add as many keys as you +want. There's a lower chance that the motion targets will be grouped with many +keys available. + +Default: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' + +------------------------------------------------------------------------------ +4.2 EasyMotion_target_hl *EasyMotion_target_hl* + +Set the highlighting group for motion targets. + +Default: 'EasyMotionTarget' + +------------------------------------------------------------------------------ +4.3 EasyMotion_shade_hl *EasyMotion_shade_hl* + +Set the highlighting group for shaded text. + +Default: 'EasyMotionShade' + +------------------------------------------------------------------------------ +4.4 EasyMotion_do_shade *EasyMotion_do_shade* + +Set this to 0 if you want to disable text shading. + +Default: 1 + +------------------------------------------------------------------------------ +4.5 EasyMotion_do_mapping *EasyMotion_do_mapping* + +Set this to 0 if you want to disable the default mappings. The default +configuration provides the following mappings in both normal and visual +mode: + + Mapping Details + -------------------------- + f{char} See |f| + F{char} See |F| + t{char} See |t| + T{char} See |T| + w See |w| + e See |e| + b See |b| + +Default: 1 + +Note: If you disable this option, you'll have to map the motions yourself. See +the plugin source code for mapping details. + +============================================================================== +5. License *easymotion-license* + +Creative Commons Attribution-ShareAlike 3.0 Unported + +http://creativecommons.org/licenses/by-sa/3.0/ + +============================================================================== +6. Known bugs *easymotion-known-bugs* + +None. + +============================================================================== +7. Contributing *easymotion-contributing* + +If you experience any bugs or have feature requests, please open an issue on +GitHub. Fork the source repository on GitHub and send a pull request if you +have any code improvements. + +Author: Kim Silkebækken +Source repository: https://github.com/Lokaltog/vim-easymotion + +============================================================================== +8. Credits *easymotion-credits* + +EasyMotion is based on Bartlomiej Podolak's great PreciseJump script, which +can be downloaded here: + +http://www.vim.org/scripts/script.php?script_id=3437 + +============================================================================== +vim:tw=78:sw=4:ts=8:ft=help:norl: diff --git a/doc/snipMate.txt b/doc/snipMate.txt new file mode 100644 index 0000000..704d44a --- /dev/null +++ b/doc/snipMate.txt @@ -0,0 +1,286 @@ +*snipMate.txt* Plugin for using TextMate-style snippets in Vim. + +snipMate *snippet* *snippets* *snipMate* +Last Change: July 13, 2009 + +|snipMate-description| Description +|snipMate-syntax| Snippet syntax +|snipMate-usage| Usage +|snipMate-settings| Settings +|snipMate-features| Features +|snipMate-disadvantages| Disadvantages to TextMate +|snipMate-contact| Contact + +For Vim version 7.0 or later. +This plugin only works if 'compatible' is not set. +{Vi does not have any of these features.} + +============================================================================== +DESCRIPTION *snipMate-description* + +snipMate.vim implements some of TextMate's snippets features in Vim. A +snippet is a piece of often-typed text that you can insert into your +document using a trigger word followed by a . + +For instance, in a C file using the default installation of snipMate.vim, if +you type "for" in insert mode, it will expand a typical for loop in C: > + + for (i = 0; i < count; i++) { + + } + + +To go to the next item in the loop, simply over to it; if there is +repeated code, such as the "i" variable in this example, you can simply +start typing once it's highlighted and all the matches specified in the +snippet will be updated. To go in reverse, use . + +============================================================================== +SYNTAX *snippet-syntax* + +Snippets can be defined in two ways. They can be in their own file, named +after their trigger in 'snippets//.snippet', or they can be +defined together in a 'snippets/.snippets' file. Note that dotted +'filetype' syntax is supported -- e.g., you can use > + + :set ft=html.eruby + +to activate snippets for both HTML and eRuby for the current file. + +The syntax for snippets in *.snippets files is the following: > + + snippet trigger + expanded text + more expanded text + +Note that the first hard tab after the snippet trigger is required, and not +expanded in the actual snippet. The syntax for *.snippet files is the same, +only without the trigger declaration and starting indentation. + +Also note that snippets must be defined using hard tabs. They can be expanded +to spaces later if desired (see |snipMate-indenting|). + +"#" is used as a line-comment character in *.snippets files; however, they can +only be used outside of a snippet declaration. E.g.: > + + # this is a correct comment + snippet trigger + expanded text + snippet another_trigger + # this isn't a comment! + expanded text +< +This should hopefully be obvious with the included syntax highlighting. + + *snipMate-${#}* +Tab stops ~ + +By default, the cursor is placed at the end of a snippet. To specify where the +cursor is to be placed next, use "${#}", where the # is the number of the tab +stop. E.g., to place the cursor first on the id of a
tag, and then allow +the user to press to go to the middle of it: + > + snippet div +
+ ${2} +
+< + *snipMate-placeholders* *snipMate-${#:}* *snipMate-$#* +Placeholders ~ + +Placeholder text can be supplied using "${#:text}", where # is the number of +the tab stop. This text then can be copied throughout the snippet using "$#", +given # is the same number as used before. So, to make a C for loop: > + + snippet for + for (${2:i}; $2 < ${1:count}; $1++) { + ${4} + } + +This will cause "count" to first be selected and change if the user starts +typing. When is pressed, the "i" in ${2}'s position will be selected; +all $2 variables will default to "i" and automatically be updated if the user +starts typing. +NOTE: "$#" syntax is used only for variables, not for tab stops as in TextMate. + +Variables within variables are also possible. For instance: > + + snippet opt + + +Will, as usual, cause "option" to first be selected and update all the $1 +variables if the user starts typing. Since one of these variables is inside of +${2}, this text will then be used as a placeholder for the next tab stop, +allowing the user to change it if he wishes. + +To copy a value throughout a snippet without supplying default text, simply +use the "${#:}" construct without the text; e.g.: > + + snippet foo + ${1:}bar$1 +< *snipMate-commands* +Interpolated Vim Script ~ + +Snippets can also contain Vim script commands that are executed (via |eval()|) +when the snippet is inserted. Commands are given inside backticks (`...`); for +TextMates's functionality, use the |system()| function. E.g.: > + + snippet date + `system("date +%Y-%m-%d")` + +will insert the current date, assuming you are on a Unix system. Note that you +can also (and should) use |strftime()| for this example. + +Filename([{expr}] [, {defaultText}]) *snipMate-filename* *Filename()* + +Since the current filename is used often in snippets, a default function +has been defined for it in snipMate.vim, appropriately called Filename(). + +With no arguments, the default filename without an extension is returned; +the first argument specifies what to place before or after the filename, +and the second argument supplies the default text to be used if the file +has not been named. "$1" in the first argument is replaced with the filename; +if you only want the filename to be returned, the first argument can be left +blank. Examples: > + + snippet filename + `Filename()` + snippet filename_with_default + `Filename('', 'name')` + snippet filename_foo + `filename('$1_foo')` + +The first example returns the filename if it the file has been named, and an +empty string if it hasn't. The second returns the filename if it's been named, +and "name" if it hasn't. The third returns the filename followed by "_foo" if +it has been named, and an empty string if it hasn't. + + *multi_snip* +To specify that a snippet can have multiple matches in a *.snippets file, use +this syntax: > + + snippet trigger A description of snippet #1 + expand this text + snippet trigger A description of snippet #2 + expand THIS text! + +In this example, when "trigger" is typed, a numbered menu containing all +of the descriptions of the "trigger" will be shown; when the user presses the +corresponding number, that snippet will then be expanded. + +To create a snippet with multiple matches using *.snippet files, +simply place all the snippets in a subdirectory with the trigger name: +'snippets///.snippet'. + +============================================================================== +USAGE *snipMate-usage* + + *'snippets'* *g:snippets_dir* +Snippets are by default looked for any 'snippets' directory in your +'runtimepath'. Typically, it is located at '~/.vim/snippets/' on *nix or +'$HOME\vimfiles\snippets\' on Windows. To change that location or add another +one, change the g:snippets_dir variable in your |.vimrc| to your preferred +directory, or use the |ExtractSnips()|function. This will be used by the +|globpath()| function, and so accepts the same syntax as it (e.g., +comma-separated paths). + +ExtractSnipsFile({directory}, {filetype}) *ExtractSnipsFile()* *.snippets* + +ExtractSnipsFile() extracts the specified *.snippets file for the given +filetype. A .snippets file contains multiple snippet declarations for the +filetype. It is further explained above, in |snippet-syntax|. + +ExtractSnips({directory}, {filetype}) *ExtractSnips()* *.snippet* + +ExtractSnips() extracts *.snippet files from the specified directory and +defines them as snippets for the given filetype. The directory tree should +look like this: 'snippets//.snippet'. If the snippet has +multiple matches, it should look like this: +'snippets///.snippet' (see |multi_snip|). + + *ResetSnippets()* +The ResetSnippets() function removes all snippets from memory. This is useful +to put at the top of a snippet setup file for if you would like to |:source| +it multiple times. + + *list-snippets* *i_CTRL-R_* +If you would like to see what snippets are available, simply type +in the current buffer to show a list via |popupmenu-completion|. + +============================================================================== +SETTINGS *snipMate-settings* *g:snips_author* + +The g:snips_author string (similar to $TM_FULLNAME in TextMate) should be set +to your name; it can then be used in snippets to automatically add it. E.g.: > + + let g:snips_author = 'Hubert Farnsworth' + snippet name + `g:snips_author` +< + *snipMate-expandtab* *snipMate-indenting* +If you would like your snippets to be expanded using spaces instead of tabs, +just enable 'expandtab' and set 'softtabstop' to your preferred amount of +spaces. If 'softtabstop' is not set, 'shiftwidth' is used instead. + + *snipMate-remap* +snipMate does not come with a setting to customize the trigger key, but you +can remap it easily in the two lines it's defined in the 'after' directory +under 'plugin/snipMate.vim'. For instance, to change the trigger key +to CTRL-J, just change this: > + + ino =TriggerSnippet() + snor i=TriggerSnippet() + +to this: > + ino =TriggerSnippet() + snor i=TriggerSnippet() + +============================================================================== +FEATURES *snipMate-features* + +snipMate.vim has the following features among others: + - The syntax of snippets is very similar to TextMate's, allowing + easy conversion. + - The position of the snippet is kept transparently (i.e. it does not use + markers/placeholders written to the buffer), which allows you to escape + out of an incomplete snippet, something particularly useful in Vim. + - Variables in snippets are updated as-you-type. + - Snippets can have multiple matches. + - Snippets can be out of order. For instance, in a do...while loop, the + condition can be added before the code. + - [New] File-based snippets are supported. + - [New] Triggers after non-word delimiters are expanded, e.g. "foo" + in "bar.foo". + - [New] can now be used to jump tab stops in reverse order. + +============================================================================== +DISADVANTAGES *snipMate-disadvantages* + +snipMate.vim currently has the following disadvantages to TextMate's snippets: + - There is no $0; the order of tab stops must be explicitly stated. + - Placeholders within placeholders are not possible. E.g.: > + + '${3}
' +< + In TextMate this would first highlight ' id="some_id"', and if + you hit delete it would automatically skip ${2} and go to ${3} + on the next , but if you didn't delete it it would highlight + "some_id" first. You cannot do this in snipMate.vim. + - Regex cannot be performed on variables, such as "${1/.*/\U&}" + - Placeholders cannot span multiple lines. + - Activating snippets in different scopes of the same file is + not possible. + +Perhaps some of these features will be added in a later release. + +============================================================================== +CONTACT *snipMate-contact* *snipMate-author* + +To contact the author (Michael Sanders), please email: + msanders42+snipmate gmail com + +I greatly appreciate any suggestions or improvements offered for the script. + +============================================================================== + +vim:tw=78:ts=8:ft=help:norl: diff --git a/doc/tags b/doc/tags new file mode 100644 index 0000000..51e9ece --- /dev/null +++ b/doc/tags @@ -0,0 +1,182 @@ +'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'* +'NERDTreeHighlightCursorline' NERD_tree.txt /*'NERDTreeHighlightCursorline'* +'NERDTreeHijackNetrw' NERD_tree.txt /*'NERDTreeHijackNetrw'* +'NERDTreeIgnore' NERD_tree.txt /*'NERDTreeIgnore'* +'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'* +'snippets' snipMate.txt /*'snippets'* +.snippet snipMate.txt /*.snippet* +.snippets snipMate.txt /*.snippets* +:CommandT command-t.txt /*:CommandT* +:CommandTFlush command-t.txt /*:CommandTFlush* +: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* +:TComment tcomment.txt /*:TComment* +:TCommentAs tcomment.txt /*:TCommentAs* +:TCommentBlock tcomment.txt /*:TCommentBlock* +:TCommentInline tcomment.txt /*:TCommentInline* +:TCommentMaybeInline tcomment.txt /*:TCommentMaybeInline* +:TCommentRight tcomment.txt /*:TCommentRight* +ExtractSnips() snipMate.txt /*ExtractSnips()* +ExtractSnipsFile() snipMate.txt /*ExtractSnipsFile()* +Filename() snipMate.txt /*Filename()* +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* +ResetSnippets() snipMate.txt /*ResetSnippets()* +command-t command-t.txt /*command-t* +command-t-authors command-t.txt /*command-t-authors* +command-t-commands command-t.txt /*command-t-commands* +command-t-contents command-t.txt /*command-t-contents* +command-t-donations command-t.txt /*command-t-donations* +command-t-history command-t.txt /*command-t-history* +command-t-installation command-t.txt /*command-t-installation* +command-t-intro command-t.txt /*command-t-intro* +command-t-license command-t.txt /*command-t-license* +command-t-mappings command-t.txt /*command-t-mappings* +command-t-options command-t.txt /*command-t-options* +command-t-pathogen command-t.txt /*command-t-pathogen* +command-t-requirements command-t.txt /*command-t-requirements* +command-t-trouble-shooting command-t.txt /*command-t-trouble-shooting* +command-t-usage command-t.txt /*command-t-usage* +command-t-website command-t.txt /*command-t-website* +command-t-wildignore command-t.txt /*command-t-wildignore* +command-t.txt command-t.txt /*command-t.txt* +g:CommandTAcceptSelectionMap command-t.txt /*g:CommandTAcceptSelectionMap* +g:CommandTAcceptSelectionSplitMap command-t.txt /*g:CommandTAcceptSelectionSplitMap* +g:CommandTAcceptSelectionTabMap command-t.txt /*g:CommandTAcceptSelectionTabMap* +g:CommandTAcceptSelectionVSplitMap command-t.txt /*g:CommandTAcceptSelectionVSplitMap* +g:CommandTAlwaysShowDotFiles command-t.txt /*g:CommandTAlwaysShowDotFiles* +g:CommandTBackspaceMap command-t.txt /*g:CommandTBackspaceMap* +g:CommandTCancelMap command-t.txt /*g:CommandTCancelMap* +g:CommandTClearMap command-t.txt /*g:CommandTClearMap* +g:CommandTCursorEndMap command-t.txt /*g:CommandTCursorEndMap* +g:CommandTCursorLeftMap command-t.txt /*g:CommandTCursorLeftMap* +g:CommandTCursorRightMap command-t.txt /*g:CommandTCursorRightMap* +g:CommandTCursorStartMap command-t.txt /*g:CommandTCursorStartMap* +g:CommandTDeleteMap command-t.txt /*g:CommandTDeleteMap* +g:CommandTMatchWindowAtTop command-t.txt /*g:CommandTMatchWindowAtTop* +g:CommandTMaxDepth command-t.txt /*g:CommandTMaxDepth* +g:CommandTMaxFiles command-t.txt /*g:CommandTMaxFiles* +g:CommandTMaxHeight command-t.txt /*g:CommandTMaxHeight* +g:CommandTNeverShowDotFiles command-t.txt /*g:CommandTNeverShowDotFiles* +g:CommandTScanDotDirectories command-t.txt /*g:CommandTScanDotDirectories* +g:CommandTSelectNextMap command-t.txt /*g:CommandTSelectNextMap* +g:CommandTSelectPrevMap command-t.txt /*g:CommandTSelectPrevMap* +g:CommandTToggleFocusMap command-t.txt /*g:CommandTToggleFocusMap* +g:snippets_dir snipMate.txt /*g:snippets_dir* +g:snips_author snipMate.txt /*g:snips_author* +g:tcommentMapLeaderOp1 tcomment.txt /*g:tcommentMapLeaderOp1* +g:tcommentMapLeaderOp2 tcomment.txt /*g:tcommentMapLeaderOp2* +g:tcommentOpModeExtra tcomment.txt /*g:tcommentOpModeExtra* +i_CTRL-R_ snipMate.txt /*i_CTRL-R_* +list-snippets snipMate.txt /*list-snippets* +multi_snip snipMate.txt /*multi_snip* +snipMate snipMate.txt /*snipMate* +snipMate-$# snipMate.txt /*snipMate-$#* +snipMate-${#:} snipMate.txt /*snipMate-${#:}* +snipMate-${#} snipMate.txt /*snipMate-${#}* +snipMate-author snipMate.txt /*snipMate-author* +snipMate-commands snipMate.txt /*snipMate-commands* +snipMate-contact snipMate.txt /*snipMate-contact* +snipMate-description snipMate.txt /*snipMate-description* +snipMate-disadvantages snipMate.txt /*snipMate-disadvantages* +snipMate-expandtab snipMate.txt /*snipMate-expandtab* +snipMate-features snipMate.txt /*snipMate-features* +snipMate-filename snipMate.txt /*snipMate-filename* +snipMate-indenting snipMate.txt /*snipMate-indenting* +snipMate-placeholders snipMate.txt /*snipMate-placeholders* +snipMate-remap snipMate.txt /*snipMate-remap* +snipMate-settings snipMate.txt /*snipMate-settings* +snipMate-usage snipMate.txt /*snipMate-usage* +snipMate.txt snipMate.txt /*snipMate.txt* +snippet snipMate.txt /*snippet* +snippet-syntax snipMate.txt /*snippet-syntax* +snippets snipMate.txt /*snippets* +tcomment#CollectFileTypes() tcomment.txt /*tcomment#CollectFileTypes()* +tcomment#Comment() tcomment.txt /*tcomment#Comment()* +tcomment#CommentAs() tcomment.txt /*tcomment#CommentAs()* +tcomment#Complete() tcomment.txt /*tcomment#Complete()* +tcomment#CompleteArgs() tcomment.txt /*tcomment#CompleteArgs()* +tcomment#DefineType() tcomment.txt /*tcomment#DefineType()* +tcomment#Operator() tcomment.txt /*tcomment#Operator()* +tcomment#OperatorAnyway() tcomment.txt /*tcomment#OperatorAnyway()* +tcomment#OperatorLine() tcomment.txt /*tcomment#OperatorLine()* +tcomment#OperatorLineAnyway() tcomment.txt /*tcomment#OperatorLineAnyway()* +tcomment#TypeExists() tcomment.txt /*tcomment#TypeExists()* +tcomment-maps tcomment.txt /*tcomment-maps* +tcomment.txt tcomment.txt /*tcomment.txt* diff --git a/doc/tcomment.txt b/doc/tcomment.txt new file mode 100644 index 0000000..b0e0854 --- /dev/null +++ b/doc/tcomment.txt @@ -0,0 +1,233 @@ +*tcomment.txt* An easily extensible & universal comment plugin + Author: Thomas Link, micathom AT gmail com?subject=vim + +tcomment provides easy to use, file-type sensible comments for Vim. It +can handle embedded syntax. + +TComment works like a toggle, i.e., it will comment out text that +contains uncommented lines, and it will remove comment markup for +already commented text (i.e. text that contains no uncommented lines). + +If the file-type is properly defined, TComment will figure out which +comment string to use. Otherwise you use |tcomment#DefineType()| to +override the default choice. + +TComment can properly handle an embedded syntax, e.g., ruby/python/perl +regions in vim scripts, HTML or JavaScript in php code etc. + + + *tcomment-maps* +Key bindings~ + +Most of the time the default toggle keys will do what you want (or to be +more precise: what I think you want it to do ;-). + + *g:tcommentMapLeaderOp1* + *g:tcommentMapLeaderOp2* +As operator (the prefix can be customized via g:tcommentMapLeaderOp1 +and g:tcommentMapLeaderOp2): + + gc{motion} :: Toggle comments (for small comments within one line + the &filetype_inline style will be used, if + defined) + gcc :: Toggle comment for the current line + gC{motion} :: Comment region + gCc :: Comment the current line + + *g:tcommentOpModeExtra* +By default the cursor stays put. If you want the cursor to the end of +the commented text, set g:tcommentOpModeExtra to '>' (but this may not +work properly with exclusive motions). + +Primary key maps: + + :: :TComment + :: :TComment + b :: :TCommentBlock + a :: :TCommentAs + n :: :TCommentAs &filetype + s :: :TCommentAs &filetype_ + i :: :TCommentInline + r :: :TCommentRight + p :: Comment the current inner paragraph + +A secondary set of key maps is defined for normal mode. + + __ :: :TComment + _p :: Comment the current inner paragraph + _ :: :TComment + _i :: :TCommentInline + _r :: :TCommentRight + _b :: :TCommentBlock + _a :: :TCommentAs + _n :: :TCommentAs &filetype + _s :: :TCommentAs &filetype_ + + +----------------------------------------------------------------------- +Install~ + +Edit the vba file and type: > + + :so % + +See :help vimball for details. If you have difficulties or use vim 7.0, +please make sure, you have the current version of vimball (vimscript +#1502) installed or update your runtime. + + +======================================================================== +Contents~ + + :TComment ..................... |:TComment| + :TCommentAs ................... |:TCommentAs| + :TCommentRight ................ |:TCommentRight| + :TCommentBlock ................ |:TCommentBlock| + :TCommentInline ............... |:TCommentInline| + :TCommentMaybeInline .......... |:TCommentMaybeInline| + tcomment#DefineType ........... |tcomment#DefineType()| + tcomment#TypeExists ........... |tcomment#TypeExists()| + tcomment#Comment .............. |tcomment#Comment()| + tcomment#Operator ............. |tcomment#Operator()| + tcomment#OperatorLine ......... |tcomment#OperatorLine()| + tcomment#OperatorAnyway ....... |tcomment#OperatorAnyway()| + tcomment#OperatorLineAnyway ... |tcomment#OperatorLineAnyway()| + tcomment#CommentAs ............ |tcomment#CommentAs()| + tcomment#CollectFileTypes ..... |tcomment#CollectFileTypes()| + tcomment#Complete ............. |tcomment#Complete()| + tcomment#CompleteArgs ......... |tcomment#CompleteArgs()| + + +======================================================================== +plugin/tcomment.vim~ + + *:TComment* +:[range]TComment[!] ?ARGS... + If there is a visual selection that begins and ends in the same line, + then |:TCommentInline| is used instead. + The optional range defaults to the current line. With a bang '!', + always comment the line. + + ARGS... are either (see also |tcomment#Comment()|): + 1. a list of key=value pairs + 2. 1-2 values for: ?commentBegin, ?commentEnd + + *:TCommentAs* +:[range]TCommentAs[!] commenttype ?ARGS... + TCommentAs requires g:tcomment_{filetype} to be defined. + With a bang '!', always comment the line. + + ARGS... are either (see also |tcomment#Comment()|): + 1. a list of key=value pairs + 2. 1-2 values for: ?commentBegin, ?commentEnd + + *:TCommentRight* +:[range]TCommentRight[!] ?ARGS... + Comment the text to the right of the cursor. If a visual selection was + made (be it block-wise or not), all lines are commented out at from + the current cursor position downwards. + With a bang '!', always comment the line. + + ARGS... are either (see also |tcomment#Comment()|): + 1. a list of key=value pairs + 2. 1-2 values for: ?commentBegin, ?commentEnd + + *:TCommentBlock* +:[range]TCommentBlock[!] ?ARGS... + Comment as "block", e.g. use the {&ft}_block comment style. The + commented text isn't indented or reformated. + With a bang '!', always comment the line. + + ARGS... are either (see also |tcomment#Comment()|): + 1. a list of key=value pairs + 2. 1-2 values for: ?commentBegin, ?commentEnd + + *:TCommentInline* +:[range]TCommentInline[!] ?ARGS... + Use the {&ft}_inline comment style. + With a bang '!', always comment the line. + + ARGS... are either (see also |tcomment#Comment()|): + 1. a list of key=value pairs + 2. 1-2 values for: ?commentBegin, ?commentEnd + + *:TCommentMaybeInline* +:[range]TCommentMaybeInline[!] ?ARGS... + With a bang '!', always comment the line. + + ARGS... are either (see also |tcomment#Comment()|): + 1. a list of key=value pairs + 2. 1-2 values for: ?commentBegin, ?commentEnd + + +======================================================================== +autoload/tcomment.vim~ + + *tcomment#DefineType()* +tcomment#DefineType(name, commentstring) + Currently this function just sets a variable + + *tcomment#TypeExists()* +tcomment#TypeExists(name) + Return 1 if a comment type is defined. + + *tcomment#Comment()* +tcomment#Comment(beg, end, ...) + tcomment#Comment(line1, line2, ?commentMode, ?commentAnyway, ?args...) + args... are either: + 1. a list of key=value pairs where known keys are: + as=STRING ... Use a specific comment definition + col=N ... Start the comment at column N (in block mode; must + be smaller than |indent()|) + count=N ... Multiply the comment markers + mode=STRING ... See the notes below on the "commentMode" argument + begin=STRING ... Comment prefix + end=STRING ... Comment postfix + 2. 1-2 values for: ?commentPrefix, ?commentPostfix + 3. a dictionary (internal use only) + + commentMode: + G ... guess the value of commentMode + B ... block (use extra lines for the comment markers) + i ... maybe inline, guess + I ... inline + R ... right (comment the line right of the cursor) + v ... visual + o ... operator + By default, each line in range will be commented by adding the comment + prefix and postfix. + + *tcomment#Operator()* +tcomment#Operator(type, ...) + + *tcomment#OperatorLine()* +tcomment#OperatorLine(type) + + *tcomment#OperatorAnyway()* +tcomment#OperatorAnyway(type) + + *tcomment#OperatorLineAnyway()* +tcomment#OperatorLineAnyway(type) + + *tcomment#CommentAs()* +tcomment#CommentAs(beg, end, commentAnyway, filetype, ?args...) + Where args is either: + 1. A count NUMBER + 2. An args list (see the notes on the "args" argument of + |tcomment#Comment()|) + comment text as if it were of a specific filetype + + *tcomment#CollectFileTypes()* +tcomment#CollectFileTypes() + collect all known comment types + + *tcomment#Complete()* +tcomment#Complete(ArgLead, CmdLine, CursorPos) + return a list of filetypes for which a tcomment_{&ft} is defined + + *tcomment#CompleteArgs()* +tcomment#CompleteArgs(ArgLead, CmdLine, CursorPos) + + + +vim:tw=78:fo=tcq2:isk=!-~,^*,^|,^":ts=8:ft=help:norl: diff --git a/ftdetect/markdown.vim b/ftdetect/markdown.vim new file mode 100644 index 0000000..8e10a06 --- /dev/null +++ b/ftdetect/markdown.vim @@ -0,0 +1,2 @@ +" Markdown +autocmd BufNewFile,BufRead *.{md,mkd,mkdn,mark*} set filetype=markdown diff --git a/ftplugin/html/sparkup.py b/ftplugin/html/sparkup.py new file mode 100755 index 0000000..50de2a8 --- /dev/null +++ b/ftplugin/html/sparkup.py @@ -0,0 +1,1087 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +version = "0.1.3" + +import os +import fileinput +import getopt +import sys +import re + +# =============================================================================== + +class Dialect: + shortcuts = {} + synonyms = {} + required = {} + short_tags = () + +class HtmlDialect(Dialect): + shortcuts = { + 'cc:ie': { + 'opening_tag': ''}, + 'cc:ie6': { + 'opening_tag': ''}, + 'cc:ie7': { + 'opening_tag': ''}, + 'cc:noie': { + 'opening_tag': '', + 'closing_tag': ''}, + 'html:4t': { + 'expand': True, + 'opening_tag': + '\n' + + '\n' + + '\n' + + ' ' + '\n' + + ' ' + '\n' + + '\n' + + '', + 'closing_tag': + '\n' + + ''}, + 'html:4s': { + 'expand': True, + 'opening_tag': + '\n' + + '\n' + + '\n' + + ' ' + '\n' + + ' ' + '\n' + + '\n' + + '', + 'closing_tag': + '\n' + + ''}, + 'html:xt': { + 'expand': True, + 'opening_tag': + '\n' + + '\n' + + '\n' + + ' ' + '\n' + + ' ' + '\n' + + '\n' + + '', + 'closing_tag': + '\n' + + ''}, + 'html:xs': { + 'expand': True, + 'opening_tag': + '\n' + + '\n' + + '\n' + + ' ' + '\n' + + ' ' + '\n' + + '\n' + + '', + 'closing_tag': + '\n' + + ''}, + 'html:xxs': { + 'expand': True, + 'opening_tag': + '\n' + + '\n' + + '\n' + + ' ' + '\n' + + ' ' + '\n' + + '\n' + + '', + 'closing_tag': + '\n' + + ''}, + 'html:5': { + 'expand': True, + 'opening_tag': + '\n' + + '\n' + + '\n' + + ' ' + '\n' + + ' ' + '\n' + + '\n' + + '', + 'closing_tag': + '\n' + + ''}, + 'input:button': { + 'name': 'input', + 'attributes': { 'class': 'button', 'type': 'button', 'name': '', 'value': '' } + }, + 'input:password': { + 'name': 'input', + 'attributes': { 'class': 'text password', 'type': 'password', 'name': '', 'value': '' } + }, + 'input:radio': { + 'name': 'input', + 'attributes': { 'class': 'radio', 'type': 'radio', 'name': '', 'value': '' } + }, + 'input:checkbox': { + 'name': 'input', + 'attributes': { 'class': 'checkbox', 'type': 'checkbox', 'name': '', 'value': '' } + }, + 'input:file': { + 'name': 'input', + 'attributes': { 'class': 'file', 'type': 'file', 'name': '', 'value': '' } + }, + 'input:text': { + 'name': 'input', + 'attributes': { 'class': 'text', 'type': 'text', 'name': '', 'value': '' } + }, + 'input:submit': { + 'name': 'input', + 'attributes': { 'class': 'submit', 'type': 'submit', 'value': '' } + }, + 'input:hidden': { + 'name': 'input', + 'attributes': { 'type': 'hidden', 'name': '', 'value': '' } + }, + 'script:src': { + 'name': 'script', + 'attributes': { 'src': '' } + }, + 'script:jquery': { + 'name': 'script', + 'attributes': { 'src': 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' } + }, + 'script:jsapi': { + 'name': 'script', + 'attributes': { 'src': 'http://www.google.com/jsapi' } + }, + 'script:jsapix': { + 'name': 'script', + 'text': '\n google.load("jquery", "1.3.2");\n google.setOnLoadCallback(function() {\n \n });\n' + }, + 'link:css': { + 'name': 'link', + 'attributes': { 'rel': 'stylesheet', 'type': 'text/css', 'href': '', 'media': 'all' }, + }, + 'link:print': { + 'name': 'link', + 'attributes': { 'rel': 'stylesheet', 'type': 'text/css', 'href': '', 'media': 'print' }, + }, + 'link:favicon': { + 'name': 'link', + 'attributes': { 'rel': 'shortcut icon', 'type': 'image/x-icon', 'href': '' }, + }, + 'link:touch': { + 'name': 'link', + 'attributes': { 'rel': 'apple-touch-icon', 'href': '' }, + }, + 'link:rss': { + 'name': 'link', + 'attributes': { 'rel': 'alternate', 'type': 'application/rss+xml', 'title': 'RSS', 'href': '' }, + }, + 'link:atom': { + 'name': 'link', + 'attributes': { 'rel': 'alternate', 'type': 'application/atom+xml', 'title': 'Atom', 'href': '' }, + }, + 'meta:ie7': { + 'name': 'meta', + 'attributes': { 'http-equiv': 'X-UA-Compatible', 'content': 'IE=7' }, + }, + 'meta:ie8': { + 'name': 'meta', + 'attributes': { 'http-equiv': 'X-UA-Compatible', 'content': 'IE=8' }, + }, + 'form:get': { + 'name': 'form', + 'attributes': { 'method': 'get' }, + }, + 'form:g': { + 'name': 'form', + 'attributes': { 'method': 'get' }, + }, + 'form:post': { + 'name': 'form', + 'attributes': { 'method': 'post' }, + }, + 'form:p': { + 'name': 'form', + 'attributes': { 'method': 'post' }, + }, + } + synonyms = { + 'checkbox': 'input:checkbox', + 'check': 'input:checkbox', + 'input:c': 'input:checkbox', + 'button': 'input:button', + 'input:b': 'input:button', + 'input:h': 'input:hidden', + 'hidden': 'input:hidden', + 'submit': 'input:submit', + 'input:s': 'input:submit', + 'radio': 'input:radio', + 'input:r': 'input:radio', + 'text': 'input:text', + 'passwd': 'input:password', + 'password': 'input:password', + 'pw': 'input:password', + 'input:t': 'input:text', + 'linkcss': 'link:css', + 'scriptsrc': 'script:src', + 'jquery': 'script:jquery', + 'jsapi': 'script:jsapi', + 'html5': 'html:5', + 'html4': 'html:4s', + 'html4s': 'html:4s', + 'html4t': 'html:4t', + 'xhtml': 'html:xxs', + 'xhtmlt': 'html:xt', + 'xhtmls': 'html:xs', + 'xhtml11': 'html:xxs', + 'opt': 'option', + 'st': 'strong', + 'css': 'style', + 'csss': 'link:css', + 'css:src': 'link:css', + 'csssrc': 'link:css', + 'js': 'script', + 'jss': 'script:src', + 'js:src': 'script:src', + 'jssrc': 'script:src', + } + short_tags = ( + 'area', 'base', 'basefont', 'br', 'embed', 'hr', \ + 'input', 'img', 'link', 'param', 'meta') + required = { + 'a': {'href':''}, + 'base': {'href':''}, + 'abbr': {'title': ''}, + 'acronym':{'title': ''}, + 'bdo': {'dir': ''}, + 'link': {'rel': 'stylesheet', 'href': ''}, + 'style': {'type': 'text/css'}, + 'script': {'type': 'text/javascript'}, + 'img': {'src':'', 'alt':''}, + 'iframe': {'src': '', 'frameborder': '0'}, + 'embed': {'src': '', 'type': ''}, + 'object': {'data': '', 'type': ''}, + 'param': {'name': '', 'value': ''}, + 'form': {'action': '', 'method': 'post'}, + 'table': {'cellspacing': '0'}, + 'input': {'type': '', 'name': '', 'value': ''}, + 'base': {'href': ''}, + 'area': {'shape': '', 'coords': '', 'href': '', 'alt': ''}, + 'select': {'name': ''}, + 'option': {'value': ''}, + 'textarea':{'name': ''}, + 'meta': {'content': ''}, + } + +class Parser: + """The parser. + """ + + # Constructor + # --------------------------------------------------------------------------- + + def __init__(self, options=None, str='', dialect=HtmlDialect()): + """Constructor. + """ + + self.tokens = [] + self.str = str + self.options = options + self.dialect = dialect + self.root = Element(parser=self) + self.caret = [] + self.caret.append(self.root) + self._last = [] + + # Methods + # --------------------------------------------------------------------------- + + def load_string(self, str): + """Loads a string to parse. + """ + + self.str = str + self._tokenize() + self._parse() + + def render(self): + """Renders. + Called by [[Router]]. + """ + + # Get the initial render of the root node + output = self.root.render() + + # Indent by whatever the input is indented with + indent = re.findall("^[\r\n]*(\s*)", self.str)[0] + output = indent + output.replace("\n", "\n" + indent) + + # Strip newline if not needed + if self.options.has("no-last-newline") \ + or self.prefix or self.suffix: + output = re.sub(r'\n\s*$', '', output) + + # TextMate mode + if self.options.has("textmate"): + output = self._textmatify(output) + + return output + + # Protected methods + # --------------------------------------------------------------------------- + + def _textmatify(self, output): + """Returns a version of the output with TextMate placeholders in it. + """ + + matches = re.findall(r'(>$%i]+>\s*)", str) + if match is None: break + if self.prefix is None: self.prefix = '' + self.prefix += match.group(0) + str = str[len(match.group(0)):] + + while True: + match = re.findall(r"(\s*<[^>]+>[\s\n\r]*)$", str) + if not match: break + if self.suffix is None: self.suffix = '' + self.suffix = match[0] + self.suffix + str = str[:-len(match[0])] + + # Split by the element separators + for token in re.split('(<|>|\+(?!\\s*\+|$))', str): + if token.strip() != '': + self.tokens.append(Token(token, parser=self)) + + def _parse(self): + """Takes the tokens and does its thing. + Populates [[self.root]]. + """ + + # Carry it over to the root node. + if self.prefix or self.suffix: + self.root.prefix = self.prefix + self.root.suffix = self.suffix + self.root.depth += 1 + + for token in self.tokens: + if token.type == Token.ELEMENT: + # Reset the "last elements added" list. We will + # repopulate this with the new elements added now. + self._last[:] = [] + + # Create [[Element]]s from a [[Token]]. + # They will be created as many as the multiplier specifies, + # multiplied by how many carets we have + count = 0 + for caret in self.caret: + local_count = 0 + for i in range(token.multiplier): + count += 1 + local_count += 1 + new = Element(token, caret, + count = count, + local_count = local_count, + parser = self) + self._last.append(new) + caret.append(new) + + # For > + elif token.type == Token.CHILD: + # The last children added. + self.caret[:] = self._last + + # For < + elif token.type == Token.PARENT: + # If we're the root node, don't do anything + parent = self.caret[0].parent + if parent is not None: + self.caret[:] = [parent] + return + + # Properties + # --------------------------------------------------------------------------- + + # Property: dialect + # The dialect of XML + dialect = None + + # Property: str + # The string + str = '' + + # Property: tokens + # The list of tokens + tokens = [] + + # Property: options + # Reference to the [[Options]] instance + options = None + + # Property: root + # The root [[Element]] node. + root = None + + # Property: caret + # The current insertion point. + caret = None + + # Property: _last + # List of the last appended stuff + _last = None + + # Property: indent + # Yeah + indent = '' + + # Property: prefix + # (String) The trailing tag in the beginning. + # + # Description: + # For instance, in `
ul>li
`, the `prefix` is `
`. + prefix = '' + + # Property: suffix + # (string) The trailing tag at the end. + suffix = '' + pass + +# =============================================================================== + +class Element: + """An element. + """ + + def __init__(self, token=None, parent=None, count=None, local_count=None, \ + parser=None, opening_tag=None, closing_tag=None, \ + attributes=None, name=None, text=None): + """Constructor. + + This is called by ???. + + Description: + All parameters are optional. + + token - (Token) The token (required) + parent - (Element) Parent element; `None` if root + count - (Int) The number to substitute for `&` (e.g., in `li.item-$`) + local_count - (Int) The number to substitute for `$` (e.g., in `li.item-&`) + parser - (Parser) The parser + + attributes - ... + name - ... + text - ... + """ + + self.children = [] + self.attributes = {} + self.parser = parser + + if token is not None: + # Assumption is that token is of type [[Token]] and is + # a [[Token.ELEMENT]]. + self.name = token.name + self.attributes = token.attributes.copy() + self.text = token.text + self.populate = token.populate + self.expand = token.expand + self.opening_tag = token.opening_tag + self.closing_tag = token.closing_tag + + # `count` can be given. This will substitude & in classname and ID + if count is not None: + for key in self.attributes: + attrib = self.attributes[key] + attrib = attrib.replace('&', ("%i" % count)) + if local_count is not None: + attrib = attrib.replace('$', ("%i" % local_count)) + self.attributes[key] = attrib + + # Copy over from parameters + if attributes: self.attributes = attribues + if name: self.name = name + if text: self.text = text + + self._fill_attributes() + + self.parent = parent + if parent is not None: + self.depth = parent.depth + 1 + + if self.populate: self._populate() + + def render(self): + """Renders the element, along with it's subelements, into HTML code. + + [Grouped under "Rendering methods"] + """ + + output = "" + try: spaces_count = int(self.parser.options.options['indent-spaces']) + except: spaces_count = 4 + spaces = ' ' * spaces_count + indent = self.depth * spaces + + prefix, suffix = ('', '') + if self.prefix: prefix = self.prefix + "\n" + if self.suffix: suffix = self.suffix + + # Make the guide from the ID (/#header), or the class if there's no ID (/.item) + # This is for the start-guide, end-guide and post-tag-guides + guide_str = '' + if 'id' in self.attributes: + guide_str += "#%s" % self.attributes['id'] + elif 'class' in self.attributes: + guide_str += ".%s" % self.attributes['class'].replace(' ', '.') + + # Build the post-tag guide (e.g.,
), + # the start guide, and the end guide. + guide = '' + start_guide = '' + end_guide = '' + if ((self.name == 'div') and \ + (('id' in self.attributes) or ('class' in self.attributes))): + + if (self.parser.options.has('post-tag-guides')): + guide = "" % guide_str + + if (self.parser.options.has('start-guide-format')): + format = self.parser.options.get('start-guide-format') + try: start_guide = format % guide_str + except: start_guide = (format + " " + guide_str).strip() + start_guide = "%s\n" % (indent, start_guide) + + if (self.parser.options.has('end-guide-format')): + format = self.parser.options.get('end-guide-format') + try: end_guide = format % guide_str + except: end_guide = (format + " " + guide_str).strip() + end_guide = "\n%s" % (indent, end_guide) + + # Short, self-closing tags (
) + short_tags = self.parser.dialect.short_tags + + # When it should be expanded.. + # (That is,
\n...\n
or similar -- wherein something must go + # inside the opening/closing tags) + if len(self.children) > 0 \ + or self.expand \ + or prefix or suffix \ + or (self.parser.options.has('expand-divs') and self.name == 'div'): + + for child in self.children: + output += child.render() + + # For expand divs: if there are no children (that is, `output` + # is still blank despite above), fill it with a blank line. + if (output == ''): output = indent + spaces + "\n" + + # If we're a root node and we have a prefix or suffix... + # (Only the root node can have a prefix or suffix.) + if prefix or suffix: + output = "%s%s%s%s%s\n" % \ + (indent, prefix, output, suffix, guide) + + # Uh.. + elif self.name != '' or \ + self.opening_tag is not None or \ + self.closing_tag is not None: + output = start_guide + \ + indent + self.get_opening_tag() + "\n" + \ + output + \ + indent + self.get_closing_tag() + \ + guide + end_guide + "\n" + + + # Short, self-closing tags (
) + elif self.name in short_tags: + output = "%s<%s />\n" % (indent, self.get_default_tag()) + + # Tags with text, possibly + elif self.name != '' or \ + self.opening_tag is not None or \ + self.closing_tag is not None: + output = "%s%s%s%s%s%s%s%s" % \ + (start_guide, indent, self.get_opening_tag(), \ + self.text, \ + self.get_closing_tag(), \ + guide, end_guide, "\n") + + # Else, it's an empty-named element (like the root). Pass. + else: pass + + + return output + + def get_default_tag(self): + """Returns the opening tag (without brackets). + + Usage: + element.get_default_tag() + + [Grouped under "Rendering methods"] + """ + + output = '%s' % (self.name) + for key, value in self.attributes.iteritems(): + output += ' %s="%s"' % (key, value) + return output + + def get_opening_tag(self): + if self.opening_tag is None: + return "<%s>" % self.get_default_tag() + else: + return self.opening_tag + + def get_closing_tag(self): + if self.closing_tag is None: + return "" % self.name + else: + return self.closing_tag + + def append(self, object): + """Registers an element as a child of this element. + + Usage: + element.append(child) + + Description: + Adds a given element `child` to the children list of this element. It + will be rendered when [[render()]] is called on the element. + + See also: + - [[get_last_child()]] + + [Grouped under "Traversion methods"] + """ + + self.children.append(object) + + def get_last_child(self): + """Returns the last child element which was [[append()]]ed to this element. + + Usage: + element.get_last_child() + + Description: + This is the same as using `element.children[-1]`. + + [Grouped under "Traversion methods"] + """ + + return self.children[-1] + + def _populate(self): + """Expands with default items. + + This is called when the [[populate]] flag is turned on. + """ + + if self.name == 'ul': + elements = [Element(name='li', parent=self, parser=self.parser)] + + elif self.name == 'dl': + elements = [ + Element(name='dt', parent=self, parser=self.parser), + Element(name='dd', parent=self, parser=self.parser)] + + elif self.name == 'table': + tr = Element(name='tr', parent=self, parser=self.parser) + td = Element(name='td', parent=tr, parser=self.parser) + tr.children.append(td) + elements = [tr] + + else: + elements = [] + + for el in elements: + self.children.append(el) + + def _fill_attributes(self): + """Fills default attributes for certain elements. + + Description: + This is called by the constructor. + + [Protected, grouped under "Protected methods"] + """ + + # Make sure 's have a href, 's have an src, etc. + required = self.parser.dialect.required + + for element, attribs in required.iteritems(): + if self.name == element: + for attrib in attribs: + if attrib not in self.attributes: + self.attributes[attrib] = attribs[attrib] + + # --------------------------------------------------------------------------- + + # Property: last_child + # [Read-only] + last_child = property(get_last_child) + + # --------------------------------------------------------------------------- + + # Property: parent + # (Element) The parent element. + parent = None + + # Property: name + # (String) The name of the element (e.g., `div`) + name = '' + + # Property: attributes + # (Dict) The dictionary of attributes (e.g., `{'src': 'image.jpg'}`) + attributes = None + + # Property: children + # (List of Elements) The children + children = None + + # Property: opening_tag + # (String or None) The opening tag. Optional; will use `name` and + # `attributes` if this is not given. + opening_tag = None + + # Property: closing_tag + # (String or None) The closing tag + closing_tag = None + + text = '' + depth = -1 + expand = False + populate = False + parser = None + + # Property: prefix + # Only the root note can have this. + prefix = None + suffix = None + +# =============================================================================== + +class Token: + def __init__(self, str, parser=None): + """Token. + + Description: + str - The string to parse + + In the string `div > ul`, there are 3 tokens. (`div`, `>`, and `ul`) + + For `>`, it will be a `Token` with `type` set to `Token.CHILD` + """ + + self.str = str.strip() + self.attributes = {} + self.parser = parser + + # Set the type. + if self.str == '<': + self.type = Token.PARENT + elif self.str == '>': + self.type = Token.CHILD + elif self.str == '+': + self.type = Token.SIBLING + else: + self.type = Token.ELEMENT + self._init_element() + + def _init_element(self): + """Initializes. Only called if the token is an element token. + [Private] + """ + + # Get the tag name. Default to DIV if none given. + name = re.findall('^([\w\-:]*)', self.str)[0] + name = name.lower().replace('-', ':') + + # Find synonyms through this thesaurus + synonyms = self.parser.dialect.synonyms + if name in synonyms.keys(): + name = synonyms[name] + + if ':' in name: + try: spaces_count = int(self.parser.options.get('indent-spaces')) + except: spaces_count = 4 + indent = ' ' * spaces_count + + shortcuts = self.parser.dialect.shortcuts + if name in shortcuts.keys(): + for key, value in shortcuts[name].iteritems(): + setattr(self, key, value) + if 'html' in name: + return + else: + self.name = name + + elif (name == ''): self.name = 'div' + else: self.name = name + + # Look for attributes + attribs = [] + for attrib in re.findall('\[([^\]]*)\]', self.str): + attribs.append(attrib) + self.str = self.str.replace("[" + attrib + "]", "") + if len(attribs) > 0: + for attrib in attribs: + try: key, value = attrib.split('=', 1) + except: key, value = attrib, '' + self.attributes[key] = value + + # Try looking for text + text = None + for text in re.findall('\{([^\}]*)\}', self.str): + self.str = self.str.replace("{" + text + "}", "") + if text is not None: + self.text = text + + # Get the class names + classes = [] + for classname in re.findall('\.([\$a-zA-Z0-9_\-\&]+)', self.str): + classes.append(classname) + if len(classes) > 0: + try: self.attributes['class'] + except: self.attributes['class'] = '' + self.attributes['class'] += ' ' + ' '.join(classes) + self.attributes['class'] = self.attributes['class'].strip() + + # Get the ID + id = None + for id in re.findall('#([\$a-zA-Z0-9_\-\&]+)', self.str): pass + if id is not None: + self.attributes['id'] = id + + # See if there's a multiplier (e.g., "li*3") + multiplier = None + for multiplier in re.findall('\*\s*([0-9]+)', self.str): pass + if multiplier is not None: + self.multiplier = int(multiplier) + + # Populate flag (e.g., ul+) + flags = None + for flags in re.findall('[\+\!]+$', self.str): pass + if flags is not None: + if '+' in flags: self.populate = True + if '!' in flags: self.expand = True + + def __str__(self): + return self.str + + str = '' + parser = None + + # For elements + # See the properties of `Element` for description on these. + name = '' + attributes = None + multiplier = 1 + expand = False + populate = False + text = '' + opening_tag = None + closing_tag = None + + # Type + type = 0 + ELEMENT = 2 + CHILD = 4 + PARENT = 8 + SIBLING = 16 + +# =============================================================================== + +class Router: + """The router. + """ + + # Constructor + # --------------------------------------------------------------------------- + + def __init__(self): + pass + + # Methods + # --------------------------------------------------------------------------- + + def start(self, options=None, str=None, ret=None): + if (options): + self.options = Options(router=self, options=options, argv=None) + else: + self.options = Options(router=self, argv=sys.argv[1:], options=None) + + if (self.options.has('help')): + return self.help() + + elif (self.options.has('version')): + return self.version() + + else: + return self.parse(str=str, ret=ret) + + def help(self): + print "Usage: %s [OPTIONS]" % sys.argv[0] + print "Expands input into HTML." + print "" + for short, long, info in self.options.cmdline_keys: + if "Deprecated" in info: continue + if not short == '': short = '-%s,' % short + if not long == '': long = '--%s' % long.replace("=", "=XXX") + + print "%6s %-25s %s" % (short, long, info) + print "" + print "\n".join(self.help_content) + + def version(self): + print "Uhm, yeah." + + def parse(self, str=None, ret=None): + self.parser = Parser(self.options) + + try: + # Read the files + # for line in fileinput.input(): lines.append(line.rstrip(os.linesep)) + if str is not None: + lines = str + else: + lines = [sys.stdin.read()] + lines = " ".join(lines) + + except KeyboardInterrupt: + pass + + except: + sys.stderr.write("Reading failed.\n") + return + + try: + self.parser.load_string(lines) + output = self.parser.render() + if ret: return output + sys.stdout.write(output) + + except: + sys.stderr.write("Parse error. Check your input.\n") + print sys.exc_info()[0] + print sys.exc_info()[1] + + def exit(self): + sys.exit() + + help_content = [ + "Please refer to the manual for more information.", + ] + +# =============================================================================== + +class Options: + def __init__(self, router, argv, options=None): + # Init self + self.router = router + + # `options` can be given as a dict of stuff to preload + if options: + for k, v in options.iteritems(): + self.options[k] = v + return + + # Prepare for getopt() + short_keys, long_keys = "", [] + for short, long, info in self.cmdline_keys: # 'v', 'version' + short_keys += short + long_keys.append(long) + + try: + getoptions, arguments = getopt.getopt(argv, short_keys, long_keys) + + except getopt.GetoptError: + err = sys.exc_info()[1] + sys.stderr.write("Options error: %s\n" % err) + sys.stderr.write("Try --help for a list of arguments.\n") + return router.exit() + + # Sort them out into options + options = {} + i = 0 + for option in getoptions: + key, value = option # '--version', '' + if (value == ''): value = True + + # If the key is long, write it + if key[0:2] == '--': + clean_key = key[2:] + options[clean_key] = value + + # If the key is short, look for the long version of it + elif key[0:1] == '-': + for short, long, info in self.cmdline_keys: + if short == key[1:]: + print long + options[long] = True + + # Done + for k, v in options.iteritems(): + self.options[k] = v + + def __getattr__(self, attr): + return self.get(attr) + + def get(self, attr): + try: return self.options[attr] + except: return None + + def has(self, attr): + try: return self.options.has_key(attr) + except: return False + + options = { + 'indent-spaces': 4 + } + cmdline_keys = [ + ('h', 'help', 'Shows help'), + ('v', 'version', 'Shows the version'), + ('', 'no-guides', 'Deprecated'), + ('', 'post-tag-guides', 'Adds comments at the end of DIV tags'), + ('', 'textmate', 'Adds snippet info (textmate mode)'), + ('', 'indent-spaces=', 'Indent spaces'), + ('', 'expand-divs', 'Automatically expand divs'), + ('', 'no-last-newline', 'Skip the trailing newline'), + ('', 'start-guide-format=', 'To be documented'), + ('', 'end-guide-format=', 'To be documented'), + ] + + # Property: router + # Router + router = 1 + +# =============================================================================== + +if __name__ == "__main__": + z = Router() + z.start() diff --git a/ftplugin/html/sparkup.vim b/ftplugin/html/sparkup.vim new file mode 100644 index 0000000..ddf9a89 --- /dev/null +++ b/ftplugin/html/sparkup.vim @@ -0,0 +1,76 @@ +" Sparkup +" Installation: +" Copy the contents of vim/ftplugin/ to your ~/.vim/ftplugin directory. +" +" $ cp -R vim/ftplugin ~/.vim/ftplugin/ +" +" Configuration: +" g:sparkup (Default: 'sparkup') - +" Location of the sparkup executable. You shouldn't need to change this +" setting if you used the install option above. +" +" g:sparkupArgs (Default: '--no-last-newline') - +" Additional args passed to sparkup. +" +" g:sparkupExecuteMapping (Default: '') - +" Mapping used to execute sparkup. +" +" g:sparkupNextMapping (Default: '') - +" Mapping used to jump to the next empty tag/attribute. + +set rtp+=~/.vim/ftplugin/html + +if !exists('g:sparkupExecuteMapping') + let g:sparkupExecuteMapping = '' +endif + +if !exists('g:sparkupNextMapping') + let g:sparkupNextMapping = '' +endif + +exec 'nmap ' . g:sparkupExecuteMapping . ' :call Sparkup()' +exec 'imap ' . g:sparkupExecuteMapping . ' u:call Sparkup()' +exec 'nmap ' . g:sparkupNextMapping . ' :call SparkupNext()' +exec 'imap ' . g:sparkupNextMapping . ' u:call SparkupNext()' + +if exists('*s:Sparkup') + finish +endif + +function! s:Sparkup() + if !exists('s:sparkup') + let s:sparkup = exists('g:sparkup') ? g:sparkup : 'sparkup' + let s:sparkupArgs = exists('g:sparkupArgs') ? g:sparkupArgs : '--no-last-newline' + " check the user's path first. if not found then search relative to + " sparkup.vim in the runtimepath. + if !executable(s:sparkup) + let paths = substitute(escape(&runtimepath, ' '), '\(,\|$\)', '/**\1', 'g') + let s:sparkup = findfile('sparkup.py', paths) + + if !filereadable(s:sparkup) + echohl WarningMsg + echom 'Warning: could not find sparkup on your path or in your vim runtime path.' + echohl None + finish + endif + endif + let s:sparkup = '"' . s:sparkup . '"' + let s:sparkup .= printf(' %s --indent-spaces=%s', s:sparkupArgs, &shiftwidth) + if has('win32') || has('win64') + let s:sparkup = 'python ' . s:sparkup + endif + endif + exec '.!' . s:sparkup + call s:SparkupNext() +endfunction + +function! s:SparkupNext() + " 1: empty tag, 2: empty attribute, 3: empty line + let n = search('><\/\|\(""\)\|^\s*$', 'Wp') + if n == 3 + startinsert! + else + execute 'normal l' + startinsert + endif +endfunction diff --git a/ftplugin/html_snip_helper.vim b/ftplugin/html_snip_helper.vim new file mode 100644 index 0000000..2e54570 --- /dev/null +++ b/ftplugin/html_snip_helper.vim @@ -0,0 +1,10 @@ +" Helper function for (x)html snippets +if exists('s:did_snip_helper') || &cp || !exists('loaded_snips') + finish +endif +let s:did_snip_helper = 1 + +" Automatically closes tag if in xhtml +fun! Close() + return stridx(&ft, 'xhtml') == -1 ? '' : ' /' +endf diff --git a/nerdtree_plugin/doc/NERD_tree.txt b/nerdtree_plugin/doc/NERD_tree.txt new file mode 100644 index 0000000..174229d --- /dev/null +++ b/nerdtree_plugin/doc/NERD_tree.txt @@ -0,0 +1,1291 @@ +*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/nerdtree_plugin/exec_menuitem.vim b/nerdtree_plugin/exec_menuitem.vim new file mode 100644 index 0000000..e7a7c53 --- /dev/null +++ b/nerdtree_plugin/exec_menuitem.vim @@ -0,0 +1,41 @@ +" ============================================================================ +" 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 new file mode 100644 index 0000000..0e2f728 --- /dev/null +++ b/nerdtree_plugin/fs_menu.vim @@ -0,0 +1,224 @@ +" ============================================================================ +" 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/nerdtree_plugin/nerdtree_plugin/exec_menuitem.vim b/nerdtree_plugin/nerdtree_plugin/exec_menuitem.vim new file mode 100644 index 0000000..e7a7c53 --- /dev/null +++ b/nerdtree_plugin/nerdtree_plugin/exec_menuitem.vim @@ -0,0 +1,41 @@ +" ============================================================================ +" 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/nerdtree_plugin/fs_menu.vim b/nerdtree_plugin/nerdtree_plugin/fs_menu.vim new file mode 100644 index 0000000..0e2f728 --- /dev/null +++ b/nerdtree_plugin/nerdtree_plugin/fs_menu.vim @@ -0,0 +1,224 @@ +" ============================================================================ +" 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/nerdtree_plugin/plugin/NERD_tree.vim b/nerdtree_plugin/plugin/NERD_tree.vim new file mode 100644 index 0000000..bc34775 --- /dev/null +++ b/nerdtree_plugin/plugin/NERD_tree.vim @@ -0,0 +1,4017 @@ +" ============================================================================ +" 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/nerdtree_plugin/syntax/nerdtree.vim b/nerdtree_plugin/syntax/nerdtree.vim new file mode 100644 index 0000000..636d2af --- /dev/null +++ b/nerdtree_plugin/syntax/nerdtree.vim @@ -0,0 +1,88 @@ +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/plugin/EasyMotion.vim b/plugin/EasyMotion.vim new file mode 100755 index 0000000..ec76bc9 --- /dev/null +++ b/plugin/EasyMotion.vim @@ -0,0 +1,404 @@ +" EasyMotion - Vim motions on speed! +" +" Author: Kim Silkebækken +" Source repository: https://github.com/Lokaltog/vim-easymotion + +" Script initialization {{{ + if exists('g:EasyMotion_loaded') || &compatible || version < 702 + finish + endif + + let g:EasyMotion_loaded = 1 +" }}} +" Default configuration {{{ + function! s:InitOption(option, default) " {{{ + if ! exists('g:EasyMotion_' . a:option) + exec 'let g:EasyMotion_' . a:option . ' = ' . string(a:default) + endif + endfunction " }}} + function! s:InitHL(group, gui, cterm256, cterm) " {{{ + if ! hlexists(a:group) + let guihl = printf('guibg=%s guifg=#%s gui=%s', a:gui[0], a:gui[1], a:gui[2]) + let ctermhl = &t_Co == 256 + \ ? printf('ctermbg=%s ctermfg=%s cterm=%s', a:cterm256[0], a:cterm256[1], a:cterm256[2]) + \ : printf('ctermbg=%s ctermfg=%s cterm=%s', a:cterm[0], a:cterm[1], a:cterm[2]) + + execute printf('hi %s %s %s', a:group, guihl, ctermhl) + endif + endfunction " }}} + + call s:InitOption('keys', 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') + call s:InitOption('target_hl', 'EasyMotionTarget') + call s:InitOption('shade_hl', 'EasyMotionShade') + call s:InitOption('do_shade', 1) + call s:InitOption('do_mapping', 1) + + call s:InitHL(g:EasyMotion_target_hl, ['NONE', 'ff0000', 'bold'], ['NONE', '196', 'bold'], ['NONE', 'red', 'bold']) + call s:InitHL(g:EasyMotion_shade_hl, ['NONE', '585858', 'NONE'], ['NONE', '240', 'NONE'], ['NONE', 'darkgrey', 'NONE']) +" }}} +" Default key mapping {{{ + if g:EasyMotion_do_mapping + nnoremap f :call EasyMotionF(0, 0) + vnoremap f :call EasyMotionF(1, 0) + + nnoremap F :call EasyMotionF(0, 1) + vnoremap F :call EasyMotionF(1, 1) + + nnoremap t :call EasyMotionT(0, 0) + vnoremap t :call EasyMotionT(1, 0) + + nnoremap T :call EasyMotionT(0, 1) + vnoremap T :call EasyMotionT(1, 1) + + nnoremap w :call EasyMotionWB(0, 0) + vnoremap w :call EasyMotionWB(1, 0) + + nnoremap b :call EasyMotionWB(0, 1) + vnoremap b :call EasyMotionWB(1, 1) + + nnoremap e :call EasyMotionE(0, 0) + vnoremap e :call EasyMotionE(1, 0) + + nnoremap ge :call EasyMotionE(0, 1) + vnoremap ge :call EasyMotionE(1, 1) + + nnoremap j :call EasyMotionJK(0, 0) + vnoremap j :call EasyMotionJK(1, 0) + + nnoremap k :call EasyMotionJK(0, 1) + vnoremap k :call EasyMotionJK(1, 1) + endif +" }}} +" Initialize variables {{{ + let s:index_to_key = {} + let s:key_to_index = {} + + let idx = 0 + for char in split(g:EasyMotion_keys, '\zs') + let s:index_to_key[idx] = char + let s:key_to_index[char] = idx + + let idx += 1 + endfor + + let s:var_reset = {} +" }}} +" Motion functions {{{ + function! EasyMotionF(visualmode, direction) " {{{ + let char = s:GetSearchChar(a:visualmode) + + if empty(char) + return + endif + + let re = '\C' . escape(char, '.$^~') + + call s:EasyMotion(re, a:direction, a:visualmode ? visualmode() : '') + endfunction " }}} + function! EasyMotionT(visualmode, direction) " {{{ + let char = s:GetSearchChar(a:visualmode) + + if empty(char) + return + endif + + if a:direction == 1 + let re = '\C' . escape(char, '.$^~') . '\zs.' + else + let re = '\C.' . escape(char, '.$^~') + endif + + call s:EasyMotion(re, a:direction, a:visualmode ? visualmode() : '') + endfunction " }}} + function! EasyMotionWB(visualmode, direction) " {{{ + call s:EasyMotion('\<.', a:direction, a:visualmode ? visualmode() : '') + endfunction " }}} + function! EasyMotionE(visualmode, direction) " {{{ + call s:EasyMotion('.\>', a:direction, a:visualmode ? visualmode() : '') + endfunction " }}} + function! EasyMotionJK(visualmode, direction) " {{{ + call s:EasyMotion('\%1v', a:direction, a:visualmode ? visualmode() : '') + endfunction " }}} +" }}} +" Helper functions {{{ + function! s:Message(message) " {{{ + echo 'EasyMotion: ' . a:message + endfunction " }}} + function! s:Prompt(message) " {{{ + echohl Question + echo a:message . ': ' + echohl None + endfunction " }}} + function! s:VarReset(var, ...) " {{{ + let buf = bufname("") + + if a:0 == 0 && has_key(s:var_reset, a:var) + " Reset var to original value + call setbufvar(buf, a:var, s:var_reset[a:var]) + elseif a:0 == 1 + let new_value = a:0 == 1 ? a:1 : '' + + " Store original value + let s:var_reset[a:var] = getbufvar(buf, a:var) + + " Set new var value + call setbufvar(buf, a:var, new_value) + endif + endfunction " }}} + function! s:SetLines(lines, key) " {{{ + try + " Try to join changes with previous undo block + undojoin + catch + endtry + + for [line_num, line] in a:lines + call setline(line_num, line[a:key]) + endfor + endfunction " }}} + function! s:GetChar() " {{{ + let char = getchar() + + if char == 27 + " Escape key pressed + redraw + + call s:Message('Cancelled') + + return '' + endif + + return nr2char(char) + endfunction " }}} + function! s:GetSearchChar(visualmode) + call s:Prompt('Search for character') + + let char = s:GetChar() + + " Check that we have an input char + if empty(char) + " Restore selection + if ! empty(a:visualmode) + silent exec 'normal! gv' + endif + + return '' + endif + + return char + endfunction +" }}} +" Core functions {{{ + function! s:PromptUser(groups) "{{{ + let single_group = len(a:groups) == 1 + let targets_len = single_group ? len(a:groups[0]) : len(a:groups) + + " Only one possible match {{{ + if single_group && targets_len == 1 + redraw + + return a:groups[0][0] + endif + " }}} + " Prepare marker lines {{{ + let lines = {} + let hl_coords = [] + let current_group = 0 + + for group in a:groups + let element = 0 + + for [line_num, col_num] in group + " Add original line and marker line + if ! has_key(lines, line_num) + let current_line = getline(line_num) + + let lines[line_num] = { 'orig': current_line, 'marker': current_line } + endif + + let marker_char = s:index_to_key[single_group ? element : current_group] + + if strlen(lines[line_num]['marker']) > 0 + " Substitute marker character if line length > 0 + let lines[line_num]['marker'] = substitute(lines[line_num]['marker'], '\%' . col_num . 'c.', marker_char, '') + else + " Set the line to the marker character if the line is empty + let lines[line_num]['marker'] = marker_char + endif + + " Add highlighting coordinates + call add(hl_coords, '\%' . line_num . 'l\%' . col_num . 'c') + + let element += 1 + endfor + + let current_group += 1 + endfor + + let lines_items = items(lines) + " }}} + + " Highlight source + let target_hl_id = matchadd(g:EasyMotion_target_hl, join(hl_coords, '\|'), 1) + + try + " Set lines with markers + call s:SetLines(lines_items, 'marker') + + redraw + + " Get target/group character + if single_group + call s:Prompt('Target character') + else + call s:Prompt('Group character') + endif + + let char = s:GetChar() + finally + " Restore original lines + call s:SetLines(lines_items, 'orig') + + " Un-highlight code + if exists('target_hl_id') + call matchdelete(target_hl_id) + endif + + redraw + endtry + + " Check that we have an input char + if empty(char) + throw 'Cancelled' + endif + + " Check if the input char is valid + if ! has_key(s:key_to_index, char) || s:key_to_index[char] >= targets_len + throw 'Invalid target' + endif + + if single_group + " Return target coordinates + return a:groups[0][s:key_to_index[char]] + else + " Prompt for target character + return s:PromptUser([a:groups[s:key_to_index[char]]]) + endif + endfunction "}}} + function! s:EasyMotion(regexp, direction, visualmode) " {{{ + let orig_pos = [line('.'), col('.')] + let targets = [] + + try + " Reset properties + call s:VarReset('&scrolloff', 0) + call s:VarReset('&modified', 0) + call s:VarReset('&modifiable', 1) + call s:VarReset('&readonly', 0) + + " Find motion targets + let search_direction = (a:direction == 1 ? 'b' : '') + let search_stopline = line(a:direction == 1 ? 'w0' : 'w$') + + while 1 + let pos = searchpos(a:regexp, search_direction, search_stopline) + + " Reached end of search range + if pos == [0, 0] + break + endif + + " Skip folded lines + if foldclosed(pos[0]) != -1 + if a:direction == 1 + normal! k$ + else + normal! j^ + endif + + continue + endif + + call add(targets, pos) + endwhile + + let targets_len = len(targets) + if targets_len == 0 + throw 'No matches' + endif + + let groups_len = len(s:index_to_key) + + " Split targets into key groups {{{ + let groups = [] + let i = 0 + + while i < targets_len + call add(groups, targets[i : i + groups_len - 1]) + + let i += groups_len + endwhile + " }}} + " Too many groups; only display the first ones {{{ + if len(groups) > groups_len + call s:Message('Only displaying the first matches') + + let groups = groups[0 : groups_len - 1] + endif + " }}} + + " Shade inactive source + if g:EasyMotion_do_shade + let shade_hl_pos = '\%' . orig_pos[0] . 'l\%'. orig_pos[1] .'c' + + if a:direction == 1 + " Backward + let shade_hl_re = '\%'. line('w0') .'l\_.*' . shade_hl_pos + else + " Forward + let shade_hl_re = shade_hl_pos . '\_.*\%'. line('w$') .'l' + endif + + let shade_hl_id = matchadd(g:EasyMotion_shade_hl, shade_hl_re, 0) + endif + + " Prompt user for target group/character + let coords = s:PromptUser(groups) + + if ! empty(a:visualmode) + " Update selection + call cursor(orig_pos[0], orig_pos[1]) + + exec 'normal! ' . a:visualmode + endif + + " Update cursor position + call cursor(coords[0], coords[1]) + + call s:Message('Jumping to [' . coords[0] . ', ' . coords[1] . ']') + catch + redraw + + " Show exception message + call s:Message(v:exception) + + " Restore cursor position/selection + if ! empty(a:visualmode) + silent exec 'normal! gv' + else + call cursor(orig_pos[0], orig_pos[1]) + endif + finally + " Restore properties + call s:VarReset('&scrolloff') + call s:VarReset('&modified') + call s:VarReset('&modifiable') + call s:VarReset('&readonly') + + " Remove shading + if g:EasyMotion_do_shade && exists('shade_hl_id') + call matchdelete(shade_hl_id) + endif + endtry + endfunction " }}} +" }}} diff --git a/plugin/Tabular.vim b/plugin/Tabular.vim new file mode 100755 index 0000000..84e08a7 --- /dev/null +++ b/plugin/Tabular.vim @@ -0,0 +1,280 @@ +" Tabular: Align columnar data using regex-designated column boundaries +" Maintainer: Matthew Wozniski (mjw@drexel.edu) +" Date: Thu, 11 Oct 2007 00:35:34 -0400 +" Version: 0.1 + +" Abort if running in vi-compatible mode or the user doesn't want us. +if &cp || exists('g:tabular_loaded') + if &cp && &verbose + echo "Not loading Tabular in compatible mode." + endif + finish +endif + +let g:tabular_loaded = 1 + +" Stupid vimscript crap {{{1 +let s:savecpo = &cpo +set cpo&vim + +" Private Things {{{1 + +" Dictionary of command name to command +let s:TabularCommands = {} + +" Generate tab completion list for :Tabularize {{{2 +" Return a list of commands that match the command line typed so far. +" NOTE: Tries to handle commands with spaces in the name, but Vim doesn't seem +" to handle that terribly well... maybe I should give up on that. +function! s:CompleteTabularizeCommand(argstart, cmdline, cursorpos) + let names = keys(s:TabularCommands) + if exists("b:TabularCommands") + let names += keys(b:TabularCommands) + endif + + let cmdstart = substitute(a:cmdline, '^\s*\S\+\s*', '', '') + + return filter(names, 'v:val =~# ''^\V'' . escape(cmdstart, ''\'')') +endfunction + +" Choose the proper command map from the given command line {{{2 +" Returns [ command map, command line with leading removed ] +function! s:ChooseCommandMap(commandline) + let map = s:TabularCommands + let cmd = a:commandline + + if cmd =~# '^\s\+' + if !exists('b:TabularCommands') + let b:TabularCommands = {} + endif + let map = b:TabularCommands + let cmd = substitute(cmd, '^\s\+', '', '') + endif + + return [ map, cmd ] +endfunction + +" Parse '/pattern/format' into separate pattern and format parts. {{{2 +" If parsing fails, return [ '', '' ] +function! s:ParsePattern(string) + if a:string[0] != '/' + return ['',''] + endif + + let pat = '\\\@ 0)] =~ '^\s*$' + throw "Empty element" + endif + + if end == -1 + let rv = [ a:string ] + else + let rv = [ a:string[0 : end-1] ] + s:SplitCommands(a:string[end+1 : -1]) + endif + + return rv +endfunction + +" Public Things {{{1 + +" Command associating a command name with a simple pattern command {{{2 +" AddTabularPattern[!] [] name /pattern[/format] +" +" If is provided, the command will only be available in the current +" buffer, and will be used instead of any global command with the same name. +" +" If a command with the same name and scope already exists, it is an error, +" unless the ! is provided, in which case the existing command will be +" replaced. +" +" pattern is a regex describing the delimiter to be used. +" +" format describes the format pattern to be used. The default will be used if +" none is provided. +com! -nargs=+ -bang AddTabularPattern + \ call AddTabularPattern(, 0) + +function! AddTabularPattern(command, force) + try + let [ commandmap, rest ] = s:ChooseCommandMap(a:command) + + let name = matchstr(rest, '.\{-}\ze\s*/') + let pattern = substitute(rest, '.\{-}\s*\ze/', '', '') + + let [ pattern, format ] = s:ParsePattern(pattern) + + if empty(name) || empty(pattern) + throw "Invalid arguments!" + endif + + if !a:force && has_key(commandmap, name) + throw string(name) . " is already defined, use ! to overwrite." + endif + + let command = "tabular#TabularizeStrings(a:lines, " . string(pattern) + + if !empty(format) + let command .= ", " . string(format) + endif + + let command .= ")" + + let commandmap[name] = ":call tabular#PipeRange(" + \ . string(pattern) . "," + \ . string(command) . ")" + catch + echohl ErrorMsg + echomsg "AddTabularPattern: " . v:exception + echohl None + endtry +endfunction + +" Command associating a command name with a pipeline of functions {{{2 +" AddTabularPipeline[!] [] name /pattern/ func [ | func2 [ | func3 ] ] +" +" If is provided, the command will only be available in the current +" buffer, and will be used instead of any global command with the same name. +" +" If a command with the same name and scope already exists, it is an error, +" unless the ! is provided, in which case the existing command will be +" replaced. +" +" pattern is a regex that will be used to determine which lines will be +" filtered. If the cursor line doesn't match the pattern, using the command +" will be a no-op, otherwise the cursor and all contiguous lines matching the +" pattern will be filtered. +" +" Each 'func' argument represents a function to be called. This function +" will have access to a:lines, a List containing one String per line being +" filtered. +com! -nargs=+ -bang AddTabularPipeline + \ call AddTabularPipeline(, 0) + +function! AddTabularPipeline(command, force) + try + let [ commandmap, rest ] = s:ChooseCommandMap(a:command) + + let name = matchstr(rest, '.\{-}\ze\s*/') + let pattern = substitute(rest, '.\{-}\s*\ze/', '', '') + + let commands = matchstr(pattern, '^/.\{-}\\\@CompleteTabularizeCommand + \ Tabularize ,call Tabularize() + +function! Tabularize(command) range + let range = a:firstline . ',' . a:lastline + + try + let [ pattern, format ] = s:ParsePattern(a:command) + + if !empty(pattern) + let cmd = "tabular#TabularizeStrings(a:lines, " . string(pattern) + + if !empty(format) + let cmd .= "," . string(format) + endif + + let cmd .= ")" + + exe range . 'call tabular#PipeRange(pattern, cmd)' + else + if exists('b:TabularCommands') && has_key(b:TabularCommands, a:command) + let command = b:TabularCommands[a:command] + elseif has_key(s:TabularCommands, a:command) + let command = s:TabularCommands[a:command] + else + throw "Unrecognized command " . string(a:command) + endif + + exe range . command + endif + catch + echohl ErrorMsg + echomsg "Tabularize: " . v:exception + echohl None + return + endtry +endfunction + +" Stupid vimscript crap, part 2 {{{1 +let &cpo = s:savecpo +unlet s:savecpo + +" vim:set sw=2 sts=2 fdm=marker: diff --git a/plugin/__MACOSX/._NERD_tree b/plugin/__MACOSX/._NERD_tree new file mode 100644 index 0000000..ad29800 Binary files /dev/null and b/plugin/__MACOSX/._NERD_tree differ diff --git a/plugin/__MACOSX/NERD_tree/._doc b/plugin/__MACOSX/NERD_tree/._doc new file mode 100644 index 0000000..44ad7bb Binary files /dev/null and b/plugin/__MACOSX/NERD_tree/._doc differ diff --git a/plugin/__MACOSX/NERD_tree/._nerdtree_plugin b/plugin/__MACOSX/NERD_tree/._nerdtree_plugin new file mode 100644 index 0000000..cd493f1 Binary files /dev/null and b/plugin/__MACOSX/NERD_tree/._nerdtree_plugin differ diff --git a/plugin/__MACOSX/NERD_tree/._plugin b/plugin/__MACOSX/NERD_tree/._plugin new file mode 100644 index 0000000..06555ce Binary files /dev/null and b/plugin/__MACOSX/NERD_tree/._plugin differ diff --git a/plugin/__MACOSX/NERD_tree/doc/._NERD_tree.txt b/plugin/__MACOSX/NERD_tree/doc/._NERD_tree.txt new file mode 100644 index 0000000..91f418d Binary files /dev/null and b/plugin/__MACOSX/NERD_tree/doc/._NERD_tree.txt differ diff --git a/plugin/__MACOSX/NERD_tree/nerdtree_plugin/._exec_menuitem.vim b/plugin/__MACOSX/NERD_tree/nerdtree_plugin/._exec_menuitem.vim new file mode 100644 index 0000000..2ec4b7e Binary files /dev/null and b/plugin/__MACOSX/NERD_tree/nerdtree_plugin/._exec_menuitem.vim differ diff --git a/plugin/__MACOSX/NERD_tree/nerdtree_plugin/._fs_menu.vim b/plugin/__MACOSX/NERD_tree/nerdtree_plugin/._fs_menu.vim new file mode 100644 index 0000000..99b9951 Binary files /dev/null and b/plugin/__MACOSX/NERD_tree/nerdtree_plugin/._fs_menu.vim differ diff --git a/plugin/__MACOSX/NERD_tree/plugin/._NERD_tree.vim b/plugin/__MACOSX/NERD_tree/plugin/._NERD_tree.vim new file mode 100644 index 0000000..6e7c8d2 Binary files /dev/null and b/plugin/__MACOSX/NERD_tree/plugin/._NERD_tree.vim differ diff --git a/plugin/acp.vim b/plugin/acp.vim new file mode 100644 index 0000000..0c01a31 --- /dev/null +++ b/plugin/acp.vim @@ -0,0 +1,170 @@ +"============================================================================= +" Copyright (c) 2007-2009 Takeshi NISHIDA +" +" GetLatestVimScripts: 1879 1 :AutoInstall: AutoComplPop +"============================================================================= +" LOAD GUARD {{{1 + +if exists('g:loaded_acp') + finish +elseif v:version < 702 + echoerr 'AutoComplPop does not support this version of vim (' . v:version . ').' + finish +endif +let g:loaded_acp = 1 + +" }}}1 +"============================================================================= +" FUNCTION: {{{1 + +" +function s:defineOption(name, default) + if !exists(a:name) + let {a:name} = a:default + endif +endfunction + +" +function s:makeDefaultBehavior() + let behavs = { + \ '*' : [], + \ 'ruby' : [], + \ 'python' : [], + \ 'perl' : [], + \ 'xml' : [], + \ 'html' : [], + \ 'xhtml' : [], + \ 'css' : [], + \ } + "--------------------------------------------------------------------------- + if !empty(g:acp_behaviorUserDefinedFunction) && + \ !empty(g:acp_behaviorUserDefinedMeets) + for key in keys(behavs) + call add(behavs[key], { + \ 'command' : "\\", + \ 'completefunc' : g:acp_behaviorUserDefinedFunction, + \ 'meets' : g:acp_behaviorUserDefinedMeets, + \ 'repeat' : 0, + \ }) + endfor + endif + "--------------------------------------------------------------------------- + for key in keys(behavs) + call add(behavs[key], { + \ 'command' : "\\", + \ 'completefunc' : 'acp#completeSnipmate', + \ 'meets' : 'acp#meetsForSnipmate', + \ 'onPopupClose' : 'acp#onPopupCloseSnipmate', + \ 'repeat' : 0, + \ }) + endfor + "--------------------------------------------------------------------------- + for key in keys(behavs) + call add(behavs[key], { + \ 'command' : g:acp_behaviorKeywordCommand, + \ 'meets' : 'acp#meetsForKeyword', + \ 'repeat' : 0, + \ }) + endfor + "--------------------------------------------------------------------------- + for key in keys(behavs) + call add(behavs[key], { + \ 'command' : "\\", + \ 'meets' : 'acp#meetsForFile', + \ 'repeat' : 1, + \ }) + endfor + "--------------------------------------------------------------------------- + call add(behavs.ruby, { + \ 'command' : "\\", + \ 'meets' : 'acp#meetsForRubyOmni', + \ 'repeat' : 0, + \ }) + "--------------------------------------------------------------------------- + call add(behavs.python, { + \ 'command' : "\\", + \ 'meets' : 'acp#meetsForPythonOmni', + \ 'repeat' : 0, + \ }) + "--------------------------------------------------------------------------- + call add(behavs.perl, { + \ 'command' : "\\", + \ 'meets' : 'acp#meetsForPerlOmni', + \ 'repeat' : 0, + \ }) + "--------------------------------------------------------------------------- + call add(behavs.xml, { + \ 'command' : "\\", + \ 'meets' : 'acp#meetsForXmlOmni', + \ 'repeat' : 1, + \ }) + "--------------------------------------------------------------------------- + call add(behavs.html, { + \ 'command' : "\\", + \ 'meets' : 'acp#meetsForHtmlOmni', + \ 'repeat' : 1, + \ }) + "--------------------------------------------------------------------------- + call add(behavs.xhtml, { + \ 'command' : "\\", + \ 'meets' : 'acp#meetsForHtmlOmni', + \ 'repeat' : 1, + \ }) + "--------------------------------------------------------------------------- + call add(behavs.css, { + \ 'command' : "\\", + \ 'meets' : 'acp#meetsForCssOmni', + \ 'repeat' : 0, + \ }) + "--------------------------------------------------------------------------- + return behavs +endfunction + +" }}}1 +"============================================================================= +" INITIALIZATION {{{1 + +"----------------------------------------------------------------------------- +call s:defineOption('g:acp_enableAtStartup', 1) +call s:defineOption('g:acp_mappingDriven', 0) +call s:defineOption('g:acp_ignorecaseOption', 1) +call s:defineOption('g:acp_completeOption', '.,w,b,k') +call s:defineOption('g:acp_completeoptPreview', 0) +call s:defineOption('g:acp_behaviorUserDefinedFunction', '') +call s:defineOption('g:acp_behaviorUserDefinedMeets', '') +call s:defineOption('g:acp_behaviorSnipmateLength', -1) +call s:defineOption('g:acp_behaviorKeywordCommand', "\") +call s:defineOption('g:acp_behaviorKeywordLength', 2) +call s:defineOption('g:acp_behaviorKeywordIgnores', []) +call s:defineOption('g:acp_behaviorFileLength', 0) +call s:defineOption('g:acp_behaviorRubyOmniMethodLength', 0) +call s:defineOption('g:acp_behaviorRubyOmniSymbolLength', 1) +call s:defineOption('g:acp_behaviorPythonOmniLength', 0) +call s:defineOption('g:acp_behaviorPerlOmniLength', -1) +call s:defineOption('g:acp_behaviorXmlOmniLength', 0) +call s:defineOption('g:acp_behaviorHtmlOmniLength', 0) +call s:defineOption('g:acp_behaviorCssOmniPropertyLength', 1) +call s:defineOption('g:acp_behaviorCssOmniValueLength', 0) +call s:defineOption('g:acp_behavior', {}) +"----------------------------------------------------------------------------- +call extend(g:acp_behavior, s:makeDefaultBehavior(), 'keep') +"----------------------------------------------------------------------------- +command! -bar -narg=0 AcpEnable call acp#enable() +command! -bar -narg=0 AcpDisable call acp#disable() +command! -bar -narg=0 AcpLock call acp#lock() +command! -bar -narg=0 AcpUnlock call acp#unlock() +"----------------------------------------------------------------------------- +" legacy commands +command! -bar -narg=0 AutoComplPopEnable AcpEnable +command! -bar -narg=0 AutoComplPopDisable AcpDisable +command! -bar -narg=0 AutoComplPopLock AcpLock +command! -bar -narg=0 AutoComplPopUnlock AcpUnlock +"----------------------------------------------------------------------------- +if g:acp_enableAtStartup + AcpEnable +endif +"----------------------------------------------------------------------------- + +" }}}1 +"============================================================================= +" vim: set fdm=marker: diff --git a/plugin/autoclose.vim b/plugin/autoclose.vim new file mode 100644 index 0000000..957399e --- /dev/null +++ b/plugin/autoclose.vim @@ -0,0 +1,189 @@ +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" AutoClose.vim - Automatically close pair of characters: ( with ), [ with ], { with }, etc. +" Version: 1.1 +" Author: Thiago Alves +" Maintainer: Thiago Alves +" URL: http://thiagoalves.org +" Licence: This script is released under the Vim License. +" Last modified: 08/25/2008 +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +let s:debug = 1 + +" check if script is already loaded +if s:debug == 0 && exists("g:loaded_AutoClose") + finish "stop loading the script" +endif +let g:loaded_AutoClose = 1 + +let s:global_cpo = &cpo " store compatible-mode in local variable +set cpo&vim " go into nocompatible-mode + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Functions +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +function! s:GetNextChar() + if col('$') == col('.') + return "\0" + endif + return strpart(getline('.'), col('.')-1, 1) +endfunction + +function! s:GetPrevChar() + if col('.') == 1 + return "\0" + endif + return strpart(getline('.'), col('.')-2, 1) +endfunction + +function! s:IsEmptyPair() + let l:prev = s:GetPrevChar() + let l:next = s:GetNextChar() + if l:prev == "\0" || l:next == "\0" + return 0 + endif + return get(s:charsToClose, l:prev, "\0") == l:next +endfunction + +function! s:GetCurrentSyntaxRegion() + return synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name') +endfunction + +function! s:GetCurrentSyntaxRegionIf(char) + let l:origin_line = getline('.') + let l:changed_line = strpart(l:origin_line, 0, col('.')-1) . a:char . strpart(l:origin_line, col('.')-1) + call setline('.', l:changed_line) + let l:region = synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name') + call setline('.', l:origin_line) + return l:region +endfunction + +function! s:IsForbidden(char) + let l:result = index(s:protectedRegions, s:GetCurrentSyntaxRegion()) >= 0 + if l:result + return l:result + endif + let l:region = s:GetCurrentSyntaxRegionIf(a:char) + let l:result = index(s:protectedRegions, l:region) >= 0 + return l:result && l:region == 'Comment' +endfunction + +function! s:InsertPair(char) + let l:next = s:GetNextChar() + let l:result = a:char + if s:running && !s:IsForbidden(a:char) && (l:next == "\0" || l:next !~ '\w') + let l:result .= s:charsToClose[a:char] . "\" + endif + return l:result +endfunction + +function! s:ClosePair(char) + if s:running && s:GetNextChar() == a:char + let l:result = "\" + else + let l:result = a:char + endif + return l:result +endfunction + +function! s:CheckPair(char) + let l:lastpos = 0 + let l:occur = stridx(getline('.'), a:char, l:lastpos) == 0 ? 1 : 0 + + while l:lastpos > -1 + let l:lastpos = stridx(getline('.'), a:char, l:lastpos+1) + if l:lastpos > col('.')-2 + break + endif + if l:lastpos >= 0 + let l:occur += 1 + endif + endwhile + + if l:occur == 0 || l:occur%2 == 0 + " Opening char + return s:InsertPair(a:char) + else + " Closing char + return s:ClosePair(a:char) + endif +endfunction + +function! s:Backspace() + if s:running && s:IsEmptyPair() + return "\\" + endif + return "\" +endfunction + +function! s:ToggleAutoClose() + let s:running = !s:running + if s:running + echo "AutoClose ON" + else + echo "AutoClose OFF" + endif +endfunction + +function! s:SetVEAll() + let s:save_ve = &ve + set ve=all + return "" +endfunction + +function! s:RestoreVE() + exec "set ve=" . s:save_ve + unlet s:save_ve + return "" +endfunction + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Configuration +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" let user define which character he/she wants to autocomplete +if exists("g:AutoClosePairs") && type(g:AutoClosePairs) == type({}) + let s:charsToClose = g:AutoClosePairs + unlet g:AutoClosePairs +else + let s:charsToClose = {'(': ')', '{': '}', '[': ']', '"': '"', "'": "'"} +endif + +" let user define in which regions the autocomplete feature should not occur +if exists("g:AutoCloseProtectedRegions") && type(g:AutoCloseProtectedRegions) == type([]) + let s:protectedRegions = g:AutoCloseProtectedRegions + unlet g:AutoCloseProtectedRegions +else + let s:protectedRegions = ["Comment", "String", "Character"] +endif + +" let user define if he/she wants the plugin turned on when vim start. Defaul is YES +if exists("g:AutoCloseOn") && type(g:AutoCloseOn) == type(0) + let s:running = g:AutoCloseOn + unlet g:AutoCloseOn +else + let s:running = 1 +endif + +" create appropriate maps to defined open/close characters +for key in keys(s:charsToClose) + if key == '"' + let open_func_arg = '"\""' + let close_func_arg = '"\""' + else + let open_func_arg = '"' . key . '"' + let close_func_arg = '"' . s:charsToClose[key] . '"' + endif + + if key == s:charsToClose[key] + exec "inoremap " . key . " =SetVEAll()=CheckPair(" . open_func_arg . ")=RestoreVE()" + else + exec "inoremap " . s:charsToClose[key] . " =SetVEAll()=ClosePair(" . close_func_arg . ")=RestoreVE()" + exec "inoremap " . key . " =SetVEAll()=InsertPair(" . open_func_arg . ")=RestoreVE()" + endif +endfor +exec "inoremap =SetVEAll()=Backspace()=RestoreVE()" + +" Define convenient commands +command! AutoCloseOn :let s:running = 1 +command! AutoCloseOff :let s:running = 0 +command! AutoCloseToggle :call s:ToggleAutoClose() diff --git a/plugin/color_sample_pack.vim b/plugin/color_sample_pack.vim new file mode 100755 index 0000000..00e8af2 --- /dev/null +++ b/plugin/color_sample_pack.vim @@ -0,0 +1,164 @@ +" Maintainer: Robert Melton ( iam -at- robertmelton -dot- com) +" Last Change: 2010 Jan 20th + +" default schemes +amenu T&hemes.D&efault.Blue :colo blue +amenu T&hemes.D&efault.DarkBlue :colo darkblue +amenu T&hemes.D&efault.Default :colo default +amenu T&hemes.D&efault.Delek :colo delek +amenu T&hemes.D&efault.Desert :colo desert +amenu T&hemes.D&efault.ElfLord :colo elflord +amenu T&hemes.D&efault.Evening :colo evening +amenu T&hemes.D&efault.Koehler :colo koehler +amenu T&hemes.D&efault.Morning :colo morning +amenu T&hemes.D&efault.Murphy :colo murphy +amenu T&hemes.D&efault.Pablo :colo pablo +amenu T&hemes.D&efault.PeachPuff :colo peachpuff +amenu T&hemes.D&efault.Ron :colo ron +amenu T&hemes.D&efault.Shine :colo shine +amenu T&hemes.D&efault.Torte :colo torte +amenu T&hemes.-s1- : + +" 37 new themes +amenu T&hemes.&New.&Dark.Adaryn :colo adaryn +amenu T&hemes.&New.&Dark.Adrian :colo adrian +amenu T&hemes.&New.&Dark.Anotherdark :colo anotherdark +amenu T&hemes.&New.&Dark.BlackSea :colo blacksea +amenu T&hemes.&New.&Dark.Colorer :colo colorer +amenu T&hemes.&New.&Dark.Darkbone :colo darkbone +amenu T&hemes.&New.&Dark.DarkZ :colo darkz +amenu T&hemes.&New.&Dark.Herald :colo herald +amenu T&hemes.&New.&Dark.Jammy :colo jammy +amenu T&hemes.&New.&Dark.Kellys :colo kellys +amenu T&hemes.&New.&Dark.Lettuce :colo lettuce +amenu T&hemes.&New.&Dark.Maroloccio :colo maroloccio +amenu T&hemes.&New.&Dark.Molokai :colo molokai +amenu T&hemes.&New.&Dark.Mustang :colo mustang +amenu T&hemes.&New.&Dark.TIRBlack :colo tir_black +amenu T&hemes.&New.&Dark.Twilight :colo twilight +amenu T&hemes.&New.&Dark.Two2Tango :colo two2tango +amenu T&hemes.&New.&Dark.Wuye :colo wuye +amenu T&hemes.&New.&Dark.Zmrok :colo zmrok +amenu T&hemes.&New.&Light.BClear :colo bclear +amenu T&hemes.&New.&Light.Satori :colo satori +amenu T&hemes.&New.&Light.Silent :colo silent +amenu T&hemes.&New.&Light.SoSo :colo soso +amenu T&hemes.&New.&Light.SummerFruit256 :colo summerfruit256 +amenu T&hemes.&New.&Light.TAqua :colo taqua +amenu T&hemes.&New.&Light.TCSoft :colo tcsoft +amenu T&hemes.&New.&Light.VYLight :colo vylight +amenu T&hemes.&New.&Other.Aqua :colo aqua +amenu T&hemes.&New.&Other.Clarity :colo clarity +amenu T&hemes.&New.&Other.CleanPHP :colo cleanphp +amenu T&hemes.&New.&Other.Denim :colo denim +amenu T&hemes.&New.&Other.Guardian :colo guardian +amenu T&hemes.&New.&Other.Moss :colo moss +amenu T&hemes.&New.&Other.Nightshimmer :colo nightshimmer +amenu T&hemes.&New.&Other.NoQuarter :colo no_quarter +amenu T&hemes.&New.&Other.RobinHood :colo robinhood +amenu T&hemes.&New.&Other.SoftBlue :colo softblue +amenu T&hemes.&New.&Other.Wood :colo wood + +" 30 removed themes +amenu T&hemes.De&precated.&Dark.DwBlue :colo dw_blue +amenu T&hemes.De&precated.&Dark.DwCyan :colo dw_cyan +amenu T&hemes.De&precated.&Dark.DwGreen :colo dw_green +amenu T&hemes.De&precated.&Dark.DwOrange :colo dw_orange +amenu T&hemes.De&precated.&Dark.DwPurple :colo dw_purple +amenu T&hemes.De&precated.&Dark.DwRed :colo dw_red +amenu T&hemes.De&precated.&Dark.DwYellow :colo dw_yellow +amenu T&hemes.De&precated.&Dark.Fruity :colo fruity +amenu T&hemes.De&precated.&Dark.Leo :colo leo +amenu T&hemes.De&precated.&Dark.Matrix :colo matrix +amenu T&hemes.De&precated.&Dark.Metacosm :colo metacosm +amenu T&hemes.De&precated.&Dark.Northland :colo northland +amenu T&hemes.De&precated.&Dark.Railscasts2 :colo railscasts2 +amenu T&hemes.De&precated.&Dark.Synic :colo synic +amenu T&hemes.De&precated.&Dark.Wombat256 :colo wombat256 +amenu T&hemes.De&precated.&Dark.Xoria256 :colo xoria256 +amenu T&hemes.De&precated.&Light.Autumn2 :colo autumn2 +amenu T&hemes.De&precated.&Light.Buttercream :colo buttercream +amenu T&hemes.De&precated.&Light.Fine_blue :colo fine_blue +amenu T&hemes.De&precated.&Light.Impact :colo impact +amenu T&hemes.De&precated.&Light.Oceanlight :colo oceanlight +amenu T&hemes.De&precated.&Light.Print_bw :colo print_bw +amenu T&hemes.De&precated.&Light.Pyte :colo pyte +amenu T&hemes.De&precated.&Light.Spring :colo spring +amenu T&hemes.De&precated.&Light.Winter :colo winter +amenu T&hemes.De&precated.&Other.Astronaut :colo astronaut +amenu T&hemes.De&precated.&Other.Bluegreen :colo bluegreen +amenu T&hemes.De&precated.&Other.Navajo :colo navajo +amenu T&hemes.De&precated.&Other.Olive :colo olive +amenu T&hemes.De&precated.&Other.Tabula :colo tabula +amenu T&hemes.De&precated.&Other.Xemacs :colo xemacs + +" Themepack Themes +amenu T&hemes.&Dark.Asu1dark :colo asu1dark +amenu T&hemes.&Dark.Brookstream :colo brookstream +amenu T&hemes.&Dark.Calmar256-dark :colo calmar256-dark +amenu T&hemes.&Dark.Camo :colo camo +amenu T&hemes.&Dark.Candy :colo candy +amenu T&hemes.&Dark.Candycode :colo candycode +amenu T&hemes.&Dark.Dante :colo dante +amenu T&hemes.&Dark.Darkspectrum :colo darkspectrum +amenu T&hemes.&Dark.Desert256 :colo desert256 +amenu T&hemes.&Dark.DesertEx :colo desertEx +amenu T&hemes.&Dark.Dusk :colo dusk +amenu T&hemes.&Dark.Earendel :colo earendel +amenu T&hemes.&Dark.Ekvoli :colo ekvoli +amenu T&hemes.&Dark.Fnaqevan :colo fnaqevan +amenu T&hemes.&Dark.Freya :colo freya +amenu T&hemes.&Dark.Golden :colo golden +amenu T&hemes.&Dark.Inkpot :colo inkpot +amenu T&hemes.&Dark.Jellybeans :colo jellybeans +amenu T&hemes.&Dark.Lucius :colo lucius +amenu T&hemes.&Dark.Manxome :colo manxome +amenu T&hemes.&Dark.Moria :colo moria +amenu T&hemes.&Dark.Motus :colo motus +amenu T&hemes.&Dark.Neon :colo neon +amenu T&hemes.&Dark.Neverness :colo neverness +amenu T&hemes.&Dark.Oceanblack :colo oceanblack +amenu T&hemes.&Dark.Railscasts :colo railscasts +amenu T&hemes.&Dark.Rdark :colo rdark +amenu T&hemes.&Dark.Relaxedgreen :colo relaxedgreen +amenu T&hemes.&Dark.Rootwater :colo rootwater +amenu T&hemes.&Dark.Tango :colo tango +amenu T&hemes.&Dark.Tango2 :colo tango2 +amenu T&hemes.&Dark.Vibrantink :colo vibrantink +amenu T&hemes.&Dark.Vividchalk :colo vividchalk +amenu T&hemes.&Dark.Wombat :colo wombat +amenu T&hemes.&Dark.Zenburn :colo zenburn + +amenu T&hemes.&Light.Autumn :colo autumn +amenu T&hemes.&Light.Autumnleaf :colo autumnleaf +amenu T&hemes.&Light.Baycomb :colo baycomb +amenu T&hemes.&Light.Biogoo :colo biogoo +amenu T&hemes.&Light.Calmar256-light :colo calmar256-light +amenu T&hemes.&Light.Chela_light :colo chela_light +amenu T&hemes.&Light.Dawn :colo dawn +amenu T&hemes.&Light.Eclipse :colo eclipse +amenu T&hemes.&Light.Fog :colo fog +amenu T&hemes.&Light.Fruit :colo fruit +amenu T&hemes.&Light.Habilight :colo habilight +amenu T&hemes.&Light.Ironman :colo ironman +amenu T&hemes.&Light.Martin_krischik :colo martin_krischik +amenu T&hemes.&Light.Nuvola :colo nuvola +amenu T&hemes.&Light.PapayaWhip :colo PapayaWhip +amenu T&hemes.&Light.Sienna :colo sienna +amenu T&hemes.&Light.Simpleandfriendly :colo simpleandfriendly +amenu T&hemes.&Light.Tolerable :colo tolerable +amenu T&hemes.&Light.Vc :colo vc + +amenu T&hemes.&Other.Aiseered :colo aiseered +amenu T&hemes.&Other.Borland :colo borland +amenu T&hemes.&Other.Breeze :colo breeze +amenu T&hemes.&Other.Chocolateliquor :colo chocolateliquor +amenu T&hemes.&Other.Darkblue2 :colo darkblue2 +amenu T&hemes.&Other.Darkslategray :colo darkslategray +amenu T&hemes.&Other.Marklar :colo marklar +amenu T&hemes.&Other.Navajo-night :colo navajo-night +amenu T&hemes.&Other.Night :colo night +amenu T&hemes.&Other.Oceandeep :colo oceandeep +amenu T&hemes.&Other.Peaksea :colo peaksea +amenu T&hemes.&Other.Sea :colo sea +amenu T&hemes.&Other.Settlemyer :colo settlemyer diff --git a/plugin/command-t.vim b/plugin/command-t.vim new file mode 100644 index 0000000..716a889 --- /dev/null +++ b/plugin/command-t.vim @@ -0,0 +1,151 @@ +" command-t.vim +" Copyright 2010 Wincent Colaiuta. All rights reserved. +" +" Redistribution and use in source and binary forms, with or without +" modification, are permitted provided that the following conditions are met: +" +" 1. Redistributions of source code must retain the above copyright notice, +" this list of conditions and the following disclaimer. +" 2. Redistributions in binary form must reproduce the above copyright notice, +" this list of conditions and the following disclaimer in the documentation +" and/or other materials provided with the distribution. +" +" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE +" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +" POSSIBILITY OF SUCH DAMAGE. + +if exists("g:command_t_loaded") + finish +endif +let g:command_t_loaded = 1 + +command -nargs=? -complete=dir CommandT call CommandTShow() +command CommandTFlush call CommandTFlush() + +if !hasmapto('CommandT') + silent! nmap t :CommandT +endif + +function s:CommandTRubyWarning() + echohl WarningMsg + echo "command-t.vim requires Vim to be compiled with Ruby support" + echo "For more information type: :help command-t" + echohl none +endfunction + +function s:CommandTShow(arg) + if has('ruby') + ruby $command_t.show + else + call s:CommandTRubyWarning() + endif +endfunction + +function s:CommandTFlush() + if has('ruby') + ruby $command_t.flush + else + call s:CommandTRubyWarning() + endif +endfunction + +if !has('ruby') + finish +endif + +function CommandTHandleKey(arg) + ruby $command_t.handle_key +endfunction + +function CommandTBackspace() + ruby $command_t.backspace +endfunction + +function CommandTDelete() + ruby $command_t.delete +endfunction + +function CommandTAcceptSelection() + ruby $command_t.accept_selection +endfunction + +function CommandTAcceptSelectionTab() + ruby $command_t.accept_selection :command => 'tabe' +endfunction + +function CommandTAcceptSelectionSplit() + ruby $command_t.accept_selection :command => 'sp' +endfunction + +function CommandTAcceptSelectionVSplit() + ruby $command_t.accept_selection :command => 'vs' +endfunction + +function CommandTToggleFocus() + ruby $command_t.toggle_focus +endfunction + +function CommandTCancel() + ruby $command_t.cancel +endfunction + +function CommandTSelectNext() + ruby $command_t.select_next +endfunction + +function CommandTSelectPrev() + ruby $command_t.select_prev +endfunction + +function CommandTClear() + ruby $command_t.clear +endfunction + +function CommandTCursorLeft() + ruby $command_t.cursor_left +endfunction + +function CommandTCursorRight() + ruby $command_t.cursor_right +endfunction + +function CommandTCursorEnd() + ruby $command_t.cursor_end +endfunction + +function CommandTCursorStart() + ruby $command_t.cursor_start +endfunction + +ruby << EOF + # require Ruby files + begin + # prepare controller + require 'command-t/vim' + require 'command-t/controller' + $command_t = CommandT::Controller.new + rescue LoadError + load_path_modified = false + ::VIM::evaluate('&runtimepath').to_s.split(',').each do |path| + lib = "#{path}/ruby" + if !$LOAD_PATH.include?(lib) and File.exist?(lib) + $LOAD_PATH << lib + load_path_modified = true + end + end + retry if load_path_modified + + # could get here if C extension was not compiled, or was compiled + # for the wrong architecture or Ruby version + require 'command-t/stub' + $command_t = CommandT::Stub.new + end +EOF diff --git a/plugin/doc/NERD_tree.txt b/plugin/doc/NERD_tree.txt new file mode 100644 index 0000000..174229d --- /dev/null +++ b/plugin/doc/NERD_tree.txt @@ -0,0 +1,1291 @@ +*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/plugin/doc/surround.txt b/plugin/doc/surround.txt new file mode 100644 index 0000000..4387fa2 --- /dev/null +++ b/plugin/doc/surround.txt @@ -0,0 +1,222 @@ +*surround.txt* Plugin for deleting, changing, and adding "surroundings" + +Author: Tim Pope *surround-author* +License: Same terms as Vim itself (see |license|) + +This plugin is only available if 'compatible' is not set. + +INTRODUCTION *surround* + +This plugin is a tool for dealing with pairs of "surroundings." Examples +of surroundings include parentheses, quotes, and HTML tags. They are +closely related to what Vim refers to as |text-objects|. Provided +are mappings to allow for removing, changing, and adding surroundings. + +Details follow on the exact semantics, but first, consider the following +examples. An asterisk (*) is used to denote the cursor position. + + Old text Command New text ~ + "Hello *world!" ds" Hello world! + [123+4*56]/2 cs]) (123+456)/2 + "Look ma, I'm *HTML!" cs" Look ma, I'm HTML! + if *x>3 { ysW( if ( x>3 ) { + my $str = *whee!; vlllls' my $str = 'whee!'; + +While a few features of this plugin will work in older versions of Vim, +Vim 7 is recommended for full functionality. + +MAPPINGS *surround-mappings* + +Delete surroundings is *ds* . The next character given determines the target +to delete. The exact nature of the target is explained in |surround-targets| +but essentially it is the last character of a |text-object|. This mapping +deletes the difference between the "i"nner object and "a"n object. This is +easiest to understand with some examples: + + Old text Command New text ~ + "Hello *world!" ds" Hello world! + (123+4*56)/2 ds) 123+456/2 +
Yo!*
dst Yo! + +Change surroundings is *cs* . It takes two arguments, a target like with +|ds|, and a replacement. Details about the second argument can be found +below in |surround-replacements|. Once again, examples are in order. + + Old text Command New text ~ + "Hello *world!" cs"' 'Hello world!' + "Hello *world!" cs" Hello world! + (123+4*56)/2 cs)] [123+456]/2 + (123+4*56)/2 cs)[ [ 123+456 ]/2 +
Yo!*
cst

Yo!

+ +*ys* takes a valid Vim motion or text object as the first object, and wraps +it using the second argument as with |cs|. (Unfortunately there's no good +mnemonic for "ys".) + + Old text Command New text ~ + Hello w*orld! ysiw) Hello (world)! + +As a special case, *yss* operates on the current line, ignoring leading +whitespace. + + Old text Command New text ~ + Hello w*orld! yssB {Hello world!} + +There is also *yS* and *ySS* which indent the surrounded text and place it +on a line of its own. + +In visual mode, a simple "s" with an argument wraps the selection. This is +referred to as the *vS* mapping, although ordinarily there will be +additional keystrokes between the v and s. In linewise visual mode, the +surroundings are placed on separate lines and indented. In blockwise visual +mode, each line is surrounded. + +A "gS" in visual mode, known as *vgS* , behaves similarly. In linewise visual +mode, the automatic indenting is surpressed. In blockwise visual mode, this +enables surrounding past the end of the like with 'virtualedit' set (there +seems to be no way in Vim Script to differentiate between a jagged end of line +selection and a virtual block selected past the end of the line, so two maps +were needed). + +Additionally, there is a legacy "s" or *vs* mapping which is basically the +same as |vS|. Due to popular demand of wanting to use "s" as Vim does to mean +replacing the selection (also available as "c"), this mapping is going away. +If you were one of these people and would like to disable "s" with the current +release, indicate this to surround.vim by assigning the "s" mapping to +something else. +> + xmap s Vsurround +< + *i_CTRL-G_s* *i_CTRL-G_S* +Finally, there is an experimental insert mode mapping on s and . +Beware that the latter won't work on terminals with flow control (if you +accidentally freeze your terminal, use to unfreeze it). The mapping +inserts the specified surroundings and puts the cursor between them. If, +immediately after the mapping and before the replacement, a second or +carriage return is pressed, the prefix, cursor, and suffix will be placed on +three separate lines. S (not s) also exhibits this behavior. + +TARGETS *surround-targets* + +The |ds| and |cs| commands both take a target as their first argument. The +possible targets are based closely on the |text-objects| provided by Vim. +In order for a target to work, the corresponding text object must be +supported in the version of Vim used (Vim 7 adds several text objects, and +thus is highly recommended). All targets are currently just one character. + +Eight punctuation marks, (, ), {, }, [, ], <, and >, represent themselves +and their counterparts. If the opening mark is used, contained whitespace is +also trimmed. The targets b, B, r, and a are aliases for ), }, ], and > +(the first two mirror Vim; the second two are completely arbitrary and +subject to change). + +Three quote marks, ', ", `, represent themselves, in pairs. They are only +searched for on the current line. + +A t is a pair of HTML or XML tags. See |tag-blocks| for details. Remember +that you can specify a numerical argument if you want to get to a tag other +than the innermost one. + +The letters w, W, and s correspond to a |word|, a |WORD|, and a |sentence|, +respectively. These are special in that they have nothing to delete, and +used with |ds| they are a no-op. With |cs|, one could consider them a +slight shortcut for ysi (cswb == ysiwb, more or less). + +A p represents a |paragraph|. This behaves similarly to w, W, and s above; +however, newlines are sometimes added and/or removed. + +REPLACEMENTS *surround-replacements* + +A replacement argument is a single character, and is required by |cs|, |ys|, +and |vs|. Undefined replacement characters (with the exception of alphabetic +characters) default to placing themselves at the beginning and end of the +destination, which can be useful for characters like / and |. + +If either ), }, ], or > is used, the text is wrapped in the appropriate pair +of characters. Similar behavior can be found with (, {, and [ (but not <), +which append an additional space to the inside. Like with the targets above, +b, B, r, and a are aliases for ), }, ], and >. To fulfill the common need for +code blocks in C-style languages, (which is really ) adds braces on +lines separate from the content. + +If t or < is used, Vim prompts for an HTML/XML tag to insert. You may specify +attributes here and they will be stripped from the closing tag. End your +input by pressing or >. If is used, the tags will appear on lines +by themselves. + +A deprecated replacement of a LaTeX environment is provided on \ and l. The +name of the environment and any arguments will be input from a prompt. This +will be removed once a more fully functional customization system is +implemented. The following shows the resulting environment from +csp\tabular}{lc +> + \begin{tabular}{lc} + \end{tabular} +< +CUSTOMIZING *surround-customizing* + +The following adds a potential replacement on "-" (ASCII 45) in PHP files. +(To determine the ASCII code to use, :echo char2nr("-")). The carriage +return will be replaced by the original text. +> + autocmd FileType php let b:surround_45 = "" +< +This can be used in a PHP file as in the following example. + + Old text Command New text ~ + print "Hello *world!" yss- + +Additionally, one can use a global variable for globally available +replacements. +> + let g:surround_45 = "<% \r %>" + let g:surround_61 = "<%= \r %>" +< +Advanced, experimental, and subject to change: One can also prompt for +replacement text. The syntax for this is to surround the replacement in pairs +of low numbered control characters. If this sounds confusing, that's because +it is (but it makes the parsing easy). Consider the following example for a +LaTeX environment on the "l" replacement. +> + let g:surround_108 = "\\begin{\1environment: \1}\r\\end{\1\1}" +< +When this replacement is used, the user is prompted with an "environment: " +prompt for input. This input is inserted between each set of \1's. +Additional inputs up to \7 can be used. + +Furthermore, one can specify a regular expression substitution to apply. +> + let g:surround_108 = "\\begin{\1environment: \1}\r\\end{\1\r}.*\r\1}" +< +This will remove anything after the first } in the input when the text is +placed within the \end{} slot. The first \r marks where the pattern begins, +and the second where the replacement text begins. + +Here's a second example for creating an HTML
. The substitution cleverly +prompts for an id, but only adds id="" if it is non-blank. You may have to +read this one a few times slowly before you understand it. +> + let g:surround_{char2nr("d")} = "\r
" +< +Inputting text replacements is a proof of concept at this point. The ugly, +unintuitive interface and the brevity of the documentation reflect this. + +Finally, It is possible to always append a string to surroundings in insert +mode (and only insert mode). This is useful with certain plugins and mappings +that allow you to jump to such markings. +> + let g:surround_insert_tail = "<++>" +< +ISSUES *surround-issues* + +Vim could potentially get confused when deleting/changing occurs at the very +end of the line. Please report any repeatable instances of this. + +Do we need to use |inputsave()|/|inputrestore()| with the tag replacement? + +Indenting is handled haphazardly. Need to decide the most appropriate +behavior and implement it. Right now one can do :let b:surround_indent = 1 +(or the global equivalent) to enable automatic re-indenting by Vim via |=|; +should this be the default? + + vim:tw=78:ts=8:ft=help:norl: diff --git a/plugin/jsbeautify.vim b/plugin/jsbeautify.vim new file mode 100644 index 0000000..2512aa1 --- /dev/null +++ b/plugin/jsbeautify.vim @@ -0,0 +1,623 @@ +if &cp || exists("loaded_jsbeautify") + finish +endif +let loaded_jsbeautify = 3 + + + +function! s:trim_output() + while len(s:output) > 0 && (s:output[len(s:output)-1] == " " || s:output[len(s:output)-1] == s:indent_string) + call remove(s:output, -1) + endwhile +endfunction + +function! s:print_newline(ignore_repeated) + let s:if_line_flag = 0 + call s:trim_output() + if len(s:output)==0 + return + endif + if s:output[len(s:output)-1] != "\n" || !a:ignore_repeated + call add(s:output, "\n") + endif + let index = 0 + while index < s:indent_level + call add(s:output, s:indent_string) + let index += 1 + endwhile +endfunction + +function! s:print_space() + let last_output = " " + if len(s:output) > 0 + let last_output = s:output[len(s:output) - 1] + endif + if last_output != " " && last_output != "\n" && last_output != s:indent_string + call add(s:output, " ") + endif +endfunction + +function! s:print_token() + call add(s:output, s:token_text) +endfunctio + +function! s:indent() + let s:indent_level += 1 +endfunction + +function! s:unindent() + if s:indent_level + let s:indent_level -= 1 + endif +endfunction + +function! s:remove_indent() + if len(s:output)>0 && s:output[len(s:output) -1] == s:indent_string + call remove(s:output, -1) + endif +endfunction + +function! s:set_mode(mode) + call add(s:modes, s:current_mode) + let s:current_mode = a:mode +endfunction + +function! s:restore_mode() + if s:current_mode == "DO_BLOCK" + let s:do_block_just_closed = 1 + else + let s:do_block_just_closed = 0 + endif + let s:current_mode = remove(s:modes, -1) +endfunction + +function! s:in_array(what, arr) + return index(a:arr, a:what) != -1 +endfunction + +function! s:get_next_token() + let n_newlines = 0 + + if s:parser_pos >= len(s:input) + return ["", "TK_EOF"] + endif + + let c = s:input[s:parser_pos] + let s:parser_pos += 1 + + while s:in_array(c, s:whitespace) + if s:parser_pos >= len(s:input) + return ["", "TK_EOF"] + endif + + if c == "\n" + let n_newlines += 1 + endif + + let c = s:input[s:parser_pos] + let s:parser_pos += 1 + endwhile + + let wanted_newline = 0 + + if s:opt_preserve_newlines + if n_newlines > 1 + for i in [0, 1] + call s:print_newline(i==0) + endfor + endif + let wanted_newline = n_newlines == 1 + endif + + if s:in_array(c, s:wordchar) + if s:parser_pos < len(s:input) + while s:in_array(s:input[s:parser_pos], s:wordchar) + let c .= s:input[s:parser_pos] + let s:parser_pos += 1 + if s:parser_pos == len(s:input) + break + endif + endwhile + endif + + "if s:parser_pos != len(s:input) && c =~ /^[0-9]+[Ee]$/ && (s:input[s:parser_pos] == "-" || s:input[s:parser_pos] == "+") + "let sign = s:input[s:parser_pos] + "let s:parser_pos += 1 + + "let t = get_next_token(s:parser_pos) + "let c .= sign . t[0] + "return [c, "TK_WORD"] + " endif + + if c == "in" + return [c, "TK_OPERATOR"] + endif + if wanted_newline && s:last_type != "TK_OPERATOR" && !s:if_line_flag + call s:print_newline(1) + endif + return [c, "TK_WORD"] + endif + if c == "(" || c == "[" + return [c, "TK_START_EXPR"] + endif + + if c == ")" || c == "]" + return [c, "TK_END_EXPR"] + endif + + if c == "{" + return [c, "TK_START_BLOCK"] + endif + + if c == "}" + return [c, "TK_END_BLOCK"] + endif + + if c == ";" + return [c, "TK_SEMICOLON"] + endif + + if c == "/" + let comment = "" + if s:input[s:parser_pos] == "*" + let s:parser_pos += 1 + if s:parser_pos < len(s:input) + while !(s:input[s:parser_pos] == "*" && s:parser_pos + 1 < len(s:input) && s:input[s:parser_pos + 1] == "/" && s:parser_pos < len(s:input)) + let comment .= s:input[s:parser_pos] + let s:parser_pos += 1 + if s:parser_pos >= len(s:input) + break + endif + endwhile + endif + let s:parser_pos += 2 + return ['/*' . comment . '*/', 'TK_BLOCK_COMMENT'] + endif + + " peek for comment // ... + if s:input[s:parser_pos] == "/" + let comment = c + while s:input[s:parser_pos] != "\r" && s:input[s:parser_pos] != "\n" + let comment .= s:input[s:parser_pos] + let s:parser_pos += 1 + if s:parser_pos >= len(s:input) + break + endif + endwhile + let s:parser_pos += 1 + if wanted_newline + call s:print_newline(1) + endif + return [comment, "TK_COMMENT"] + endif + endif + + if c == "'" || c =='"' || (c == "/" && ((s:last_type == "TK_WORD" && s:last_text == "return") || (s:last_type == "TK_START_EXPR" || s:last_type == "TK_START_BLOCK" || s:last_type == "TK_END_BLOCK" || s:last_type == "TK_OPERATOR" || s:last_type == "TK_EOF" || s:last_type == "TK_SEMICOLON"))) + let sep = c + let esc = 0 + let resulting_string = c + + if s:parser_pos < len(s:input) + while esc || s:input[s:parser_pos] != sep + let resulting_string .= s:input[s:parser_pos] + if !esc + let esc = s:input[s:parser_pos] == "\\" + else + let esc = 0 + endif + let s:parser_pos += 1 + if s:parser_pos >= len(s:input) + return [resulting_string, "TK_STRING"] + endif + endwhile + endif + + let s:parser_pos += 1 + + let resulting_string .= sep + + if sep == "/" + + while s:parser_pos < len(s:input) && s:in_array(s:input[s:parser_pos], s:wordchar) + let resulting_string .= s:input[s:parser_pos] + let s:parser_pos += 1 + endwhile + endif + return [resulting_string, "TK_STRING"] + endif + + if c == "#" + let sharp = "#" + if s:parser_pos < len(s:input) && s:in_array(s:input[s:parser_pos], s:digits) + let c = s:input[s:parser_pos] + let sharp .= c + let s:parser_pos += 1 + + while s:parser_pos < len(s:input) && c != "#" && c !="=" + let c = s:input[s:parser_pos] + let sharp .= c + let s:parser_pos += 1 + endwhile + + if c == "#" + return [sharp, "TK_WORD"] + else + return [sharp, "TK_OPERATOR"] + endif + endif + endif + + if c == "<" && s:input[s:parser_pos-1 : s:parser_pos+3] == "" + let s:parser_pos += 2 + if wanted_newline + call s:print_newline(1) + endif + return ["-->", "TK_COMMENT"] + endif + + if s:in_array(c, s:punct) + while s:parser_pos < len(s:input) && s:in_array(c . s:input[s:parser_pos], s:punct) + let c .= s:input[s:parser_pos] + let s:parser_pos += 1 + if s:parser_pos >= len(s:input) + break + endif + endwhile + + return [c, "TK_OPERATOR"] + endif + + return [c, "TK_UNKNOWN"] + endif + + + +endfunction + +function! s:is_js() + return expand("%:e") == "js" +endfunction + +"function! g:Jsbeautify(js_source_text, options) +function! g:Jsbeautify() + if !s:is_js() + echo "Not a JS file." + return + endif + + "let a:options = {} + let s:opt_indent_size = 1 + let s:opt_indent_char = "\t" + let s:opt_preserve_newlines = 1 + let s:opt_indent_level = 0 + + let s:if_line_flag = 0 + "-------------------------------- + + let s:indent_string = "" + while s:opt_indent_size > 0 + let s:indent_string .= s:opt_indent_char + let s:opt_indent_size -= 1 + endwhile + + let s:indent_level = s:opt_indent_level + + let lines = getline(1, "$") + let s:input = join(lines, "\n") + "let s:input = a:js_source_text + + let s:last_word = "" "last 'TK_WORD' passed + let s:last_type = "TK_START_EXPR" "last token type + let s:last_text = "" "last token text + let s:output = [] + + let s:do_block_just_closed = 0 + let s:var_line = 0 + let s:var_line_tainted = 0 + + let s:whitespace = ["\n", "\r", "\t", " "] + let s:wordchar = split("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$", '\zs') + let s:digits = split("0123456789", '\zs') + + " + + + + + + + + + + + + + + + SITENAME + + + ${1} + + diff --git a/snippets/java.snippets b/snippets/java.snippets new file mode 100644 index 0000000..fd705cb --- /dev/null +++ b/snippets/java.snippets @@ -0,0 +1,78 @@ +snippet main + public static void main (String [] args) + { + ${1:/* code */} + } +snippet pu + public +snippet po + protected +snippet pr + private +snippet st + static +snippet fi + final +snippet ab + abstract +snippet re + return +snippet br + break; +snippet de + default: + ${1} +snippet ca + catch(${1:Exception} ${2:e}) ${3} +snippet th + throw +snippet sy + synchronized +snippet im + import +snippet j.u + java.util +snippet j.i + java.io. +snippet j.b + java.beans. +snippet j.n + java.net. +snippet j.m + java.math. +snippet if + if (${1}) ${2} +snippet el + else +snippet elif + else if (${1}) ${2} +snippet wh + while (${1}) ${2} +snippet for + for (${1}; ${2}; ${3}) ${4} +snippet fore + for (${1} : ${2}) ${3} +snippet sw + switch (${1}) ${2} +snippet cs + case ${1}: + ${2} + ${3} +snippet tc + public class ${1:`Filename()`} extends ${2:TestCase} +snippet t + public void test${1:Name}() throws Exception ${2} +snippet cl + class ${1:`Filename("", "untitled")`} ${2} +snippet in + interface ${1:`Filename("", "untitled")`} ${2:extends Parent}${3} +snippet m + ${1:void} ${2:method}(${3}) ${4:throws }${5} +snippet v + ${1:String} ${2:var}${3: = null}${4};${5} +snippet co + static public final ${1:String} ${2:var} = ${3};${4} +snippet cos + static public final String ${1:var} = "${2}";${3} +snippet as + assert ${1:test} : "${2:Failure message}";${3} diff --git a/snippets/javascript.snippets b/snippets/javascript.snippets new file mode 100644 index 0000000..d13b401 --- /dev/null +++ b/snippets/javascript.snippets @@ -0,0 +1,76 @@ +# Prototype +snippet proto + ${1:class_name}.prototype.${2:method_name} = + function(${3:first_argument}) { + ${4:// body...} + }; +# Function +snippet fun + function ${1:function_name} (${2:argument}) { + ${3:// body...} + } +# Anonymous Function +snippet f + function(${1}) {${2}}; +# if +snippet if + if (${1:true}) {${2}}; +# if ... else +snippet ife + if (${1:true}) {${2}} + else{${3}}; +# tertiary conditional +snippet t + ${1:/* condition */} ? ${2:a} : ${3:b} +# switch +snippet switch + switch(${1:expression}) { + case '${3:case}': + ${4:// code} + break; + ${5} + default: + ${2:// code} + } +# case +snippet case + case '${1:case}': + ${2:// code} + break; + ${3} +# for (...) {...} +snippet for + for (var ${2:i} = 0; $2 < ${1:Things}.length; $2${3:++}) { + ${4:$1[$2]} + }; +# for (...) {...} (Improved Native For-Loop) +snippet forr + for (var ${2:i} = ${1:Things}.length - 1; $2 >= 0; $2${3:--}) { + ${4:$1[$2]} + }; +# while (...) {...} +snippet wh + while (${1:/* condition */}) { + ${2:/* code */} + } +# do...while +snippet do + do { + ${2:/* code */} + } while (${1:/* condition */}); +# Object Method +snippet :f + ${1:method_name}: function(${2:attribute}) { + ${4} + }${3:,} +# setTimeout function +snippet timeout + setTimeout(function() {${3}}${2}, ${1:10}; +# Get Elements +snippet get + getElementsBy${1:TagName}('${2}')${3} +# Get Element +snippet gett + getElementBy${1:Id}('${2}')${3} +snippet dog + doggie diff --git a/snippets/mako.snippets b/snippets/mako.snippets new file mode 100644 index 0000000..2a0aef9 --- /dev/null +++ b/snippets/mako.snippets @@ -0,0 +1,54 @@ +snippet def + <%def name="${1:name}"> + ${2:} + +snippet call + <%call expr="${1:name}"> + ${2:} + +snippet doc + <%doc> + ${1:} + +snippet text + <%text> + ${1:} + +snippet for + % for ${1:i} in ${2:iter}: + ${3:} + % endfor +snippet if if + % if ${1:condition}: + ${2:} + % endif +snippet if if/else + % if ${1:condition}: + ${2:} + % else: + ${3:} + % endif +snippet try + % try: + ${1:} + % except${2:}: + ${3:pass} + % endtry +snippet wh + % while ${1:}: + ${2:} + % endwhile +snippet $ + ${ ${1:} } +snippet <% + <% ${1:} %> +snippet +snippet inherit + <%inherit file="${1:filename}" /> +snippet include + <%include file="${1:filename}" /> +snippet namespace + <%namespace file="${1:name}" /> +snippet page + <%page args="${1:}" /> diff --git a/snippets/markdown.snippets b/snippets/markdown.snippets new file mode 100644 index 0000000..fb310c1 --- /dev/null +++ b/snippets/markdown.snippets @@ -0,0 +1,43 @@ +# [link][] +snippet [] + [${1:link_id}][]${2} +# [link][id] +snippet [[ + [${1:link}][${2:id}]${3} +# [link](url) +snippet [( + [${1:link}](http://${2:url})${3} +# [link](email) +snippet [@ + [${1:link}(mailto:${2:email})${3} +# [link](url "title") +snippet [(" + [${1:link}](${2:url} "${3:title}")${4} +# [id]: url "title" +snippet [: + [${1:id}]: http://${2:url} "${3:title}" +# [id]: email "title" +snippet [:@ + [${1:id}]: mailto:${2:url} "${3:title}" +# ![alt][id] +snippet ![ + ![${1:alt}][${2:id}]${3} +# ![alt](url) +snippet !( + ![${1:alt}](${2:url})${3} +# ![alt](url "title") +snippet !(" + ![${1:alt}](${2:url} "${3:title}")${4} +# *emphasis* or _emphasis_ +snippet * + *${1}*${2} +snippet _ + _${1}_${2} +# **strong** or __strong__ +snippet ** + **${1}**${2} +snippet __ + __${1}__${2} +# `code` +snippet ` + `${1}`${2} diff --git a/snippets/objc.snippets b/snippets/objc.snippets new file mode 100644 index 0000000..4749bb7 --- /dev/null +++ b/snippets/objc.snippets @@ -0,0 +1,184 @@ +# #import <...> +snippet Imp + #import <${1:Cocoa/Cocoa.h}>${2} +# #import "..." +snippet imp + #import "${1:`Filename()`.h}"${2} +# @selector(...) +snippet sel + @selector(${1:method}:)${3} +# @"..." string +snippet s + @"${1}"${2} +# Object +snippet o + ${1:NSObject} *${2:foo} = [${3:$1 alloc}]${4};${5} +# NSLog(...) +snippet log + NSLog(@"${1:%@}"${2});${3} +# Class +snippet objc + @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject} + { + } + @end + + @implementation $1 + ${3} + @end +# Class Interface +snippet int + @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject} + {${3} + } + ${4} + @end +# Class Implementation +snippet impl + @implementation ${1:`Filename('', 'someClass')`} + ${2} + @end +snippet init + - (id)init + { + [super init]; + return self; + } +snippet ifself + if (self = [super init]) { + ${1:/* code */} + } + return self; +snippet ibo + IBOutlet ${1:NSSomeClass} *${2:$1};${3} +# Category +snippet cat + @interface ${1:NSObject} (${2:Category}) + @end + + @implementation $1 ($2) + ${3} + @end +# Category Interface +snippet cath + @interface ${1:NSObject} (${2:Category}) + ${3} + @end +# NSArray +snippet array + NSMutableArray *${1:array} = [NSMutable array];${2} +# NSDictionary +snippet dict + NSMutableDictionary *${1:dict} = [NSMutableDictionary dictionary];${2} +# NSBezierPath +snippet bez + NSBezierPath *${1:path} = [NSBezierPath bezierPath];${2} +# Method +snippet m + - (${1:id})${2:method} + { + ${3} + } +# Method declaration +snippet md + - (${1:id})${2:method};${3} +# IBAction declaration +snippet ibad + - (IBAction)${1:method}:(${2:id})sender;${3} +# IBAction method +snippet iba + - (IBAction)${1:method}:(${2:id})sender + { + ${3} + } +# awakeFromNib method +snippet wake + - (void)awakeFromNib + { + ${1} + } +# Class Method +snippet M + + (${1:id})${2:method} + {${3} + return nil; + } +# Sub-method (Call super) +snippet sm + - (${1:id})${2:method} + { + [super $2];${3} + return self; + } +# Method: Initialize +snippet I + + (void) initialize + { + [[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWIthObjectsAndKeys: + ${1}@"value", @"key", + nil]]; + } +# Accessor Methods For: +# Object +snippet objacc + - (${1:id})${2:thing} + { + return $2; + } + + - (void)set$2:($1)${3:new$2} + { + [$3 retain]; + [$2 release]; + $2 = $3; + }${4} +# for (object in array) +snippet forin + for (${1:Class} *${2:some$1} in ${3:array}) { + ${4} + } +snippet forarray + unsigned int ${1:object}Count = [${2:array} count]; + + for (unsigned int index = 0; index < $1Count; index++) { + ${3:id} $1 = [$2 $1AtIndex:index]; + ${4} + } +# IBOutlet +# @property (Objective-C 2.0) +snippet prop + @property (${1:retain}) ${2:NSSomeClass} ${3:*$2};${4} +# @synthesize (Objective-C 2.0) +snippet syn + @synthesize ${1:property};${2} +# [[ alloc] init] +snippet alloc + [[${1:foo} alloc] init${2}];${3} +# retain +snippet ret + [${1:foo} retain];${2} +# release +snippet rel + [${1:foo} release]; + ${2:$1 = nil;} +# autorelease +snippet arel + [${1:foo} autorelease]; +# autorelease pool +snippet pool + NSAutoreleasePool *${1:pool} = [[NSAutoreleasePool alloc] init]; + ${2:/* code */} + [$1 drain]; +# Throw an exception +snippet except + NSException *${1:badness}; + $1 = [NSException exceptionWithName:@"${2:$1Name}" + reason:@"${3}" + userInfo:nil]; + [$1 raise]; +snippet prag + #pragma mark ${1:foo} +snippet cl + @class ${1:Foo};${2} +snippet color + [[NSColor ${1:blackColor}] set]; diff --git a/snippets/perl.snippets b/snippets/perl.snippets new file mode 100644 index 0000000..cf8f9fc --- /dev/null +++ b/snippets/perl.snippets @@ -0,0 +1,91 @@ +# #!/usr/bin/perl +snippet #! + #!/usr/bin/perl + +# Hash Pointer +snippet . + => +# Function +snippet sub + sub ${1:function_name} { + ${2:#body ...} + } +# Conditional +snippet if + if (${1}) { + ${2:# body...} + } +# Conditional if..else +snippet ife + if (${1}) { + ${2:# body...} + } else { + ${3:# else...} + } +# Conditional if..elsif..else +snippet ifee + if (${1}) { + ${2:# body...} + } elsif (${3}) { + ${4:# elsif...} + } else { + ${5:# else...} + } +# Conditional One-line +snippet xif + ${1:expression} if ${2:condition};${3} +# Unless conditional +snippet unless + unless (${1}) { + ${2:# body...} + } +# Unless conditional One-line +snippet xunless + ${1:expression} unless ${2:condition};${3} +# Try/Except +snippet eval + eval { + ${1:# do something risky...} + }; + if ($@) { + ${2:# handle failure...} + } +# While Loop +snippet wh + while (${1}) { + ${2:# body...} + } +# While Loop One-line +snippet xwh + ${1:expression} while ${2:condition};${3} +# For Loop +snippet for + for (my $${2:var} = 0; $$2 < ${1:count}; $$2${3:++}) { + ${4:# body...} + } +# Foreach Loop +snippet fore + foreach my $${1:x} (@${2:array}) { + ${3:# body...} + } +# Foreach Loop One-line +snippet xfore + ${1:expression} foreach @${2:array};${3} +# Package +snippet cl + package ${1:ClassName}; + + use base qw(${2:ParentClass}); + + sub new { + my $class = shift; + $class = ref $class if ref $class; + my $self = bless {}, $class; + $self; + } + + 1;${3} +# Read File +snippet slurp + my $${1:var}; + { local $/ = undef; local *FILE; open FILE, "<${2:file}"; $$1 = ; close FILE }${3} diff --git a/snippets/php.snippets b/snippets/php.snippets new file mode 100644 index 0000000..3ce9e26 --- /dev/null +++ b/snippets/php.snippets @@ -0,0 +1,216 @@ +snippet php + +snippet ec + echo "${1:string}"${2}; +snippet inc + include '${1:file}';${2} +snippet inc1 + include_once '${1:file}';${2} +snippet req + require '${1:file}';${2} +snippet req1 + require_once '${1:file}';${2} +# $GLOBALS['...'] +snippet globals + $GLOBALS['${1:variable}']${2: = }${3:something}${4:;}${5} +snippet $_ COOKIE['...'] + $_COOKIE['${1:variable}']${2} +snippet $_ ENV['...'] + $_ENV['${1:variable}']${2} +snippet $_ FILES['...'] + $_FILES['${1:variable}']${2} +snippet $_ Get['...'] + $_GET['${1:variable}']${2} +snippet $_ POST['...'] + $_POST['${1:variable}']${2} +snippet $_ REQUEST['...'] + $_REQUEST['${1:variable}']${2} +snippet $_ SERVER['...'] + $_SERVER['${1:variable}']${2} +snippet $_ SESSION['...'] + $_SESSION['${1:variable}']${2} +# Start Docblock +snippet /* + /** + * ${1} + **/ +# Class - post doc +snippet doc_cp + /** + * ${1:undocumented class} + * + * @package ${2:default} + * @author ${3:`g:snips_author`} + **/${4} +# Class Variable - post doc +snippet doc_vp + /** + * ${1:undocumented class variable} + * + * @var ${2:string} + **/${3} +# Class Variable +snippet doc_v + /** + * ${3:undocumented class variable} + * + * @var ${4:string} + **/ + ${1:var} $${2};${5} +# Class +snippet doc_c + /** + * ${3:undocumented class} + * + * @packaged ${4:default} + * @author ${5:`g:snips_author`} + **/ + ${1:}class ${2:} + {${6} + } // END $1class $2 +# Constant Definition - post doc +snippet doc_dp + /** + * ${1:undocumented constant} + **/${2} +# Constant Definition +snippet doc_d + /** + * ${3:undocumented constant} + **/ + define(${1}, ${2});${4} +# Function - post doc +snippet doc_fp + /** + * ${1:undocumented function} + * + * @return ${2:void} + * @author ${3:`g:snips_author`} + **/${4} +# Function signature +snippet doc_s + /** + * ${4:undocumented function} + * + * @return ${5:void} + * @author ${6:`g:snips_author`} + **/ + ${1}function ${2}(${3});${7} +# Function +snippet doc_f + /** + * ${4:undocumented function} + * + * @return ${5:void} + * @author ${6:`g:snips_author`} + **/ + ${1}function ${2}(${3}) + {${7} + } +# Header +snippet doc_h + /** + * ${1} + * + * @author ${2:`g:snips_author`} + * @version ${3:$Id$} + * @copyright ${4:$2}, `strftime('%d %B, %Y')` + * @package ${5:default} + **/ + + /** + * Define DocBlock + *// +# Interface +snippet doc_i + /** + * ${2:undocumented class} + * + * @package ${3:default} + * @author ${4:`g:snips_author`} + **/ + interface ${1:} + {${5} + } // END interface $1 +# class ... +snippet class + /** + * ${1} + **/ + class ${2:ClassName} + { + ${3} + function ${4:__construct}(${5:argument}) + { + ${6:// code...} + } + } +# define(...) +snippet def + define('${1}'${2});${3} +# defined(...) +snippet def? + ${1}defined('${2}')${3} +snippet wh + while (${1:/* condition */}) { + ${2:// code...} + } +# do ... while +snippet do + do { + ${2:// code... } + } while (${1:/* condition */}); +snippet if + if (${1:/* condition */}) { + ${2:// code...} + } +snippet ife + if (${1:/* condition */}) { + ${2:// code...} + } else { + ${3:// code...} + } + ${4} +snippet else + else { + ${1:// code...} + } +snippet elseif + elseif (${1:/* condition */}) { + ${2:// code...} + } +# Tertiary conditional +snippet t + $${1:retVal} = (${2:condition}) ? ${3:a} : ${4:b};${5} +snippet switch + switch ($${1:variable}) { + case '${2:value}': + ${3:// code...} + break; + ${5} + default: + ${4:// code...} + break; + } +snippet case + case '${1:value}': + ${2:// code...} + break;${3} +snippet for + for ($${2:i} = 0; $$2 < ${1:count}; $$2${3:++}) { + ${4: // code...} + } +snippet foreach + foreach ($${1:variable} as $${2:key}) { + ${3:// code...} + } +snippet fun + ${1:public }function ${2:FunctionName}(${3}) + { + ${4:// code...} + } +# $... = array (...) +snippet array + $${1:arrayName} = array('${2}' => ${3});${4} diff --git a/snippets/python.snippets b/snippets/python.snippets new file mode 100644 index 0000000..d511184 --- /dev/null +++ b/snippets/python.snippets @@ -0,0 +1,86 @@ +snippet #! + #!/usr/bin/python + +snippet imp + import ${1:module} +# Module Docstring +snippet docs + ''' + File: ${1:`Filename('$1.py', 'foo.py')`} + Author: ${2:`g:snips_author`} + Description: ${3} + ''' +snippet wh + while ${1:condition}: + ${2:# code...} +snippet for + for ${1:needle} in ${2:haystack}: + ${3:# code...} +# New Class +snippet cl + class ${1:ClassName}(${2:object}): + """${3:docstring for $1}""" + def __init__(self, ${4:arg}): + ${5:super($1, self).__init__()} + self.$4 = $4 + ${6} +# New Function +snippet def + def ${1:fname}(${2:`indent('.') ? 'self' : ''`}): + """${3:docstring for $1}""" + ${4:pass} +snippet deff + def ${1:fname}(${2:`indent('.') ? 'self' : ''`}): + ${3} +# New Method +snippet defs + def ${1:mname}(self, ${2:arg}): + ${3:pass} +# New Property +snippet property + def ${1:foo}(): + doc = "${2:The $1 property.}" + def fget(self): + ${3:return self._$1} + def fset(self, value): + ${4:self._$1 = value} +# Lambda +snippet ld + ${1:var} = lambda ${2:vars} : ${3:action} +snippet . + self. +snippet try Try/Except + try: + ${1:pass} + except ${2:Exception}, ${3:e}: + ${4:raise $3} +snippet try Try/Except/Else + try: + ${1:pass} + except ${2:Exception}, ${3:e}: + ${4:raise $3} + else: + ${5:pass} +snippet try Try/Except/Finally + try: + ${1:pass} + except ${2:Exception}, ${3:e}: + ${4:raise $3} + finally: + ${5:pass} +snippet try Try/Except/Else/Finally + try: + ${1:pass} + except ${2:Exception}, ${3:e}: + ${4:raise $3} + else: + ${5:pass} + finally: + ${6:pass} +# if __name__ == '__main__': +snippet ifmain + if __name__ == '__main__': + ${1:main()} +# __magic__ +snippet _ + __${1:init}__${2} diff --git a/snippets/ruby.snippets b/snippets/ruby.snippets new file mode 100644 index 0000000..bf1d7f1 --- /dev/null +++ b/snippets/ruby.snippets @@ -0,0 +1,420 @@ +# #!/usr/bin/ruby +snippet #! + #!/usr/bin/ruby + +# New Block +snippet =b + =begin rdoc + ${1} + =end +snippet y + :yields: ${1:arguments} +snippet rb + #!/usr/bin/env ruby -wKU + +snippet req + require "${1}"${2} +snippet # + # => +snippet end + __END__ +snippet case + case ${1:object} + when ${2:condition} + ${3} + end +snippet when + when ${1:condition} + ${2} +snippet def + def ${1:method_name} + ${2} + end +snippet deft + def test_${1:case_name} + ${2} + end +snippet if + if ${1:condition} + ${2} + end +snippet ife + if ${1:condition} + ${2} + else + ${3} + end +snippet elsif + elsif ${1:condition} + ${2} +snippet unless + unless ${1:condition} + ${2} + end +snippet while + while ${1:condition} + ${2} + end +snippet until + until ${1:condition} + ${2} + end +snippet cla class .. end + class ${1:`substitute(Filename(), '^.', '\u&', '')`} + ${2} + end +snippet cla class .. initialize .. end + class ${1:`substitute(Filename(), '^.', '\u&', '')`} + def initialize(${2:args}) + ${3} + end + + + end +snippet cla class .. < ParentClass .. initialize .. end + class ${1:`substitute(Filename(), '^.', '\u&', '')`} < ${2:ParentClass} + def initialize(${3:args}) + ${4} + end + + + end +snippet cla ClassName = Struct .. do .. end + ${1:`substitute(Filename(), '^.', '\u&', '')`} = Struct.new(:${2:attr_names}) do + def ${3:method_name} + ${4} + end + + + end +snippet cla class BlankSlate .. initialize .. end + class ${1:BlankSlate} + instance_methods.each { |meth| undef_method(meth) unless meth =~ /\A__/ } +snippet cla class << self .. end + class << ${1:self} + ${2} + end +# class .. < DelegateClass .. initialize .. end +snippet cla- + class ${1:`substitute(Filename(), '^.', '\u&', '')`} < DelegateClass(${2:ParentClass}) + def initialize(${3:args}) + super(${4:del_obj}) + + ${5} + end + + + end +snippet mod module .. end + module ${1:`substitute(Filename(), '^.', '\u&', '')`} + ${2} + end +snippet mod module .. module_function .. end + module ${1:`substitute(Filename(), '^.', '\u&', '')`} + module_function + + ${2} + end +snippet mod module .. ClassMethods .. end + module ${1:`substitute(Filename(), '^.', '\u&', '')`} + module ClassMethods + ${2} + end + + module InstanceMethods + + end + + def self.included(receiver) + receiver.extend ClassMethods + receiver.send :include, InstanceMethods + end + end +# attr_reader +snippet r + attr_reader :${1:attr_names} +# attr_writer +snippet w + attr_writer :${1:attr_names} +# attr_accessor +snippet rw + attr_accessor :${1:attr_names} +# include Enumerable +snippet Enum + include Enumerable + + def each(&block) + ${1} + end +# include Comparable +snippet Comp + include Comparable + + def <=>(other) + ${1} + end +# extend Forwardable +snippet Forw- + extend Forwardable +# def self +snippet defs + def self.${1:class_method_name} + ${2} + end +# def method_missing +snippet defmm + def method_missing(meth, *args, &blk) + ${1} + end +snippet defd + def_delegator :${1:@del_obj}, :${2:del_meth}, :${3:new_name} +snippet defds + def_delegators :${1:@del_obj}, :${2:del_methods} +snippet am + alias_method :${1:new_name}, :${2:old_name} +snippet app + if __FILE__ == $PROGRAM_NAME + ${1} + end +# usage_if() +snippet usai + if ARGV.${1} + abort "Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}"${3} + end +# usage_unless() +snippet usau + unless ARGV.${1} + abort "Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}"${3} + end +snippet array + Array.new(${1:10}) { |${2:i}| ${3} } +snippet hash + Hash.new { |${1:hash}, ${2:key}| $1[$2] = ${3} } +snippet file File.foreach() { |line| .. } + File.foreach(${1:"path/to/file"}) { |${2:line}| ${3} } +snippet file File.read() + File.read(${1:"path/to/file"})${2} +snippet Dir Dir.global() { |file| .. } + Dir.glob(${1:"dir/glob/*"}) { |${2:file}| ${3} } +snippet Dir Dir[".."] + Dir[${1:"glob/**/*.rb"}]${2} +snippet dir + Filename.dirname(__FILE__) +snippet deli + delete_if { |${1:e}| ${2} } +snippet fil + fill(${1:range}) { |${2:i}| ${3} } +# flatten_once() +snippet flao + inject(Array.new) { |${1:arr}, ${2:a}| $1.push(*$2)}${3} +snippet zip + zip(${1:enums}) { |${2:row}| ${3} } +# downto(0) { |n| .. } +snippet dow + downto(${1:0}) { |${2:n}| ${3} } +snippet ste + step(${1:2}) { |${2:n}| ${3} } +snippet tim + times { |${1:n}| ${2} } +snippet upt + upto(${1:1.0/0.0}) { |${2:n}| ${3} } +snippet loo + loop { ${1} } +snippet ea + each { |${1:e}| ${2} } +snippet eab + each_byte { |${1:byte}| ${2} } +snippet eac- each_char { |chr| .. } + each_char { |${1:chr}| ${2} } +snippet eac- each_cons(..) { |group| .. } + each_cons(${1:2}) { |${2:group}| ${3} } +snippet eai + each_index { |${1:i}| ${2} } +snippet eak + each_key { |${1:key}| ${2} } +snippet eal + each_line { |${1:line}| ${2} } +snippet eap + each_pair { |${1:name}, ${2:val}| ${3} } +snippet eas- + each_slice(${1:2}) { |${2:group}| ${3} } +snippet eav + each_value { |${1:val}| ${2} } +snippet eawi + each_with_index { |${1:e}, ${2:i}| ${3} } +snippet reve + reverse_each { |${1:e}| ${2} } +snippet inj + inject(${1:init}) { |${2:mem}, ${3:var}| ${4} } +snippet map + map { |${1:e}| ${2} } +snippet mapwi- + enum_with_index.map { |${1:e}, ${2:i}| ${3} } +snippet sor + sort { |a, b| ${1} } +snippet sorb + sort_by { |${1:e}| ${2} } +snippet ran + sort_by { rand } +snippet all + all? { |${1:e}| ${2} } +snippet any + any? { |${1:e}| ${2} } +snippet cl + classify { |${1:e}| ${2} } +snippet col + collect { |${1:e}| ${2} } +snippet det + detect { |${1:e}| ${2} } +snippet fet + fetch(${1:name}) { |${2:key}| ${3} } +snippet fin + find { |${1:e}| ${2} } +snippet fina + find_all { |${1:e}| ${2} } +snippet gre + grep(${1:/pattern/}) { |${2:match}| ${3} } +snippet sub + ${1:g}sub(${2:/pattern/}) { |${3:match}| ${4} } +snippet sca + scan(${1:/pattern/}) { |${2:match}| ${3} } +snippet max + max { |a, b|, ${1} } +snippet min + min { |a, b|, ${1} } +snippet par + partition { |${1:e}|, ${2} } +snippet rej + reject { |${1:e}|, ${2} } +snippet sel + select { |${1:e}|, ${2} } +snippet lam + lambda { |${1:args}| ${2} } +snippet do + do |${1:variable}| + ${2} + end +snippet : + :${1:key} => ${2:"value"}${3} +snippet ope + open(${1:"path/or/url/or/pipe"}, "${2:w}") { |${3:io}| ${4} } +# path_from_here() +snippet patfh + File.join(File.dirname(__FILE__), *%2[${1:rel path here}])${2} +# unix_filter {} +snippet unif + ARGF.each_line${1} do |${2:line}| + ${3} + end +# option_parse {} +snippet optp + require "optparse" + + options = {${1:default => "args"}} + + ARGV.options do |opts| + opts.banner = "Usage: #{File.basename($PROGRAM_NAME)} +snippet opt + opts.on( "-${1:o}", "--${2:long-option-name}", ${3:String}, + "${4:Option description.}") do |${5:opt}| + ${6} + end +snippet tc + require "test/unit" + + require "${1:library_file_name}" + + class Test${2:$1} < Test::Unit::TestCase + def test_${3:case_name} + ${4} + end + end +snippet ts + require "test/unit" + + require "tc_${1:test_case_file}" + require "tc_${2:test_case_file}"${3} +snippet as + assert(${1:test}, "${2:Failure message.}")${3} +snippet ase + assert_equal(${1:expected}, ${2:actual})${3} +snippet asne + assert_not_equal(${1:unexpected}, ${2:actual})${3} +snippet asid + assert_in_delta(${1:expected_float}, ${2:actual_float}, ${3:2 ** -20})${4} +snippet asio + assert_instance_of(${1:ExpectedClass}, ${2:actual_instance})${3} +snippet asko + assert_kind_of(${1:ExpectedKind}, ${2:actual_instance})${3} +snippet asn + assert_nil(${1:instance})${2} +snippet asnn + assert_not_nil(${1:instance})${2} +snippet asm + assert_match(/${1:expected_pattern}/, ${2:actual_string})${3} +snippet asnm + assert_no_match(/${1:unexpected_pattern}/, ${2:actual_string})${3} +snippet aso + assert_operator(${1:left}, :${2:operator}, ${3:right})${4} +snippet asr + assert_raise(${1:Exception}) { ${2} } +snippet asnr + assert_nothing_raised(${1:Exception}) { ${2} } +snippet asrt + assert_respond_to(${1:object}, :${2:method})${3} +snippet ass assert_same(..) + assert_same(${1:expected}, ${2:actual})${3} +snippet ass assert_send(..) + assert_send([${1:object}, :${2:message}, ${3:args}])${4} +snippet asns + assert_not_same(${1:unexpected}, ${2:actual})${3} +snippet ast + assert_throws(:${1:expected}) { ${2} } +snippet asnt + assert_nothing_thrown { ${1} } +snippet fl + flunk("${1:Failure message.}")${2} +# Benchmark.bmbm do .. end +snippet bm- + TESTS = ${1:10_000} + Benchmark.bmbm do |results| + ${2} + end +snippet rep + results.report("${1:name}:") { TESTS.times { ${2} }} +# Marshal.dump(.., file) +snippet Md + File.open(${1:"path/to/file.dump"}, "wb") { |${2:file}| Marshal.dump(${3:obj}, $2) }${4} +# Mashal.load(obj) +snippet Ml + File.open(${1:"path/to/file.dump"}, "rb") { |${2:file}| Marshal.load($2) }${3} +# deep_copy(..) +snippet deec + Marshal.load(Marshal.dump(${1:obj_to_copy}))${2} +snippet Pn- + PStore.new(${1:"file_name.pstore"})${2} +snippet tra + transaction(${1:true}) { ${2} } +# xmlread(..) +snippet xml- + REXML::Document.new(File.read(${1:"path/to/file"}))${2} +# xpath(..) { .. } +snippet xpa + elements.each(${1:"//Xpath"}) do |${2:node}| + ${3} + end +# class_from_name() +snippet clafn + split("::").inject(Object) { |par, const| par.const_get(const) } +# singleton_class() +snippet sinc + class << self; self end +snippet nam + namespace :${1:`Filename()`} do + ${2} + end +snippet tas + desc "${1:Task description\}" + task :${2:task_name => [:dependent, :tasks]} do + ${3} + end diff --git a/snippets/sh.snippets b/snippets/sh.snippets new file mode 100644 index 0000000..f035126 --- /dev/null +++ b/snippets/sh.snippets @@ -0,0 +1,28 @@ +# #!/bin/bash +snippet #! + #!/bin/bash + +snippet if + if [[ ${1:condition} ]]; then + ${2:#statements} + fi +snippet elif + elif [[ ${1:condition} ]]; then + ${2:#statements} +snippet for + for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do + ${3:#statements} + done +snippet wh + while [[ ${1:condition} ]]; do + ${2:#statements} + done +snippet until + until [[ ${1:condition} ]]; do + ${2:#statements} + done +snippet case + case ${1:word} in + ${2:pattern}) + ${3};; + esac diff --git a/snippets/snippet.snippets b/snippets/snippet.snippets new file mode 100644 index 0000000..854c058 --- /dev/null +++ b/snippets/snippet.snippets @@ -0,0 +1,7 @@ +# snippets for making snippets :) +snippet snip + snippet ${1:trigger} + ${2} +snippet msnip + snippet ${1:trigger} ${2:description} + ${3} diff --git a/snippets/tcl.snippets b/snippets/tcl.snippets new file mode 100644 index 0000000..bee2ef8 --- /dev/null +++ b/snippets/tcl.snippets @@ -0,0 +1,92 @@ +# #!/usr/bin/tclsh +snippet #! + #!/usr/bin/tclsh + +# Process +snippet pro + proc ${1:function_name} {${2:args}} { + ${3:#body ...} + } +#xif +snippet xif + ${1:expr}? ${2:true} : ${3:false} +# Conditional +snippet if + if {${1}} { + ${2:# body...} + } +# Conditional if..else +snippet ife + if {${1}} { + ${2:# body...} + } else { + ${3:# else...} + } +# Conditional if..elsif..else +snippet ifee + if {${1}} { + ${2:# body...} + } elseif {${3}} { + ${4:# elsif...} + } else { + ${5:# else...} + } +# If catch then +snippet ifc + if { [catch {${1:#do something...}} ${2:err}] } { + ${3:# handle failure...} + } +# Catch +snippet catch + catch {${1}} ${2:err} ${3:options} +# While Loop +snippet wh + while {${1}} { + ${2:# body...} + } +# For Loop +snippet for + for {set ${2:var} 0} {$$2 < ${1:count}} {${3:incr} $2} { + ${4:# body...} + } +# Foreach Loop +snippet fore + foreach ${1:x} {${2:#list}} { + ${3:# body...} + } +# after ms script... +snippet af + after ${1:ms} ${2:#do something} +# after cancel id +snippet afc + after cancel ${1:id or script} +# after idle +snippet afi + after idle ${1:script} +# after info id +snippet afin + after info ${1:id} +# Expr +snippet exp + expr {${1:#expression here}} +# Switch +snippet sw + switch ${1:var} { + ${3:pattern 1} { + ${4:#do something} + } + default { + ${2:#do something} + } + } +# Case +snippet ca + ${1:pattern} { + ${2:#do something} + }${3} +# Namespace eval +snippet ns + namespace eval ${1:path} {${2:#script...}} +# Namespace current +snippet nsc + namespace current diff --git a/snippets/tex.snippets b/snippets/tex.snippets new file mode 100644 index 0000000..22f7316 --- /dev/null +++ b/snippets/tex.snippets @@ -0,0 +1,115 @@ +# \begin{}...\end{} +snippet begin + \begin{${1:env}} + ${2} + \end{$1} +# Tabular +snippet tab + \begin{${1:tabular}}{${2:c}} + ${3} + \end{$1} +# Align(ed) +snippet ali + \begin{align${1:ed}} + ${2} + \end{align$1} +# Gather(ed) +snippet gat + \begin{gather${1:ed}} + ${2} + \end{gather$1} +# Equation +snippet eq + \begin{equation} + ${1} + \end{equation} +# Unnumbered Equation +snippet \ + \\[ + ${1} + \\] +# Enumerate +snippet enum + \begin{enumerate} + \item ${1} + \end{enumerate} +# Itemize +snippet item + \begin{itemize} + \item ${1} + \end{itemize} +# Description +snippet desc + \begin{description} + \item[${1}] ${2} + \end{description} +# Matrix +snippet mat + \begin{${1:p/b/v/V/B/small}matrix} + ${2} + \end{$1matrix} +# Cases +snippet cas + \begin{cases} + ${1:equation}, &\text{ if }${2:case}\\ + ${3} + \end{cases} +# Split +snippet spl + \begin{split} + ${1} + \end{split} +# Part +snippet part + \part{${1:part name}} % (fold) + \label{prt:${2:$1}} + ${3} + % part $2 (end) +# Chapter +snippet cha + \chapter{${1:chapter name}} % (fold) + \label{cha:${2:$1}} + ${3} + % chapter $2 (end) +# Section +snippet sec + \section{${1:section name}} % (fold) + \label{sec:${2:$1}} + ${3} + % section $2 (end) +# Sub Section +snippet sub + \subsection{${1:subsection name}} % (fold) + \label{sub:${2:$1}} + ${3} + % subsection $2 (end) +# Sub Sub Section +snippet subs + \subsubsection{${1:subsubsection name}} % (fold) + \label{ssub:${2:$1}} + ${3} + % subsubsection $2 (end) +# Paragraph +snippet par + \paragraph{${1:paragraph name}} % (fold) + \label{par:${2:$1}} + ${3} + % paragraph $2 (end) +# Sub Paragraph +snippet subp + \subparagraph{${1:subparagraph name}} % (fold) + \label{subp:${2:$1}} + ${3} + % subparagraph $2 (end) +snippet itd + \item[${1:description}] ${2:item} +snippet figure + ${1:Figure}~\ref{${2:fig:}}${3} +snippet table + ${1:Table}~\ref{${2:tab:}}${3} +snippet listing + ${1:Listing}~\ref{${2:list}}${3} +snippet section + ${1:Section}~\ref{${2:sec:}}${3} +snippet page + ${1:page}~\pageref{${2}}${3} diff --git a/snippets/vim.snippets b/snippets/vim.snippets new file mode 100644 index 0000000..64e7807 --- /dev/null +++ b/snippets/vim.snippets @@ -0,0 +1,32 @@ +snippet header + " File: ${1:`expand('%:t')`} + " Author: ${2:`g:snips_author`} + " Description: ${3} + ${4:" Last Modified: `strftime("%B %d, %Y")`} +snippet guard + if exists('${1:did_`Filename()`}') || &cp${2: || version < 700} + finish + endif + let $1 = 1${3} +snippet f + fun ${1:function_name}(${2}) + ${3:" code} + endf +snippet for + for ${1:needle} in ${2:haystack} + ${3:" code} + endfor +snippet wh + while ${1:condition} + ${2:" code} + endw +snippet if + if ${1:condition} + ${2:" code} + endif +snippet ife + if ${1:condition} + ${2} + else + ${3} + endif diff --git a/snippets/zsh.snippets b/snippets/zsh.snippets new file mode 100644 index 0000000..7aee05b --- /dev/null +++ b/snippets/zsh.snippets @@ -0,0 +1,58 @@ +# #!/bin/zsh +snippet #! + #!/bin/zsh + +snippet if + if ${1:condition}; then + ${2:# statements} + fi +snippet ife + if ${1:condition}; then + ${2:# statements} + else + ${3:# statements} + fi +snippet elif + elif ${1:condition} ; then + ${2:# statements} +snippet for + for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do + ${3:# statements} + done +snippet fore + for ${1:item} in ${2:list}; do + ${3:# statements} + done +snippet wh + while ${1:condition}; do + ${2:# statements} + done +snippet until + until ${1:condition}; do + ${2:# statements} + done +snippet repeat + repeat ${1:integer}; do + ${2:# statements} + done +snippet case + case ${1:word} in + ${2:pattern}) + ${3};; + esac +snippet select + select ${1:answer} in ${2:choices}; do + ${3:# statements} + done +snippet ( + ( ${1:#statements} ) +snippet { + { ${1:#statements} } +snippet [ + [[ ${1:test} ]] +snippet always + { ${1:try} } always { ${2:always} } +snippet fun + function ${1:name} (${2:args}) { + ${3:# body} + } diff --git a/syntax/markdown.vim b/syntax/markdown.vim new file mode 100644 index 0000000..c6ef322 --- /dev/null +++ b/syntax/markdown.vim @@ -0,0 +1,104 @@ +" Vim syntax file +" Language: Markdown +" Author: Ben Williams +" Maintainer: Hallison Batista +" URL: http://plasticboy.com/markdown-vim-mode/ +" Version: 1.0.1 +" Last Change: Fri Dec 4 08:36:48 AMT 2009 +" Remark: Uses HTML syntax file +" Remark: I don't do anything with angle brackets (<>) because that would too easily +" easily conflict with HTML syntax +" TODO: Handle stuff contained within stuff (e.g. headings within blockquotes) + +" Read the HTML syntax to start with +if version < 600 + so :p:h/html.vim +else + runtime! syntax/html.vim + unlet b:current_syntax +endif + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Don't use standard HiLink, it will not work with included syntax files +if version < 508 + command! -nargs=+ HtmlHiLink hi link +else + command! -nargs=+ HtmlHiLink hi def link +endif + +syntax spell toplevel +syntax case ignore +syntax sync linebreaks=1 + +" Additions to HTML groups +syntax region htmlBold start=/\\\@) +syntax region mkdLinkDef matchgroup=mkdDelimiter start="^ \{,3}\zs\[" end="]:" oneline nextgroup=mkdLinkDefTarget skipwhite +syntax region mkdLinkDefTarget start="<\?\zs\S" excludenl end="\ze[>[:space:]\n]" contained nextgroup=mkdLinkTitle,mkdLinkDef skipwhite skipnl oneline +syntax region mkdLinkTitle matchgroup=mkdDelimiter start=+"+ end=+"+ contained +syntax region mkdLinkTitle matchgroup=mkdDelimiter start=+'+ end=+'+ contained +syntax region mkdLinkTitle matchgroup=mkdDelimiter start=+(+ end=+)+ contained + +" Define Markdown groups +syntax match mkdLineContinue ".$" contained +syntax match mkdRule /^\s*\*\s\{0,1}\*\s\{0,1}\*$/ +syntax match mkdRule /^\s*-\s\{0,1}-\s\{0,1}-$/ +syntax match mkdRule /^\s*_\s\{0,1}_\s\{0,1}_$/ +syntax match mkdRule /^\s*-\{3,}$/ +syntax match mkdRule /^\s*\*\{3,5}$/ +syntax match mkdListItem "^\s*[-*+]\s\+" +syntax match mkdListItem "^\s*\d\+\.\s\+" +syntax match mkdCode /^\s*\n\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/ +syntax match mkdLineBreak / \+$/ +syntax region mkdCode start=/\\\@/ end=/$/ contains=mkdLineBreak,mkdLineContinue,@Spell +syntax region mkdCode start="]*>" end="" +syntax region mkdCode start="]*>" end="" + +" HTML headings +syntax region htmlH1 start="^\s*#" end="\($\|#\+\)" contains=@Spell +syntax region htmlH2 start="^\s*##" end="\($\|#\+\)" contains=@Spell +syntax region htmlH3 start="^\s*###" end="\($\|#\+\)" contains=@Spell +syntax region htmlH4 start="^\s*####" end="\($\|#\+\)" contains=@Spell +syntax region htmlH5 start="^\s*#####" end="\($\|#\+\)" contains=@Spell +syntax region htmlH6 start="^\s*######" end="\($\|#\+\)" contains=@Spell +syntax match htmlH1 /^.\+\n=\+$/ contains=@Spell +syntax match htmlH2 /^.\+\n-\+$/ contains=@Spell + +"highlighting for Markdown groups +HtmlHiLink mkdString String +HtmlHiLink mkdCode String +HtmlHiLink mkdBlockquote Comment +HtmlHiLink mkdLineContinue Comment +HtmlHiLink mkdListItem Identifier +HtmlHiLink mkdRule Identifier +HtmlHiLink mkdLineBreak Todo +HtmlHiLink mkdLink htmlLink +HtmlHiLink mkdURL htmlString +HtmlHiLink mkdID Identifier +HtmlHiLink mkdLinkDef mkdID +HtmlHiLink mkdLinkDefTarget mkdURL +HtmlHiLink mkdLinkTitle htmlString + +HtmlHiLink mkdDelimiter Delimiter + +let b:current_syntax = "markdown" + +delcommand HtmlHiLink +" vim: tabstop=2 diff --git a/syntax/nerdtree.vim b/syntax/nerdtree.vim new file mode 100644 index 0000000..636d2af --- /dev/null +++ b/syntax/nerdtree.vim @@ -0,0 +1,88 @@ +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/syntax/snippet.vim b/syntax/snippet.vim new file mode 100644 index 0000000..5e919e7 --- /dev/null +++ b/syntax/snippet.vim @@ -0,0 +1,19 @@ +" Syntax highlighting for snippet files (used for snipMate.vim) +" Hopefully this should make snippets a bit nicer to write! +syn match snipComment '^#.*' +syn match placeHolder '\${\d\+\(:.\{-}\)\=}' contains=snipCommand +syn match tabStop '\$\d\+' +syn match snipCommand '`.\{-}`' +syn match snippet '^snippet.*' transparent contains=multiSnipText,snipKeyword +syn match multiSnipText '\S\+ \zs.*' contained +syn match snipKeyword '^snippet'me=s+8 contained +syn match snipError "^[^#s\t].*$" + +hi link snipComment Comment +hi link multiSnipText String +hi link snipKeyword Keyword +hi link snipComment Comment +hi link placeHolder Special +hi link tabStop Special +hi link snipCommand String +hi link snipError Error diff --git a/templates/html.tpl b/templates/html.tpl new file mode 100644 index 0000000..772fa92 --- /dev/null +++ b/templates/html.tpl @@ -0,0 +1,12 @@ + + + + + + untitled + + + + + + diff --git a/vimrc b/vimrc new file mode 100644 index 0000000..a79d6c9 --- /dev/null +++ b/vimrc @@ -0,0 +1,217 @@ +" .vimrc File +" Maintained by: Dmitry Ogurtsov +" daogurtsov@gmail.com +" daogurtsov.github.com +" + +"Forget compatibility with Vi. Who cares. +set nocompatible +"Enable filetypes +filetype on +filetype plugin on +filetype indent on +syntax on + +"lines +set lines=40 +"columns +set columns=90 +"Write the old file out when switching between files. +set autowrite + +"Display current cursor position in lower right corner. +set ruler + +"Want a different map leader than \ +"set mapleader = ","; + +"Ever notice a slight lag after typing the leader key + command? This lowers +"the timeout. +set timeoutlen=700 + +"Switch between buffers without saving +set hidden + +"Set the color scheme. Change this to your preference. +"Here's 100 to choose from: http://www.vim.org/scripts/script.php?script_id=625 +colorscheme twilight + +"Set font type and size. Depends on the resolution. Larger screens, prefer h15 +set guifont=Monaco:h18 + +"Tab stuff +set tabstop=3 +set shiftwidth=3 +set softtabstop=3 +set expandtab + +"Show command in bottom right portion of the screen +set showcmd + +"Show lines numbers +set number + +"Prefer relative line numbering? +"set relativenumber" + +"Indent stuff +set smartindent +set autoindent + +"Always show the status line +set laststatus=2 + +"Prefer a slightly higher line height +set linespace=3 + +"Better line wrapping +set wrap +set textwidth=79 +set formatoptions=qrn1 + +"Set incremental searching" +set incsearch + +"Highlight searching +set hlsearch + +" case insensitive search +set ignorecase +set smartcase + +"Hide MacVim toolbar by default +set go-=T + +"Hard-wrap paragraphs of text +nnoremap q gqip + +"Enable code folding +set foldenable + +"Hide mouse when typing +set mousehide + +"Shortcut to fold tags with leader (usually \) + ft +nnoremap ft Vatzf + +" Create dictionary for custom expansions +set dictionary+=/Users/Home/.vim/dict.txt + +"Opens a vertical split and switches over (\v) +nnoremap v vl + +"Split windows below the current window. +set splitbelow + +"Session settings +set sessionoptions=resize,winpos,winsize,buffers,tabpages,folds,curdir,help + +"Set up an HTML5 template for all new .html files +"autocmd BufNewFile * silent! 0r $VIMHOME/templates/%:e.tpl + +"Load the current buffer in Firefox - Mac specific. +abbrev ff :! open -a firefox %:p + +"Map a change directory to the desktop - Mac specific +nmap ,d :cd ~/Desktop:e. + +"Shortcut for editing vimrc file in a new tab +nmap ,ev :tabedit $MYVIMRC + +"Change zen coding plugin expansion key to shift + e +let g:user_zen_expandabbr_key = '' + +"Faster shortcut for commenting. Requires T-Comment plugin +map ,c + +"Saves time; maps the spacebar to colon +nmap : + +"Automatically change current directory to that of the file in the buffer +" autocmd BufEnter * cd %:p:h + +"Map code completion to , + tab +imap , + +" More useful command-line completion +" set wildmenu + +"Auto-completion menu +" set wildmode=list:longest + +"http://vim.wikia.com/wiki/Make_Vim_completion_popup_menu_work_just_like_in_an_IDE +" set completeopt=longest,menuone +" inoremap pumvisible() ? "\" : "\u\" +" inoremap pumvisible() ? '' : +" \ '=pumvisible() ? "\Down>" : ""' +" inoremap pumvisible() ? '' : +" \ '=pumvisible() ? "\Down>" : ""' + +"Map escape key to jj -- much faster +imap jj + +"Delete all buffers (via Derek Wyatt) +nmap ,da :exec "1," . bufnr('$') . "bd" + +"Bubble single lines (kicks butt) +"http://vimcasts.org/episodes/bubbling-text/ +nmap ddkP +nmap ddp + +"Bubble multiple lines +vmap xkP`[V`] +vmap xp`[V`] + +" Source the vimrc file after saving it. This way, you don't have to reload +" Vim to see the changes. +if has("autocmd") + autocmd bufwritepost .vimrc source $MYVIMRC +endif +" +" easier window navigation +nmap h +nmap j +nmap k +nmap l + +"------------------------" +"NERDTREE PLUGIN SETTINGS +"------------------------" +"Shortcut for NERDTreeToggle +nmap ,nt :NERDTreeToggle + +"Show hidden files in NerdTree +let NERDTreeShowHidden=1 + +"autopen NERDTree and focus cursor in new document +autocmd VimEnter * NERDTree +autocmd VimEnter * wincmd p + +"Helpeful abbreviations +iab lorem Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. +iab llorem Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. + +"Spelling corrects. Just for example. Add yours below. +iab teh the +iab Teh The + +"--------------------------" +" PERSONAL SETTINGS +" -------------------------" +"Example for adding abbreviations - triggered by the spacebar. +iabbrev mysite ftp://jeff-way.com@jeffrey-way.com/domains/ + +"Shortcut for logging into my server +nmap ,server :Nread ftp://jeff-way.com@jeffrey-way.com/domains/ + +"Shortcut directly to my theme files on server +nmap ,theme :Nread ftp://jeff-way.com@jeffrey-way.com/domains/jeffrey-way.com/html/wp-content/themes/magazineJW/ + +"For autocompletion of Snipmate plugin +"let g:acp_behaviorSnipmateLength = 1 + +"Peep open +if has("gui_macvim") + macmenu &File.New\ Tab key= + map PeepOpen +end