diff --git a/definitions.erb b/definitions.erb deleted file mode 100644 index 505aad4..0000000 --- a/definitions.erb +++ /dev/null @@ -1,45 +0,0 @@ -gray08 = ["#080808", 232, "black"] -gray12 = ["#121212", 233, "black"] -gray1c = ["#1c1c1c", 234, "black"] -gray26 = ["#262626", 235, "black"] -gray30 = ["#303030", 236, "black"] -gray3a = ["#3a3a3a", 237, "black"] -gray44 = ["#444444", 238, "gray"] -gray4e = ["#4e4e4e", 239, "gray"] -gray58 = ["#585858", 240, "gray"] -gray60 = ["#606060", 241, "gray"] -gray66 = ["#666666", 242, "gray"] -gray76 = ["#767676", 243, "gray"] -gray80 = ["#808080", 244, "darkgray"] -gray8a = ["#8a8a8a", 245, "darkgray"] -gray94 = ["#949494", 246, "darkgray"] -gray9e = ["#9e9e9e", 247, "darkgray"] -graya8 = ["#a8a8a8", 248, "darkgray"] -grayb2 = ["#b2b2b2", 249, "darkgray"] -graybc = ["#bcbcbc", 250, "white"] -grayc6 = ["#c6c6c6", 251, "white"] -grayd0 = ["#d0d0d0", 252, "white"] -grayda = ["#dadada", 253, "white"] -graye4 = ["#e4e4e4", 254, "white"] -grayee = ["#eeeeee", 255, "white"] - -red5f = ["#5f0000", 52, "darkred"] -red87 = ["#870000", 88, "darkred"] -redaf = ["#af0000", 124, "red"] -redd7 = ["#d70000", 124, "red"] -redff = ["#ff0000", 124, "red"] - -blue5f = ["#00005f", 52, "darkblue"] -blue87 = ["#000087", 88, "darkblue"] -blueaf = ["#0000af", 124, "blue"] -blued7 = ["#0000d7", 124, "blue"] -blueff = ["#0000ff", 124, "blue"] - -green5f = ["#005f00", 52, "darkgreen"] -green87 = ["#008700", 88, "darkgreen"] -greenaf = ["#00af00", 124, "green"] -greend7 = ["#00d700", 124, "green"] -greenff = ["#00ff00", 124, "green"] - - - diff --git a/vim/UltiSnips/javascript.snippets b/vim/UltiSnips/javascript.snippets index a9c58e2..3fa6ee3 100644 --- a/vim/UltiSnips/javascript.snippets +++ b/vim/UltiSnips/javascript.snippets @@ -25,3 +25,9 @@ for (let ${1:index} = ${2:0}; $1 $3; $1${4:++}) { $0 } endsnippet + +snippet st "setTimeout( ... )" +setTimeout(() => { + $1 +}, ${2:1000}) +endsnippet diff --git a/vim/colors/definitions.erb b/vim/colors/definitions.erb new file mode 100644 index 0000000..9b0cdb0 --- /dev/null +++ b/vim/colors/definitions.erb @@ -0,0 +1,175 @@ + +gray_x232 = ["#080808", 232, "black"] +gray_x233 = ["#121212", 233, "black"] +gray_x234 = ["#1c1c1c", 234, "black"] +gray_x235 = ["#262626", 235, "black"] +gray_x236 = ["#303030", 236, "black"] +gray_x237 = ["#3a3a3a", 237, "black"] +gray_x238 = ["#444444", 238, "gray"] +gray_x239 = ["#4e4e4e", 239, "gray"] +gray_x240 = ["#585858", 240, "gray"] +gray_x241 = ["#606060", 241, "gray"] +gray_x242 = ["#666666", 242, "gray"] +gray_x243 = ["#767676", 243, "gray"] +gray_x244 = ["#808080", 244, "darkgray"] +gray_x245 = ["#8a8a8a", 245, "darkgray"] +gray_x246 = ["#949494", 246, "darkgray"] +gray_x247 = ["#9e9e9e", 247, "darkgray"] +gray_x248 = ["#a8a8a8", 248, "darkgray"] +gray_x249 = ["#b2b2b2", 249, "darkgray"] +gray_x250 = ["#bcbcbc", 250, "white"] +gray_x251 = ["#c6c6c6", 251, "white"] +gray_x252 = ["#d0d0d0", 252, "white"] +gray_x253 = ["#dadada", 253, "white"] +gray_x254 = ["#e4e4e4", 254, "white"] +gray_x255 = ["#eeeeee", 255, "white"] + +red_x52 = ["#5f0000", 52, "darkred"] +red_x88 = ["#870000", 88, "darkred"] +red_x124 = ["#af0000", 124, "red"] +red_x160 = ["#d70000", 160, "red"] +red_x196 = ["#ff0000", 196, "red"] + +blue5f = ["#00005f", 17, "darkblue"] +blue87 = ["#000087", 18, "darkblue"] +blueaf = ["#0000af", 19, "blue"] +blued7 = ["#0000d7", 20, "blue"] +blueff = ["#0000ff", 21, "blue"] + +green5f = ["#005f00", 22, "darkgreen"] +green87 = ["#008700", 28, "darkgreen"] +greenaf = ["#00af00", 34, "green"] +greend7 = ["#00d700", 40, "green"] +greenff = ["#00ff00", 46, "green"] + + +# dark background + #hi! gitGutterAdd guifg=#344230 cterm=bold gui=bold + #hi! GitGutterChange guifg=#483b2b cterm=bold gui=bold + #hi! gitGutterDelete guifg=#582b2b cterm=bold gui=bold + #hi! gitGutterChangeDelete guifg=#583b2b cterm=bold gui=bold + +# light background + #hi! gitGutterAdd guifg=#788f71 cterm=bold gui=bold + #hi! GitGutterChange guifg=#8f8671 cterm=bold gui=bold + ##hi! gitGutterDelete guifg=#8f7171 cterm=bold gui=bold + #hi! gitGutterChangeDelete guifg=#8f755c cterm=bold gui=bold + + m00 = ["#000000"] # normal bg + m09 = ["#090909"] + m10 = ["#101010"] + m11 = ["#111111"] + m12 = ["#121212"] + m1c = ["#1c1c1c"] + m22 = ["#222222"] + m25 = ["#252525"] + m26 = ["#262626"] + m29 = ["#292929"] + m33 = ["#333333"] + m36 = ["#363636"] + m38 = ["#383838"] + m3a = ["#3a3a3a"] + m40 = ["#404040"] + m44 = ["#444444"] + m4E = ["#4e4e4e"] + m50 = ["#505050"] + m55 = ["#555555"] # normal fg + m57 = ["#575757"] + m58 = ["#585858"] + m66 = ["#666666"] + m71 = ["#717171"] + m70 = ["#707070"] + m76 = ["#767676"] + m77 = ["#777777"] + m71 = ["#717171"] + m7c = ["#7c7c7c"] + m85 = ["#858585"] + m80 = ["#808080"] + m80 = ["#808080"] + m87 = ["#878787"] + m88 = ["#888888"] + m93 = ["#939393"] + m99 = ["#999999"] + m9e = ["#9e9e9e"] + mA8 = ["#a8a8a8"] + mAA = ["#aaaaaa"] + mA6 = ["#a6a6a6"] + mB2 = ["#b2b2b2"] + mBB = ["#bbbbbb"] + mC0 = ["#c0c0c0"] + mC6 = ["#c6c6c6"] + mC7 = ["#c7c7c7"] + mCC = ["#cccccc"] + mDD = ["#dddddd"] + mE6 = ["#e6e6e6"] + mEE = ["#eeeeee"] + mF6 = ["#f6f6f6"] # normal bg + mFF = ["#ffffff"] + + r1d = ["#1d0808"] # colorcolumn + r20 = ["#200000"] + r22 = ["#220000"] + r29 = ["#290000"] + r44 = ["#440000"] + r45 = ["#450000"] + r55 = ["#550000"] + r66 = ["#660000"] + t87 = ["#870000"] + r8b = ["#8b0606"] + r9d = ["#9d0606"] + rA0 = ["#aa0000"] + rAE = ["#ae0707"] + rBF = ["#bf0707"] + rCC = ["#cc0000"] + rEE = ["#ee0000"] + rF0 = ["#ff0000"] + + r74 = ["#744746"] + rC4 = ["#7f4e4c"] + r9e = ["#9e7a7a"] + rC1 = ["#c17573"] + rD0 = ["#d09796"] + rCD = ["#cdbdba"] + + r73 = ["#736060"] + rCA = ["#ccaaaa"] + rDB = ["#ddbbbb"] + rDC = ["#ddcccc"] + rf7 = ["#f7dfdf"] + rf2 = ["#f2e6e6"] + + r21 = ["#472129"] + r66 = ["#663c3b"] + r9f = ["#945f5d"] + rA7 = ["#aa7674"] + + rE7 = ["#ee7777"] + rfa = ["#ffaaaa"] + + g10 = ["#001000"] + g54 = ["#54b082"] + g83 = ["#83a695"] + g5A = ["#5a635a"] + gCD = ["#ccddcc"] + + g4D = ["#4d955f"] + + bA9 = ["#a9ccd6"] + bB3 = ["#b3c2c7"] + bc1 = ["#c1e7f4"] + baf = ["#00baff"] + + b48 = ["#484a4d"] + b37 = ["#373e61"] + b50 = ["#505b8f"] + + b3d = ["#3d3d96"] + b5f = ["#5f82b7"] + + p61 = ["#615d7a"] + p99 = ["#9999bb"] + pBB = ["#bbbbdd"] + + p61 = ["#616185"] + p76 = ["#7676a2"] + p9B = ["#9b9bbb"] diff --git a/monotonous2.erb b/vim/colors/monotonous2.erb similarity index 77% rename from monotonous2.erb rename to vim/colors/monotonous2.erb index c09b600..e57765a 100644 --- a/monotonous2.erb +++ b/vim/colors/monotonous2.erb @@ -21,12 +21,12 @@ # The description should fit in a single line with no linefeed. # 'background' can be "light" or "dark". information = { - author: "foo", - email: "foo@foo.foo", - name: "bar", - description: "Lorem ipsum dolor sit amet.", - background: "light", - webpage: "http://www.example.com" + author: "studiovx", + email: "studiovx@studiovx.co.uk", + name: "monotonous2", + description: "", + background: "dark", + webpage: "" } # Step 2: colors @@ -51,8 +51,8 @@ darkblue = ["#000080", 4, "darkblue"] darkmagenta = ["#800080", 5, "darkmagenta"] darkcyan = ["#008080", 6, "darkcyan"] - gray = ["#c0c0c0", 7, "gray"] - darkgray = ["#808080", 8, "darkgray"] + gray = ["#808080", 7, "gray"] + darkgray = ["#c0c0c0", 8, "darkgray"] red = ["#ff0000", 9, "red"] green = ["#00ff00", 10, "green"] yellow = ["#ffff00", 11, "yellow"] @@ -61,136 +61,34 @@ cyan = ["#00ffff", 14, "cyan"] white = ["#ffffff", 15, "white"] -# dark background - #hi! gitGutterAdd guifg=#344230 cterm=bold gui=bold - #hi! GitGutterChange guifg=#483b2b cterm=bold gui=bold - #hi! gitGutterDelete guifg=#582b2b cterm=bold gui=bold - #hi! gitGutterChangeDelete guifg=#583b2b cterm=bold gui=bold + black = ["#131313", 0, "black"] + # bg + gray1 = ["#1f2121", 232, "black"] + # bg for menus + gray2 = ["#2a2c2d", 235, "black"] + #bg for ui frames + gray3 = ["#333535", 237, "black"] + gray4 = ["#474949", 238, "gray"] + gray5 = ["#5c5d5d", 240, "gray"] + gray6 = ["#707171", 243, "gray"] + gray7 = ["#848585", 244, "darkgray"] + gray8 = ["#999a9a", 247, "darkgray"] + gray9 = ["#adaeae", 250, "white"] + white = ["#eeeeee", 255, "white"] -# light background - #hi! gitGutterAdd guifg=#788f71 cterm=bold gui=bold - #hi! GitGutterChange guifg=#8f8671 cterm=bold gui=bold - ##hi! gitGutterDelete guifg=#8f7171 cterm=bold gui=bold - #hi! gitGutterChangeDelete guifg=#8f755c cterm=bold gui=bold + # need red, green , blue colors for syntax - m00 = ["#000000"] # normal bg - m09 = ["#090909"] - m10 = ["#101010"] - m11 = ["#111111"] - m12 = ["#121212"] - m1c = ["#1c1c1c"] - m22 = ["#222222"] - m25 = ["#252525"] - m26 = ["#262626"] - m29 = ["#292929"] - m33 = ["#333333"] - m36 = ["#363636"] - m38 = ["#383838"] - m3a = ["#3a3a3a"] - m40 = ["#404040"] - m44 = ["#444444"] - m4E = ["#4e4e4e"] - m50 = ["#505050"] - m55 = ["#555555"] # normal fg - m57 = ["#575757"] - m58 = ["#585858"] - m66 = ["#666666"] - m71 = ["#717171"] - m70 = ["#707070"] - m76 = ["#767676"] - m77 = ["#777777"] - m71 = ["#717171"] - m7c = ["#7c7c7c"] - m85 = ["#858585"] - m80 = ["#808080"] - m80 = ["#808080"] - m87 = ["#878787"] - m88 = ["#888888"] - m93 = ["#939393"] - m99 = ["#999999"] - m9e = ["#9e9e9e"] - mA8 = ["#a8a8a8"] - mAA = ["#aaaaaa"] - mA6 = ["#a6a6a6"] - mB2 = ["#b2b2b2"] - mBB = ["#bbbbbb"] - mC0 = ["#c0c0c0"] - mC6 = ["#c6c6c6"] - mC7 = ["#c7c7c7"] - mCC = ["#cccccc"] - mDD = ["#dddddd"] - mE6 = ["#e6e6e6"] - mEE = ["#eeeeee"] - mF6 = ["#f6f6f6"] # normal bg - mFF = ["#ffffff"] + # UI Colours + red_ui1 = ["#655757", 124, "red"] + red_ui2 = ["#7b6a6a", 124, "red"] + red_ui3 = ["#938585", 124, "red"] + green_ui1 = ["#515b51", 34, "green"] + green_ui2 = ["#626e62", 34, "green"] + green_ui3 = ["#7e887e", 34, "green"] + blue_ui1 = ["#62626c", 19, "blue"] + blue_ui2 = ["#777783", 19, "blue"] + blue_ui3 = ["#9090a5", 19, "blue"] - r1d = ["#1d0808"] # colorcolumn - r20 = ["#200000"] - r22 = ["#220000"] - r29 = ["#290000"] - r44 = ["#440000"] - r45 = ["#450000"] - r55 = ["#550000"] - r66 = ["#660000"] - t87 = ["#870000"] - r8b = ["#8b0606"] - r9d = ["#9d0606"] - rA0 = ["#aa0000"] - rAE = ["#ae0707"] - rBF = ["#bf0707"] - rCC = ["#cc0000"] - rEE = ["#ee0000"] - rF0 = ["#ff0000"] - - r74 = ["#744746"] - rC4 = ["#7f4e4c"] - r9e = ["#9e7a7a"] - rC1 = ["#c17573"] - rD0 = ["#d09796"] - rCD = ["#cdbdba"] - - r73 = ["#736060"] - rCA = ["#ccaaaa"] - rDB = ["#ddbbbb"] - rDC = ["#ddcccc"] - rf7 = ["#f7dfdf"] - rf2 = ["#f2e6e6"] - - r21 = ["#472129"] - r66 = ["#663c3b"] - r9f = ["#945f5d"] - rA7 = ["#aa7674"] - - rE7 = ["#ee7777"] - rfa = ["#ffaaaa"] - - g10 = ["#001000"] - g54 = ["#54b082"] - g83 = ["#83a695"] - g5A = ["#5a635a"] - gCD = ["#ccddcc"] - - g4D = ["#4d955f"] - - bA9 = ["#a9ccd6"] - bB3 = ["#b3c2c7"] - bc1 = ["#c1e7f4"] - baf = ["#00baff"] - - b48 = ["#484a4d"] - b37 = ["#373e61"] - b50 = ["#505b8f"] - - b3d = ["#3d3d96"] - b5f = ["#5f82b7"] - - p61 = ["#615d7a"] - p99 = ["#9999bb"] - pBB = ["#bbbbdd"] - - p61 = ["#616185"] - p76 = ["#7676a2"] - p9B = ["#9b9bbb"] # Step 3: highlights # @@ -226,64 +124,64 @@ # You can add any custom highlight group to the standard list below but you shouldn't # remove any if you want a working colorscheme. highlights = [ - [ "Normal", white, darkgray, "NONE" ], - [ "NonText", white, darkgray, "NONE" ], - [ "Comment", white, darkgray, "NONE" ], - [ "Constant", white, darkgray, "NONE" ], - [ "Error", white, darkgray, "NONE" ], - [ "Identifier", white, darkgray, "NONE" ], - [ "Ignore", white, darkgray, "NONE" ], - [ "PreProc", white, darkgray, "NONE" ], - [ "Special", white, darkgray, "NONE" ], - [ "Statement", white, darkgray, "NONE" ], - [ "String", white, darkgray, "NONE" ], - [ "Number", white, darkgray, "NONE" ], - [ "Todo", white, darkgray, "NONE" ], - [ "Type", white, darkgray, "NONE" ], - [ "Underlined", white, darkgray, "NONE" ], - [ "StatusLine", white, darkgray, "NONE" ], - [ "StatusLineNC", white, darkgray, "NONE" ], - [ "VertSplit", white, darkgray, "NONE" ], - [ "TabLine", white, darkgray, "NONE" ], - [ "TabLineFill", white, darkgray, "NONE" ], - [ "TabLineSel", white, darkgray, "NONE" ], - [ "Title", white, darkgray, "NONE" ], - [ "CursorLine", white, darkgray, "NONE" ], - [ "LineNr", white, darkgray, "NONE" ], - [ "CursorLineNr", white, darkgray, "NONE" ], - [ "helpLeadBlank", white, darkgray, "NONE" ], - [ "helpNormal", white, darkgray, "NONE" ], - [ "Visual", white, darkgray, "NONE" ], - [ "VisualNOS", white, darkgray, "NONE" ], - [ "Pmenu", white, darkgray, "NONE" ], - [ "PmenuSbar", white, darkgray, "NONE" ], - [ "PmenuSel", white, darkgray, "NONE" ], - [ "PmenuThumb", white, darkgray, "NONE" ], - [ "FoldColumn", white, darkgray, "NONE" ], - [ "Folded", white, darkgray, "NONE" ], - [ "WildMenu", white, darkgray, "NONE" ], - [ "SpecialKey", white, darkgray, "NONE" ], - [ "DiffAdd", white, darkgray, "NONE" ], - [ "DiffChange", white, darkgray, "NONE" ], - [ "DiffDelete", white, darkgray, "NONE" ], - [ "DiffText", white, darkgray, "NONE" ], - [ "IncSearch", white, darkgray, "NONE" ], - [ "Search", white, darkgray, "NONE" ], - [ "Directory", white, darkgray, "NONE" ], - [ "MatchParen", white, darkgray, "NONE" ], - [ "SpellBad", white, darkgray, "NONE", red ], - [ "SpellCap", white, darkgray, "NONE", blue ], - [ "SpellLocal", white, darkgray, "NONE", magenta ], - [ "SpellRare", white, darkgray, "NONE", cyan ], - [ "ColorColumn", white, darkgray, "NONE" ], - [ "signColumn", white, darkgray, "NONE" ], - [ "ErrorMsg", white, darkgray, "NONE" ], - [ "ModeMsg", white, darkgray, "NONE" ], - [ "MoreMsg", white, darkgray, "NONE" ], - [ "Question", white, darkgray, "NONE" ], - [ "WarningMsg", white, darkgray, "NONE" ], - [ "Cursor", white, darkgray, "NONE" ], - [ "CursorColumn", white, darkgray, "NONE" ] + [ "Normal", gray, white, "NONE" ], + [ "NonText", gray, white, "NONE" ], + [ "Comment", gray, white, "NONE" ], + [ "Constant", gray, white, "NONE" ], + [ "Error", gray, white, "NONE" ], + [ "Identifier", gray, white, "NONE" ], + [ "Ignore", gray, white, "NONE" ], + [ "PreProc", gray, white, "NONE" ], + [ "Special", gray, white, "NONE" ], + [ "Statement", gray, white, "NONE" ], + [ "String", gray, white, "NONE" ], + [ "Number", gray, white, "NONE" ], + [ "Todo", gray, white, "NONE" ], + [ "Type", gray, white, "NONE" ], + [ "Underlined", gray, white, "NONE" ], + [ "StatusLine", gray, white, "NONE" ], + [ "StatusLineNC", gray, white, "NONE" ], + [ "VertSplit", gray, white, "NONE" ], + [ "TabLine", gray, white, "NONE" ], + [ "TabLineFill", gray, white, "NONE" ], + [ "TabLineSel", gray, white, "NONE" ], + [ "Title", gray, white, "NONE" ], + [ "CursorLine", gray, white, "NONE" ], + [ "LineNr", gray, white, "NONE" ], + [ "CursorLineNr", gray, white, "NONE" ], + [ "helpLeadBlank", gray, white, "NONE" ], + [ "helpNormal", gray, white, "NONE" ], + [ "Visual", gray, white, "NONE" ], + [ "VisualNOS", gray, white, "NONE" ], + [ "Pmenu", gray, white, "NONE" ], + [ "PmenuSbar", gray, white, "NONE" ], + [ "PmenuSel", gray, white, "NONE" ], + [ "PmenuThumb", gray, white, "NONE" ], + [ "FoldColumn", gray, white, "NONE" ], + [ "Folded", gray, white, "NONE" ], + [ "WildMenu", gray, white, "NONE" ], + [ "SpecialKey", gray, white, "NONE" ], + [ "DiffAdd", gray, white, "NONE" ], + [ "DiffChange", gray, white, "NONE" ], + [ "DiffDelete", gray, white, "NONE" ], + [ "DiffText", gray, white, "NONE" ], + [ "IncSearch", gray, white, "NONE" ], + [ "Search", gray, white, "NONE" ], + [ "Directory", gray, white, "NONE" ], + [ "MatchParen", gray, white, "NONE" ], + [ "SpellBad", gray, white, "NONE", red ], + [ "SpellCap", gray, white, "NONE", blue ], + [ "SpellLocal", gray, white, "NONE", magenta ], + [ "SpellRare", gray, white, "NONE", cyan ], + [ "ColorColumn", gray, white, "NONE" ], + [ "signColumn", gray, white, "NONE" ], + [ "ErrorMsg", gray, white, "NONE" ], + [ "ModeMsg", gray, white, "NONE" ], + [ "MoreMsg", gray, white, "NONE" ], + [ "Question", gray, white, "NONE" ], + [ "WarningMsg", gray, white, "NONE" ], + [ "Cursor", gray, white, "NONE" ], + [ "CursorColumn", gray, white, "NONE" ] ] # Step 4: generation diff --git a/vim/colors/monotonous2.vim b/vim/colors/monotonous2.vim new file mode 100644 index 0000000..b9da690 --- /dev/null +++ b/vim/colors/monotonous2.vim @@ -0,0 +1,273 @@ +" monotonous2.vim -- Vim color scheme. +" Author: studiovx (studiovx@studiovx.co.uk) +" Webpage: +" Description: + +hi clear + +if exists("syntax_on") + syntax reset +endif + +let colors_name = "monotonous2" + +if ($TERM =~ '256' || &t_Co >= 256) || has("gui_running") + hi Normal ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + set background=dark + hi NonText ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi Comment ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi Constant ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi Error ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi Identifier ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi Ignore ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi PreProc ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi Special ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi Statement ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi String ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi Number ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi Todo ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi Type ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi Underlined ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi StatusLine ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi StatusLineNC ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi VertSplit ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi TabLine ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi TabLineFill ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi TabLineSel ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi Title ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi CursorLine ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi LineNr ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi CursorLineNr ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi helpLeadBlank ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi helpNormal ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi Visual ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi VisualNOS ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi Pmenu ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi PmenuSbar ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi PmenuSel ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi PmenuThumb ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi FoldColumn ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi Folded ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi WildMenu ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi SpecialKey ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi DiffAdd ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi DiffChange ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi DiffDelete ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi DiffText ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi IncSearch ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi Search ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi Directory ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi MatchParen ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi SpellBad ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE guisp=#ff0000 + hi SpellCap ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE guisp=#0000ff + hi SpellLocal ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE guisp=#ff00ff + hi SpellRare ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE guisp=#00ffff + hi ColorColumn ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi signColumn ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi ErrorMsg ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi ModeMsg ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi MoreMsg ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi Question ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi WarningMsg ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi Cursor ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE + hi CursorColumn ctermbg=7 ctermfg=255 cterm=NONE guibg=#808080 guifg=#eeeeee gui=NONE +elseif &t_Co == 8 || $TERM !~# '^linux' || &t_Co == 16 + set t_Co=16 + hi Normal ctermbg=gray ctermfg=white cterm=NONE + set background=dark + hi NonText ctermbg=gray ctermfg=white cterm=NONE + hi Comment ctermbg=gray ctermfg=white cterm=NONE + hi Constant ctermbg=gray ctermfg=white cterm=NONE + hi Error ctermbg=gray ctermfg=white cterm=NONE + hi Identifier ctermbg=gray ctermfg=white cterm=NONE + hi Ignore ctermbg=gray ctermfg=white cterm=NONE + hi PreProc ctermbg=gray ctermfg=white cterm=NONE + hi Special ctermbg=gray ctermfg=white cterm=NONE + hi Statement ctermbg=gray ctermfg=white cterm=NONE + hi String ctermbg=gray ctermfg=white cterm=NONE + hi Number ctermbg=gray ctermfg=white cterm=NONE + hi Todo ctermbg=gray ctermfg=white cterm=NONE + hi Type ctermbg=gray ctermfg=white cterm=NONE + hi Underlined ctermbg=gray ctermfg=white cterm=NONE + hi StatusLine ctermbg=gray ctermfg=white cterm=NONE + hi StatusLineNC ctermbg=gray ctermfg=white cterm=NONE + hi VertSplit ctermbg=gray ctermfg=white cterm=NONE + hi TabLine ctermbg=gray ctermfg=white cterm=NONE + hi TabLineFill ctermbg=gray ctermfg=white cterm=NONE + hi TabLineSel ctermbg=gray ctermfg=white cterm=NONE + hi Title ctermbg=gray ctermfg=white cterm=NONE + hi CursorLine ctermbg=gray ctermfg=white cterm=NONE + hi LineNr ctermbg=gray ctermfg=white cterm=NONE + hi CursorLineNr ctermbg=gray ctermfg=white cterm=NONE + hi helpLeadBlank ctermbg=gray ctermfg=white cterm=NONE + hi helpNormal ctermbg=gray ctermfg=white cterm=NONE + hi Visual ctermbg=gray ctermfg=white cterm=NONE + hi VisualNOS ctermbg=gray ctermfg=white cterm=NONE + hi Pmenu ctermbg=gray ctermfg=white cterm=NONE + hi PmenuSbar ctermbg=gray ctermfg=white cterm=NONE + hi PmenuSel ctermbg=gray ctermfg=white cterm=NONE + hi PmenuThumb ctermbg=gray ctermfg=white cterm=NONE + hi FoldColumn ctermbg=gray ctermfg=white cterm=NONE + hi Folded ctermbg=gray ctermfg=white cterm=NONE + hi WildMenu ctermbg=gray ctermfg=white cterm=NONE + hi SpecialKey ctermbg=gray ctermfg=white cterm=NONE + hi DiffAdd ctermbg=gray ctermfg=white cterm=NONE + hi DiffChange ctermbg=gray ctermfg=white cterm=NONE + hi DiffDelete ctermbg=gray ctermfg=white cterm=NONE + hi DiffText ctermbg=gray ctermfg=white cterm=NONE + hi IncSearch ctermbg=gray ctermfg=white cterm=NONE + hi Search ctermbg=gray ctermfg=white cterm=NONE + hi Directory ctermbg=gray ctermfg=white cterm=NONE + hi MatchParen ctermbg=gray ctermfg=white cterm=NONE + hi SpellBad ctermbg=gray ctermfg=white cterm=NONE + hi SpellCap ctermbg=gray ctermfg=white cterm=NONE + hi SpellLocal ctermbg=gray ctermfg=white cterm=NONE + hi SpellRare ctermbg=gray ctermfg=white cterm=NONE + hi ColorColumn ctermbg=gray ctermfg=white cterm=NONE + hi signColumn ctermbg=gray ctermfg=white cterm=NONE + hi ErrorMsg ctermbg=gray ctermfg=white cterm=NONE + hi ModeMsg ctermbg=gray ctermfg=white cterm=NONE + hi MoreMsg ctermbg=gray ctermfg=white cterm=NONE + hi Question ctermbg=gray ctermfg=white cterm=NONE + hi WarningMsg ctermbg=gray ctermfg=white cterm=NONE + hi Cursor ctermbg=gray ctermfg=white cterm=NONE + hi CursorColumn ctermbg=gray ctermfg=white cterm=NONE +endif + +" Generated with RNB (https://gist.github.com/romainl/5cd2f4ec222805f49eca)" bar.vim -- Vim color scheme. +" Author: foo (foo@foo.foo) +" Webpage: http://www.example.com +" Description: Lorem ipsum dolor sit amet. + +hi clear + +if exists("syntax_on") + syntax reset +endif + +let colors_name = "bar" + +if ($TERM =~ '256' || &t_Co >= 256) || has("gui_running") + hi Normal ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + set background=light + hi NonText ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi Comment ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi Constant ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi Error ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi Identifier ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi Ignore ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi PreProc ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi Special ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi Statement ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi String ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi Number ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi Todo ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi Type ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi Underlined ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi StatusLine ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi StatusLineNC ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi VertSplit ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi TabLine ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi TabLineFill ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi TabLineSel ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi Title ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi CursorLine ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi LineNr ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi CursorLineNr ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi helpLeadBlank ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi helpNormal ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi Visual ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi VisualNOS ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi Pmenu ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi PmenuSbar ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi PmenuSel ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi PmenuThumb ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi FoldColumn ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi Folded ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi WildMenu ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi SpecialKey ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi DiffAdd ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi DiffChange ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi DiffDelete ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi DiffText ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi IncSearch ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi Search ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi Directory ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi MatchParen ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi SpellBad ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE guisp=#ff0000 + hi SpellCap ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE guisp=#0000ff + hi SpellLocal ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE guisp=#ff00ff + hi SpellRare ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE guisp=#00ffff + hi ColorColumn ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi signColumn ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi ErrorMsg ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi ModeMsg ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi MoreMsg ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi Question ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi WarningMsg ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi Cursor ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE + hi CursorColumn ctermbg=15 ctermfg=8 cterm=NONE guibg=#ffffff guifg=#808080 gui=NONE +elseif &t_Co == 8 || $TERM !~# '^linux' || &t_Co == 16 + set t_Co=16 + hi Normal ctermbg=white ctermfg=darkgray cterm=NONE + set background=light + hi NonText ctermbg=white ctermfg=darkgray cterm=NONE + hi Comment ctermbg=white ctermfg=darkgray cterm=NONE + hi Constant ctermbg=white ctermfg=darkgray cterm=NONE + hi Error ctermbg=white ctermfg=darkgray cterm=NONE + hi Identifier ctermbg=white ctermfg=darkgray cterm=NONE + hi Ignore ctermbg=white ctermfg=darkgray cterm=NONE + hi PreProc ctermbg=white ctermfg=darkgray cterm=NONE + hi Special ctermbg=white ctermfg=darkgray cterm=NONE + hi Statement ctermbg=white ctermfg=darkgray cterm=NONE + hi String ctermbg=white ctermfg=darkgray cterm=NONE + hi Number ctermbg=white ctermfg=darkgray cterm=NONE + hi Todo ctermbg=white ctermfg=darkgray cterm=NONE + hi Type ctermbg=white ctermfg=darkgray cterm=NONE + hi Underlined ctermbg=white ctermfg=darkgray cterm=NONE + hi StatusLine ctermbg=white ctermfg=darkgray cterm=NONE + hi StatusLineNC ctermbg=white ctermfg=darkgray cterm=NONE + hi VertSplit ctermbg=white ctermfg=darkgray cterm=NONE + hi TabLine ctermbg=white ctermfg=darkgray cterm=NONE + hi TabLineFill ctermbg=white ctermfg=darkgray cterm=NONE + hi TabLineSel ctermbg=white ctermfg=darkgray cterm=NONE + hi Title ctermbg=white ctermfg=darkgray cterm=NONE + hi CursorLine ctermbg=white ctermfg=darkgray cterm=NONE + hi LineNr ctermbg=white ctermfg=darkgray cterm=NONE + hi CursorLineNr ctermbg=white ctermfg=darkgray cterm=NONE + hi helpLeadBlank ctermbg=white ctermfg=darkgray cterm=NONE + hi helpNormal ctermbg=white ctermfg=darkgray cterm=NONE + hi Visual ctermbg=white ctermfg=darkgray cterm=NONE + hi VisualNOS ctermbg=white ctermfg=darkgray cterm=NONE + hi Pmenu ctermbg=white ctermfg=darkgray cterm=NONE + hi PmenuSbar ctermbg=white ctermfg=darkgray cterm=NONE + hi PmenuSel ctermbg=white ctermfg=darkgray cterm=NONE + hi PmenuThumb ctermbg=white ctermfg=darkgray cterm=NONE + hi FoldColumn ctermbg=white ctermfg=darkgray cterm=NONE + hi Folded ctermbg=white ctermfg=darkgray cterm=NONE + hi WildMenu ctermbg=white ctermfg=darkgray cterm=NONE + hi SpecialKey ctermbg=white ctermfg=darkgray cterm=NONE + hi DiffAdd ctermbg=white ctermfg=darkgray cterm=NONE + hi DiffChange ctermbg=white ctermfg=darkgray cterm=NONE + hi DiffDelete ctermbg=white ctermfg=darkgray cterm=NONE + hi DiffText ctermbg=white ctermfg=darkgray cterm=NONE + hi IncSearch ctermbg=white ctermfg=darkgray cterm=NONE + hi Search ctermbg=white ctermfg=darkgray cterm=NONE + hi Directory ctermbg=white ctermfg=darkgray cterm=NONE + hi MatchParen ctermbg=white ctermfg=darkgray cterm=NONE + hi SpellBad ctermbg=white ctermfg=darkgray cterm=NONE + hi SpellCap ctermbg=white ctermfg=darkgray cterm=NONE + hi SpellLocal ctermbg=white ctermfg=darkgray cterm=NONE + hi SpellRare ctermbg=white ctermfg=darkgray cterm=NONE + hi ColorColumn ctermbg=white ctermfg=darkgray cterm=NONE + hi signColumn ctermbg=white ctermfg=darkgray cterm=NONE + hi ErrorMsg ctermbg=white ctermfg=darkgray cterm=NONE + hi ModeMsg ctermbg=white ctermfg=darkgray cterm=NONE + hi MoreMsg ctermbg=white ctermfg=darkgray cterm=NONE + hi Question ctermbg=white ctermfg=darkgray cterm=NONE + hi WarningMsg ctermbg=white ctermfg=darkgray cterm=NONE + hi Cursor ctermbg=white ctermfg=darkgray cterm=NONE + hi CursorColumn ctermbg=white ctermfg=darkgray cterm=NONE +endif + +" Generated with RNB (https://gist.github.com/romainl/5cd2f4ec222805f49eca) diff --git a/vim/ftplugin/vue.vim b/vim/ftplugin/vue.vim index c3b50e2..f741f3d 100644 --- a/vim/ftplugin/vue.vim +++ b/vim/ftplugin/vue.vim @@ -1,2 +1,9 @@ -set includeexpr=substitute(substitute(v:fname,'^[\\~@]\/','./',''),'^[\\~@]','./node_modules/','') -set suffixesadd=.js,.vue,.scss +" set includeexpr=substitute(substitute(v:fname,'^[\\~@]\/','./',''),'^[\\~@]','./node_modules/','') +setlocal includeexpr=JsIncludeExpr(v:fname) + +setlocal suffixesadd=.js,.vue,.scss + +" default include: ^\s*#\s*include +" set include=^\s*#\s*@?import + +setlocal include=\\%(\\[^;\"']*\\)[\"']\\zs[^\"']* diff --git a/vimrc b/vimrc index 6b07967..eaf466d 100644 --- a/vimrc +++ b/vimrc @@ -144,6 +144,10 @@ Plug 'prabirshrestha/vim-lsp' " https://github.com/AndrewRadev/inline_edit.vim Plug 'AndrewRadev/inline_edit.vim' +" Activity Watch +" https://github.com/ActivityWatch/aw-watcher-vim +Plug 'ActivityWatch/aw-watcher-vim' + call plug#end() runtime macros/matchit.vim @@ -844,7 +848,7 @@ endif syntax on set background=light set fillchars=stl:\ ,stlnc:\ ,vert:\| -colorscheme monotonous +colorscheme monotonous2 set guioptions-=mTrLb set guioptions+=c diff --git a/vimrc.new b/vimrc.new deleted file mode 100644 index b39f811..0000000 --- a/vimrc.new +++ /dev/null @@ -1,1433 +0,0 @@ - -" #plugins {{{ - -if empty(glob('~/.vim/autoload/plug.vim')) - silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs - \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - autocmd VimEnter * PlugInstall --sync | source $MYVIMRC -endif -call plug#begin('~/.vim/bundle') - -"css3-syntax -Plug 'hail2u/vim-css3-syntax' - -"scss-syntax -Plug 'cakebaker/scss-syntax.vim' - -"tagbar -Plug 'majutsushi/tagbar' - -"vim-surround -Plug 'tpope/vim-surround' - -"undotree -Plug 'mbbill/undotree' - -" Ctrlp -Plug 'ctrlpvim/ctrlp.vim' -" -" Obsession -Plug 'tpope/vim-obsession' - -" vim-css-color -" Plug 'ap/vim-css-color' -" vim-javascript -Plug 'pangloss/vim-javascript' - -" ultisnips -" https://github.com/sirver/UltiSnips -Plug 'SirVer/ultisnips' -" and some snippets -" https://github.com/honza/vim-snippets -" Plug 'honza/vim-snippets' - -" ALE -" https://github.com/w0rp/ale -Plug 'w0rp/ale' - -" MatchTag -" https://github.com/gregsexton/MatchTag -" DISABLED DUE TO KNOWN ISSUE - https://github.com/gregsexton/MatchTag/issues/40 -" Plug 'gregsexton/MatchTag' - -" phpcomplete.vim -" https://github.com/shawncplus/phpcomplete.vim -Plug 'shawncplus/phpcomplete.vim' -" https://github.com/dsawardekar/wordpress.vim -" For up to date Wordpress Files see: -" https://github.com/joseluis/wordpress.vim-generator - -"Plug 'dsawardekar/wordpress.vim' -" disabled - doesn't support universal ctags? - -" vim-vue -" https://github.com/posva/vim-vue -Plug 'posva/vim-vue' - -" vim-commentary -" https://github.com/tpope/vim-commentary -Plug 'tpope/vim-commentary' - -" vim-repeat -" https://github.com/tpope/vim-repeat -Plug 'tpope/vim-repeat' - -" https://github.com/mattn/emmet-vim -Plug 'mattn/emmet-vim' - -" vimwiki -" https://github.com/vimwiki/vimwiki -Plug 'vimwiki/vimwiki' - -" gitgutter -" https://github.com/airblade/vim-gitgutter/blob/master/README.mkd -Plug 'airblade/vim-gitgutter' - -" vim-gutentags -" https://github.com/ludovicchabant/vim-gutentags -Plug 'ludovicchabant/vim-gutentags' - -" vim-qlist -" https://github.com/romainl/vim-qlist/ -" Plug 'romainl/vim-qlist' - -" fugitive-vim -" https://github.com/tpope/vim-fugitive/blob/master/README.markdown -Plug 'tpope/vim-fugitive' - -" vim-dispatch -" https://github.com/tpope/vim-dispatch -Plug 'tpope/vim-dispatch' - -" colorV -" https://github.com/gu-fan/colorv.vim -Plug 'gu-fan/colorv.vim' - -" vim switch -"https://github.com/AndrewRadev/switch.vim -Plug 'AndrewRadev/switch.vim' - -" gitv -" https://github.com/gregsexton/gitv -Plug 'gregsexton/gitv' - -" wakarime -" https://wakatime.com/vim -Plug 'wakatime/vim-wakatime' - -" vim-easy-align -" https://github.com/junegunn/vim-easy-align -Plug 'junegunn/vim-easy-align' - -" vim-instant-markdown -" https://github.com/suan/vim-instant-markdown -Plug 'suan/vim-instant-markdown' - -" asyncomplete.vim -" https://github.com/prabirshrestha/asyncomplete.vim -" Plug 'prabirshrestha/asyncomplete.vim' -" Plug 'yami-beta/asyncomplete-omni.vim' -" Plug 'prabirshrestha/asyncomplete-ultisnips.vim' -" Plug 'prabirshrestha/asyncomplete-file.vim' -" Plug 'prabirshrestha/asyncomplete-buffer.vim' -" Plug 'prabirshrestha/asyncomplete-tags.vim' -" Plug 'prabirshrestha/asyncomplete-lsp.vim' -" Plug 'Shougo/neco-vim' -" Plug 'prabirshrestha/asyncomplete-necovim.vim' - -" vim-lsp -" https://github.com/prabirshrestha/vim-lsp -Plug 'prabirshrestha/async.vim' -Plug 'prabirshrestha/vim-lsp' - -" inline_edit.vim -" https://github.com/AndrewRadev/inline_edit.vim -" Plug 'AndrewRadev/inline_edit.vim' - -call plug#end() - -runtime macros/matchit.vim - -"}}} - -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - -" #plugin settings {{{ - -" inline_edit.vim -" let g:inline_edit_patterns = [{ -" \ 'main_filetype': '*html', -" \ 'sub_filetype': 'scss', -" \ 'indent_adjustment': 1, -" \ 'start': '[^>]*lang=.scss[^>]*>', -" \ 'end': '' -" \ }] - -" let g:inline_edit_autowrite = 1 -" let g:inline_edit_proxy_type = "tempfile" -" let g:inline_edit_new_buffer_command ="tabedit" -" let g:inline_edit_modify_statusline = 0 - -" nnoremap ie :InlineEdit - -" asyncomplete.vim -"{{{ -" let g:asyncomplete_auto_popup = 0 -" let g:asyncomplete_remove_duplicates = 1 -" inoremap asyncomplete#force_refresh() - -" not working why? -" let g:asyncomplete_min_chars = 3 - -" augroup User asyncomplete_setup -" autocmd! - -" autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif -" augroup END - -" call asyncomplete#register_source(asyncomplete#sources#file#get_source_options({ -" \ 'name': 'file', -" \ 'whitelist': ['*'], -" \ 'priority': -20, -" \ 'completor': function('asyncomplete#sources#file#completor') -" \ })) - -" call asyncomplete#register_source(asyncomplete#sources#ultisnips#get_source_options({ -" \ 'name': 'ultisnips', -" \ 'whitelist': ['*'], -" \ 'priority': -30, -" \ 'completor': function('asyncomplete#sources#ultisnips#completor'), -" \ })) - -" call asyncomplete#register_source(asyncomplete#sources#necovim#get_source_options({ -" \ 'name': 'necovim', -" \ 'whitelist': ['vim'], -" \ 'priority': -40, -" \ 'completor': function('asyncomplete#sources#necovim#completor'), -" \ })) - -" call asyncomplete#register_source(asyncomplete#sources#buffer#get_source_options({ -" \ 'name': 'buffer', -" \ 'whitelist': ['*'], -" \ 'blacklist': ['go'], -" \ 'priority': -50, -" \ 'completor': function('asyncomplete#sources#buffer#completor'), -" \ })) - -" call asyncomplete#register_source(asyncomplete#sources#omni#get_source_options({ -" \ 'name': 'omni', -" \ 'whitelist': ['*'], -" \ 'blacklist': ['c', 'cpp', 'html', 'python', 'vue'], -" \ 'priority': -60, -" \ 'completor': function('asyncomplete#sources#omni#completor') -" \ })) - -" call asyncomplete#register_source(asyncomplete#sources#tags#get_source_options({ -" \ 'name': 'tags', -" \ 'whitelist': ['*'], -" \ 'blacklist': ['vim', 'python'], -" \ 'priority': -70, -" \ 'completor': function('asyncomplete#sources#tags#completor'), -" \ 'config': { -" \ 'max_file_size': 50000000, -" \ }, -" \ })) - -"}}} - -" vim-lsp -"{{{ -let g:lsp_signs_enabled = 1 -let g:lsp_signs_error = {'text': '>>'} -let g:lsp_signs_warning = {'text': '>'} -let g:lsp_signs_information = {'text': '--'} -let g:lsp_signs_hint = {'text': '--'} -let g:lsp_diagnostics_echo_cursor = 1 -let g:lsp_diagnostics_echo_delay = 0 -nnoremap \l :LspDocumentDiagnostics -nnoremap \h :LspHover -nnoremap \d :LspDefinition -nnoremap \r :LspReferences -nnoremap \n :LspRename -nnoremap \s :LspDocumentSymbol -nnoremap \w :LspWorkspaceSymbol -nnoremap \ff :LspDocumentFormat -nnoremap \fr :LspDocumentRangeFormat -augroup User lsp_setup - autocmd! - if executable('vls') - autocmd User lsp_setup call lsp#register_server({ - \ 'name': 'vue', - \ 'cmd': {server_info->['vls']}, - \ 'whitelist': ['vue'], - \ }) - endif - - if executable('pyls') - autocmd User lsp_setup call lsp#register_server({ - \ 'name': 'pyls', - \ 'cmd': {server_info->['pyls']}, - \ 'whitelist': ['python'], - \ }) - endif - - if executable('typescript-language-server') - au User lsp_setup call lsp#register_server({ - \ 'name': 'typescript-language-server', - \ 'cmd': { server_info->[&shell, &shellcmdflag, 'typescript-language-server --stdio']}, - \ 'root_uri': { server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_directory(lsp#utils#get_buffer_path(), '.git/..'))}, - \ 'whitelist': ['typescript', 'javascript', 'javascript.jsx'] - \ }) - endif -augroup END - -"}}} - -" ALE -"{{{ -nnoremap ne :lnext -nnoremap pe :lprev - -let g:ale_sign_error = '>>' -let g:ale_sign_warning = '>' -let g:ale_sign_column_always = 1 - -" let g:ale_linters = {'scss': ['stylelint'], 'javascript': ['eslint'], 'php':['php'], 'html':['htmlhint'], 'python': [], 'vue': []} -let g:ale_linters = {'scss': ['stylelint'], 'javascript': [], 'php':['php'], 'html':['htmlhint'], 'python': [], 'vue': []} -" let g:ale_linters_explicit = 1 -let g:ale_html_htmlhint_options = '-c ~/.htmlhintrc --format=unix' -let g:ale_fixers = {'javascript': ['eslint']} -"}}} - -" vim-easy-align -"{{{ -xmap ga (EasyAlign) -nmap ga (EasyAlign) -"}}} - -" switch.vim -"{{{ -let g:switch_mapping = '-' -let g:switch_custom_definitions = [ - \ ['0', '1'], - \ ['ease-in', 'ease-out'], - \ ['auto', 'none'], - \ ['left', 'right'], - \ ['top', 'bottom'], - \ ['relative', 'absolute', 'fixed'] -\ ] -"}}} - -" gitgutter -"{{{ -nmap ]h GitGutterNextHunk -nmap [h GitGutterPrevHunk -omap ih GitGutterTextObjectInnerPending -omap ah GitGutterTextObjectOuterPending -xmap ih GitGutterTextObjectInnerVisual -xmap ah GitGutterTextObjectOuterVisual -"}}} - -" Use the silver searcher ag command instead of grep -"{{{ -if executable('ag') - " Use ag over grep - set grepprg=ag\ --nogroup\ --nocolor - - " Use ag in CtrlP for listing files. Lightning fast and respects .gitignore - let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' - - " ag is fast enough that CtrlP doesn't need to cache - let g:ctrlp_use_caching = 0 -endif - -"vim-wiki -let g:vimwiki_list = [{'path': '~/vimwiki/', 'path_html': '~/vimwiki_html/'}] - -" emmet -let g:user_emmet_leader_key=',,' -let g:user_emmet_settings = { -\ 'indentation': ' ', -\ 'html': { -\ 'indentation': ' ', -\ } -\} -"}}} - -" vue-vim -"{{{ -" disable preprocessor checking for vue files - increases speed -let g:vue_disable_pre_processors=0 -" set custom syntax highlighting -augroup fixhighlighting - autocmd! - autocmd BufNewFile,BufRead *.vue syntax sync fromstart -augroup END -"}}} - -" ultisnips -"{{{ -nnoremap ul :call ListUltisnips() -inoremap jkul :call ListUltisnips() - -let g:UltiSnipsSnippetsDir='~/.vim/UltiSnips' -" Trigger configuration. Do not use if you use https://github.com/Valloric/YouCompleteMe. -let g:UltiSnipsExpandTrigger='' -let g:UltiSnipsJumpForwardTrigger='' -let g:UltiSnipsJumpBackwardTrigger='' -let g:UltiSnipsEditSplit='horizontal' - -function! ListUltisnips() abort - let l:snips = UltiSnips#SnippetsInCurrentScope(1) - let l:keylist = sort(keys(l:snips)) - echo ' --------------------------------------------------' - for l:key in l:keylist - echo printf(" %-10s\t%s", l:key, l:snips[l:key]) - endfor - echo '---------------------------------------------------' -endfunction - -function! CompleteSnippets(findstart, base) - if a:findstart - let l:line = getline('.') - let l:start = col('.') - 1 - while l:start > 0 && l:line[l:start - 1] =~ '\a' - let l:start -= 1 - endwhile - return l:start - else - let l:res = [] - let l:snips = UltiSnips#SnippetsInCurrentScope(1) - let l:keylist = sort(keys(l:snips)) - for l:key in l:keylist - if l:key =~ '^' . a:base - let l:item = {'word': l:key, 'menu': l:snips[l:key]} - call add(l:res, l:item) - endif - endfor - return l:res - endif -endfunction - -set completefunc=CompleteSnippets - - - - - -"}}} - -" Netrw -"{{{ -let g:netrw_liststyle=3 -let g:netrw_list_hide='^\..*' -let g:netrw_preview = 0 -"}}} - -" undotree -"{{{ -nnoremap ut :UndotreeToggle -"}}} - -" TagBar -"{{{ -nnoremap tb :TagbarOpen fj -nnoremap ] :tag /[.#@]=expand('') -let g:tagbar_autoclose = 1 -" let g:tagbar_autopreview = 1 -" let g:tagbar_previewwin_pos = '' - -let g:tagbar_type_css = { -\ 'ctagstype' : 'css', -\ 'kinds' : [ -\ 'c:classes', -\ 'i:ids', -\ 't:tags', -\ 'm:medias' -\ ] -\} - -let g:tagbar_type_scss = { -\ 'ctagstype' : 'scss', -\ 'kinds' : [ -\ 'v:variables', -\ 'c:classes', -\ 'i:ids', -\ 't:tags', -\ 'd:medias', -\ 'm:mixins', -\ 'f:functions' -\ ] -\} - -let g:tagbar_type_vue = { -\ 'ctagstype' : 'vue', -\ 'kinds' : [ -\ 'o:objects', -\ 'f:functions', -\ 'a:array', -\ 's:string', -\ 'b:boolean', -\ 'n:number', -\ 'v:variable' -\ ] -\ } -"}}} - -" gutentags -"{{{ -let g:gutentags_ctags_tagfile = '.tags' -let g:gutentags_ctags_exclude = ['package.json', 'Session.vim', 'package-lock.json', 'TODO.txt'] -"}}} - -" colorV -"{{{ -let g:colorv_no_global_map = 1 -let g:colorv_win_pos = 'top' -let g:colorv_preview_area = 0 - -nnoremap cv :ColorV -nnoremap ce :ColorVEdit -nnoremap cc :call ToggleColorPreview() -nnoremap ci :ColorVInsert -nnoremap cp :ColorVPicker - -function! ToggleColorPreview() abort - if !exists('w:colorv_is_previewing') - let w:colorv_is_previewing = 0 - endif - if w:colorv_is_previewing == 0 - execute 'ColorVPreview' - let w:colorv_is_previewing = 1 - else - execute 'ColorVClear' - let w:colorv_is_previewing = 0 - endif -endfunction -"}}} - -" vim-instant-markdown -" this doesn't work - issue is open in guthub -let g:instant_markdown_open_to_the_world = 1 - -"}}} - -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - -" #functions {{{ -function! SetColor(name, fg, bg, fg_l, bg_l, style) abort"{{{ - - if &background ==? 'dark' - if a:fg ==? 'normal' - let l:guifg = ' guifg=' . g:d_normal_fg - let l:ctermfg = 'ctermfg=black' - " let l:termfg = 'termfg=black' - elseif a:fg ==? 'none' - let l:guifg = ' guifg=' . g:d_normal_bg - let l:ctermfg = ' ctermfg=white' - " let l:termfg = ' termfg=white' - elseif a:fg ==? '' - let l:guifg = '' - let l:ctermfg = '' - " let l:termfg = '' - else - let l:guifg = ' guifg=' . a:fg - let l:ctermfg = ' ctermfg=black' - " let l:termfg = ' termfg=black' - endif - - if a:bg ==? 'none' - let l:guibg = ' guibg=NONE' - let l:ctermbg = ' ctermbg=none' - " let l:termbg = ' termbg=none' - elseif a:bg ==? '' - let l:guibg = '' - let l:ctermbg = '' - " let l:termbg = '' - else - let l:guibg = ' guibg=' . a:bg - let l:ctermbg = ' ctermbg=black' - endif - else " light background - if a:fg_l ==? 'normal' - let l:guifg = ' guifg=' . g:l_normal_fg - let l:ctermfg = ' ctermfg=black' - " let l:termfg = ' termfg=black' - elseif a:fg_l ==? 'none' - let l:guifg = ' guifg=' . g:l_normal_bg - let l:ctermfg = ' ctermfg=white' - " let l:termfg = ' termfg=white' - elseif a:fg_l ==? '' - let l:guifg = '' - let l:ctermfg = '' - let l:termfg = '' - else - let l:guifg = ' guifg=' . a:fg_l - let l:ctermfg = ' ctermfg=black' - " let l:termfg = ' termfg=black' - endif - - if a:bg_l ==? 'none' - let l:guibg = ' guibg=NONE' - let l:ctermbg = ' ctermbg=none' - " let l:termbg = ' termbg=none' - elseif a:bg_l ==? '' - let l:guibg = '' - let l:ctermbg = '' - " let l:termbg = '' - else - let l:guibg = ' guibg=' . a:bg_l - let l:ctermbg = ' ctermbg=white' - " let l:termbg = ' termbg=white' - endif - endif - - if a:style ==? '' - let l:style = ' term=none cterm=none gui=NONE' - else - let l:style = ' term=' . a:style . ' cterm=' . a:style . ' gui=' . a:style - endif - - let l:histring = 'hi! ' . a:name . l:guifg . l:guibg . l:style - let l:histring .= l:ctermfg . l:ctermbg - " let l:histring .= l:termfg . l:termbg - - execute 'hi clear ' . a:name - execute l:histring - -endfunction"}}} - -function! GetStatusFrag(condition, colorname, conditionprefix, text) abort "{{{ -" TODO better name - let l:frag='%#' . a:colorname . '#' - let l:frag.=a:conditionprefix - let l:frag.='%{(' . a:condition . ")?'" . a:text . "':''}" - return l:frag -endfunction"}}} - -function! MyFoldText()"{{{ - - let l:linecount = v:foldend - v:foldstart - 1 - let l:line = getline(v:foldstart) - - let l:postfix = ' +' . l:linecount . ' ' . v:folddashes . '|' - while len(l:postfix) < 11 - let l:postfix = ' ' . l:postfix - endwhile - " unicode characters counted as 2 digits in length - TODO find fix - " checkout strlen - " let l:postfix = ' •••••••••••• +' . l:linecount . ' ' . v:folddashes . '|' - - let l:len_line = len(l:line) - let l:len_postfix = len(l:postfix) - - " TODO use width of window maybe (i fit's less than 80) - if l:len_line + l:len_postfix <= 80 - let l:padding = ' ' . ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -'[l:len_line + l:len_postfix + 4:79] - if l:padding[:-1] !== '-' - let l:padding = ' ' . l:padding [0:-1] - endif - let l:foldtext = l:line . l:padding . l:postfix - else - let l:foldtext = l:line[:76 - l:len_postfix] . '...' . l:postfix - endif - - return l:foldtext -endfunction"}}} - -" get name of syntax item -function! SyntaxItem() abort "{{{ - - return synIDattr(synID(line('.'),col('.'),1),'name') . ' -> ' . synIDattr(synIDtrans(synID(line('.'),col('.'),1)), 'name' ) -endfunction -nnoremap pp :echom SyntaxItem() -"}}} - -" devdocs DD -" https://gist.github.com/romainl/8d3b73428b4366f75a19be2dad2f0987#file-devdocs-vim -function! s:Get_env() abort "{{{ - if has('win64') || has('win32') || has('win16') - return 'WINDOWS' - else - return toupper(substitute(system('uname'), '\n', '', '')) - endif -endfunction -" What command to use on what system -let s:cmds = {'DARWIN': 'open', 'LINUX': 'qutebrowser', 'WINDOWS': 'start'} - -" Build the URL stub -let s:stub = s:cmds[Get_env()] . " 'http://devdocs.io/?q=" - -command! -nargs=* DD silent! call system(len(split(, ' ')) == 0 ? - \ s:stub . &ft . ' ' . expand('') . "'" : len(split(, ' ')) == 1 ? - \ s:stub . &ft . ' ' . . "'" : s:stub . . "'") -"}}} - -" use ranger as file manager -if !exists('*RangerExplorer') "{{{ - function RangerExplorer() abort - exec 'silent !ranger --choosefile=/tmp/vim_ranger_current_file ' . expand('%:p:h') - if filereadable('/tmp/vim_ranger_current_file') - exec 'edit ' . system('cat /tmp/vim_ranger_current_file') - call system('rm /tmp/vim_ranger_current_file') - endif - redraw! - endfun - map ra :call RangerExplorer() -endif -"}}} - -function! SetColorColumn() abort"{{{ - if &buftype == '' - setlocal colorcolumn=80 - endif -endfunction -"}}} - -function! GetLinterStatus(key) abort "{{{ - - let l:statuscount = 0 - - if exists('b:ale_linted') - let l:linter = ale#statusline#Count(bufnr('')) - else - let l:linter = GetDiagnosticCountsFromSigns(bufnr('')) - endif - - if has_key(l:linter, a:key) - let l:statuscount = l:linter[a:key] - endif - return l:statuscount -endfunction -"}}} - -" Shell command -" http://vim.wikia.com/wiki/VimTip1599 -function! s:RunShellCommand(cmdline) abort"{{{ - - let l:expanded_cmdline = a:cmdline - for l:part in split(a:cmdline, ' ') - if l:part[0] =~ '\v[%#<]' - let l:expanded_part = fnameescape(expand(l:part)) - let l:expanded_cmdline = substitute(l:expanded_cmdline, l:part, l:expanded_part, '') - endif - endfor - - if g:shell_scratch_buffer_nr > -1 - let l:win_nr = bufwinnr(g:shell_scratch_buffer_nr) - if l:win_nr < 0 - execute 'bdelete' g:shell_scratch_buffer_nr - top new - let g:shell_scratch_buffer_nr = bufnr('%') - else - execute l:win_nr. ' wincmd w' - setlocal modifiable - %delete _ - endif - else - top new - let g:shell_scratch_buffer_nr = bufnr('%') - endif - - setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile nowrap - nnoremap q :bdelete - augroup ResetShellBufferNr - autocmd! * - autocmd BufUnload let g:shell_scratch_buffer_nr = -1 - augroup END - - " call setline(1, 'You entered: ' . a:cmdline) - " call setline(2, 'Expanded Form: ' .l:expanded_cmdline) - " call setline(3,substitute(getline(2),'.','=','g')) - execute '$read !'. l:expanded_cmdline - 1 - - setlocal nomodifiable - if !exists('b:shell_line_count') - let b:shell_line_count = line('$') - if b:shell_line_count > 25 - let b:shell_line_count = 20 - endif - execute 'resize' b:shell_line_count + 1 - endif - - wincmd p -endfunction - -command! -complete=shellcmd -nargs=+ Shell call s:RunShellCommand() -let g:shell_scratch_buffer_nr = -1 -"}}} - -function! GetDiagnosticCountsFromSigns(buffer) abort "{{{ - let l:error = 0 - let l:warn = 0 - let l:info = 0 - let l:hint = 0 - - redir => l:result - silent exec 'sign place buffer=' . a:buffer - redir end - - let l:lines = split(l:result, '\n') - - for l:line in l:lines - if l:line =~? 'Error' - let l:error += 1 - endif - if l:line =~? 'Warning' - let l:warn += 1 - endif - if l:line =~? 'Info' - let l:info += 1 - endif - if l:line =~? 'Hint' - let l:hint += 1 - endif - endfor - - return {'error': l:error, 'warning': l:warn, 'info': l:info, 'hint': l:hint} - -endfunction -"}}} - -" https://stackoverflow.com/a/40195855 -" ex_command: command to run to execute file -function! SaveAndExecute(ex_command) abort "{{{ - " SOURCE [reusable window]: https://github.com/fatih/vim-go/blob/master/autoload/go/ui.vim - - " save and reload current file - silent execute "update | edit" - - " get file path of current file - let s:current_buffer_file_path = expand("%") - - let s:output_buffer_name = "Output" - let s:output_buffer_filetype = "output" - - " reuse existing buffer window if it exists otherwise create a new one - if !exists("s:buf_nr") || !bufexists(s:buf_nr) || bufwinnr(s:buf_nr) == -1 - silent execute 'top new ' . s:output_buffer_name - let s:buf_nr = bufnr('%') - elseif bufwinnr(s:buf_nr) != bufwinnr('%') - silent execute bufwinnr(s:buf_nr) . 'wincmd w' - endif - - silent execute "setlocal filetype=" . s:output_buffer_filetype - setlocal bufhidden=delete - setlocal buftype=nofile - setlocal noswapfile - setlocal nobuflisted - setlocal winfixheight - setlocal cursorline " make it easy to distinguish - setlocal nonumber - setlocal norelativenumber - setlocal showbreak="" - - nnoremap q :bdelete!'.zz - - " clear the buffer - setlocal noreadonly - " setlocal modifiable - %delete _ - - " add the console output - silent execute '.!'. a:ex_command . ' ' . shellescape(s:current_buffer_file_path, 1) - - " resize window to content length - " Note: This is annoying because if you print a lot of lines then your code buffer is forced to a height of one line every time you run this function. - " However without this line the buffer starts off as a default size and if you resize the buffer then it keeps that custom size after repeated runs of this function. - " But if you close the output buffer then it returns to using the default size when its recreated - "execute 'resize' . line('$') - - " make the buffer non modifiable - setlocal readonly - " setlocal nomodifiable -endfunction -"}}} -"}}} - -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - -" #settings {{{ -scriptencoding utf-8 -set ttyfast - -if &term ==? 'xterm-256color' - set termguicolors -endif - -syntax on -set background=light -set fillchars=stl:\ ,stlnc:\ ,vert:\| -colorscheme monotonous - -set guioptions-=mTrLb -set guioptions+=c - -set updatetime=100 - -set backupdir=~/.vimtmp -set directory=~/.vimtmp - -set tags+=./.tags,.tags;/home/ray/ - -" persisitent undo file -set undodir=/home/ray/.vim/undodir -set undofile - -set clipboard=unnamedplus - -set ignorecase -set smartcase - -set wildmenu -set wildmode=longest:full,full - -set hidden - -set number relativenumber -set hlsearch - -" set previewheight=24 -" set splitbelow - -set completeopt=longest,menuone -set completeopt-=preview - -set nospell -set spelllang=en_gb -set dictionary+=/usr/share/dict/brit-a-z.txt,/usr/share/dict/britcaps.txt -set thesaurus+=/usr/share/dict/mthesaur.txt - -" function! GetGitRoot() abort -" let gitroot=system("git rev-parse --show-toplevel") -" if gitroot=~?"^fatal" -" let gitstring = system("echo ${PWD/#$HOME/'~'}") . "/" -" let gitstring .= expand("%t") -" else -" let gitstring = system("echo ${PWD/#$HOME/'~'}") . "/" -" let gitstring .= expand("%t") -" let gitstring .= " [ " . system("git branch | grep '*' | cut -d ' ' -f2") -" let gitstring .= " ] ( " . system('basename "' . gitroot . '"') . " )" -" endif -" return gitstring -" endfunction -" let &titlestring="%{GetGitRoot()}" -" set title - -set tabstop=8 -set softtabstop=2 -set shiftwidth=2 -set shiftround -set expandtab -set autoindent - -set textwidth=180 -set formatoptions=cq -set wrapmargin=0 - -set foldcolumn=1 -set signcolumn=yes -set colorcolumn=80 - -set iskeyword+=- -set scrolloff=10 -set showcmd -set incsearch - -set laststatus=2 -set shortmess=aoOT -set cmdheight=2 - -set foldmethod=manual - -set showmode - -set autoindent -set breakindent -set showbreak=\ \ ↳\ - -set mouse=a - -set listchars=eol:¬,tab:>-,trail:~,extends:>,precedes:<,space:· - -set foldtext=MyFoldText() -"}}} - -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - -" #mappings {{{ -let g:mapleader = ' ' - -" miscallaneous {{{ -nnoremap : :setlocal norelativenumber: -nnoremap rc :so $MYVIMRC -nnoremap nn :set invrelativenumber -nnoremap nh (&hls && v:hlsearch ? ':nohls' : ':set hls')."\n" -nnoremap sl :set invlist -nnoremap aa A -nnoremap a2 A -nnoremap ab AB -nnoremap co :!clear; -" Focus on current fold, close the rest -nnoremap zz zMzvzt -" replace current word with last yanked/deleted text -nnoremap rr "_diwP -" replace current word with last yanked text -nnoremap ry diw"0P -" quick grep of visual selection -vnoremap gr y:grep! -R " . -" open quickfix window of TODOs -nnoremap td :grep! -R '// *TODO' .:botright cwindow:echo len(getqflist()) 'TODOs' -" devdocs mapping -nnoremap dd :DD -" write and delete current buffer -nnoremap bx :w\|bd - -"}}} - -" git mappings {{{ -nnoremap gs :Gstatus -nnoremap gd :Gdiff -nnoremap gD :!clear; echo 'git diff'; git diff -nnoremap ga :!clear; git add %; git status -nnoremap gA :!clear; git add .; git status -nnoremap gc :Gcommit -nnoremap gg :!clear; git add %; git commit -m '' -nnoremap gp :!clear; echo 'git push'; git push -" nnoremap gp :terminal echo ':git push' & git push -" nnoremap gp :Gpush -" nnoremap gp :pedit | read ! echo 'git push'; git push -nnoremap gl :Glog -"}}} - -" netrw {{{ -nnoremap ex :Ex -nnoremap ee :e . -nnoremap eq :Rex -"}}} - - " better window/tab/buffer navigation/management {{{ -nnoremap j :resize -5 -nnoremap k :resize +5 -nnoremap l :vertical resize +5 -nnoremap h :vertical resize -5 - -"}}} - -"location list and quickfix mappings {{{ -nnoremap lo :botright lwindow -nnoremap :lprevzv -nnoremap :lnextzv -nnoremap lc :lclose -nnoremap lh :lhistory -nnoremap lp :lolder -nnoremap ln :lnewer - -nnoremap qo :botright cwindow -nnoremap :cprevzv -nnoremap :cnextzv -nnoremap qc :cclose -nnoremap qh :chistory -nnoremap qp :colder -nnoremap qn :cnewer -"}}} - -" insert mode mappings {{{ -inoremap jkrg :reg -inoremap :w :w -inoremap [:w :w -inoremap {:w :w -"}}} - -" brace/quotes completion {{{ -inoremap {{ {} -inoremap { {}O -inoremap {; {};O -inoremap {{{ {{}} - -inoremap (( () -inoremap ( ()O -inoremap (; (); - -inoremap [[ [] -inoremap [ []O - -inoremap "" "" -inoremap """ "" -inoremap "; ""; -inoremap '' '' -inoremap ''' '' -inoremap '; ''; - -"}}} - -"}}} -"}}} - -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - -" #abbreviations {{{ -iabbrev adn and -iabbrev waht what -iabbrev tehn then -"}}} - -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - -" #autocommands {{{ - -" persistent folds {{{ -augroup AutoSaveFolds - autocmd! - autocmd BufWinLeave ?* mkview - autocmd BufWinEnter ?* silent loadview -augroup END -"}}} - -" fix higlight problems such as vertical-align etc {{{ -augroup VimCSS3Syntax - autocmd! - autocmd FileType css setlocal iskeyword+=- -augroup END -"}}} - -" Show trailing whitepace and spaces before a tab: {{{ -augroup whitespaceerrors - autocmd! - autocmd Syntax * syn match ExtraWhitespace /\s\+$\| \+\ze\t/ containedin=ALL -augroup END -"}}} - -" automatically reload if color scheme file written {{{ -" augroup coloreload -" autocmd! -" autocmd BufWritePost customred256.vim so $MYVIMRC -" augroup end -" -"}}} - -" line numbering {{{ -augroup linenumbering - autocmd! - autocmd InsertEnter * :set norelativenumber - autocmd InsertLeave * :set number relativenumber - autocmd WinEnter * :set number relativenumber - autocmd WinLeave * set norelativenumber - autocmd CmdlineLeave * :set number relativenumber - " see 'mapping nnoremap :' for setting norelative number. -augroup END -"}}} - -" colorcolumns {{{ -augroup colorcolumns - autocmd! - autocmd WinEnter * call SetColorColumn() - autocmd WinLeave * setlocal colorcolumn=0 -augroup END -"}}} - -" Automatically reload .vimrc if chanaged {{{ -augroup myvimrc - autocmd! - autocmd BufWritePost .vimrc,_vimrc,vimrc,.gvimrc,_gvimrc,gvimrc so $MYVIMRC | if has('gui_running') | so $MYGVIMRC | endif -augroup END -"}}} - -" Open qfix after grepping {{{ -augroup qfixopen - autocmd! - autocmd QuickFixCmdPost *grep* botright cwindow -augroup END -"}}} -" }}} - -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - -" #statusline {{{ -set statusline=%!GetStatus(1) - -function! GetStatus(isactive) abort "{{{ - " let l:linter = ale#statusline#Count(bufnr('')) - let l:divider = '- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >' - let l:separator = '%#StatusLineSeparator# ' - let l:normal = '%#StatusLineNormal#' - let l:active = '%#StatusLineActive#' - let l:statusline = '' - - "buffer number - if a:isactive - let l:statusline .= '%#StatusLineBufferNrActive#' - else - let l:statusline .= '%#StatusLineBufferNr#' - endif - let l:statusline .= ' %n %* ' - - - " file percentage {{{ - let l:statusline .= '%#FoldColumn# ' - if a:isactive - let l:statusline .= '%#StatusLinePercentActive#' - let l:statusline .= '%P %#StatusLineDirActive#of %#StatusLineFileActive#%L %* ' - else - let l:statusline .= '%#StatusLinePercent#' - let l:statusline .= '%P %#StatusLineDir#of %#StatusLinePercent#%L %* ' - endif"}}} - - " non-empty buftype (help, quickfix, etc) {{{ - if a:isactive - let l:statusline .= l:active . "%{&buftype == '' ? '' : ' '}%q%h%w%#StatusLineActiveNoText#" - else - let l:statusline .= l:normal . "%{&buftype == '' ? '' : ' '}%q%h%w%#StatusLineNormalNoText#" - endif - let l:statusline .= "%{&buftype == '' ? '' : ' '}%s" -"}}} - - " right/left divider {{{ - let l:statusline.=l:separator - " modified version - let l:color = 'StatusLineDivMod' . (a:isactive?'Active':'') - let l:statusline .= GetStatusFrag("&modified && mode() != 'i'", l:color, '%<', l:divider) - - " unmodified version - let l:color = 'StatusLineDiv' . (a:isactive?'Active':'') - let l:statusline .= GetStatusFrag("!&modified && mode() != 'i'", l:color, '%<', l:divider) - - " input mode version - if a:isactive - let l:statusline .= GetStatusFrag("mode() == 'i'", 'StatusLineDivInput', '%<', l:divider) - endif - - let l:statusline.= l:separator . '%*%=' - - let l:statusline .= ' ' - "}}} - - " file info{{{ - if a:isactive == 1 - " let l:statusline.=l:active - let l:statusline.='%#StatusLineFileActive#' - " let l:statusline.=" %{strlen(&ft)?&ft:'none'} " - " let l:statusline.=l:separator . l:active - let l:statusline.=' %{strlen(&fenc)?&fenc:&enc} ' - " let l:statusline.=l:separator . l:active - let l:statusline.=' %{&fileformat} ' - let l:statusline.=l:separator . l:active - " let l:statusline.=' %{&spelllang} ' - " let l:statusline.=l:separator - endif -"}}} - - " path/filename.extension {{{ - if a:isactive - let l:statusline.='%#StatusLineDirActive# ' - let l:statusline.="%{expand('%:p:h:t')}/" - let l:statusline.='%#StatusLineFileActive#' - - let l:statusline.="%{expand('%:t:r')}" - - let l:statusline.='%#StatusLineDotActive#' - let l:statusline.="%{strlen(expand('%:e'))?'.':''}" - let l:statusline.='%#StatusLineExtActive#' - let l:statusline.="%{strlen(expand('%:e'))?expand('%:e'):expand('%:e')} " - let l:statusline .= '%#InterfaceSignWarning# %R ' - else - let l:statusline.='%#StatusLineDir# ' - let l:statusline.="%{fnamemodify(expand('%:p:h'),':~')}/" - let l:statusline.='%#StatusLineFile#' - - let l:statusline.="%{expand('%:t:r')}" - - let l:statusline.='%#StatusLineDot#' - let l:statusline.="%{strlen(expand('%:e'))?'.':''}" - let l:statusline.='%#StatusLineExt#' - let l:statusline.="%{strlen(expand('%:e'))?expand('%:e'):expand('%:e')} " - let l:statusline .= '%#LinterWarningInactive# %R ' - endif - let l:statusline.='%*' - "}}} - - " linter status {{{ - if a:isactive - " errors - let l:statusline .= "%#LinterDashActive#%{(GetLinterStatus('error') == 0?'-':'')}" - let l:statusline .= "%#LinterError#%{(GetLinterStatus('error') == 0?'':GetLinterStatus('error'))}" - " style errors - let l:statusline .= '%#LinterDash#|' - let l:statusline .= "%#LinterDashActive#%{(GetLinterStatus('style_error') == 0?'-':'')}" - let l:statusline .= "%#LinterErrorStyle#%{(GetLinterStatus('style_error') == 0?'':GetLinterStatus('style_error'))} " - - " warnings - let l:statusline .= "%#LinterDashActive#%{(GetLinterStatus('warning') == 0?'-':'')}" - let l:statusline .= "%#LinterWarning#%{(GetLinterStatus('warning') == 0?'':GetLinterStatus('warning'))}" - " style warnings - let l:statusline .= '%#LinterDash#|' - let l:statusline .= "%#LinterDashActive#%{(GetLinterStatus('style_warning') == 0?'-':'')}" - let l:statusline .= "%#LinterWarningStyle#%{(GetLinterStatus('style_warning') == 0?'':GetLinterStatus('style_warning'))} " - - " info - let l:statusline .= "%#LinterDashActive#%{(GetLinterStatus('info') == 0?'-':'')}" - let l:statusline .= "%#LinterInfo#%{(GetLinterStatus('info') == 0?'':GetLinterStatus('info'))}" - else - " errors - let l:statusline .= "%#LinterDash#%{(GetLinterStatus('error') == 0?'-':'')}" - let l:statusline .= "%#LinterErrorInactive#%{(GetLinterStatus('error') == 0?'':GetLinterStatus('error'))}" - " style errors - let l:statusline .= '%#LinterDash#|' - let l:statusline .= "%{(GetLinterStatus('style_error') == 0?'-':'')}" - let l:statusline .= "%#LinterErrorStyleInactive#%{(GetLinterStatus('style_error') == 0?'':GetLinterStatus('style_error'))} " - - " warnings - let l:statusline .= "%#LinterDash#%{(GetLinterStatus('warning') == 0?'-':'')}" - let l:statusline .= "%#LinterWarningInactive#%{(GetLinterStatus('warning') == 0?'':GetLinterStatus('warning'))}" - " style warnings - let l:statusline .= '%#LinterDash#|' - let l:statusline .= "%{(GetLinterStatus('style_warning') == 0?'-':'')}" - let l:statusline .= "%#LinterWarningStyleInactive#%{(GetLinterStatus('style_warning') == 0?'':GetLinterStatus('style_warning'))} " - - " info - let l:statusline .= "%#LinterDash#%{GetLinterStatus('info') == 0 ? '-' : GetLinterStatus('info')}" - endif -"}}} - - return l:statusline - -endfunction -"}}} - -function! DoInsertEnter() "{{{ - set cursorline - call SetColor('LineNr', '#262626', '', '#cccccc', '', '') - call SetColor('CursorLineNr', '#bcbcbc', '', '#999999', '', 'bold') -endfunction -"}}} - -function! DoInsertLeave() "{{{ - set nocursorline - call SetColor('LineNr', '#3a3a3a', '', '#999999', '', '') - call SetColor('CursorLineNr', '#767676', '', '#777777', '', 'bold') -endfunction -"}}} - -augroup status "{{{ - autocmd! - autocmd WinNew,WinEnter * setlocal statusline=%!GetStatus(1) - autocmd WinLeave * setlocal statusline=%!GetStatus(0) - " autocmd WinNew * setlocal statusline=%!GetStatus(1) - " autocmd InsertChange * setlocal statusline=%!GetStatus(1) -augroup END -"}}} - -augroup statuscursorlines "{{{ - au! - au InsertEnter * call DoInsertEnter() - au InsertLeave * call DoInsertLeave() -augroup END -"}}} -"}}} - -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - -" #tabline {{{ -if exists('+showtabline') - - " Rename tabs to show tab number. - " based on: - " http://stackoverflow.com/questions/5927952/whats-implementation-of-vims-default-tabline-function - - function! MyTabLine() "{{{ - let l:customtabline = '' - let l:currenttabnum = tabpagenr() - let l:lasttabnumber = tabpagenr('$') - let l:tabnumber = 1 - while l:tabnumber <= l:lasttabnumber - let l:buflist = tabpagebuflist(l:tabnumber) - let l:winnr = tabpagewinnr(l:tabnumber) - - if l:lasttabnumber > 1 - let l:customtabline .= '%' . l:tabnumber . 'T' - let l:customtabline .= (l:tabnumber == l:currenttabnum ? '%1*' : '%2*') - - let l:customtabline .= (l:tabnumber == l:currenttabnum ? '%#TabNumSel#' : '%#TabNum#') - let l:customtabline .= ' ' . l:tabnumber - let l:customtabline .= '%#TabSeparator#:' - let l:customtabline .= (l:tabnumber == l:currenttabnum ? '%#TabLineItemSel#' : '%#TabLineItem#') - endif - - let l:bufnr = l:buflist[l:winnr - 1] - let l:file = bufname(l:bufnr) - let l:buftype = getbufvar(l:bufnr, '&buftype') - - if l:buftype ==# 'help' - let l:file = 'help:' . fnamemodify(l:file, ':t:r') - - elseif l:buftype ==# 'quickfix' - let l:file = 'quickfix' - - elseif l:buftype ==# 'nofile' - if l:file =~# '\/.' - let l:file = substitute(l:file, '.*\/\ze.', '', '') - endif - - else - let l:file = fnamemodify(l:file, ':p:t') - - endif - - if l:file ==# '' - let l:file = "''" - endif - - let l:customtabline .= l:file . ' %#TabLineNoise# ' - - let l:tabnumber = l:tabnumber + 1 - - endwhile - - let l:customtabline .= '%T%#TabLineFill#%=' - let l:customtabline .= '%#TabLineItemSel# %{fugitive#statusline()}%#TabSeparator# ' - let l:customtabline .= '%#TabLineNoise# ' - let l:customtabline .= '%#TabLineNoise# ' - " let l:customtabline .= '%#TabSeparator# "%#TabLineItemSel#%{v:register}%#TabSeparator#" ' - " let l:customtabline .= '%#TabLineNoise# ' - let l:customtabline .= "%#TabLineItemSel# %{ObsessionStatus(fnamemodify(v:this_session,':t'),'---')} %*" - - return l:customtabline - - endfunction -"}}} - - set showtabline=2 - set tabline=%!MyTabLine() - -endif " exists("+showtabline") -"}}} - -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - -" #pymode {{{ -let g:pymode = 1 -let g:pymode_syntax = 1 -let g:pymode_syntax_all = 1 -let g:pymode_syntax_print_as_function = 1 -let g:pymode_syntax_highlight_async_await = 1 -let g:pymode_syntax_highlight_equal_operator = 1 -let g:pymode_syntax_highlight_stars_operator = 1 -let g:pymode_syntax_highlight_self = 1 -let g:pymode_syntax_indent_errors = 0 -let g:pymode_syntax_space_errors = 0 -let g:pymode_syntax_string_formatting = 1 -let g:pymode_syntax_string_format = 1 -let g:pymode_syntax_string_templates = 1 -let g:pymode_syntax_doctests = 1 -let g:pymode_syntax_docstrings = 1 -let g:pymode_syntax_builtin_objs = 1 -let g:pymode_syntax_builtin_types = 1 -let g:pymode_syntax_builtin_funcs = 1 -let g:pymode_syntax_highlight_exceptions = 1 -let g:pymode_syntax_slow_sync = 1 -"}}} - -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - -" vim: foldmethod=marker