diff --git a/.Xresources b/.Xresources index 67fbf1a..7621d1a 100644 --- a/.Xresources +++ b/.Xresources @@ -57,7 +57,7 @@ Xcursor.size: 32 ! -- XFT SETTINGS -- ! ! default -Xft.dpi: 96 +! Xft.dpi: 96 Xft.autohint: 0 Xft.lcdfilter: lcddefault diff --git a/.bin/_config b/.bin/_config index ee4ce07..a208ce5 100644 --- a/.bin/_config +++ b/.bin/_config @@ -10,10 +10,10 @@ #BFONT="InputMono-15" # couch distance #HFONT="FuraCodeNerdFont-19" # presentation -DFONT="InputMono-13" # Font for dmenu -SFONT="InputMono-12" # couch distance -BFONT="InputMono-15" # couch distance -HFONT="InputMono-19" # couch distance +DFONT="InputMono-8" # Font for dmenu +SFONT="InputMono-8" # couch distance +BFONT="InputMono-12" # couch distance +HFONT="InputMono-14" # couch distance # # TERMINALS diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc index 9500ce8..3f18416 100644 --- a/.config/dunst/dunstrc +++ b/.config/dunst/dunstrc @@ -33,7 +33,7 @@ ### Text ### - font = FuraCodeNerdFont-13 + font = FuraCodeNerdFont-8 line_height = 2 markup = no diff --git a/.gnupg/pinentry-dmenu.conf b/.gnupg/pinentry-dmenu.conf index 2d988b8..42548c6 100644 --- a/.gnupg/pinentry-dmenu.conf +++ b/.gnupg/pinentry-dmenu.conf @@ -1,6 +1,6 @@ asterisk = "*"; prompt = ""; -font = "FuraCodeNerdFont-13"; +font = "FuraCodeNerdFont-8"; bottom = false; prompt_fg = "#FFFFFF"; diff --git a/.kshrc b/.kshrc index 7787343..00c45c4 100644 --- a/.kshrc +++ b/.kshrc @@ -152,7 +152,7 @@ rem-sync() {( rem-uugrn() {( set -xe vim sftp://vorstand@vorstand.uugrn.org/private/Kalender/uugrn.rem - ssh -q sdk@vorstand.uugrn.org sh ~/.bin/make_calendar.sh + ssh -q sdk@vorstand.uugrn.org sh ~sdk/.bin/make_calendar.sh rem-sync )} diff --git a/.notion/look_codevoid.lua b/.notion/look_codevoid.lua index c68068d..d46628c 100644 --- a/.notion/look_codevoid.lua +++ b/.notion/look_codevoid.lua @@ -13,7 +13,7 @@ de.defstyle("*", { highlight_pixels = 1, shadow_pixels = 1, border_style = "elevated", - font = "xft:FuraCodeNerdFont:size=9", + font = "xft:FuraCodeNerdFont:size=6", text_align = "center", }) @@ -93,7 +93,7 @@ de.defstyle("stdisp", { shadow_pixels = 0, highlight_pixels = 0, text_align = "left", - font = "xft:FuraCodeNerdFont:size=12", + font = "xft:FuraCodeNerdFont:size=8", de.substyle("important", { foreground_colour = "green", diff --git a/.vim/bundle/vim-colors/colors/base16-duotone-dark.vim b/.vim/bundle/vim-colors/colors/base16-duotone-dark.vim new file mode 100644 index 0000000..f7803d2 --- /dev/null +++ b/.vim/bundle/vim-colors/colors/base16-duotone-dark.vim @@ -0,0 +1,326 @@ +" Base16 Duotone-Dark (https://github.com/chriskempson/base16) +" Scheme: adapted from: Simurai (https://github.com/simurai/duotone-dark-syntax/) + +" This enables the coresponding base16-shell script to run so that +" :colorscheme works in terminals supported by base16-shell scripts +" User must set this variable in .vimrc +" let g:base16_shell_path=base16-builder/output/shell/ +if !has('gui_running') + if exists("g:base16_shell_path") + execute "silent !/bin/sh ".g:base16_shell_path."/base16-duotone-dark.".&background.".sh" + endif +endif + +" GUI color definitions +let s:gui00 = "2a2734" +let s:gui01 = "363442" +let s:gui02 = "5a566c" +let s:gui03 = "726e87" +let s:gui04 = "837bad" +let s:gui05 = "9b87fd" +let s:gui06 = "b3a5fe" +let s:gui07 = "eeebff" +let s:gui08 = "7765d2" +let s:gui09 = "dc9147" +let s:gui0A = "e59e57" +let s:gui0B = "7c756e" +let s:gui0C = "fec286" +let s:gui0D = "ecab69" +let s:gui0E = "a49bcf" +let s:gui0F = "8e81cf" + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists('base16colorspace') && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +" Theme setup +hi clear +syntax reset +let g:colors_name = "base16-duotone-dark" + +" Highlighting function +fun hi(group, guifg, guibg, ctermfg, ctermbg, attr) + if a:guifg != "" + exec "hi " . a:group . " guifg=#" . s:gui(a:guifg) + endif + if a:guibg != "" + exec "hi " . a:group . " guibg=#" . s:gui(a:guibg) + endif + if a:ctermfg != "" + exec "hi " . a:group . " ctermfg=" . s:cterm(a:ctermfg) + endif + if a:ctermbg != "" + exec "hi " . a:group . " ctermbg=" . s:cterm(a:ctermbg) + endif + if a:attr != "" + exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr + endif +endfun + +" Return GUI color for light/dark variants +fun s:gui(color) + if &background == "dark" + return a:color + endif + + if a:color == s:gui00 + return s:gui07 + elseif a:color == s:gui01 + return s:gui06 + elseif a:color == s:gui02 + return s:gui05 + elseif a:color == s:gui03 + return s:gui04 + elseif a:color == s:gui04 + return s:gui03 + elseif a:color == s:gui05 + return s:gui02 + elseif a:color == s:gui06 + return s:gui01 + elseif a:color == s:gui07 + return s:gui00 + endif + + return a:color +endfun + +" Return terminal color for light/dark variants +fun s:cterm(color) + if &background == "dark" + return a:color + endif + + if a:color == s:cterm00 + return s:cterm07 + elseif a:color == s:cterm01 + return s:cterm06 + elseif a:color == s:cterm02 + return s:cterm05 + elseif a:color == s:cterm03 + return s:cterm04 + elseif a:color == s:cterm04 + return s:cterm03 + elseif a:color == s:cterm05 + return s:cterm02 + elseif a:color == s:cterm06 + return s:cterm01 + elseif a:color == s:cterm07 + return s:cterm00 + endif + + return a:color +endfun + +" Vim editor colors +call hi("Bold", "", "", "", "", "bold") +call hi("Debug", s:gui08, "", s:cterm08, "", "") +call hi("Directory", s:gui0D, "", s:cterm0D, "", "") +call hi("ErrorMsg", s:gui08, s:gui00, s:cterm08, s:cterm00, "") +call hi("Exception", s:gui08, "", s:cterm08, "", "") +call hi("FoldColumn", "", s:gui01, "", s:cterm01, "") +call hi("Folded", s:gui03, s:gui01, s:cterm03, s:cterm01, "") +call hi("IncSearch", s:gui01, s:gui09, s:cterm01, s:cterm09, "none") +call hi("Italic", "", "", "", "", "none") +call hi("Macro", s:gui08, "", s:cterm08, "", "") +call hi("MatchParen", s:gui00, s:gui03, s:cterm00, s:cterm03, "") +call hi("ModeMsg", s:gui0B, "", s:cterm0B, "", "") +call hi("MoreMsg", s:gui0B, "", s:cterm0B, "", "") +call hi("Question", s:gui0D, "", s:cterm0D, "", "") +call hi("Search", s:gui03, s:gui0A, s:cterm03, s:cterm0A, "") +call hi("SpecialKey", s:gui03, "", s:cterm03, "", "") +call hi("TooLong", s:gui08, "", s:cterm08, "", "") +call hi("Underlined", s:gui08, "", s:cterm08, "", "") +call hi("Visual", "", s:gui02, "", s:cterm02, "") +call hi("VisualNOS", s:gui08, "", s:cterm08, "", "") +call hi("WarningMsg", s:gui08, "", s:cterm08, "", "") +call hi("WildMenu", s:gui08, "", s:cterm08, "", "") +call hi("Title", s:gui0D, "", s:cterm0D, "", "none") +call hi("Conceal", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "") +call hi("Cursor", s:gui00, s:gui09, s:cterm00, s:cterm09, "") +call hi("NonText", s:gui03, "", s:cterm03, "", "") +call hi("Normal", s:gui05, s:gui00, s:cterm05, s:cterm00, "") +call hi("LineNr", s:gui01, s:gui00, s:cterm01, s:cterm00, "") +call hi("SignColumn", s:gui03, s:gui01, s:cterm03, s:cterm01, "") +call hi("SpecialKey", s:gui03, "", s:cterm03, "", "") +call hi("StatusLine", s:gui04, s:gui02, s:cterm04, s:cterm02, "none") +call hi("StatusLineNC", s:gui03, s:gui01, s:cterm03, s:cterm01, "none") +call hi("VertSplit", s:gui01, s:gui01, s:cterm01, s:cterm01, "none") +call hi("ColorColumn", "", s:gui01, "", s:cterm01, "none") +call hi("CursorColumn", "", s:gui01, "", s:cterm01, "none") +call hi("CursorLine", "", s:gui01, "", s:cterm01, "none") +call hi("CursorLineNr", s:gui02, s:gui01, s:cterm02, s:cterm01, "") +call hi("PMenu", s:gui04, s:gui01, s:cterm04, s:cterm01, "none") +call hi("PMenuSel", s:gui01, s:gui04, s:cterm01, s:cterm04, "") +call hi("TabLine", s:gui03, s:gui01, s:cterm03, s:cterm01, "none") +call hi("TabLineFill", s:gui03, s:gui01, s:cterm03, s:cterm01, "none") +call hi("TabLineSel", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "none") + +" Standard syntax highlighting +call hi("Boolean", s:gui09, "", s:cterm09, "", "") +call hi("Character", s:gui08, "", s:cterm08, "", "") +call hi("Comment", s:gui03, "", s:cterm03, "", "") +call hi("Conditional", s:gui0E, "", s:cterm0E, "", "") +call hi("Constant", s:gui0C, "", s:cterm0C, "", "") +call hi("Define", s:gui0E, "", s:cterm0E, "", "none") +call hi("Delimiter", s:gui0F, "", s:cterm0F, "", "") +call hi("Float", s:gui09, "", s:cterm09, "", "") +call hi("Function", s:gui0C, "", s:cterm0C, "", "") +call hi("Identifier", s:gui07, "", s:cterm07, "", "none") +call hi("Include", s:gui0D, "", s:cterm0D, "", "") +call hi("Keyword", s:gui0E, "", s:cterm0E, "", "") +call hi("Label", s:gui0A, "", s:cterm0A, "", "") +call hi("Number", s:gui0C, "", s:cterm0C, "", "") +call hi("Operator", s:gui0A, "", s:cterm0A, "", "none") +call hi("PreProc", s:gui0A, "", s:cterm0A, "", "") +call hi("Repeat", s:gui0A, "", s:cterm0A, "", "") +call hi("Special", s:gui0C, "", s:cterm0C, "", "") +call hi("SpecialChar", s:gui0F, "", s:cterm0F, "", "") +call hi("Statement", s:gui07, "", s:cterm07, "none", "none") +call hi("StorageClass", s:gui05, "", s:cterm05, "", "") +call hi("String", s:gui0C, "", s:cterm0C, "", "") +call hi("Structure", s:gui0E, "", s:cterm0E, "", "") +call hi("Tag", s:gui0A, "", s:cterm0A, "", "") +call hi("Todo", s:gui0A, s:gui01, s:cterm0A, s:cterm01, "") +call hi("Type", s:gui06, "", s:cterm06, "", "none") +call hi("Typedef", s:gui0A, "", s:cterm0A, "", "") + +" C highlighting +call hi("cOperator", s:gui0C, "", s:cterm0C, "", "") +call hi("cPreCondit", s:gui0E, "", s:cterm0E, "", "") + +" C# highlighting +call hi("csClass", s:gui0A, "", s:cterm0A, "", "") +call hi("csAttribute", s:gui0A, "", s:cterm0A, "", "") +call hi("csModifier", s:gui0E, "", s:cterm0E, "", "") +call hi("csType", s:gui08, "", s:cterm08, "", "") +call hi("csUnspecifiedStatement", s:gui0D, "", s:cterm0D, "", "") +call hi("csContextualStatement", s:gui0E, "", s:cterm0E, "", "") +call hi("csNewDecleration", s:gui08, "", s:cterm08, "", "") + +" CSS highlighting +call hi("cssBraces", s:gui03, "", s:cterm03, "", "") +call hi("cssClassName", s:gui07, "", s:cterm07, "", "") +call hi("cssClassNameDot", s:gui04, "", s:cterm04, "", "") +call hi("cssInclude", s:gui04, "", s:cterm04, "", "") +call hi("cssColor", s:gui0C, "", s:cterm0C, "", "") +call hi("cssUnitDecorators", s:gui09, "", s:cterm09, "", "") +call hi("cssMediaKeyword", s:gui09, "", s:cterm09, "", "") + +" Diff highlighting +call hi("DiffAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "") +call hi("DiffChange", s:gui03, s:gui01, s:cterm03, s:cterm01, "") +call hi("DiffDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "") +call hi("DiffText", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "") +call hi("DiffAdded", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "") +call hi("DiffFile", s:gui08, s:gui00, s:cterm08, s:cterm00, "") +call hi("DiffNewFile", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "") +call hi("DiffLine", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "") +call hi("DiffRemoved", s:gui08, s:gui00, s:cterm08, s:cterm00, "") + +" Git highlighting +call hi("gitCommitOverflow", s:gui08, "", s:cterm08, "", "") +call hi("gitCommitSummary", s:gui0B, "", s:cterm0B, "", "") + +" GitGutter highlighting +call hi("GitGutterAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "") +call hi("GitGutterChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "") +call hi("GitGutterDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "") +call hi("GitGutterChangeDelete", s:gui0E, s:gui01, s:cterm0E, s:cterm01, "") + +" HTML highlighting +call hi("htmlBold", s:gui0A, "", s:cterm0A, "", "") +call hi("htmlItalic", s:gui0E, "", s:cterm0E, "", "") +call hi("htmlEndTag", s:gui05, "", s:cterm05, "", "") +call hi("htmlTag", s:gui04, "", s:cterm04, "", "") +call hi("htmlTagN", s:gui07, "", s:cterm07, "", "") + +" JavaScript highlighting +call hi("javaScript", s:gui05, "", s:cterm05, "", "") +call hi("javaScriptBraces", s:gui03, "", s:cterm03, "", "") +call hi("javaScriptNumber", s:gui09, "", s:cterm09, "", "") +call hi("javaScriptParens", s:gui03, "", s:cterm03, "", "") + +" Markdown highlighting +call hi("markdownCode", s:gui0B, "", s:cterm0B, "", "") +call hi("markdownError", s:gui05, s:gui00, s:cterm05, s:cterm00, "") +call hi("markdownCodeBlock", s:gui0B, "", s:cterm0B, "", "") +call hi("markdownHeadingDelimiter", s:gui0D, "", s:cterm0D, "", "") + +" NERDTree highlighting +call hi("NERDTreeDirSlash", s:gui0D, "", s:cterm0D, "", "") +call hi("NERDTreeExecFile", s:gui05, "", s:cterm05, "", "") + +" PHP highlighting +call hi("phpMemberSelector", s:gui05, "", s:cterm05, "", "") +call hi("phpComparison", s:gui05, "", s:cterm05, "", "") +call hi("phpParent", s:gui05, "", s:cterm05, "", "") + +" Python highlighting +call hi("pythonOperator", s:gui0E, "", s:cterm0E, "", "") +call hi("pythonRepeat", s:gui0E, "", s:cterm0E, "", "") + +" Ruby highlighting +call hi("rubyAttribute", s:gui0D, "", s:cterm0D, "", "") +call hi("rubyConstant", s:gui0A, "", s:cterm0A, "", "") +call hi("rubyInterpolation", s:gui0B, "", s:cterm0B, "", "") +call hi("rubyInterpolationDelimiter", s:gui0F, "", s:cterm0F, "", "") +call hi("rubyRegexp", s:gui0C, "", s:cterm0C, "", "") +call hi("rubySymbol", s:gui0B, "", s:cterm0B, "", "") +call hi("rubyStringDelimiter", s:gui0B, "", s:cterm0B, "", "") + +" SASS highlighting +call hi("sassidChar", s:gui08, "", s:cterm08, "", "") +call hi("sassClassChar", s:gui09, "", s:cterm09, "", "") +call hi("sassInclude", s:gui07, "", s:cterm07, "", "") +call hi("scssInclude", s:gui07, "", s:cterm07, "", "") +call hi("sassMixing", s:gui0E, "", s:cterm0E, "", "") +call hi("sassMixinName", s:gui09, "", s:cterm09, "", "") +call hi("scssMixinName", s:gui09, "", s:cterm09, "", "") +call hi("scssVariable", s:gui06, "", s:cterm06, "", "") +call hi("scssSelectorChar", s:gui04, "", s:cterm04, "", "") +call hi("cssIncludeKeyword", s:gui07, "", s:cterm07, "", "") +call hi("scssMixinParams", s:gui03, "", s:cterm03, "", "") +call hi("scssFunctionName", s:gui05, "", s:cterm05, "", "") + +" Signify highlighting +call hi("SignifySignAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "") +call hi("SignifySignChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "") +call hi("SignifySignDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "") + +" Spelling highlighting +call hi("SpellBad", "", s:gui00, "", s:cterm00, "undercurl") +call hi("SpellLocal", "", s:gui00, "", s:cterm00, "undercurl") +call hi("SpellCap", "", s:gui00, "", s:cterm00, "undercurl") +call hi("SpellRare", "", s:gui00, "", s:cterm00, "undercurl") + +" Remove functions +delf hi +delf gui +delf cterm + +" Remove color variables +unlet s:gui00 s:gui01 s:gui02 s:gui03 s:gui04 s:gui05 s:gui06 s:gui07 s:gui08 s:gui09 s:gui0A s:gui0B s:gui0C s:gui0D s:gui0E s:gui0F +unlet s:cterm00 s:cterm01 s:cterm02 s:cterm03 s:cterm04 s:cterm05 s:cterm06 s:cterm07 s:cterm08 s:cterm09 s:cterm0A s:cterm0B s:cterm0C s:cterm0D s:cterm0E s:cterm0F diff --git a/.vim/bundle/vim-colors/colors/goodwolf.vim b/.vim/bundle/vim-colors/colors/goodwolf.vim new file mode 100644 index 0000000..7ef26c3 --- /dev/null +++ b/.vim/bundle/vim-colors/colors/goodwolf.vim @@ -0,0 +1,546 @@ +" _ _ __ +" | | | |/ _| +" __ _ ___ ___ __| | __ _____ | | |_ +" / _` |/ _ \ / _ \ / _` | \ \ /\ / / _ \| | _| +" | (_| | (_) | (_) | (_| | \ V V / (_) | | | +" \__, |\___/ \___/ \__,_| \_/\_/ \___/|_|_| +" __/ | +" |___/ +" +" :syntax less +" +" A Vim colorscheme pieced together by Steve Losh. +" Available at http://stevelosh.com/projects/badwolf/ +" +" Supporting code ------------------------------------------------------------- +" Preamble {{{ + +if !has("gui_running") && &t_Co != 88 && &t_Co != 256 + finish +endif + +set background=dark + +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = "goodwolf" + +if !exists("g:badwolf_html_link_underline") " {{{ + let g:badwolf_html_link_underline = 1 +endif " }}} + +" }}} +" Palette {{{ + +let s:bwc = {} + +" The most basic of all our colors is a slightly tweaked version of the Molokai +" Normal text. +let s:bwc.plain = ['f8f6f2', 15] + +" Pure and simple. +let s:bwc.snow = ['ffffff', 15] +let s:bwc.coal = ['000000', 16] + +" All of the Gravel colors are based on a brown from Clouds Midnight. +let s:bwc.brightgravel = ['d9cec3', 252] +let s:bwc.lightgravel = ['998f84', 245] +let s:bwc.gravel = ['857f78', 243] +let s:bwc.mediumgravel = ['666462', 241] +let s:bwc.deepgravel = ['45413b', 238] +let s:bwc.deepergravel = ['35322d', 236] +let s:bwc.darkgravel = ['242321', 235] +let s:bwc.blackgravel = ['1c1b1a', 233] +let s:bwc.blackestgravel = ['141413', 232] + +" A color sampled from a highlight in a photo of a glass of Dale's Pale Ale on +" my desk. +let s:bwc.dalespale = ['fade3e', 221] + +" A beautiful tan from Tomorrow Night. +let s:bwc.dirtyblonde = ['f4cf86', 222] + +" Delicious, chewy red from Made of Code for the poppiest highlights. +let s:bwc.taffy = ['ff2c4b', 196] + +" Another chewy accent, but use sparingly! +let s:bwc.saltwatertaffy = ['8cffba', 121] + +" The star of the show comes straight from Made of Code. +" +" You should almost never use this. It should be used for things that denote +" 'where the user is', which basically consists of: +" +" * The cursor +" * A REPL prompt +let s:bwc.tardis = ['0a9dff', 39] + +" This one's from Mustang, not Florida! +let s:bwc.orange = ['ffa724', 214] + +" A limier green from Getafe. +let s:bwc.lime = ['aeee00', 154] + +" Rose's dress in The Idiot's Lantern. +let s:bwc.dress = ['ff9eb8', 211] + +" Another play on the brown from Clouds Midnight. I love that color. +let s:bwc.toffee = ['b88853', 137] + +" Also based on that Clouds Midnight brown. +let s:bwc.coffee = ['c7915b', 173] +let s:bwc.darkroast = ['88633f', 95] + +" }}} +" Highlighting Function {{{ +function! GoodWolfHL(group, fg, ...) + " Arguments: group, guifg, guibg, gui, guisp + + let histring = 'hi ' . a:group . ' ' + + if strlen(a:fg) + if a:fg == 'fg' + let histring .= 'guifg=fg ctermfg=fg ' + else + let c = get(s:bwc, a:fg) + let histring .= 'guifg=#' . c[0] . ' ctermfg=' . c[1] . ' ' + endif + endif + + if a:0 >= 1 && strlen(a:1) + if a:1 == 'bg' + let histring .= 'guibg=bg ctermbg=bg ' + else + let c = get(s:bwc, a:1) + let histring .= 'guibg=#' . c[0] . ' ctermbg=' . c[1] . ' ' + endif + endif + + if a:0 >= 2 && strlen(a:2) + let histring .= 'gui=' . a:2 . ' cterm=' . a:2 . ' ' + endif + + if a:0 >= 3 && strlen(a:3) + let c = get(s:bwc, a:3) + let histring .= 'guisp=#' . c[0] . ' ' + endif + + execute histring +endfunction + +" }}} +" Configuration Options {{{ + +if exists('g:badwolf_darkgutter') && g:badwolf_darkgutter + let s:gutter = 'blackestgravel' +else + let s:gutter = 'blackgravel' +endif + +if exists('g:badwolf_tabline') + if g:badwolf_tabline == 0 + let s:tabline = 'blackestgravel' + elseif g:badwolf_tabline == 1 + let s:tabline = 'blackgravel' + elseif g:badwolf_tabline == 2 + let s:tabline = 'darkgravel' + elseif g:badwolf_tabline == 3 + let s:tabline = 'deepgravel' + else + let s:tabline = 'blackestgravel' + endif +else + let s:tabline = 'blackgravel' +endif + +" }}} + +" Actual colorscheme ---------------------------------------------------------- +" Vanilla Vim {{{ + +" General/UI {{{ + +" call GoodWolfHL('Normal', 'plain', 'blackgravel') +call GoodWolfHL('Normal', 'plain', 'blackestgravel') + +call GoodWolfHL('Folded', 'mediumgravel', 'bg', 'none') + +call GoodWolfHL('VertSplit', 'lightgravel', 'bg', 'none') + +call GoodWolfHL('CursorLine', '', 'darkgravel', 'none') +call GoodWolfHL('CursorColumn', '', 'darkgravel') +call GoodWolfHL('ColorColumn', '', 'darkgravel') + +call GoodWolfHL('TabLine', 'plain', s:tabline, 'none') +call GoodWolfHL('TabLineFill', 'plain', s:tabline, 'none') +call GoodWolfHL('TabLineSel', 'coal', 'tardis', 'none') + +call GoodWolfHL('MatchParen', 'dalespale', 'darkgravel', 'bold') + +call GoodWolfHL('NonText', 'deepgravel', 'bg') +call GoodWolfHL('SpecialKey', 'deepgravel', 'bg') + +call GoodWolfHL('Visual', '', 'deepgravel') +call GoodWolfHL('VisualNOS', '', 'deepgravel') + +call GoodWolfHL('Search', 'coal', 'dalespale', 'bold') +call GoodWolfHL('IncSearch', 'coal', 'tardis', 'bold') + +call GoodWolfHL('Underlined', 'fg', '', 'underline') + +call GoodWolfHL('StatusLine', 'coal', 'tardis', 'bold') +call GoodWolfHL('StatusLineNC', 'snow', 'deepgravel', 'none') + +call GoodWolfHL('Directory', 'dirtyblonde', '', 'bold') + +call GoodWolfHL('Title', 'lime') + +call GoodWolfHL('ErrorMsg', 'taffy', 'bg', 'bold') +call GoodWolfHL('MoreMsg', 'dalespale', '', 'bold') +call GoodWolfHL('ModeMsg', 'dirtyblonde', '', 'bold') +call GoodWolfHL('Question', 'dirtyblonde', '', 'bold') +call GoodWolfHL('WarningMsg', 'dress', '', 'bold') + +" This is a ctags tag, not an HTML one. 'Something you can use c-] on'. +call GoodWolfHL('Tag', '', '', 'bold') + +" }}} +" Gutter {{{ + +call GoodWolfHL('LineNr', 'mediumgravel', s:gutter) +call GoodWolfHL('SignColumn', '', s:gutter) +call GoodWolfHL('FoldColumn', 'mediumgravel', s:gutter) + +" }}} +" Cursor {{{ + +call GoodWolfHL('Cursor', 'coal', 'tardis', 'bold') +call GoodWolfHL('vCursor', 'coal', 'tardis', 'bold') +call GoodWolfHL('iCursor', 'coal', 'tardis', 'none') + +" }}} +" Syntax highlighting {{{ + +" Start with a simple base. +call GoodWolfHL('Special', 'plain') + +" Comments are slightly brighter than folds, to make 'headers' easier to see. +call GoodWolfHL('Comment', 'gravel', 'bg', 'none') +call GoodWolfHL('Todo', 'snow', 'bg', 'bold') +call GoodWolfHL('SpecialComment', 'snow', 'bg', 'bold') + +" Strings are highlighted separately. +call GoodWolfHL('String', 'lightgravel', '', 'bold') + +" Turn off everything else +call GoodWolfHL('Statement', 'plain', '', 'none') +call GoodWolfHL('Keyword', 'plain', '', 'none') +call GoodWolfHL('Conditional', 'plain', '', 'none') +call GoodWolfHL('Operator', 'plain', '', 'none') +call GoodWolfHL('Label', 'plain', '', 'none') +call GoodWolfHL('Repeat', 'plain', '', 'none') +call GoodWolfHL('Identifier', 'plain', '', 'none') +call GoodWolfHL('Function', 'plain', '', 'none') +call GoodWolfHL('PreProc', 'plain', '', 'none') +call GoodWolfHL('Macro', 'plain', '', 'none') +call GoodWolfHL('Define', 'plain', '', 'none') +call GoodWolfHL('PreCondit', 'plain', '', 'none') +call GoodWolfHL('Constant', 'plain', '', 'none') +call GoodWolfHL('Character', 'plain', '', 'none') +call GoodWolfHL('Boolean', 'plain', '', 'none') +call GoodWolfHL('Number', 'plain', '', 'none') +call GoodWolfHL('Float', 'plain', '', 'none') +call GoodWolfHL('Type', 'plain', '', 'none') +call GoodWolfHL('StorageClass', 'plain', '', 'none') +call GoodWolfHL('Structure', 'plain', '', 'none') +call GoodWolfHL('Typedef', 'plain', '', 'none') +call GoodWolfHL('Exception', 'plain', '', 'none') + +" Not sure what 'special character in a constant' means, but let's make it pop. +call GoodWolfHL('SpecialChar', 'plain', '', 'bold') + +" Misc +call GoodWolfHL('Error', 'snow', 'taffy', 'bold') +call GoodWolfHL('Debug', 'snow', '', 'bold') +call GoodWolfHL('Ignore', 'gravel', '', '') + +" }}} +" Completion Menu {{{ + +call GoodWolfHL('Pmenu', 'plain', 'deepergravel') +call GoodWolfHL('PmenuSel', 'coal', 'tardis', 'bold') +call GoodWolfHL('PmenuSbar', '', 'deepergravel') +call GoodWolfHL('PmenuThumb', 'brightgravel') + +" }}} +" Diffs {{{ + +call GoodWolfHL('DiffDelete', 'coal', 'coal') +call GoodWolfHL('DiffAdd', '', 'deepergravel') +call GoodWolfHL('DiffChange', '', 'darkgravel') +call GoodWolfHL('DiffText', 'snow', 'deepergravel', 'bold') + +" }}} +" Spelling {{{ + +if has("spell") + call GoodWolfHL('SpellCap', 'dalespale', 'bg', 'undercurl,bold', 'dalespale') + call GoodWolfHL('SpellBad', '', 'bg', 'undercurl', 'dalespale') + call GoodWolfHL('SpellLocal', '', '', 'undercurl', 'dalespale') + call GoodWolfHL('SpellRare', '', '', 'undercurl', 'dalespale') +endif + +" }}} +" Status Line Utils {{{ + +call GoodWolfHL('GWStatusLineMode', 'coal', 'lime') +call GoodWolfHL('GWStatusLineModeX', 'lime', 'deepergravel') + + +" }}} + +" }}} +" Plugins {{{ + +" Clam {{{ + +" hg status +call GoodWolfHL('clamHgStatusAdded', 'lime', '', 'none') +call GoodWolfHL('clamHgStatusModified', 'saltwatertaffy', '', 'none') +call GoodWolfHL('clamHgStatusRemoved', 'toffee', '', 'none') +call GoodWolfHL('clamHgStatusUnknown', 'taffy', '', 'bold') + +" }}} +" CtrlP {{{ + +" the message when no match is found +call GoodWolfHL('CtrlPNoEntries', 'snow', 'taffy', 'bold') + +" the matched pattern +call GoodWolfHL('CtrlPMatch', 'dress', 'bg', 'bold') + +" the line prefix '>' in the match window +call GoodWolfHL('CtrlPLinePre', 'deepgravel', 'bg', 'none') + +" the prompt’s base +call GoodWolfHL('CtrlPPrtBase', 'deepgravel', 'bg', 'none') + +" the prompt’s text +call GoodWolfHL('CtrlPPrtText', 'plain', 'bg', 'none') + +" the prompt’s cursor when moving over the text +call GoodWolfHL('CtrlPPrtCursor', 'coal', 'tardis', 'bold') + +" 'prt' or 'win', also for 'regex' +call GoodWolfHL('CtrlPMode1', 'coal', 'tardis', 'bold') + +" 'file' or 'path', also for the local working dir +call GoodWolfHL('CtrlPMode2', 'coal', 'tardis', 'bold') + +" the scanning status +call GoodWolfHL('CtrlPStats', 'coal', 'tardis', 'bold') + +" }}} +" Interesting Words {{{ + +" These are only used if you're me or have copied the hNUM mappings +" from my Vimrc. +call GoodWolfHL('InterestingWord1', 'coal', 'orange') +call GoodWolfHL('InterestingWord2', 'coal', 'lime') +call GoodWolfHL('InterestingWord3', 'coal', 'saltwatertaffy') +call GoodWolfHL('InterestingWord4', 'coal', 'toffee') +call GoodWolfHL('InterestingWord5', 'coal', 'dress') +call GoodWolfHL('InterestingWord6', 'coal', 'taffy') + +" }}} +" Rainbow Parentheses {{{ + +call GoodWolfHL('level1c', 'mediumgravel', '', 'bold') + +" }}} +" Fugitive {{{ + +call GoodWolfHL('fugitiveHeading', 'dress', 'bg', 'bold') +call GoodWolfHL('fugitiveHeader', 'dress', 'bg', 'bold') +call GoodWolfHL('fugitiveCount', 'plain', 'bg', 'bold') +call GoodWolfHL('fugitiveSymbolicRef', 'dirtyblonde', 'bg', 'none') +call GoodWolfHL('fugitiveModifier', 'dirtyblonde', 'bg', 'bold') + +" }}} + +" }}} +" Filetype-specific {{{ + +" Clojure {{{ + +call GoodWolfHL('clojureParen0', 'lightgravel', '', 'none') +call GoodWolfHL('clojureAnonArg', 'snow', '', 'bold') + +" }}} +" CSS {{{ + +call GoodWolfHL('cssBraces', 'lightgravel', '', 'none') + +" }}} +" Diff {{{ + +call GoodWolfHL('gitDiff', 'lightgravel', '',) + +call GoodWolfHL('diffRemoved', 'dress', '',) +call GoodWolfHL('diffAdded', 'lime', '',) +call GoodWolfHL('diffFile', 'coal', 'toffee', 'bold') +call GoodWolfHL('diffNewFile', 'coal', 'toffee', 'bold') + +call GoodWolfHL('diffLine', 'coal', 'orange', 'bold') +call GoodWolfHL('diffSubname', 'orange', '', 'none') + +" }}} +" Fish {{{ + +call GoodWolfHL('fishOperator', 'fg', 'bg', 'none') +call GoodWolfHL('fishDerefIdentifier', 'dress', 'bg', 'bold') + +" }}} +" HTML {{{ + +" Punctuation +call GoodWolfHL('htmlTag', 'darkroast', 'bg', 'none') +call GoodWolfHL('htmlEndTag', 'darkroast', 'bg', 'none') + +" Tag names +call GoodWolfHL('htmlTagName', 'coffee', '', 'bold') +call GoodWolfHL('htmlSpecialTagName', 'coffee', '', 'bold') +call GoodWolfHL('htmlSpecialChar', 'lime', '', 'none') + +" Attributes +call GoodWolfHL('htmlArg', 'coffee', '', 'none') + +" Stuff inside an tag + +if g:badwolf_html_link_underline + call GoodWolfHL('htmlLink', 'lightgravel', '', 'underline') +else + call GoodWolfHL('htmlLink', 'lightgravel', '', 'none') +endif + +" }}} +" Java {{{ + +call GoodWolfHL('javaCommentTitle', 'gravel', '') +call GoodWolfHL('javaDocTags', 'snow', '', 'none') +call GoodWolfHL('javaDocParam', 'plain', '', '') + +" }}} +" LaTeX {{{ + +call GoodWolfHL('texStatement', 'dress', '', 'none') +call GoodWolfHL('texDocType', 'dress', '', 'none') +call GoodWolfHL('texSection', 'dress', '', 'none') +call GoodWolfHL('texBeginEnd', 'dress', '', 'none') + +call GoodWolfHL('texMathZoneX', 'orange', '', 'none') +call GoodWolfHL('texMathZoneA', 'orange', '', 'none') +call GoodWolfHL('texMathZoneB', 'orange', '', 'none') +call GoodWolfHL('texMathZoneC', 'orange', '', 'none') +call GoodWolfHL('texMathZoneD', 'orange', '', 'none') +call GoodWolfHL('texMathZoneE', 'orange', '', 'none') +call GoodWolfHL('texMathZoneV', 'orange', '', 'none') +call GoodWolfHL('texMathZoneX', 'orange', '', 'none') +call GoodWolfHL('texMath', 'orange', '', 'none') +call GoodWolfHL('texMathMatcher', 'orange', '', 'none') +call GoodWolfHL('texRefLabel', 'dirtyblonde', '', 'none') +call GoodWolfHL('texRefZone', 'lime', '', 'none') +call GoodWolfHL('texDelimiter', 'orange', '', 'none') +call GoodWolfHL('texZone', 'brightgravel', '', 'none') + +augroup badwolf_tex + au! + + au BufRead,BufNewFile *.tex syn region texMathZoneV start="\\(" end="\\)\|%stopzone\>" keepend contains=@texMathZoneGroup + au BufRead,BufNewFile *.tex syn region texMathZoneX start="\$" skip="\\\\\|\\\$" end="\$\|%stopzone\>" keepend contains=@texMathZoneGroup +augroup END + +" }}} +" REPLs {{{ +" This isn't a specific plugin, but just useful highlight classes for anything +" that might want to use them. + +call GoodWolfHL('replPrompt', 'tardis', '', 'bold') + +" }}} +" Mail {{{ + +call GoodWolfHL('mailSubject', 'orange', '', 'bold') +call GoodWolfHL('mailHeader', 'lightgravel', '', '') +call GoodWolfHL('mailHeaderKey', 'lightgravel', '', '') +call GoodWolfHL('mailHeaderEmail', 'snow', '', '') +call GoodWolfHL('mailURL', 'toffee', '', 'underline') +call GoodWolfHL('mailSignature', 'gravel', '', 'none') + +call GoodWolfHL('mailQuoted1', 'gravel', '', 'none') +call GoodWolfHL('mailQuoted2', 'dress', '', 'none') +call GoodWolfHL('mailQuoted3', 'dirtyblonde', '', 'none') +call GoodWolfHL('mailQuoted4', 'orange', '', 'none') +call GoodWolfHL('mailQuoted5', 'lime', '', 'none') + +" }}} +" Markdown {{{ + +call GoodWolfHL('markdownHeadingRule', 'lightgravel', '', 'bold') +call GoodWolfHL('markdownHeadingDelimiter', 'lightgravel', '', 'bold') +call GoodWolfHL('markdownOrderedListMarker', 'lightgravel', '', 'bold') +call GoodWolfHL('markdownListMarker', 'lightgravel', '', 'bold') +call GoodWolfHL('markdownItalic', 'snow', '', 'bold') +call GoodWolfHL('markdownBold', 'snow', '', 'bold') +call GoodWolfHL('markdownH1', 'orange', '', 'bold') +call GoodWolfHL('markdownH2', 'lime', '', 'bold') +call GoodWolfHL('markdownH3', 'lime', '', 'none') +call GoodWolfHL('markdownH4', 'lime', '', 'none') +call GoodWolfHL('markdownH5', 'lime', '', 'none') +call GoodWolfHL('markdownH6', 'lime', '', 'none') +call GoodWolfHL('markdownLinkText', 'toffee', '', 'underline') +call GoodWolfHL('markdownIdDeclaration', 'toffee') +call GoodWolfHL('markdownAutomaticLink', 'toffee', '', 'bold') +call GoodWolfHL('markdownUrl', 'toffee', '', 'bold') +call GoodWolfHL('markdownUrldelimiter', 'lightgravel', '', 'bold') +call GoodWolfHL('markdownLinkDelimiter', 'lightgravel', '', 'bold') +call GoodWolfHL('markdownLinkTextDelimiter', 'lightgravel', '', 'bold') +call GoodWolfHL('markdownCodeDelimiter', 'dirtyblonde', '', 'bold') +call GoodWolfHL('markdownCode', 'dirtyblonde', '', 'none') +call GoodWolfHL('markdownCodeBlock', 'dirtyblonde', '', 'none') + +" }}} +" Python {{{ + +hi def link pythonOperator Operator +call GoodWolfHL('pythonBuiltin', 'plain') +call GoodWolfHL('pythonBuiltinObj', 'plain') +call GoodWolfHL('pythonBuiltinFunc', 'plain') +call GoodWolfHL('pythonEscape', 'plain') +call GoodWolfHL('pythonException', 'plain', '', 'none') +call GoodWolfHL('pythonExceptions', 'plain', '', 'none') +call GoodWolfHL('pythonPrecondit', 'plain', '', 'none') +call GoodWolfHL('pythonDecorator', 'plain', '', 'none') +call GoodWolfHL('pythonRun', 'plain', '', 'none') +call GoodWolfHL('pythonCoding', 'plain', '', 'bold') + +" }}} +" Scala {{{ + +call GoodWolfHL('scalaParameterAnnotation', 'gravel', '', 'bold') +call GoodWolfHL('scalaParamAnnotationValue', 'gravel', '', 'bold') +call GoodWolfHL('scalaCommentAnnotation', 'gravel', '', 'bold') +call GoodWolfHL('scalaDocLinks', 'gravel', '', 'bold') + +" }}} +" Vim {{{ + +call GoodWolfHL('helpHyperTextJump', 'dress', '', 'none') + +" }}} + +" }}} + + diff --git a/.vim/bundle/vim-colors/colors/jjstyle2.vim b/.vim/bundle/vim-colors/colors/jjstyle2.vim new file mode 100644 index 0000000..ce930d1 --- /dev/null +++ b/.vim/bundle/vim-colors/colors/jjstyle2.vim @@ -0,0 +1,71 @@ +" Vim color file + +set bg=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "jjstyle2" + +hi Normal guifg=#b3b3b3 guibg=#242324 +hi ErrorMsg guifg=#b3b3b3 guibg=red +hi Visual guifg=#b3b3b3 guibg=#e3411b +hi VisualNOS guifg=#b3b3b3 guibg=#e3411b gui=underline +hi Todo guifg=#b3b3b3 guibg=red +hi Search guifg=black guibg=orange +hi IncSearch guifg=orange guibg=black + +hi SpecialKey guifg=#b3b3b3 +hi Directory guifg=#b3b3b3 +hi Title guifg=green gui=none +hi WarningMsg guifg=red +hi WildMenu guifg=black guibg=orange +hi ModeMsg guifg=#b3b3b3 +hi MoreMsg ctermfg=darkgreen +hi Question guifg=#b3b3b3 gui=none +hi NonText guifg=#b3b3b3 + +hi StatusLine guifg=#b3b3b3 gui=none +hi StatusLineNC guifg=#6f6262 gui=none +hi VertSplit guifg=#6f6262 gui=none + +hi Folded guifg=#b3b3b3 guibg=#404040 +hi FoldColumn guifg=#b3b3b3 guibg=#404040 +hi LineNr guifg=#6f6262 +hi SignColumn guibg=#4d4d4d + +hi DiffAdd guibg=darkblue +hi DiffChange guibg=darkmagenta +hi DiffDelete gui=bold guifg=#b3b3b3 guibg=DarkCyan +hi DiffText gui=bold guibg=Red + +"hi lCursor guifg=white guibg=black +hi CursorLine guibg=#454545 +hi Cursor gui=NONE guibg=green + +hi Comment guifg=#6f6262 +hi Constant guifg=#78b54f +hi Special guifg=#78b54f gui=none +hi Identifier guifg=#b3b3b3 +hi Statement guifg=#d4a702 gui=none +hi PreProc guifg=#b3b3b3 gui=none +hi type guifg=#d4a702 gui=none +hi Underlined cterm=underline term=underline +hi Ignore guifg=#b3b3b3 + +hi Pmenu guifg=black guibg=white +hi PmenuSel guifg=black guibg=orange +hi PmenuSbar guifg=black guibg=darkgray +hi PmenuThumb guifg=black + +"Errors +hi SpellBad guifg=#b3b3b3 guibg=orange +hi SpellCap guifg=#b3b3b3 guibg=red + +hi SyntasticError guifg=white guibg=red +hi SyntasticErrorLine guifg=white guibg=red +"hi SyntasticWarningLine guifg=#b3b3b3 guibg=red +hi SyntasticWarningSign guifg=#b3b3b3 guibg=red +hi SyntasticStyleWarning guifg=#b3b3b3 guibg=red + diff --git a/.vim/bundle/vim-colors/colors/mindark.vim b/.vim/bundle/vim-colors/colors/mindark.vim new file mode 100644 index 0000000..73ddbb1 --- /dev/null +++ b/.vim/bundle/vim-colors/colors/mindark.vim @@ -0,0 +1,116 @@ +"============================================================================= +" +" mindark.vim +" +" A minimalist dark color scheme. +" +" This file does not define the colors. This, rather, gets the ANSI colors in +" a good arrangement to be used with the TTY's scheme. +" +" 0 black (unmapped) +" 1 red (unmapped) +" 2 green (unmapped) +" 3 yellow (unmapped) +" 4 blue type identifiers +" 5 magenta (unmapped) +" 6 cyan string literals +" 7 white normal text foreground +" 8 bblack (unmapped) +" 9 bred (unmapped) +" 10 bgreen comments +" 11 byellow (unmapped) +" 12 bblue (unmapped) +" 13 bmagenta (unmapped) +" 14 bcyan (unmapped) +" 15 bwhite highlighted/special foreground +" +"============================================================================= + +"----------------------------------------------------------------------------- +" Colorscheme Boilerplate +"----------------------------------------------------------------------------- + +" This is a dark scheme. +set background=dark + +" Drop current highlighting. +highlight clear + +" Reset highlighting to the defaults. +if exists( 'syntax_on' ) + syntax reset +endif + +" Set the name of the scheme. +let g:colors_name = 'mindark' + +"----------------------------------------------------------------------------- +" Editor Display +"----------------------------------------------------------------------------- + +" Normal Text (everything that isn't "highlighted", must be first in scheme) +hi Normal cterm=none ctermbg=none ctermfg=7 + +" Cursor and Selection +hi Cursor cterm=none ctermbg=none ctermfg=11 +hi CursorColumn cterm=none ctermbg=none ctermfg=none +hi CursorLine cterm=none ctermbg=none ctermfg=none +hi Visual cterm=none ctermbg=0 ctermfg=none + +" Window Margins +hi ColorColumn cterm=none ctermbg=0 ctermfg=none +hi CursorLineNr cterm=none ctermbg=0 ctermfg=7 +hi LineNr cterm=none ctermbg=0 ctermfg=7 +hi VertSplit cterm=none ctermbg=0 ctermfg=7 + +"----------------------------------------------------------------------------- +" In-buffer Highlighting +"----------------------------------------------------------------------------- + +" Other +hi Underlined cterm=underline + +"----------------------------------------------------------------------------- +" Informational Highlighting +"----------------------------------------------------------------------------- + +" Errors and Debugging +hi Error cterm=none ctermbg=15 ctermfg=1 + +"----------------------------------------------------------------------------- +" Code Syntax Highlighting +"----------------------------------------------------------------------------- + +" Highlight other delimiters the same as parenthesis. +hi link Delimiter Parens + +" Comments +hi Comment cterm=none ctermbg=none ctermfg=2 + +" Constants +hi Constant cterm=none ctermbg=none ctermfg=15 +hi String cterm=none ctermbg=none ctermfg=6 + +" Highlight other constants similarly. +hi link Boolean Constant +hi link Character Constant +hi link Float Constant +hi link Number Constant + +" Include the quotation marks when highlighting string constants. +hi link StringDelimiter String + +" Named Identifiers +hi Function cterm=none ctermbg=none ctermfg=15 +hi Identifier cterm=none ctermbg=none ctermfg=15 + +" Language Constructs +hi Operator cterm=none ctermbg=none ctermfg=15 +hi Statement cterm=none ctermbg=none ctermfg=15 + +" Preprocessor +hi PreProc cterm=none ctermbg=none ctermfg=15 + +" Types +hi Type cterm=none ctermbg=none ctermfg=15 + diff --git a/.vim/bundle/vim-colors/colors/moonshine_minimal.vim b/.vim/bundle/vim-colors/colors/moonshine_minimal.vim new file mode 100644 index 0000000..17eaf3a --- /dev/null +++ b/.vim/bundle/vim-colors/colors/moonshine_minimal.vim @@ -0,0 +1,14 @@ +" Vim color file - +" Generated by http://bytefluent.com/vivify 2023-03-04 +set background=dark +if version > 580 + hi clear + if exists("syntax_on") + syntax reset + endif +endif + +set t_Co=256 +let g:colors_name = "" + +"hi -- no settings -- diff --git a/.vim/bundle/vim-colors/colors/nofrils-dark.vim b/.vim/bundle/vim-colors/colors/nofrils-dark.vim new file mode 100644 index 0000000..eac53b9 --- /dev/null +++ b/.vim/bundle/vim-colors/colors/nofrils-dark.vim @@ -0,0 +1,189 @@ +" Name: No Frils Dark Colorscheme +" Author: robertmeta (on Github) +" URL: https://github.com/robertmeta/nofrils +" (see this url for latest release & screenshots) +" License: OSI approved MIT license + +hi clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = "nofrils-dark" + +if !exists("g:nofrils_strbackgrounds") + let g:nofrils_strbackgrounds = 0 +endif +if !exists("g:nofrils_heavycomments") + let g:nofrils_heavycomments = 0 +endif +if !exists("g:nofrils_heavylinenumbers") + let g:nofrils_heavylinenumbers = 0 +endif + +set background=dark + +" Baseline +hi Normal term=NONE cterm=NONE ctermfg=255 ctermbg=235 gui=NONE guifg=#eeeeee guibg=#262626 + +" Faded +hi ColorColumn term=NONE cterm=NONE ctermfg=NONE ctermbg=236 gui=NONE guifg=NONE guibg=#303030 +hi Comment term=NONE cterm=NONE ctermfg=242 ctermbg=NONE gui=NONE guifg=#6C6C6C guibg=NONE +hi FoldColumn term=NONE cterm=NONE ctermfg=242 ctermbg=NONE gui=NONE guifg=#6C6C6C guibg=NONE +hi Folded term=NONE cterm=NONE ctermfg=242 ctermbg=NONE gui=NONE guifg=#6C6C6C guibg=NONE +hi LineNr term=NONE cterm=NONE ctermfg=8 ctermbg=bg gui=NONE guifg=#808080 guibg=bg +hi NonText term=NONE cterm=NONE ctermfg=242 ctermbg=NONE gui=NONE guifg=#6C6C6C guibg=NONE +hi SignColumn term=NONE cterm=NONE ctermfg=242 ctermbg=NONE gui=NONE guifg=#6C6C6C guibg=NONE +hi SpecialComment term=NONE cterm=NONE ctermfg=242 ctermbg=NONE gui=NONE guifg=#6C6C6C guibg=NONE +hi SpecialKey term=NONE cterm=NONE ctermfg=242 ctermbg=NONE gui=NONE guifg=#6C6C6C guibg=NONE +hi StatusLineNC term=NONE cterm=NONE ctermfg=fg ctermbg=242 gui=NONE guifg=fg guibg=#6C6C6C +hi VertSplit term=NONE cterm=NONE ctermfg=black ctermbg=242 gui=NONE guifg=black guibg=#6C6C6C + +" Highlighted +hi CursorColumn term=NONE cterm=NONE ctermfg=NONE ctermbg=236 gui=NONE guifg=NONE guibg=#303030 +hi CursorIM term=NONE cterm=NONE ctermfg=black ctermbg=4 gui=NONE guifg=black guibg=#00FFFF +hi CursorLineNr term=NONE cterm=NONE ctermfg=NONE ctermbg=black gui=NONE guifg=NONE guibg=black +hi CursorLine term=NONE cterm=NONE ctermfg=NONE ctermbg=236 gui=NONE guifg=NONE guibg=#303030 +hi Cursor term=NONE cterm=NONE ctermfg=black ctermbg=4 gui=NONE guifg=black guibg=#00FFFF +hi Directory term=NONE cterm=NONE ctermfg=69 ctermbg=NONE gui=NONE guifg=#5F87FF guibg=NONE +hi ErrorMsg term=NONE cterm=NONE ctermfg=fg ctermbg=52 gui=NONE guifg=fg guibg=#5F0000 +hi Error term=NONE cterm=NONE ctermfg=fg ctermbg=52 gui=NONE guifg=fg guibg=#5F0000 +hi IncSearch term=NONE cterm=NONE ctermfg=black ctermbg=green gui=NONE guifg=black guibg=green +hi MatchParen term=NONE cterm=NONE ctermfg=15 ctermbg=4 gui=NONE guifg=#ffffff guibg=#000080 +hi ModeMsg term=NONE cterm=NONE ctermfg=69 ctermbg=NONE gui=NONE guifg=#5F87FF guibg=NONE +hi MoreMsg term=NONE cterm=NONE ctermfg=69 ctermbg=NONE gui=NONE guifg=#5F87FF guibg=NONE +hi PmenuSel term=NONE cterm=NONE ctermfg=black ctermbg=13 gui=NONE guifg=black guibg=#FF00FF +hi Question term=NONE cterm=NONE ctermfg=69 ctermbg=NONE gui=NONE guifg=#5F87FF guibg=NONE +hi Search term=NONE cterm=NONE ctermfg=black ctermbg=6 gui=NONE guifg=black guibg=#00CDCD +hi StatusLine term=NONE cterm=NONE ctermfg=black ctermbg=fg gui=NONE guifg=black guibg=fg +hi Todo term=NONE cterm=NONE ctermfg=10 ctermbg=NONE gui=NONE guifg=#00FF00 guibg=black +hi WarningMsg term=NONE cterm=NONE ctermfg=fg ctermbg=52 gui=NONE guifg=fg guibg=#5F0000 +hi WildMenu term=NONE cterm=NONE ctermfg=fg ctermbg=black gui=NONE guifg=fg guibg=black + +" Reversed +hi PmenuSbar term=reverse cterm=reverse ctermfg=NONE ctermbg=NONE gui=reverse guifg=NONE guibg=NONE +hi Pmenu term=reverse cterm=reverse ctermfg=NONE ctermbg=NONE gui=reverse guifg=NONE guibg=NONE +hi PmenuThumb term=reverse cterm=reverse ctermfg=NONE ctermbg=NONE gui=reverse guifg=NONE guibg=NONE +hi TabLineSel term=reverse cterm=reverse ctermfg=NONE ctermbg=NONE gui=reverse guifg=NONE guibg=NONE +hi Visual term=reverse cterm=reverse ctermfg=NONE ctermbg=NONE gui=reverse guifg=NONE guibg=NONE +hi VisualNOS term=reverse,underline cterm=reverse,underline ctermfg=NONE ctermbg=NONE gui=reverse,underline guifg=NONE guibg=NONE + +" Diff +hi DiffAdd term=NONE cterm=NONE ctermfg=2 ctermbg=NONE gui=NONE guifg=#008000 guibg=NONE +hi DiffChange term=NONE cterm=NONE ctermfg=3 ctermbg=NONE gui=NONE guifg=#808000 guibg=NONE +hi DiffDelete term=NONE cterm=NONE ctermfg=1 ctermbg=NONE gui=NONE guifg=#800000 guibg=NONE +hi DiffText term=NONE cterm=NONE ctermfg=4 ctermbg=NONE gui=NONE guifg=#000080 guibg=NONE + +" Spell +hi SpellBad term=underline cterm=underline ctermfg=13 ctermbg=NONE gui=underline guifg=#FF00FF guibg=NONE +hi SpellCap term=underline cterm=underline ctermfg=13 ctermbg=NONE gui=underline guifg=#FF00FF guibg=NONE +hi SpellLocal term=underline cterm=underline ctermfg=13 ctermbg=NONE gui=underline guifg=#FF00FF guibg=NONE +hi SpellRare term=underline cterm=underline ctermfg=13 ctermbg=NONE gui=underline guifg=#FF00FF guibg=NONE + +" Vim Features +hi Menu term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Scrollbar term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi TabLineFill term=NONE cterm=NONE ctermfg=fg ctermbg=242 gui=NONE guifg=fg guibg=#6C6C6C +hi TabLine term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Tooltip term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE + +" Syntax Highlighting (or lack of) +hi Boolean term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Character term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Conceal term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Conditional term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Constant term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Debug term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Define term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Delimiter term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Directive term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Exception term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Float term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Format term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Function term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Identifier term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Ignore term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Include term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Keyword term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Label term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Macro term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Number term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Operator term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi PreCondit term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi PreProc term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Repeat term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi SpecialChar term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Special term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Statement term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi StorageClass term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi String term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Structure term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Tag term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Title term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Typedef term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Type term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE +hi Underlined term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE + +" Sneak +hi SneakLabelMask term=NONE cterm=NONE ctermfg=black ctermbg=195 gui=NONE guifg=black guibg=#d7ffff +hi SneakTarget term=NONE cterm=NONE ctermfg=black ctermbg=195 gui=NONE guifg=black guibg=#d7ffff +hi SneakLabelTarget term=NONE cterm=NONE ctermfg=black ctermbg=183 gui=NONE guifg=black guibg=#d7afff +hi SneakScope term=NONE cterm=NONE ctermfg=black ctermbg=183 gui=NONE guifg=black guibg=#d7afff + +" Helper Functions +function! NofrilsFocusComments() + hi Comment term=NONE cterm=NONE ctermfg=255 ctermbg=235 gui=NONE guifg=#eeeeee guibg=#262626 + hi Normal term=NONE cterm=NONE ctermfg=242 ctermbg=235 gui=NONE guifg=#eeeeee guibg=#262626 + hi LineNr term=NONE cterm=NONE ctermfg=8 ctermbg=bg gui=NONE guifg=#808080 guibg=bg + hi Character term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE + hi String term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE + + if g:nofrils_heavycomments + hi Comment term=NONE cterm=NONE ctermfg=135 ctermbg=NONE gui=NONE guifg=#AF5FFF guibg=NONE + end +endfunction + +function! NofrilsFocusCode() + hi Comment term=NONE cterm=NONE ctermfg=242 ctermbg=235 gui=NONE guifg=#eeeeee guibg=#262626 + hi Normal term=NONE cterm=NONE ctermfg=255 ctermbg=235 gui=NONE guifg=#eeeeee guibg=#262626 + hi LineNr term=NONE cterm=NONE ctermfg=8 ctermbg=bg gui=NONE guifg=#808080 guibg=bg + hi Character term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE + hi String term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE + + if g:nofrils_strbackgrounds + hi Character term=NONE cterm=NONE ctermfg=NONE ctermbg=233 gui=NONE guifg=NONE guibg=#121212 + hi String term=NONE cterm=NONE ctermfg=NONE ctermbg=233 gui=NONE guifg=NONE guibg=#121212 + end +endfunction + +function! NofrilsNormal() + hi Comment term=NONE cterm=NONE ctermfg=242 ctermbg=NONE gui=NONE guifg=#6C6C6C guibg=NONE + hi Normal term=NONE cterm=NONE ctermfg=255 ctermbg=235 gui=NONE guifg=#eeeeee guibg=#262626 + hi LineNr term=NONE cterm=NONE ctermfg=8 ctermbg=bg gui=NONE guifg=#808080 guibg=bg + hi Character term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE + hi String term=NONE cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE + + " Optional Syntax Features + if g:nofrils_strbackgrounds + hi Character term=NONE cterm=NONE ctermfg=NONE ctermbg=233 gui=NONE guifg=NONE guibg=#121212 + hi String term=NONE cterm=NONE ctermfg=NONE ctermbg=233 gui=NONE guifg=NONE guibg=#121212 + end + if g:nofrils_heavycomments + hi Comment term=NONE cterm=NONE ctermfg=135 ctermbg=NONE gui=NONE guifg=#AF5FFF guibg=NONE + end + if g:nofrils_heavylinenumbers + hi LineNr term=NONE cterm=NONE ctermfg=135 ctermbg=NONE gui=NONE guifg=#AF5FFF guibg=NONE + end +endfunction + +" Command mappings +command! NofrilsDark :colo nofrils-dark +command! NofrilsLight :colo nofrils-light +command! NofrilsSepia :colo nofrils-sepia +command! NofrilsAcme :colo nofrils-acme +command! NofrilsFocusNormal :call NofrilsNormal() +command! NofrilsFocusCode :call NofrilsFocusCode() +command! NofrilsFocusComments :call NofrilsFocusComments() + +" Setup normal settings +call NofrilsNormal() diff --git a/.vim/bundle/vim-colors/colors/off.vim b/.vim/bundle/vim-colors/colors/off.vim new file mode 100644 index 0000000..84cfef1 --- /dev/null +++ b/.vim/bundle/vim-colors/colors/off.vim @@ -0,0 +1,224 @@ +" Name: off.vim +" Version: 0.1 +" Maintainer: github.com/pbrisbin +" License: The MIT License (MIT) +" +" A colorscheme meant to look like a more pleasant version of syntax off. +" Structure and what little color there is is taken from pencil.vim +" +" https://github.com/reedes/vim-colors-pencil +" +""" +hi clear + +if exists('syntax on') + syntax reset +endif + +let g:colors_name='off' +let colors_off_a_little = get(g:, 'colors_off_a_little', 0) + +let s:black = { "gui": "#212121", "cterm": "0" } +let s:medium_gray = { "gui": "#767676", "cterm": "243" } +let s:white = { "gui": "#F1F1F1", "cterm": "15" } +let s:actual_white = { "gui": "#FFFFFF", "cterm": "231" } +let s:light_black = { "gui": "#424242", "cterm": "8" } +let s:lighter_black = { "gui": "#545454", "cterm": "240" } +let s:subtle_black = { "gui": "#303030", "cterm": "236" } +let s:light_gray = { "gui": "#B2B2B2", "cterm": "249" } +let s:lighter_gray = { "gui": "#C6C6C6", "cterm": "251" } +let s:subtle_gray = { "gui": "#696969", "cterm": "250" } +let s:pink = { "gui": "#fb007a", "cterm": "9" } +let s:dark_red = { "gui": "#C30771", "cterm": "1" } +let s:light_red = { "gui": "#E32791", "cterm": "1" } +let s:orange = { "gui": "#D75F5F", "cterm": "167" } +let s:darker_blue = { "gui": "#005F87", "cterm": "18" } +let s:dark_blue = { "gui": "#008EC4", "cterm": "4" } +let s:blue = { "gui": "#20BBFC", "cterm": "12" } +let s:light_blue = { "gui": "#b6d6fd", "cterm": "153" } +let s:dark_cyan = { "gui": "#20A5BA", "cterm": "6" } +let s:light_cyan = { "gui": "#4FB8CC", "cterm": "14" } +let s:dark_green = { "gui": "#10A778", "cterm": "2" } +let s:light_green = { "gui": "#5FD7A7", "cterm": "10" } +let s:dark_purple = { "gui": "#523C79", "cterm": "5" } +let s:light_purple = { "gui": "#6855DE", "cterm": "13" } +let s:yellow = { "gui": "#F3E430", "cterm": "11" } +let s:dark_yellow = { "gui": "#A89C14", "cterm": "3" } + +if &background == "dark" + let s:bg = s:black + let s:bg_subtle = s:light_black + let s:bg_subtle_comment = s:subtle_gray + let s:bg_very_subtle = s:subtle_black + let s:norm = s:lighter_gray + let s:norm_subtle = s:light_gray + let s:purple = s:light_purple + let s:cyan = s:light_cyan + let s:green = s:light_green + let s:red = s:light_red + let s:visual = s:lighter_black +else + let s:bg = s:actual_white + let s:bg_subtle = s:light_gray + let s:bg_subtle_comment = s:subtle_gray + let s:bg_very_subtle = s:lighter_gray + let s:norm = s:light_black + let s:norm_subtle = s:lighter_black + let s:purple = s:dark_purple + let s:cyan = s:dark_cyan + let s:green = s:dark_green + let s:red = s:dark_red + let s:visual = s:light_blue +endif + +" https://github.com/noahfrederick/vim-hemisu/ +function! s:h(group, style) + execute "highlight" a:group + \ "guifg=" (has_key(a:style, "fg") ? a:style.fg.gui : "NONE") + \ "guibg=" (has_key(a:style, "bg") ? a:style.bg.gui : "NONE") + \ "guisp=" (has_key(a:style, "sp") ? a:style.sp.gui : "NONE") + \ "gui=" (has_key(a:style, "gui") ? a:style.gui : "NONE") + \ "ctermfg=" (has_key(a:style, "fg") ? a:style.fg.cterm : "NONE") + \ "ctermbg=" (has_key(a:style, "bg") ? a:style.bg.cterm : "NONE") + \ "cterm=" (has_key(a:style, "cterm") ? a:style.cterm : "NONE") +endfunction + +call s:h("Normal", {"bg": s:bg, "fg": s:norm}) +call s:h("Cursor", {"bg": s:blue, "fg": s:norm }) +call s:h("Comment", {"fg": s:bg_subtle_comment, "gui": "italic"}) + +"call s:h("Constant", {"fg": s:cyan}) +hi! link Constant Normal +hi! link Character Constant +hi! link Number Constant +hi! link Boolean Constant +hi! link Float Constant +hi! link String Constant + +"call s:h("Identifier", {"fg": s:dark_blue}) +hi! link Identifier Normal +hi! link Function Identifier + +"call s:h("Statement", {"fg": s:green}) +hi! link Statement Normal +hi! link Conditonal Statement +hi! link Repeat Statement +hi! link Label Statement +hi! link Operator Statement +hi! link Keyword Statement +hi! link Exception Statement + +"call s:h("PreProc", {"fg": s:red}) +hi! link PreProc Normal +hi! link Include PreProc +hi! link Define PreProc +hi! link Macro PreProc +hi! link PreCondit PreProc + +"call s:h("Type", {"fg": s:purple}) +hi! link Type Normal +hi! link StorageClass Type +hi! link Structure Type +hi! link Typedef Type + +"call s:h("Special", {"fg": s:pink}) +hi! link Special Normal +hi! link SpecialChar Special +hi! link Tag Special +hi! link Delimiter Special +hi! link SpecialComment Special +hi! link Debug Special + +call s:h("Underlined", {"fg": s:norm, "gui": "underline", "cterm": "underline"}) +call s:h("Ignore", {"fg": s:bg}) +call s:h("Error", {"fg": s:actual_white, "bg": s:red, "cterm": "bold"}) +call s:h("Todo", {"fg": s:actual_white, "bg": s:pink, "gui": "bold", "cterm": "bold"}) +call s:h("SpecialKey", {"fg": s:light_green}) +call s:h("NonText", {"fg": s:medium_gray}) +call s:h("Directory", {"fg": s:dark_blue}) +call s:h("ErrorMsg", {"fg": s:pink}) +call s:h("IncSearch", {"bg": s:yellow, "fg": s:light_black}) +call s:h("Search", {"bg": s:bg_subtle, "fg": s:norm}) +call s:h("MoreMsg", {"fg": s:medium_gray, "cterm": "bold", "gui": "bold"}) +hi! link ModeMsg MoreMsg +call s:h("LineNr", {"fg": s:bg_subtle}) +call s:h("CursorLineNr", {"fg": s:blue, "bg": s:bg_very_subtle}) +call s:h("Question", {"fg": s:red}) +call s:h("StatusLine", {"bg": s:bg_very_subtle}) +call s:h("StatusLineNC", {"bg": s:bg_very_subtle, "fg": s:medium_gray}) +call s:h("VertSplit", {"bg": s:bg_very_subtle, "fg": s:bg_very_subtle}) +call s:h("Title", {"fg": s:dark_blue}) +call s:h("Visual", {"bg": s:visual}) +call s:h("VisualNOS", {"bg": s:bg_subtle}) +call s:h("WarningMsg", {"fg": s:red}) +call s:h("WildMenu", {"fg": s:bg, "bg": s:norm}) +call s:h("Folded", {"fg": s:medium_gray}) +call s:h("FoldColumn", {"fg": s:bg_subtle}) +call s:h("DiffAdd", {"fg": s:green}) +call s:h("DiffDelete", {"fg": s:red}) +call s:h("DiffChange", {"fg": s:dark_yellow}) +call s:h("DiffText", {"fg": s:dark_blue}) +call s:h("SignColumn", {"fg": s:light_green}) + +if has("gui_running") + call s:h("SpellBad", {"gui": "underline", "sp": s:red}) + call s:h("SpellCap", {"gui": "underline", "sp": s:light_green}) + call s:h("SpellRare", {"gui": "underline", "sp": s:pink}) + call s:h("SpellLocal", {"gui": "underline", "sp": s:dark_green}) +else + call s:h("SpellBad", {"cterm": "underline", "fg": s:red}) + call s:h("SpellCap", {"cterm": "underline", "fg": s:light_green}) + call s:h("SpellRare", {"cterm": "underline", "fg": s:pink}) + call s:h("SpellLocal", {"cterm": "underline", "fg": s:dark_green}) +endif + +call s:h("Pmenu", {"fg": s:norm, "bg": s:bg_subtle}) +call s:h("PmenuSel", {"fg": s:norm, "bg": s:blue}) +call s:h("PmenuSbar", {"fg": s:norm, "bg": s:bg_subtle}) +call s:h("PmenuThumb", {"fg": s:norm, "bg": s:bg_subtle}) +call s:h("TabLine", {"fg": s:norm, "bg": s:bg_very_subtle}) +call s:h("TabLineSel", {"fg": s:blue, "bg": s:bg_subtle, "gui": "bold", "cterm": "bold"}) +call s:h("TabLineFill", {"fg": s:norm, "bg": s:bg_very_subtle}) +call s:h("CursorColumn", {"bg": s:bg_very_subtle}) +call s:h("CursorLine", {"fg": s:norm, "bg": s:bg_very_subtle}) +call s:h("ColorColumn", {"bg": s:bg_subtle}) + +call s:h("MatchParen", {"bg": s:bg_subtle, "fg": s:norm}) +call s:h("qfLineNr", {"fg": s:medium_gray}) + +call s:h("htmlH1", {"bg": s:bg, "fg": s:norm}) +call s:h("htmlH2", {"bg": s:bg, "fg": s:norm}) +call s:h("htmlH3", {"bg": s:bg, "fg": s:norm}) +call s:h("htmlH4", {"bg": s:bg, "fg": s:norm}) +call s:h("htmlH5", {"bg": s:bg, "fg": s:norm}) +call s:h("htmlH6", {"bg": s:bg, "fg": s:norm}) + +hi link diffRemoved DiffDelete +hi link diffAdded DiffAdd + +" Signify, git-gutter +hi link SignifySignAdd LineNr +hi link SignifySignDelete LineNr +hi link SignifySignChange LineNr +if colors_off_a_little + hi! GitGutterAdd guifg=#10A778 ctermfg=2 + hi! GitGutterChange guifg=#A89C14 ctermfg=3 + hi! GitGutterDelete guifg=#C30771 ctermfg=1 + hi! GitGutterChangeDelete guifg=#C30771 ctermfg=1 +else + hi link GitGutterAdd LineNr + hi link GitGutterDelete LineNr + hi link GitGutterChange LineNr + hi link GitGutterChangeDelete LineNr +endif + +" Fuzzy Search, Telescope & CtrlP +if colors_off_a_little + hi! CtrlPMatch ctermbg=235 ctermfg=250 guibg=NONE guifg=#5FD7A7 cterm=NONE gui=NONE + hi! TelescopeMatching guifg=#5FD7A7 guibg=#303030 ctermbg=NONE + highlight TelescopeSelection guifg=NONE gui=bold guibg=#303030 +else + hi! CtrlPMatch ctermbg=NONE ctermfg=NONE guibg=NONE guifg=NONE cterm=NONE gui=bold + hi! TelescopeMatching guifg=NONE guibg=NONE ctermbg=NONE + highlight TelescopeSelection guifg=NONE gui=bold guibg=#303030 +endif diff --git a/.vim/bundle/vim-colors/colors/paramount.vim b/.vim/bundle/vim-colors/colors/paramount.vim new file mode 100644 index 0000000..c3e60cc --- /dev/null +++ b/.vim/bundle/vim-colors/colors/paramount.vim @@ -0,0 +1,224 @@ +" Name: paramount.vim +" Version: 0.1.0 +" Maintainer: github.com/owickstrom +" License: The MIT License (MIT) +" +" A minimal colorscheme for Vim that only puts emphasis on the paramount. +" +" Based on the pencil and off colorschemes: +" +" https://github.com/reedes/vim-colors-pencil +" https://github.com/reedes/vim-colors-off +" +""" +hi clear + +if exists('syntax on') + syntax reset +endif + +let g:colors_name='paramount' + +let s:black = { "gui": "#000000", "cterm": "232" } +let s:medium_gray = { "gui": "#767676", "cterm": "243" } +let s:white = { "gui": "#F1F1F1", "cterm": "15" } +let s:actual_white = { "gui": "#FFFFFF", "cterm": "231" } +let s:subtle_black = { "gui": "#303030", "cterm": "236" } +let s:light_black = { "gui": "#262626", "cterm": "235" } +let s:lighter_black = { "gui": "#4E4E4E", "cterm": "239" } +let s:light_gray = { "gui": "#A8A8A8", "cterm": "248" } +let s:lighter_gray = { "gui": "#C6C6C6", "cterm": "251" } +let s:lightest_gray = { "gui": "#EEEEEE", "cterm": "255" } +let s:pink = { "gui": "#fb007a", "cterm": "9" } +let s:dark_red = { "gui": "#C30771", "cterm": "1" } +let s:light_red = { "gui": "#E32791", "cterm": "1" } +let s:orange = { "gui": "#D75F5F", "cterm": "167" } +let s:darker_blue = { "gui": "#005F87", "cterm": "18" } +let s:dark_blue = { "gui": "#008EC4", "cterm": "32" } +let s:blue = { "gui": "#20BBFC", "cterm": "12" } +let s:light_blue = { "gui": "#b6d6fd", "cterm": "153" } +let s:dark_cyan = { "gui": "#20A5BA", "cterm": "6" } +let s:light_cyan = { "gui": "#4FB8CC", "cterm": "14" } +let s:dark_green = { "gui": "#10A778", "cterm": "2" } +let s:light_green = { "gui": "#5FD7A7", "cterm": "10" } +let s:dark_purple = { "gui": "#af5fd7", "cterm": "134" } +let s:light_purple = { "gui": "#a790d5", "cterm": "140" } +let s:yellow = { "gui": "#F3E430", "cterm": "11" } +let s:light_yellow = { "gui": "#ffff87", "cterm": "228" } +let s:dark_yellow = { "gui": "#A89C14", "cterm": "3" } + +let s:background = &background + +if &background == "dark" + let s:bg = s:black + let s:bg_subtle = s:lighter_black + let s:bg_very_subtle = s:subtle_black + let s:norm = s:lighter_gray + let s:norm_subtle = s:medium_gray + let s:purple = s:light_purple + let s:cyan = s:light_cyan + let s:green = s:light_green + let s:red = s:light_red + let s:visual = s:light_purple + let s:yellow = s:light_yellow +else + let s:bg = s:actual_white + let s:bg_subtle = s:light_gray + let s:bg_very_subtle = s:lightest_gray + let s:norm = s:light_black + let s:norm_subtle = s:medium_gray + let s:purple = s:dark_purple + let s:cyan = s:dark_cyan + let s:green = s:dark_green + let s:red = s:dark_red + let s:visual = s:dark_purple + let s:yellow = s:dark_yellow +endif + +" https://github.com/noahfrederick/vim-hemisu/ +function! s:h(group, style) + execute "highlight" a:group + \ "guifg=" (has_key(a:style, "fg") ? a:style.fg.gui : "NONE") + \ "guibg=" (has_key(a:style, "bg") ? a:style.bg.gui : "NONE") + \ "guisp=" (has_key(a:style, "sp") ? a:style.sp.gui : "NONE") + \ "gui=" (has_key(a:style, "gui") ? a:style.gui : "NONE") + \ "ctermfg=" (has_key(a:style, "fg") ? a:style.fg.cterm : "NONE") + \ "ctermbg=" (has_key(a:style, "bg") ? a:style.bg.cterm : "NONE") + \ "cterm=" (has_key(a:style, "cterm") ? a:style.cterm : "NONE") +endfunction + +call s:h("Normal", {"bg": s:bg, "fg": s:norm}) + +" restore &background's value in case changing Normal changed &background (:help :hi-normal-cterm) +if &background != s:background + execute "set background=" . s:background +endif + +call s:h("Cursor", {"bg": s:purple, "fg": s:norm }) +call s:h("Comment", {"fg": s:bg_subtle, "gui": "italic"}) + +call s:h("Constant", {"fg": s:purple}) +hi! link Character Constant +hi! link Number Constant +hi! link Boolean Constant +hi! link Float Constant +hi! link String Constant + +"call s:h("Identifier", {"fg": s:dark_blue}) +hi! link Identifier Normal +hi! link Function Identifier + +call s:h("Statement", {"fg": s:norm_subtle}) +hi! link Conditonal Statement +hi! link Repeat Statement +hi! link Label Statement +hi! link Keyword Statement +hi! link Exception Statement + +call s:h("Operator", {"fg": s:norm, "cterm": "bold", "gui": "bold"}) + +call s:h("PreProc", {"fg": s:norm_subtle}) +hi! link Include PreProc +hi! link Define PreProc +hi! link Macro PreProc +hi! link PreCondit PreProc + +call s:h("Type", {"fg": s:norm}) +hi! link StorageClass Type +hi! link Structure Type +hi! link Typedef Type + +call s:h("Special", {"fg": s:norm_subtle, "gui": "italic"}) +hi! link SpecialChar Special +hi! link Tag Special +hi! link Delimiter Special +hi! link SpecialComment Special +hi! link Debug Special + +call s:h("Underlined", {"fg": s:norm, "gui": "underline", "cterm": "underline"}) +call s:h("Ignore", {"fg": s:bg}) +call s:h("Error", {"fg": s:actual_white, "bg": s:red, "cterm": "bold"}) +call s:h("Todo", {"fg": s:purple, "gui": "underline", "cterm": "underline"}) +call s:h("SpecialKey", {"fg": s:light_green}) +call s:h("NonText", {"fg": s:medium_gray}) +call s:h("Directory", {"fg": s:dark_blue}) +call s:h("ErrorMsg", {"fg": s:red}) +call s:h("IncSearch", {"bg": s:yellow, "fg": s:light_black}) +call s:h("Search", {"bg": s:light_green, "fg": s:light_black}) +call s:h("MoreMsg", {"fg": s:medium_gray, "cterm": "bold", "gui": "bold"}) +hi! link ModeMsg MoreMsg +call s:h("LineNr", {"fg": s:bg_subtle}) +call s:h("CursorLineNr", {"fg": s:purple, "bg": s:bg_very_subtle}) +call s:h("Question", {"fg": s:red}) +call s:h("StatusLine", {"bg": s:bg_very_subtle}) +call s:h("StatusLineNC", {"bg": s:bg_very_subtle, "fg": s:medium_gray}) +call s:h("VertSplit", {"bg": s:bg_very_subtle, "fg": s:bg_very_subtle}) +call s:h("Title", {"fg": s:dark_blue}) +call s:h("Visual", {"fg": s:norm, "bg": s:visual}) +call s:h("VisualNOS", {"bg": s:bg_subtle}) +call s:h("WarningMsg", {"fg": s:yellow}) +call s:h("WildMenu", {"fg": s:bg, "bg": s:norm}) +call s:h("Folded", {"fg": s:medium_gray}) +call s:h("FoldColumn", {"fg": s:bg_subtle}) +call s:h("DiffAdd", {"fg": s:green}) +call s:h("DiffDelete", {"fg": s:red}) +call s:h("DiffChange", {"fg": s:dark_yellow}) +call s:h("DiffText", {"fg": s:dark_blue}) +call s:h("SignColumn", {"fg": s:light_green}) + + +if has("gui_running") + call s:h("SpellBad", {"gui": "underline", "sp": s:red}) + call s:h("SpellCap", {"gui": "underline", "sp": s:light_green}) + call s:h("SpellRare", {"gui": "underline", "sp": s:pink}) + call s:h("SpellLocal", {"gui": "underline", "sp": s:dark_green}) +else + call s:h("SpellBad", {"cterm": "underline", "fg": s:red}) + call s:h("SpellCap", {"cterm": "underline", "fg": s:light_green}) + call s:h("SpellRare", {"cterm": "underline", "fg": s:pink}) + call s:h("SpellLocal", {"cterm": "underline", "fg": s:dark_green}) +endif + +call s:h("Pmenu", {"fg": s:norm, "bg": s:bg_subtle}) +call s:h("PmenuSel", {"fg": s:norm, "bg": s:purple}) +call s:h("PmenuSbar", {"fg": s:norm, "bg": s:bg_subtle}) +call s:h("PmenuThumb", {"fg": s:norm, "bg": s:bg_subtle}) +call s:h("TabLine", {"fg": s:norm, "bg": s:bg_very_subtle}) +call s:h("TabLineSel", {"fg": s:purple, "bg": s:bg_subtle, "gui": "bold", "cterm": "bold"}) +call s:h("TabLineFill", {"fg": s:norm, "bg": s:bg_very_subtle}) +call s:h("CursorColumn", {"bg": s:bg_very_subtle}) +call s:h("CursorLine", {"bg": s:bg_very_subtle}) +call s:h("ColorColumn", {"bg": s:bg_subtle}) + +call s:h("MatchParen", {"bg": s:bg_subtle, "fg": s:norm}) +call s:h("qfLineNr", {"fg": s:medium_gray}) + +call s:h("htmlH1", {"bg": s:bg, "fg": s:norm}) +call s:h("htmlH2", {"bg": s:bg, "fg": s:norm}) +call s:h("htmlH3", {"bg": s:bg, "fg": s:norm}) +call s:h("htmlH4", {"bg": s:bg, "fg": s:norm}) +call s:h("htmlH5", {"bg": s:bg, "fg": s:norm}) +call s:h("htmlH6", {"bg": s:bg, "fg": s:norm}) + +" Synatastic +call s:h("SyntasticWarningSign", {"fg": s:yellow}) +call s:h("SyntasticWarning", {"bg": s:yellow, "fg": s:black, "gui": "bold", "cterm": "bold"}) +call s:h("SyntasticErrorSign", {"fg": s:red}) +call s:h("SyntasticError", {"bg": s:red, "fg": s:white, "gui": "bold", "cterm": "bold"}) + +" Neomake +hi link NeomakeWarningSign SyntasticWarningSign +hi link NeomakeErrorSign SyntasticErrorSign + +" ALE +hi link ALEWarningSign SyntasticWarningSign +hi link ALEErrorSign SyntasticErrorSign + +" Signify, git-gutter +hi link SignifySignAdd LineNr +hi link SignifySignDelete LineNr +hi link SignifySignChange LineNr +hi link GitGutterAdd LineNr +hi link GitGutterDelete LineNr +hi link GitGutterChange LineNr +hi link GitGutterChangeDelete LineNr diff --git a/.vim/bundle/vim-dirdiff/doc/dirdiff.txt b/.vim/bundle/vim-dirdiff/doc/dirdiff.txt new file mode 100644 index 0000000..4f76dda --- /dev/null +++ b/.vim/bundle/vim-dirdiff/doc/dirdiff.txt @@ -0,0 +1,329 @@ +*dirdiff.txt* Diff and merge two directories recursively + +Author: William Lee +License: BSD-like (see |dirdiff-license|) + +INTRODUCTION *dirdiff* *DirDiff* + +This plugin enables you to run vim-diff on two directories recursively. You +can also perform batch or individual merge through a simple interface. + +REQUIREMENTS *dirdiff-requirements* + + - Make sure you have GNU diff in your path on Unix and Windows. I only + tested this on cygwin's version on Windows. If you have a diff that + doesn't support -x or -I flag, do not set variable g:DirDiffExcludes and + g:DirDiffIgnore to "". It should still work. + - On Windows, you need to have "xcopy", "copy", "del" "rd" and "xxd" in your + path. + - On Unix, you need to have "rm", "cp" and "xxd" in your path. + +INSTALLATION *dirdiff-installation* + + With pathogen.vim: + + $ cd ~/.vim/bundle + $ git clone git://github.com/will133/vim-dirdiff + + With vim-plug, put this in your ~/.vimrc: + + Plug 'will133/vim-dirdiff' + + With Vim 8+'s default packaging system, run this: + + $ mkdir -p ~/.vim/pack/bundle/start + $ cd ~/.vim/pack/bundle/start + $ git clone git://github.com/will133/vim-dirdiff + + +USAGE *dirdiff-usage* *:DirDiff* + > + :DirDiff +< + +For example: + > + :DirDiff ../something/dir1 /usr/bin/somethingelse/dir2 +< + +MAPS *dirdiff-maps* + +The following commands can be used inside the diff window: + + *dirdiff-enter* *dirdiff-o* +, Diff open: open the diff file(s) where your cursor is + at + + *dirdiff-s* + Synchronize the current diff. You can also select a + range (through visual) and press 's' to synchronize + differences across a range. + + There are 6 Options you can choose when you hit : + + 1. A -> B + Copy A to overwrite B + If A's file actually points to a directory, it'll + copy it to B recursively. + 2. B -> A + Copy B to overwrite A + If B's file actually points to a directory, it'll + copy it to A recursively. + 3. Always A + For the rest of the items that you've selected, + synchronize like (1). + 4. Always B + For the rest of the items that you've selected, + synchronize like (2). + 5. Skip + Skip this diff entry. + 6. Cancel + Quit the loop and exit. + + *dirdiff-u* + Diff update: update the diff window + + *dirdiff-x* + Sets the exclude pattern, separated by ',' + + *dirdiff-i* + Sets the ignore pattern, separated by ',' + + *dirdiff-a* + Sets additional arguments for diff, eg. -w to ignore + white space, etc. + + *dirdiff-h* + Toggle xxd hex mode on or off. + + *dirdiff-w* + Toggle wrap and nowrap mode + + Quit DirDiff + +The following comamnds can be used in the Vim diff mode if this is global flag +is set to 1 (default to 0): > + + let g:DirDiffEnableMappings = 1 +< + +Note: by default these would not be added, unlike previous version. It is +preferable to not change people's mappings by default. These mappings can be +overriden by their corresponding variables added to .vimrc. + + *dirdiff-leader-dg* +dg Diff get: maps to :diffget +> + let g:DirDiffGetKeyMap = 'dg' +< + *dirdiff-leader-dp* +dp Diff put: maps to :diffput +> + let g:DirDiffPutKeyMap = 'dp' +< + *dirdiff-leader-dj* +dj Diff next: (think j for down) +> + let g:DirDiffNextKeyMap = 'dj' +< + + *dirdiff-leader-dk* +dk Diff previous: (think k for up) +> + let g:DirDiffPrevKeyMap = 'dk' +< + + +OPTIONS *dirdiff-options* + +You can add the following "let" lines in your .vimrc file in order to customize +the plugin's behavior. + +Enable additional mappings in diff mode (set to 1 to enable mappings). +Default to do nothing: > + + let g:DirDiffEnableMappings = 0 +< +Ignore FileName case during diff: > + + let g:DirDiffIgnoreFileNameCase = 0 + +Sets default exclude pattern: > + + let g:DirDiffExcludes = "CVS,*.class,*.exe,.*.swp" + +Sets default ignore pattern: > + + let g:DirDiffIgnore = "Id:,Revision:,Date:" + +If DirDiffSort is set to 1, sorts the diff lines: > + + let g:DirDiffSort = 1 + +Sets the diff window (bottom window) height (rows): > + + let g:DirDiffWindowSize = 14 + +Ignore case during diff: > + + let g:DirDiffIgnoreCase = 0 + +Force setting the LANG variable before running DirDiff: > + + let g:DirDiffForceLang = "C" + +You can set g:DirDiffForceLang to "" in turn this off (the system's LANG would +be used in such case). You may need to customize the following variables so +DirDiff can match the correct text in your locale. + +Force the diff execution shell: > + + let g:DirDiffForceShell = "C" + +If empty, the default shell would not be changed before running the diff +command. If not, then the shell would be set to this before running the diff +command (and restored after the execuation). This is useful for people who +are using shells that are not compatible. If you are getting a message saying +that there's no diff for some shell, you may want to set this to "sh". + +Dynamically figure out the diff text. If you are using and i18n version of +diff, this will try to get the specific diff text during runtime. It's turned +off by default. If you are always targetting a specific version of diff, you +can turn this off and set the DirDiffText* variables accordingly: > + + let g:DirDiffDynamicDiffText = 0 + +String used for the English equivalent "Files ": > + + let g:DirDiffTextFiles = "Files " + +String used for the English equivalent " and ": > + + let g:DirDiffTextAnd = " and " + +String used for the English equivalent " differ"): > + + let g:DirDiffTextDiffer = " differ" + +String used for the English equivalent "Only in "): > + + let g:DirDiffTextOnlyIn = "Only in " + +To specify a valid theme (e.g. github): > + + let g:DirDiffTheme = "github" + +To use [ and ] rather than [c and ]c motions: > + + let g:DirDiffSimpleMap = 1 + +Add extra options to the "diff" tool. For example, use "-w" to ignore white +spaces or "-N" to list all new files even when inside a new folder (instead of +just listing the new folder name) + + let g:DirDiffAddArgs = "-w" + +OPTIONS EXAMPLE *dirdiff-options-example* + +This is an example for setting DirDiffExcludes and DirDiffIgnore in addition +to enabling the plugin's mappings. Note that patterns are separated with +commas and no spaces. + +For example, you can set these in your .vimrc file: > + + let g:DirDiffExcludes = "CVS,*.class,*.o" + let g:DirDiffIgnore = "Id:" + " ignore white space in diff + let g:DirDiffAddArgs = "-w" + let g:DirDiffEnableMappings = 1 +< + +WARNING *dirdiff-warning* + +This script can copy and remove your files. This can be powerful (or too +powerful) at times. Please be careful and use version control! + +LICENSE *dirdiff-license* + +Copyright (c) 2001-2015 William Lee. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * 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. + * Neither the name William Lee nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED "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 +WILLIAM LEE AND 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. + +THANKS *dirdiff-thanks* + + Florian Delizy for the i18n diff patch + Robert Webb for his sorting function + Wu WeiWei for his Chinese diff patch + Salman Halim, Yosuke Kimura, and others for their suggestions + +HISTORY *dirdiff-history* + +1.1.7 - Added support for "hex mode" and "wrap mode" +1.1.6 - Fixed problem with vim 8.2 where the :drop would not work with + wildignore. Added option to set shell. +1.1.5 - Fixed split windows problems caused by some .vimrc settings. +1.1.4 - Fixed split windows problems caused by some .vimrc settings. +1.1.3 - Applied the patch to 1.1.2 by Wu WeiWei in order to make diff + that's localized in Chinese work. +1.1.2 - Applied the patch to 1.1.0 instead of 1.0.2. Please do not use + 1.1.1 +1.1.1 - Make it work with filename with spaces. (Thanks to Atte Kojo) +1.1.0 - Added support for i18n (tested on a French version for now only). + Can dynamically figure out the diff strings output by diff. +1.0.2 - Fixed a small typo bug in the quit function. +1.0.1 - Ensure the path separator is correct when running in W2K +1.0 - Fixed a bug that flags errors if the user use the nowrapscan option. + Implements a quit function that exit the diff windows. +0.94 - Fixed a bug where the diff will give incorrect A and B file due to + similarity of directory names. Allow you to modify the diff + argument. +0.93 - Opps, messed up the key mapping usage. +0.92 - Doesn't use n and p mappings since it confuses the search next key + mapping and causes some bugs. Minor modification to change the + exclude and ignore pattern. +0.91 - Clean up delete routine. + - Added interactive mode. + - Added multiple entries of exclude and ignore pattern. + - Custom configuration through global variables. + - Change exclude and ignore patterns on the fly. + +0.9 - Reorganization of the interface. Much simplier dialog for + synchronization. Support for range synchronization option (REALLY + powerful) + - Removed unnecessary key bindings. All key bindings are local to + the diff window. (except for the \dg and \dp) + +0.8 - Added syntax highlighting. + - Enter and double-click in buffer opens diff. + - Removed dependency on "sort" + - Removed usage of registry and marker + - Code cleanup and some bug fixes + - On Windows the diff command will use the -i flag instead + - Changed mappings for diff next (\dj) and diff previous (\dk) + - Added mappings for vim diff mode (\dg, \dp) + +0.7 Initial Release + + vim:tw=78:et:ft=help:norl: diff --git a/.vim/bundle/vim-dirdiff/doc/tags b/.vim/bundle/vim-dirdiff/doc/tags new file mode 100644 index 0000000..691c650 --- /dev/null +++ b/.vim/bundle/vim-dirdiff/doc/tags @@ -0,0 +1,27 @@ +:DirDiff dirdiff.txt /*:DirDiff* +DirDiff dirdiff.txt /*DirDiff* +dirdiff dirdiff.txt /*dirdiff* +dirdiff-a dirdiff.txt /*dirdiff-a* +dirdiff-enter dirdiff.txt /*dirdiff-enter* +dirdiff-h dirdiff.txt /*dirdiff-h* +dirdiff-history dirdiff.txt /*dirdiff-history* +dirdiff-i dirdiff.txt /*dirdiff-i* +dirdiff-installation dirdiff.txt /*dirdiff-installation* +dirdiff-leader-dg dirdiff.txt /*dirdiff-leader-dg* +dirdiff-leader-dj dirdiff.txt /*dirdiff-leader-dj* +dirdiff-leader-dk dirdiff.txt /*dirdiff-leader-dk* +dirdiff-leader-dp dirdiff.txt /*dirdiff-leader-dp* +dirdiff-license dirdiff.txt /*dirdiff-license* +dirdiff-maps dirdiff.txt /*dirdiff-maps* +dirdiff-o dirdiff.txt /*dirdiff-o* +dirdiff-options dirdiff.txt /*dirdiff-options* +dirdiff-options-example dirdiff.txt /*dirdiff-options-example* +dirdiff-requirements dirdiff.txt /*dirdiff-requirements* +dirdiff-s dirdiff.txt /*dirdiff-s* +dirdiff-thanks dirdiff.txt /*dirdiff-thanks* +dirdiff-u dirdiff.txt /*dirdiff-u* +dirdiff-usage dirdiff.txt /*dirdiff-usage* +dirdiff-w dirdiff.txt /*dirdiff-w* +dirdiff-warning dirdiff.txt /*dirdiff-warning* +dirdiff-x dirdiff.txt /*dirdiff-x* +dirdiff.txt dirdiff.txt /*dirdiff.txt* diff --git a/.vim/bundle/vim-dirdiff/plugin/dirdiff.vim b/.vim/bundle/vim-dirdiff/plugin/dirdiff.vim new file mode 100644 index 0000000..2389f7a --- /dev/null +++ b/.vim/bundle/vim-dirdiff/plugin/dirdiff.vim @@ -0,0 +1,1091 @@ +" -*- vim -*- +" (C) 2001-2020 by William Lee, +" }}} + +if exists('g:loaded_dirdiff') + finish +endif +let g:loaded_dirdiff = 1 + +" Public Interface: +command! -nargs=* -complete=dir DirDiff call DirDiff () +command! -nargs=0 DirDiffOpen call DirDiffOpen () +command! -nargs=0 DirDiffNext call DirDiffNext () +command! -nargs=0 DirDiffPrev call DirDiffPrev () +command! -nargs=0 DirDiffUpdate call DirDiffUpdate () +command! -nargs=0 DirDiffQuit call DirDiffQuit () + +" The following comamnds can be used in the Vim diff mode: +" +" \dg - Diff get: maps to :diffget +" \dp - Diff put: maps to :diffput +" \dj - Diff next: (think j for down) +" \dk - Diff previous: (think k for up) + +if get(g:, 'DirDiffEnableMappings', 0) + silent! exe 'nnoremap ' . get(g:, 'DirDiffGetKeyMap', 'dg') . ' :diffget' + silent! exe 'nnoremap ' . get(g:, 'DirDiffPutKeyMap', 'dp') . ' :diffput' + silent! exe 'nnoremap ' . get(g:, 'DirDiffNextKeyMap', 'dj') . ' :DirDiffNext' + silent! exe 'nnoremap ' . get(g:, 'DirDiffPrevKeyMap', 'dk') . ' :DirDiffPrev' +endif + +" Global Maps: + +" Default Variables. You can override these in your global variables +" settings. +" +" For DirDiffExcludes and DirDiffIgnore, separate different patterns with a +" ',' (comma and no space!). +" +" eg. in your .vimrc file: let g:DirDiffExcludes = "CVS,*.class,*.o" +" let g:DirDiffIgnore = "Id:" +" " ignore white space in diff +" let g:DirDiffAddArgs = "-w" +" +" You can set the pattern that diff excludes. Defaults to the CVS directory +if !exists("g:DirDiffExcludes") + let g:DirDiffExcludes = "" +endif +" This is the -I argument of the diff, ignore the lines of differences that +" matches the pattern +if !exists("g:DirDiffIgnore") + let g:DirDiffIgnore = "" +endif +if !exists("g:DirDiffSort") + let g:DirDiffSort = 1 +endif +if !exists("g:DirDiffWindowSize") + let g:DirDiffWindowSize = 14 +endif +if !exists("g:DirDiffInteractive") + let g:DirDiffInteractive = 0 +endif +if !exists("g:DirDiffIgnoreCase") + let g:DirDiffIgnoreCase = 0 +endif +if !exists("g:DirDiffTheme") + let g:DirDiffTheme = "" +endif +if !exists("g:DirDiffSimpleMap") + let g:DirDiffSimpleMap = 0 +endif +" Additional arguments +if !exists("g:DirDiffAddArgs") + let g:DirDiffAddArgs = "" +endif +" Support for i18n (dynamically figure out the diff text) +" Defaults to off +if !exists("g:DirDiffDynamicDiffText") + let g:DirDiffDynamicDiffText = 0 +endif + +if !exists("g:DirDiffIgnoreFileNameCase") + let g:DirDiffIgnoreFileNameCase = 0 +endif + +" Force set the LANG variable before running the C command. Default to C. +" Set to "" to not set the variable. +if !exists("g:DirDiffForceLang") + let g:DirDiffForceLang = "C" +endif + +" Force the shell to run the diff command to be this. If set to an empty +" string, the shell would not be changed. +if !exists("g:DirDiffForceShell") + let g:DirDiffForceShell = "" +endif + +let g:DirDiffLangString = "" +if (g:DirDiffForceLang != "") + if has('win32') && !has('win32unix') + let g:DirDiffLangString = 'SET LANG=' . g:DirDiffForceLang . ' && ' + else + let g:DirDiffLangString = 'LANG=' . g:DirDiffForceLang . ' ' + endif +endif + +" String used for the English equivalent "Files " +if !exists("g:DirDiffTextFiles") + let g:DirDiffTextFiles = "Files " +endif + +" String used for the English equivalent " and " +if !exists("g:DirDiffTextAnd") + let g:DirDiffTextAnd = " and " +endif + +" String used for the English equivalent " differ") +if !exists("g:DirDiffTextDiffer") + let g:DirDiffTextDiffer = " differ" +endif + +" String used for the English equivalent "Only in ") +if !exists("g:DirDiffTextOnlyIn") + let g:DirDiffTextOnlyIn = "Only in " +endif + +" String used for the English equivalent ": ") +if !exists("g:DirDiffTextOnlyInCenter") + let g:DirDiffTextOnlyInCenter = ": " +endif + +" Set some script specific variables: +" +let s:DirDiffFirstDiffLine = 6 +let s:DirDiffALine = 1 +let s:DirDiffBLine = 2 + +" -- Variables used in various utilities +if has("unix") + let s:DirDiffCopyCmd = "cp" + let s:DirDiffCopyFlags = "" + let s:DirDiffCopyDirCmd = "cp" + let s:DirDiffCopyDirFlags = "-rf" + let s:DirDiffCopyInteractiveFlag = "-i" + + let s:DirDiffDeleteCmd = "rm" + let s:DirDiffDeleteFlags = "" + let s:DirDiffDeleteInteractiveFlag = "-i" + + let s:DirDiffDeleteDirCmd = "rm" + let s:DirDiffDeleteDirFlags = "-rf" + + let s:sep = "/" + + let s:DirDiffMakeDirCmd = "!mkdir " + +elseif has("win32") + let s:DirDiffCopyCmd = "copy" + let s:DirDiffCopyFlags = "" + let s:DirDiffCopyDirCmd = "xcopy" + let s:DirDiffCopyDirFlags = "/e /i /q" + let s:DirDiffCopyInteractiveFlag = "/-y" + + let s:DirDiffDeleteCmd = "del" + let s:DirDiffDeleteFlags = "/s /q" + let s:DirDiffDeleteInteractiveFlag = "/p" + " Windows is somewhat stupid since "del" can only remove the files, not + " the directory. The command "rd" would remove files recursively, but it + " doesn't really work on a file (!). where is the deltree command??? + + let s:DirDiffDeleteDirCmd = "rd" + " rd is by default prompting, we need to handle this in a different way + let s:DirDiffDeleteDirFlags = "/s" + let s:DirDiffDeleteDirQuietFlag = "/q" + + let s:sep = "\\" + + let s:DirDiffMakeDirCmd = "!mkdir " +else + " Platforms not supported + let s:DirDiffCopyCmd = "" + let s:DirDiffCopyFlags = "" + let s:DirDiffDeleteCmd = "" + let s:DirDiffDeleteFlags = "" + let s:sep = "" +endif + + +function! DirDiff(srcA, srcB) + " Setup + let DirDiffAbsSrcA = fnamemodify(expand(a:srcA, ":p"), ":p") + let DirDiffAbsSrcB = fnamemodify(expand(a:srcB, ":p"), ":p") + " Check for an internationalized version of diff ? + call GetDiffStrings() + + " Remove the trailing \ or / + let DirDiffAbsSrcA = substitute(DirDiffAbsSrcA, '\\$\|/$', '', '') + let DirDiffAbsSrcB = substitute(DirDiffAbsSrcB, '\\$\|/$', '', '') + + let s:FilenameDiffWindow = tempname() + " We first write to that file + " Constructs the command line + let langStr = "" + let cmd = "!" . g:DirDiffLangString . "diff" + let cmdarg = " -r --brief" + + if (g:DirDiffIgnoreFileNameCase) + let cmdarg = cmdarg." --ignore-file-name-case" + endif + + " If variable is set, we ignore the case + if (g:DirDiffIgnoreCase) + let cmdarg = cmdarg." -i" + endif + if (g:DirDiffAddArgs != "") + let cmdarg = cmdarg." ".g:DirDiffAddArgs." " + endif + if (g:DirDiffExcludes != "") + let cmdarg = cmdarg.' -x"'.substitute(g:DirDiffExcludes, ',', '" -x"', 'g').'"' + endif + if (g:DirDiffIgnore != "") + let cmdarg = cmdarg.' -I"'.substitute(g:DirDiffIgnore, ',', '" -I"', 'g').'"' + endif + " Prompt the user for additional arguments +" let addarg = input("Additional diff args (current =". cmdarg. "): ") + let addarg = "" + let cmd = cmd.cmdarg." ".addarg." \"".DirDiffAbsSrcA."\" \"".DirDiffAbsSrcB."\"" + let cmd = cmd." > \"".s:FilenameDiffWindow."\"" + + echo "Diffing directories, it may take a while..." + let error = DirDiffExec(cmd, 0) + if (error == 0) + redraw | echom "diff found no differences - directories match." + return + endif + silent exe "edit ".s:FilenameDiffWindow + echo "Defining [A] and [B] ... " + " We then do a substitution on the directory path + " We need to do substitution of the the LONGER string first, otherwise + " it'll mix up the A and B directory + if (strlen(DirDiffAbsSrcA) > strlen(DirDiffAbsSrcB)) + silent! exe "%s/".EscapeDirForRegex(DirDiffAbsSrcA)."/[A]/" + silent! exe "%s/".EscapeDirForRegex(DirDiffAbsSrcB)."/[B]/" + else + silent! exe "%s/".EscapeDirForRegex(DirDiffAbsSrcB)."/[B]/" + silent! exe "%s/".EscapeDirForRegex(DirDiffAbsSrcA)."/[A]/" + endif + " In windows, diff behaves somewhat weirdly, for the appened path it'll + " use "/" instead of "\". Convert this to \ + if (has("win32")) + silent! %s/\//\\/g + endif + + echo "Sorting entries ..." + " We then sort the lines if the option is set + if (g:DirDiffSort == 1) + 1,$call Sort("s:Strcmp") + endif + + " Put in spacer in front of each line + silent! %s/^/ / + + " We then put the file [A] and [B] on top of the diff lines + call append(0, "[A]=". DirDiffAbsSrcA) + call append(1, "[B]=". DirDiffAbsSrcB) + if get(g:, 'DirDiffEnableMappings', 0) + call append(2, "Usage: /'o'=open,'s'=sync,'dg'=diffget,'dp'=diffput,'dj'=next,'dk'=prev, 'q'=quit") + else + call append(2, "Usage: /'o'=open,'s'=sync,'q'=quit") + endif + call append(3, "Options: 'u'=update,'x'=set excludes,'i'=set ignore,'a'=set args, 'h'=hex mode, 'w'=wrap mode") + call append(4, "Diff Args:" . cmdarg) + call append(5, "") + " go to the beginning of the file + 0 + setlocal filetype=dirdiff + setlocal nomodified + setlocal nomodifiable + setlocal buftype=nowrite + "setlocal buftype=nofile + "setlocal bufhidden=delete + setlocal bufhidden=hide + setlocal nowrap + + " Set up local key bindings + " 'n' actually messes with the search next pattern, I think using \dj and + " \dk is enough. Otherwise, use j,k, and enter. +" nnoremap n :call DirDiffNext() +" nnoremap p :call DirDiffPrev() + nnoremap s :. call DirDiffSync() + vnoremap s :call DirDiffSync() + nnoremap u :call DirDiffUpdate() + nnoremap x :call ChangeExcludes() + nnoremap a :call ChangeArguments() + nnoremap i :call ChangeIgnore() + nnoremap h :call DirDiffHexmode() + nnoremap w :call DirDiffWrapmode() + nnoremap q :call DirDiffQuit() + + nnoremap o :call DirDiffOpen() + nnoremap :call DirDiffOpen() + nnoremap <2-Leftmouse> :call DirDiffOpen() + call SetupSyntax() + + " Open the first diff + call DirDiffNext() +endfunction + +" Set up syntax highlighing for the diff window +"function! SetupSyntax() +function! SetupSyntax() + if has("syntax") && exists("g:syntax_on") + "&& !has("syntax_items") + syn match DirDiffSrcA "\[A\]" + syn match DirDiffSrcB "\[B\]" + syn match DirDiffUsage "^Usage.*" + syn match DirDiffOptions "^Options.*" + " exec 'syn match DirDiffFiles "' . s:DirDiffDifferLine .'"' + " exec 'syn match DirDiffOnly "' . s:DirDiffDiffOnlyLine . '"' + syn match DirDiffSelected "^==>.*" contains=DirDiffSrcA,DirDiffSrcB + + hi def link DirDiffSrcA Directory + hi def link DirDiffSrcB Type + hi def link DirDiffUsage Special + hi def link DirDiffOptions Special + hi def link DirDiffFiles String + hi def link DirDiffOnly PreProc + hi def link DirDiffSelected DiffChange + endif +endfunction + +" You should call this within the diff window +function! DirDiffUpdate() + let dirA = GetBaseDir("A") + let dirB = GetBaseDir("B") + call DirDiff(dirA, dirB) +endfun + +" Quit the DirDiff mode +function! DirDiffQuit() + let in = confirm ("Are you sure you want to quit DirDiff?", "&Yes\n&No", 2) + if (in == 1) + call SaveDiffWindowsIfModified() + bd! + endif + unlet! s:FilenameDiffWindow + unlet! s:FilenameA + unlet! s:FilenameB + unlet! s:LastMode +endfun + +" Returns an escaped version of the path for regex uses +function! EscapeDirForRegex(path) + " This list is probably not complete, modify later + return escape(a:path, "/\\[]$^~") +endfunction + +" Closes a specified window +function! AskToSaveFileIfModified(file) + let bufNum = bufnr(a:file) + if !bufexists(bufNum) + return + endif + + call SaveIfModified(bufNum) +endfunction + +" Close the opened diff comparison windows if they exist +function! SaveDiffWindowsIfModified() + if exists("s:FilenameA") + call AskToSaveFileIfModified(s:FilenameA) + endif + if exists("s:FilenameA") + call AskToSaveFileIfModified(s:FilenameB) + endif +endfunction + +" Toggle hexmode from http://vim.wikia.com/wiki/Hex +function ToggleHex() + " hex mode should be considered a read-only operation + " save values for modified and read-only for restoration later, + " and clear the read-only flag for now + let l:modified=&mod + let l:oldreadonly=&readonly + let &readonly=0 + let l:oldmodifiable=&modifiable + let &modifiable=1 + if !exists("b:editHex") || !b:editHex + " save old options + let b:oldft=&ft + let b:oldbin=&bin + " set new options + setlocal binary " make sure it overrides any textwidth, etc. + let &ft="xxd" + " set status + let b:editHex=1 + " switch to hex editor + silent %!xxd + else + " restore old options + let &ft=b:oldft + if !b:oldbin + setlocal nobinary + endif + " set status + let b:editHex=0 + " return to normal editing + silent %!xxd -r + endif + " restore values for modified and read only state + let &mod=l:modified + let &readonly=l:oldreadonly + let &modifiable=l:oldmodifiable +endfunction + +function! DirDiffHexmode() + wincmd k + call ToggleHex() + wincmd l + call ToggleHex() + " Go back to the diff window + wincmd j +endfunction + +function! DirDiffWrapmode() + wincmd k + setlocal wrap! + wincmd l + setlocal wrap! + " Go back to the diff window + wincmd j +endfunction + +function! EscapeFileName(path) + if (v:version >= 702) + return fnameescape(a:path) + else + " This is not a complete list of escaped character, so it's + " not as sophisicated as the fnameescape, but this should + " cover most of the cases and should work for Vim version < + " 7.2 + return escape(a:path, " \t\n*?[{`$\\%#'\"|!<") + endif +endfunction + +function! EchoErr(varName, varValue) + echoe '' . a:varName . ' : ' . a:varValue +endfunction + +function! Drop(fname) + " We need to replace the :drop implementation due to this issue: + " https://github.com/vim/vim/issues/1503. Thus if wideignore is set the + " command would no work. This is intended to work around that issue + let winid = bufwinid(a:fname) + if winid > 0 + call win_gotoid(winid) + else + exe 'edit ' a:fname + endif +endfunction + +function! GotoDiffWindow() + call Drop(s:FilenameDiffWindow) +endfunction + +function! DirDiffOpen() + " Ensure we're in the right window + call GotoDiffWindow() + if exists("b:currentDiff") && b:currentDiff == line(".") + return + endif + + " First dehighlight the last marked line + call DeHighlightLine() + + " Close existing diff windows + call SaveDiffWindowsIfModified() + + " Change back to the right window + call GotoDiffWindow() + + let line = getline(".") + let b:currentDiff = line(".") + + let previousFileA = exists("s:FilenameA") ? s:FilenameA : "" + let previousFileB = exists("s:FilenameB") ? s:FilenameB : "" + + " Parse the line and see whether it's a "Only in" or "Files Differ" + call HighlightLine() + let fileA = GetFileNameFromLine("A", line) + let fileB = GetFileNameFromLine("B", line) + let s:FilenameA = EscapeFileName(fileA) + let s:FilenameB = EscapeFileName(fileB) + + if IsOnly(line) + " We open the file + let fileSrc = ParseOnlySrc(line) + if (fileSrc == "A") + let fileToOpen = s:FilenameA + elseif (fileSrc == "B") + let fileToOpen = s:FilenameB + endif + + if exists("s:LastMode") + if s:LastMode == 2 + silent exec "bd ".bufnr(previousFileA) + + call Drop(previousFileB) + silent exec "edit ".fileToOpen + else + let previousFile = (s:LastMode == "A") ? previousFileA : previousFileB + call Drop(previousFile) + silent exec "edit ".fileToOpen + silent exec "bd ".bufnr(previousFile) + endif + else + silent exec "split ".fileToOpen + endif + + " Fool the window saying that this is diff + diffthis + call GotoDiffWindow() + " Resize the window + exe("resize " . g:DirDiffWindowSize) + exe (b:currentDiff) + let s:LastMode = fileSrc + elseif IsDiffer(line) + + if exists("s:LastMode") + if s:LastMode == 2 + call Drop(previousFileA) + silent exec "edit ".s:FilenameA + diffthis + silent exec "bd ".bufnr(previousFileA) + + call Drop(previousFileB) + silent exec "edit ".s:FilenameB + diffthis + silent exec "bd ".bufnr(previousFileB) + else + let previousFile = (s:LastMode == "A") ? previousFileA : previousFileB + call Drop(previousFile) + silent exec "edit ".s:FilenameB + silent exec "bd ".bufnr(previousFile) + diffthis + + " To ensure that A is on the left and B on the right, splitright must be off + silent exec "leftabove vert diffsplit ".s:FilenameA + endif + else + "Open the diff windows + silent exec "split ".s:FilenameB + + " To ensure that A is on the left and B on the right, splitright must be off + silent exec "leftabove vert diffsplit ".s:FilenameA + endif + + " Go back to the diff window + call GotoDiffWindow() + " Resize the window + exe("resize " . g:DirDiffWindowSize) + exe (b:currentDiff) + " Center the line + exe ("normal z.") + let s:LastMode = 2 + else + echo "There is no diff at the current line!" + endif +endfunction + +" Ask the user to save if the buffer is modified +" +function! SaveIfModified(bufNum) + if &autowriteall + return + endif + + if (getbufvar(a:bufNum, "&modified")) + let name = bufname(a:bufNum) + let fullName = fnamemodify(name, ":p") + let input = confirm("File " . fullName . " has been modified.", "&Save\nCa&ncel", 1) + if (input == 1) + cal Drop(name) + exec "w! ".name + endif + endif +endfunction + +" Highlights the selected line in the diff window +" +function! HighlightLine() + let savedLine = line(".") + exe (b:currentDiff) + setlocal modifiable + let line = getline(".") + if (match(line, "^ ") == 0) + let line = substitute(line, "^ ", "==> ", "") + call setline(savedLine, line) + endif + setlocal nomodifiable + setlocal nomodified + exe (savedLine) + " This is necessary since the modified file would make the syntax + " disappear. + call SetupSyntax() + redraw +endfunction + +" Removes the highlight from the selected line in the diff window +" +function! DeHighlightLine() + let savedLine = line(".") + exe (b:currentDiff) + let line = getline(".") + setlocal modifiable + if (match(line, "^==> ") == 0) + let line = substitute(line, "^==> ", " ", "") + call setline(line("."), line) + endif + setlocal nomodifiable + setlocal nomodified + exe (savedLine) + redraw +endfunction + +" Returns the directory for buffer "A" or "B". You need to be in the diff +" buffer though. +function! GetBaseDir(diffName) + let currLine = line(".") + if (a:diffName == "A") + let baseLine = s:DirDiffALine + else + let baseLine = s:DirDiffBLine + endif + let regex = '\['.a:diffName.'\]=\(.*\)' + let line = getline(baseLine) + let rtn = substitute(line, regex , '\1', '') + return rtn +endfunction + +function! DirDiffNext() + " If the current window is a diff, go down one + call GotoDiffWindow() + " if the current line is <= 6, (within the header range), we go to the + " first diff line open it + if (line(".") < s:DirDiffFirstDiffLine) + exe (s:DirDiffFirstDiffLine) + let b:currentDiff = line(".") + endif + silent! exe (b:currentDiff + 1) + call DirDiffOpen() +endfunction + +function! DirDiffPrev() + " If the current window is a diff, go down one + call GotoDiffWindow() + silent! exe (b:currentDiff - 1) + call DirDiffOpen() +endfunction + +" For each line, we can perform a recursive copy or delete to sync up the +" difference. Returns non-zero if the operation is NOT successful, returns 0 +" if everything is fine. +" +function! DirDiffSyncHelper(AB, line) + let fileA = GetFileNameFromLine("A", a:line) + let fileB = GetFileNameFromLine("B", a:line) +" echo "Helper line is ". a:line. " fileA " . fileA . " fileB " . fileB + if IsOnly(a:line) + " If a:AB is "A" and the ParseOnlySrc returns "A", that means we need to + " copy + let fileSrc = ParseOnlySrc(a:line) + let operation = "" + if (a:AB == "A" && fileSrc == "A") + let operation = "Copy" + " Use A, and A has source, thus copy the file from A to B + let fileFrom = fileA + let fileTo = fileB + elseif (a:AB == "A" && fileSrc == "B") + let operation = "Delete" + " Use A, but B has source, thus delete the file from B + let fileFrom = fileB + let fileTo = fileA + elseif (a:AB == "B" && fileSrc == "A") + let operation = "Delete" + " Use B, but the source file is A, thus removing A + let fileFrom = fileA + let fileTo = fileB + elseif (a:AB == "B" && fileSrc == "B") + " Use B, and B has the source file, thus copy B to A + let operation = "Copy" + let fileFrom = fileB + let fileTo = fileA + endif + elseif IsDiffer(a:line) + " Copy no matter what + let operation = "Copy" + if (a:AB == "A") + let fileFrom = fileA + let fileTo = fileB + elseif (a:AB == "B") + let fileFrom = fileB + let fileTo = fileA + endif + else + echo "There is no diff here!" + " Error + return 1 + endif + if (operation == "Copy") + let rtnCode = Copy(fileFrom, fileTo) + elseif (operation == "Delete") + let rtnCode = Delete(fileFrom) + endif + return rtnCode +endfunction + +" Synchronize the range +function! DirDiffSync() range + let answer = 1 + let silence = 0 + let syncMaster = "A" + let currLine = a:firstline + let lastLine = a:lastline + let syncCount = 0 + + while ((currLine <= lastLine)) + " Update the highlight + call DeHighlightLine() + let b:currentDiff = currLine + call HighlightLine() + let line = getline(currLine) + if (!silence) + let answer = confirm(substitute(line, "^....", '', ''). "\nSynchronization option:" , "&A -> B\n&B -> A\nA&lways A\nAl&ways B\n&Skip\nCa&ncel", 6) + if (answer == 1 || answer == 3) + let syncMaster = "A" + endif + if (answer == 2 || answer == 4) + let syncMaster = "B" + endif + if (answer == 3 || answer == 4) + let silence = 1 + endif + if (answer == 5) + let currLine = currLine + 1 + continue + endif + if (answer == 6) + break + endif + endif + +" call DeHighlightLine() + let rtnCode = DirDiffSyncHelper(syncMaster, line) + if (rtnCode == 0) + " Successful + let syncCount = syncCount + 1 + " Assume that the line is synchronized, we delete the entry + setlocal modifiable + exe (currLine.",".currLine." delete") + setlocal nomodifiable + setlocal nomodified + let lastLine = lastLine - 1 + else + " Failed! + let currLine = currLine + 1 + endif + endwhile + redraw! + echo syncCount . " diff item(s) synchronized." +endfunction + +" Return file "A" or "B" depending on the line given. If it's a Only line, +" either A or B does not exist, but the according value would be returned. +function! GetFileNameFromLine(AB, line) + " Determine where the source of the copy is. + let dirA = GetBaseDir("A") + let dirB = GetBaseDir("B") + + let fileToProcess = "" + + if IsOnly(a:line) + let fileToProcess = ParseOnlyFile(a:line) + elseif IsDiffer(a:line) + let regex = '^.*' . s:DirDiffDifferLine . '\[A\]\(.*\)' . s:DirDiffDifferAndLine . '\[B\]\(.*\)' . s:DirDiffDifferEndLine . '.*$' + let fileToProcess = substitute(a:line, regex, '\1', '') + else + endif + + "echo "line : " . a:line. "AB = " . a:AB . " File to Process " . fileToProcess + if (a:AB == "A") + return dirA . fileToProcess + elseif (a:AB == "B") + return dirB . fileToProcess + else + return "" + endif +endfunction + +"Returns the source (A or B) of the "Only" line +function! ParseOnlySrc(line) + return substitute(a:line, '^.*' . s:DirDiffDiffOnlyLine . '\[\(.\)\].*' . s:DirDiffDiffOnlyLineCenter . '.*', '\1', '') +endfunction + +function! ParseOnlyFile(line) + let regex = '^.*' . s:DirDiffDiffOnlyLine . '\[.\]\(.*\)' . s:DirDiffDiffOnlyLineCenter . '\(.*\)' + let root = substitute(a:line, regex , '\1', '') + let file = root . s:sep . substitute(a:line, regex , '\2', '') + return file +endfunction + +function! Copy(fileFromOrig, fileToOrig) + let fileFrom = substitute(a:fileFromOrig, '/', s:sep, 'g') + let fileTo = substitute(a:fileToOrig, '/', s:sep, 'g') + echo "Copy from " . fileFrom . " to " . fileTo + if (s:DirDiffCopyCmd == "") + echo "Copy not supported on this platform" + return 1 + endif + + " Constructs the copy command + let copycmd = "!".s:DirDiffCopyCmd." ".s:DirDiffCopyFlags + " Append the interactive flag + if (g:DirDiffInteractive) + let copycmd = copycmd . " " . s:DirDiffCopyInteractiveFlag + endif + let copycmd = copycmd . " \"".fileFrom."\" \"".fileTo."\"" + + " Constructs the copy directory command + let copydircmd = "!".s:DirDiffCopyDirCmd." ".s:DirDiffCopyDirFlags + " Append the interactive flag + if (g:DirDiffInteractive) + let copydircmd = copydircmd . " " . s:DirDiffCopyInteractiveFlag + endif + let copydircmd = copydircmd . " \"".fileFrom."\" \"".fileTo."\"" + + let error = 0 + if (isdirectory(fileFrom)) + let error = DirDiffExec(copydircmd, g:DirDiffInteractive) + else + let error = DirDiffExec(copycmd, g:DirDiffInteractive) + endif + if (error != 0) + echo "Can't copy from " . fileFrom . " to " . fileTo + return 1 + endif + return 0 +endfunction + +" Would execute the command, either silent or not silent, by the +" interactive flag ([0|1]). Returns the v:shell_error after +" executing the command. +function! DirDiffExec(cmd, interactive) + let error = 0 + " On Unix, if we use a different shell other than bash, we can cause + " problem + if g:DirDiffForceShell != "" + let shell_save = &shell + let &shell = g:DirDiffForceShell + endif + if (a:interactive) + exe (a:cmd) + let error = v:shell_error + else + silent exe (a:cmd) + let error = v:shell_error + endif + if g:DirDiffForceShell != "" + let &shell = shell_save + endif +" let d = input("DirDiffExec: " . a:cmd . " " . a:interactive . " returns " . v:shell_error) + if !empty(g:DirDiffTheme) + execute "colorscheme ". g:DirDiffTheme + endif + if g:DirDiffSimpleMap + nnoremap [ [c + nnoremap ] ]c + endif + return error +endfunction + +" Delete the file or directory. Returns 0 if nothing goes wrong, error code +" otherwise. +function! Delete(fileFromOrig) + let fileFrom = substitute(a:fileFromOrig, '/', s:sep, 'g') + echo "Deleting from " . fileFrom + if (s:DirDiffDeleteCmd == "") + echo "Delete not supported on this platform" + return 1 + endif + + let delcmd = "" + + if (isdirectory(fileFrom)) + let delcmd = "!".s:DirDiffDeleteDirCmd." ".s:DirDiffDeleteDirFlags + if (g:DirDiffInteractive) + " If running on Unix, and we're running in interactive mode, we + " append the -i tag + if (has("unix")) + let delcmd = delcmd . " " . s:DirDiffDeleteInteractiveFlag + endif + else + " If running on windows, and we're not running in interactive + " mode, we append the quite flag to the "rd" command + if (has("win32")) + let delcmd = delcmd . " " . s:DirDiffDeleteDirQuietFlag + endif + endif + else + let delcmd = "!".s:DirDiffDeleteCmd." ".s:DirDiffDeleteFlags + if (g:DirDiffInteractive) + let delcmd = delcmd . " " . s:DirDiffDeleteInteractiveFlag + endif + endif + + let delcmd = delcmd ." \"".fileFrom."\"" + let error = DirDiffExec(delcmd, g:DirDiffInteractive) + if (error != 0) + echo "Can't delete " . fileFrom + endif + return error +endfunction + +" The given line begins with the "Only in" +function! IsOnly(line) + return (match(a:line, "^ *" . s:DirDiffDiffOnlyLine . "\\|^==> " . s:DirDiffDiffOnlyLine ) == 0) +endfunction + +" The given line begins with the "Files" +function! IsDiffer(line) + return (match(a:line, "^ *" . s:DirDiffDifferLine . "\\|^==> " . s:DirDiffDifferLine ) == 0) +endfunction + +" Let you modify the Exclude patthern +function! ChangeExcludes() + let g:DirDiffExcludes = input ("Exclude pattern (separate multiple patterns with ','): ", g:DirDiffExcludes) + echo "\nPress update ('u') to refresh the diff." +endfunction + +" Let you modify additional arguments for diff +function! ChangeArguments() + let g:DirDiffAddArgs = input ("Additional diff args: ", g:DirDiffAddArgs) + echo "\nPress update ('u') to refresh the diff." +endfunction + +" Let you modify the Ignore patthern +function! ChangeIgnore() + let g:DirDiffIgnore = input ("Ignore pattern (separate multiple patterns with ','): ", g:DirDiffIgnore) + echo "\nPress update ('u') to refresh the diff." +endfunction + +" Sorting functions from the Vim docs. Use this instead of the sort binary. +" +" Function for use with Sort(), to compare two strings. +func! Strcmp(str1, str2) + if (a:str1 < a:str2) + return -1 + elseif (a:str1 > a:str2) + return 1 + else + return 0 + endif +endfunction + +" Sort lines. SortR() is called recursively. +func! SortR(start, end, cmp) + if (a:start >= a:end) + return + endif + let partition = a:start - 1 + let middle = partition + let partStr = getline((a:start + a:end) / 2) + let i = a:start + while (i <= a:end) + let str = getline(i) + exec "let result = " . a:cmp . "(str, partStr)" + if (result <= 0) + " Need to put it before the partition. Swap lines i and partition. + let partition = partition + 1 + if (result == 0) + let middle = partition + endif + if (i != partition) + let str2 = getline(partition) + call setline(i, str2) + call setline(partition, str) + endif + endif + let i = i + 1 + endwhile + + " Now we have a pointer to the "middle" element, as far as partitioning + " goes, which could be anywhere before the partition. Make sure it is at + " the end of the partition. + if (middle != partition) + let str = getline(middle) + let str2 = getline(partition) + call setline(middle, str2) + call setline(partition, str) + endif + call SortR(a:start, partition - 1, a:cmp) + call SortR(partition + 1, a:end, a:cmp) +endfunc + +" To Sort a range of lines, pass the range to Sort() along with the name of a +" function that will compare two lines. +func! Sort(cmp) range + call SortR(a:firstline, a:lastline, a:cmp) +endfunc + +" Added to deal with internationalized version of diff, which returns a +" different string than "Files ... differ" or "Only in ... " + +function! GetDiffStrings() + " Check if we have the dynamic text string turned on. If not, just return + " what's set in the global variables + + if (g:DirDiffDynamicDiffText == 0) + let s:DirDiffDiffOnlyLineCenter = g:DirDiffTextOnlyInCenter + let s:DirDiffDiffOnlyLine = g:DirDiffTextOnlyIn + let s:DirDiffDifferLine = g:DirDiffTextFiles + let s:DirDiffDifferAndLine = g:DirDiffTextAnd + let s:DirDiffDifferEndLine = g:DirDiffTextDiffer + return + endif + + let tmp1 = tempname() + let tmp2 = tempname() + let tmpdiff = tempname() + + " We need to pad the backslashes in order to make it match + let tmp1rx = EscapeDirForRegex(tmp1) + let tmp2rx = EscapeDirForRegex(tmp2) + let tmpdiffrx = EscapeDirForRegex(tmpdiff) + + silent exe s:DirDiffMakeDirCmd . "\"" . tmp1 . "\"" + silent exe s:DirDiffMakeDirCmd . "\"" . tmp2 . "\"" + silent exe "!echo test > \"" . tmp1 . s:sep . "test" . "\"" + silent exe "!" . g:DirDiffLangString . "diff -r --brief \"" . tmp1 . "\" \"" . tmp2 . "\" > \"" . tmpdiff . "\"" + + " Now get the result of that diff cmd + silent exe "split ". tmpdiff + "echo "First line: " . getline(1) + "echo "tmp1: " . tmp1 + "echo "tmp1rx: " . tmp1rx + let regex = '\(^.*\)' . tmp1rx . '\(.*\)' . "test" + let s:DirDiffDiffOnlyLine = substitute( getline(1), regex, '\1', '') + let s:DirDiffDiffOnlyLineCenter = substitute( getline(1), regex, '\2', '') + "echo "DirDiff Only: " . s:DirDiffDiffOnlyLine + + bd + + " Now let's get the Differ string + "echo "Getting the diff in GetDiffStrings" + + silent exe "!echo testdifferent > \"" . tmp2 . s:sep . "test" . "\"" + silent exe "!" . g:DirDiffLangString . "diff -r --brief \"" . tmp1 . "\" \"" . tmp2 . "\" > \"" . tmpdiff . "\"" + + silent exe "split ". tmpdiff + let s:DirDiffDifferLine = substitute( getline(1), tmp1rx . ".*$", "", '') + " Note that the diff on cygwin may output '/' instead of '\' for the + " separator, so we need to accomodate for both cases + let andrx = "^.*" . tmp1rx . "[\\\/]test\\(.*\\)" . tmp2rx . "[\\\/]test.*$" + let endrx = "^.*" . tmp1rx . "[\\\/]test.*" . tmp2rx . "[\\\/]test\\(.*$\\)" + "echo "andrx : " . andrx + "echo "endrx : " . endrx + let s:DirDiffDifferAndLine = substitute( getline(1), andrx , "\\1", '') + let s:DirDiffDifferEndLine = substitute( getline(1), endrx, "\\1", '') + + "echo "s:DirDiffDifferLine = " . s:DirDiffDifferLine + "echo "s:DirDiffDifferAndLine = " . s:DirDiffDifferAndLine + "echo "s:DirDiffDifferEndLine = " . s:DirDiffDifferEndLine + + q + + " Delete tmp files + "echo "Deleting tmp files." + + call Delete(tmp1) + call Delete(tmp2) + call Delete(tmpdiff) + + "avoid get diff text again + let g:DirDiffTextOnlyInCenter = s:DirDiffDiffOnlyLineCenter + let g:DirDiffTextOnlyIn = s:DirDiffDiffOnlyLine + let g:DirDiffTextFiles = s:DirDiffDifferLine + let g:DirDiffTextAnd = s:DirDiffDifferAndLine + let g:DirDiffTextDiffer = s:DirDiffDifferEndLine + let g:DirDiffDynamicDiffText = 0 + +endfunction