1
0
Fork 0

some cleanup, vim is back as well as st

This commit is contained in:
Von Random 2018-07-10 03:01:14 +03:00
parent 5e6c4b6caa
commit 0a87a30e45
8 changed files with 464 additions and 1085 deletions

3
.gitmodules vendored
View file

@ -4,9 +4,6 @@
[submodule "vim-easy-align"]
path = vimpack/start/vim-easy-align
url = https://github.com/junegunn/vim-easy-align.git
[submodule "vim-fugitive"]
path = vimpack/start/vim-fugitive
url = https://github.com/tpope/vim-fugitive.git
[submodule "vim-polyglot"]
path = vimpack/start/vim-polyglot
url = https://github.com/sheerun/vim-polyglot

@ -1 +0,0 @@
Subproject commit 8fa5cad8d7502be2f3438d02f353ab62264d358e

View file

@ -0,0 +1,453 @@
" File: hybrid.vim
" Maintainer: Andrew Wong (w0ng)
" URL: https://github.com/w0ng/vim-hybrid
" Modified: 27 Jan 2013 07:33 AM AEST
" License: MIT
" Description:"{{{
" ----------------------------------------------------------------------------
" The default RGB colour palette is taken from Tomorrow-Night.vim:
" https://github.com/chriskempson/vim-tomorrow-theme
"
" The reduced RGB colour palette is taken from Codecademy's online editor:
" https://www.codecademy.com/learn
"
" The syntax highlighting scheme is taken from jellybeans.vim:
" https://github.com/nanotech/jellybeans.vim
"
" The is code taken from solarized.vim:
" https://github.com/altercation/vim-colors-solarized
"}}}
" Requirements And Recommendations:"{{{
" ----------------------------------------------------------------------------
" Requirements
" - gVim 7.3+ on Linux, Mac and Windows.
" - Vim 7.3+ on Linux and Mac, using a terminal that supports 256 colours.
"
" Due to the limited 256 palette, colours in Vim and gVim will still be slightly
" different.
"
" In order to have Vim use the same colours as gVim (the way this colour scheme
" is intended), it is recommended that you define the basic 16 colours in your
" terminal.
"
" For Linux users (rxvt-unicode, xterm):
"
" 1. Add the default palette to ~/.Xresources:
"
" https://gist.github.com/3278077
"
" or alternatively, add the reduced contrast palette to ~/.Xresources:
"
" https://gist.github.com/w0ng/16e33902508b4a0350ae
"
" 2. Add to ~/.vimrc:
"
" let g:hybrid_custom_term_colors = 1
" let g:hybrid_reduced_contrast = 1 " Remove this line if using the default palette.
" colorscheme hybrid
"
" For OSX users (iTerm):
"
" 1. Import the default colour preset into iTerm:
"
" https://raw.githubusercontent.com/w0ng/dotfiles/master/iterm2/hybrid.itermcolors
"
" or alternatively, import the reduced contrast color preset into iTerm:
"
" https://raw.githubusercontent.com/w0ng/dotfiles/master/iterm2/hybrid-reduced-contrast.itermcolors
"
" 2. Add to ~/.vimrc:
"
" let g:hybrid_custom_term_colors = 1
" let g:hybrid_reduced_contrast = 1 " Remove this line if using the default palette.
" colorscheme hybrid
"}}}
" Initialisation:"{{{
" ----------------------------------------------------------------------------
hi clear
if exists("syntax_on")
syntax reset
endif
let s:style = &background
let g:colors_name = "hybrid"
"}}}
" GUI And Cterm Palettes:"{{{
" ----------------------------------------------------------------------------
let s:palette = {'gui' : {} , 'cterm' : {}}
if exists("g:hybrid_reduced_contrast") && g:hybrid_reduced_contrast == 1
let s:gui_background = "#232c31"
let s:gui_selection = "#425059"
let s:gui_line = "#2d3c46"
let s:gui_comment = "#6c7a80"
else
let s:gui_background = "#1d1f21"
let s:gui_selection = "#373b41"
let s:gui_line = "#282a2e"
let s:gui_comment = "#707880"
endif
let s:palette.gui.background = { 'dark' : s:gui_background , 'light' : "#e4e4e4" }
let s:palette.gui.foreground = { 'dark' : "#c5c8c6" , 'light' : "#000000" }
let s:palette.gui.selection = { 'dark' : s:gui_selection , 'light' : "#bcbcbc" }
let s:palette.gui.line = { 'dark' : s:gui_line , 'light' : "#d0d0d0" }
let s:palette.gui.comment = { 'dark' : s:gui_comment , 'light' : "#5f5f5f" }
let s:palette.gui.red = { 'dark' : "#cc6666" , 'light' : "#5f0000" }
let s:palette.gui.orange = { 'dark' : "#de935f" , 'light' : "#875f00" }
let s:palette.gui.yellow = { 'dark' : "#f0c674" , 'light' : "#5f5f00" }
let s:palette.gui.green = { 'dark' : "#b5bd68" , 'light' : "#005f00" }
let s:palette.gui.aqua = { 'dark' : "#8abeb7" , 'light' : "#005f5f" }
let s:palette.gui.blue = { 'dark' : "#81a2be" , 'light' : "#00005f" }
let s:palette.gui.purple = { 'dark' : "#b294bb" , 'light' : "#5f005f" }
let s:palette.gui.window = { 'dark' : "#303030" , 'light' : "#9e9e9e" }
let s:palette.gui.darkcolumn = { 'dark' : "#1c1c1c" , 'light' : "#808080" }
let s:palette.gui.addbg = { 'dark' : "#5F875F" , 'light' : "#d7ffd7" }
let s:palette.gui.addfg = { 'dark' : "#d7ffaf" , 'light' : "#005f00" }
let s:palette.gui.changebg = { 'dark' : "#5F5F87" , 'light' : "#d7d7ff" }
let s:palette.gui.changefg = { 'dark' : "#d7d7ff" , 'light' : "#5f005f" }
let s:palette.gui.delbg = { 'dark' : "#cc6666" , 'light' : "#ffd7d7" }
let s:palette.gui.darkblue = { 'dark' : "#00005f" , 'light' : "#d7ffd7" }
let s:palette.gui.darkcyan = { 'dark' : "#005f5f" , 'light' : "#005f00" }
let s:palette.gui.darkred = { 'dark' : "#5f0000" , 'light' : "#d7d7ff" }
let s:palette.gui.darkpurple = { 'dark' : "#5f005f" , 'light' : "#5f005f" }
if exists("g:hybrid_custom_term_colors") && g:hybrid_custom_term_colors == 1
let s:cterm_foreground = "15" " White
let s:cterm_selection = "8" " DarkGrey
let s:cterm_line = "0" " Black
let s:cterm_comment = "7" " LightGrey
let s:cterm_red = "9" " LightRed
let s:cterm_orange = "3" " DarkYellow
let s:cterm_yellow = "11" " LightYellow
let s:cterm_green = "10" " LightGreen
let s:cterm_aqua = "14" " LightCyan
let s:cterm_blue = "12" " LightBlue
let s:cterm_purple = "13" " LightMagenta
let s:cterm_delbg = "9" " LightRed
else
let s:cterm_foreground = "250"
let s:cterm_selection = "237"
let s:cterm_line = "235"
let s:cterm_comment = "243"
let s:cterm_red = "167"
let s:cterm_orange = "173"
let s:cterm_yellow = "221"
let s:cterm_green = "143"
let s:cterm_aqua = "109"
let s:cterm_blue = "110"
let s:cterm_purple = "139"
let s:cterm_delbg = "167"
endif
let s:palette.cterm.background = { 'dark' : "234" , 'light' : "254" }
let s:palette.cterm.foreground = { 'dark' : s:cterm_foreground , 'light' : "16" }
let s:palette.cterm.window = { 'dark' : "236" , 'light' : "247" }
let s:palette.cterm.selection = { 'dark' : s:cterm_selection , 'light' : "250" }
let s:palette.cterm.line = { 'dark' : s:cterm_line , 'light' : "252" }
let s:palette.cterm.comment = { 'dark' : s:cterm_comment , 'light' : "59" }
let s:palette.cterm.red = { 'dark' : s:cterm_red , 'light' : "52" }
let s:palette.cterm.orange = { 'dark' : s:cterm_orange , 'light' : "94" }
let s:palette.cterm.yellow = { 'dark' : s:cterm_yellow , 'light' : "58" }
let s:palette.cterm.green = { 'dark' : s:cterm_green , 'light' : "22" }
let s:palette.cterm.aqua = { 'dark' : s:cterm_aqua , 'light' : "23" }
let s:palette.cterm.blue = { 'dark' : s:cterm_blue , 'light' : "17" }
let s:palette.cterm.purple = { 'dark' : s:cterm_purple , 'light' : "53" }
let s:palette.cterm.darkcolumn = { 'dark' : "234" , 'light' : "244" }
let s:palette.cterm.addbg = { 'dark' : "65" , 'light' : "194" }
let s:palette.cterm.addfg = { 'dark' : "193" , 'light' : "22" }
let s:palette.cterm.changebg = { 'dark' : "60" , 'light' : "189" }
let s:palette.cterm.changefg = { 'dark' : "189" , 'light' : "53" }
let s:palette.cterm.delbg = { 'dark' : s:cterm_delbg , 'light' : "224" }
let s:palette.cterm.darkblue = { 'dark' : "17" , 'light' : "194" }
let s:palette.cterm.darkcyan = { 'dark' : "24" , 'light' : "22" }
let s:palette.cterm.darkred = { 'dark' : "52" , 'light' : "189" }
let s:palette.cterm.darkpurple = { 'dark' : "53" , 'light' : "53" }
"}}}
" Formatting Options:"{{{
" ----------------------------------------------------------------------------
let s:none = "NONE"
let s:t_none = "NONE"
let s:n = "NONE"
let s:c = ",undercurl"
let s:r = ",reverse"
let s:s = ",standout"
let s:b = ",bold"
let s:u = ",underline"
let s:i = ",italic"
"}}}
" Highlighting Primitives:"{{{
" ----------------------------------------------------------------------------
function! s:build_prim(hi_elem, field)
" Given a:hi_elem = bg, a:field = comment
let l:vname = "s:" . a:hi_elem . "_" . a:field " s:bg_comment
let l:gui_assign = "gui".a:hi_elem."=".s:palette.gui[a:field][s:style] " guibg=...
let l:cterm_assign = "cterm".a:hi_elem."=".s:palette.cterm[a:field][s:style] " ctermbg=...
exe "let " . l:vname . " = ' " . l:gui_assign . " " . l:cterm_assign . "'"
endfunction
let s:bg_none = ' guibg=NONE ctermbg=NONE'
call s:build_prim('bg', 'foreground')
call s:build_prim('bg', 'background')
call s:build_prim('bg', 'selection')
call s:build_prim('bg', 'line')
call s:build_prim('bg', 'comment')
call s:build_prim('bg', 'red')
call s:build_prim('bg', 'orange')
call s:build_prim('bg', 'yellow')
call s:build_prim('bg', 'green')
call s:build_prim('bg', 'aqua')
call s:build_prim('bg', 'blue')
call s:build_prim('bg', 'purple')
call s:build_prim('bg', 'window')
call s:build_prim('bg', 'darkcolumn')
call s:build_prim('bg', 'addbg')
call s:build_prim('bg', 'addfg')
call s:build_prim('bg', 'changebg')
call s:build_prim('bg', 'changefg')
call s:build_prim('bg', 'delbg')
call s:build_prim('bg', 'darkblue')
call s:build_prim('bg', 'darkcyan')
call s:build_prim('bg', 'darkred')
call s:build_prim('bg', 'darkpurple')
let s:fg_none = ' guifg=NONE ctermfg=NONE'
call s:build_prim('fg', 'foreground')
call s:build_prim('fg', 'background')
call s:build_prim('fg', 'selection')
call s:build_prim('fg', 'line')
call s:build_prim('fg', 'comment')
call s:build_prim('fg', 'red')
call s:build_prim('fg', 'orange')
call s:build_prim('fg', 'yellow')
call s:build_prim('fg', 'green')
call s:build_prim('fg', 'aqua')
call s:build_prim('fg', 'blue')
call s:build_prim('fg', 'purple')
call s:build_prim('fg', 'window')
call s:build_prim('fg', 'darkcolumn')
call s:build_prim('fg', 'addbg')
call s:build_prim('fg', 'addfg')
call s:build_prim('fg', 'changebg')
call s:build_prim('fg', 'changefg')
call s:build_prim('fg', 'darkblue')
call s:build_prim('fg', 'darkcyan')
call s:build_prim('fg', 'darkred')
call s:build_prim('fg', 'darkpurple')
exe "let s:fmt_none = ' gui=NONE". " cterm=NONE". " term=NONE" ."'"
exe "let s:fmt_bold = ' gui=NONE".s:b. " cterm=NONE".s:b. " term=NONE".s:b ."'"
exe "let s:fmt_bldi = ' gui=NONE".s:b. " cterm=NONE".s:b. " term=NONE".s:b ."'"
exe "let s:fmt_undr = ' gui=NONE".s:u. " cterm=NONE".s:u. " term=NONE".s:u ."'"
exe "let s:fmt_undb = ' gui=NONE".s:u.s:b. " cterm=NONE".s:u.s:b. " term=NONE".s:u.s:b."'"
exe "let s:fmt_undi = ' gui=NONE".s:u. " cterm=NONE".s:u. " term=NONE".s:u ."'"
exe "let s:fmt_curl = ' gui=NONE".s:c. " cterm=NONE".s:c. " term=NONE".s:c ."'"
exe "let s:fmt_ital = ' gui=NONE".s:i. " cterm=NONE".s:i. " term=NONE".s:i ."'"
exe "let s:fmt_stnd = ' gui=NONE".s:s. " cterm=NONE".s:s. " term=NONE".s:s ."'"
exe "let s:fmt_revr = ' gui=NONE".s:r. " cterm=NONE".s:r. " term=NONE".s:r ."'"
exe "let s:fmt_revb = ' gui=NONE".s:r.s:b. " cterm=NONE".s:r.s:b. " term=NONE".s:r.s:b."'"
exe "let s:sp_none = ' guisp=". s:none ."'"
exe "let s:sp_foreground = ' guisp=". s:palette.gui.foreground[s:style] ."'"
exe "let s:sp_background = ' guisp=". s:palette.gui.background[s:style] ."'"
exe "let s:sp_selection = ' guisp=". s:palette.gui.selection[s:style] ."'"
exe "let s:sp_line = ' guisp=". s:palette.gui.line[s:style] ."'"
exe "let s:sp_comment = ' guisp=". s:palette.gui.comment[s:style] ."'"
exe "let s:sp_red = ' guisp=". s:palette.gui.red[s:style] ."'"
exe "let s:sp_orange = ' guisp=". s:palette.gui.orange[s:style] ."'"
exe "let s:sp_yellow = ' guisp=". s:palette.gui.yellow[s:style] ."'"
exe "let s:sp_green = ' guisp=". s:palette.gui.green[s:style] ."'"
exe "let s:sp_aqua = ' guisp=". s:palette.gui.aqua[s:style] ."'"
exe "let s:sp_blue = ' guisp=". s:palette.gui.blue[s:style] ."'"
exe "let s:sp_purple = ' guisp=". s:palette.gui.purple[s:style] ."'"
exe "let s:sp_window = ' guisp=". s:palette.gui.window[s:style] ."'"
exe "let s:sp_addbg = ' guisp=". s:palette.gui.addbg[s:style] ."'"
exe "let s:sp_addfg = ' guisp=". s:palette.gui.addfg[s:style] ."'"
exe "let s:sp_changebg = ' guisp=". s:palette.gui.changebg[s:style] ."'"
exe "let s:sp_changefg = ' guisp=". s:palette.gui.changefg[s:style] ."'"
exe "let s:sp_darkblue = ' guisp=". s:palette.gui.darkblue[s:style] ."'"
exe "let s:sp_darkcyan = ' guisp=". s:palette.gui.darkcyan[s:style] ."'"
exe "let s:sp_darkred = ' guisp=". s:palette.gui.darkred[s:style] ."'"
exe "let s:sp_darkpurple = ' guisp=". s:palette.gui.darkpurple[s:style] ."'"
"}}}
" Vim Highlighting: (see :help highlight-groups)"{{{
" ----------------------------------------------------------------------------
exe "hi! ColorColumn" .s:fg_none .s:bg_line .s:fmt_none
" Conceal"
" Cursor"
" CursorIM"
exe "hi! CursorColumn" .s:fg_none .s:bg_line .s:fmt_none
exe "hi! CursorLine" .s:fg_none .s:bg_line .s:fmt_none
exe "hi! Directory" .s:fg_blue .s:bg_none .s:fmt_none
exe "hi! DiffAdd" .s:fg_addfg .s:bg_addbg .s:fmt_none
exe "hi! DiffChange" .s:fg_changefg .s:bg_changebg .s:fmt_none
exe "hi! DiffDelete" .s:fg_background .s:bg_delbg .s:fmt_none
exe "hi! DiffText" .s:fg_background .s:bg_blue .s:fmt_none
exe "hi! ErrorMsg" .s:fg_background .s:bg_red .s:fmt_stnd
exe "hi! VertSplit" .s:fg_window .s:bg_none .s:fmt_none
exe "hi! Folded" .s:fg_comment .s:bg_darkcolumn .s:fmt_none
exe "hi! FoldColumn" .s:fg_none .s:bg_darkcolumn .s:fmt_none
exe "hi! SignColumn" .s:fg_none .s:bg_darkcolumn .s:fmt_none
" Incsearch"
exe "hi! LineNr" .s:fg_selection .s:bg_none .s:fmt_none
exe "hi! CursorLineNr" .s:fg_yellow .s:bg_none .s:fmt_none
exe "hi! MatchParen" .s:fg_background .s:bg_changebg .s:fmt_none
exe "hi! ModeMsg" .s:fg_green .s:bg_none .s:fmt_none
exe "hi! MoreMsg" .s:fg_green .s:bg_none .s:fmt_none
exe "hi! NonText" .s:fg_selection .s:bg_none .s:fmt_none
exe "hi! Pmenu" .s:fg_foreground .s:bg_selection .s:fmt_none
exe "hi! PmenuSel" .s:fg_foreground .s:bg_selection .s:fmt_revr
" PmenuSbar"
" PmenuThumb"
exe "hi! Question" .s:fg_green .s:bg_none .s:fmt_none
exe "hi! Search" .s:fg_background .s:bg_yellow .s:fmt_none
exe "hi! SpecialKey" .s:fg_selection .s:bg_none .s:fmt_none
exe "hi! SpellCap" .s:fg_blue .s:bg_darkblue .s:fmt_undr
exe "hi! SpellLocal" .s:fg_aqua .s:bg_darkcyan .s:fmt_undr
exe "hi! SpellBad" .s:fg_red .s:bg_darkred .s:fmt_undr
exe "hi! SpellRare" .s:fg_purple .s:bg_darkpurple .s:fmt_undr
exe "hi! StatusLine" .s:fg_comment .s:bg_background .s:fmt_revr
exe "hi! StatusLineNC" .s:fg_window .s:bg_comment .s:fmt_revr
exe "hi! TabLine" .s:fg_foreground .s:bg_darkcolumn .s:fmt_revr
" TabLineFill"
" TabLineSel"
exe "hi! Title" .s:fg_yellow .s:bg_none .s:fmt_none
exe "hi! Visual" .s:fg_none .s:bg_selection .s:fmt_none
" VisualNos"
exe "hi! WarningMsg" .s:fg_red .s:bg_none .s:fmt_none
" FIXME LongLineWarning to use variables instead of hardcoding
hi LongLineWarning guifg=NONE guibg=#371F1C gui=underline ctermfg=NONE ctermbg=NONE cterm=underline
" WildMenu"
" Use defined custom background colour for terminal Vim.
if !has('gui_running') && exists("g:hybrid_custom_term_colors") && g:hybrid_custom_term_colors == 1
let s:bg_normal = s:bg_none
else
let s:bg_normal = s:bg_background
endif
exe "hi! Normal" .s:fg_foreground .s:bg_normal .s:fmt_none
"}}}
" Generic Syntax Highlighting: (see :help group-name)"{{{
" ----------------------------------------------------------------------------
exe "hi! Comment" .s:fg_comment .s:bg_none .s:fmt_none
exe "hi! Constant" .s:fg_red .s:bg_none .s:fmt_none
exe "hi! String" .s:fg_green .s:bg_none .s:fmt_none
" Character"
" Number"
" Boolean"
" Float"
exe "hi! Identifier" .s:fg_purple .s:bg_none .s:fmt_none
exe "hi! Function" .s:fg_yellow .s:bg_none .s:fmt_none
exe "hi! Statement" .s:fg_blue .s:bg_none .s:fmt_none
" Conditional"
" Repeat"
" Label"
exe "hi! Operator" .s:fg_aqua .s:bg_none .s:fmt_none
" Keyword"
" Exception"
exe "hi! PreProc" .s:fg_aqua .s:bg_none .s:fmt_none
" Include"
" Define"
" Macro"
" PreCondit"
exe "hi! Type" .s:fg_orange .s:bg_none .s:fmt_none
" StorageClass"
exe "hi! Structure" .s:fg_aqua .s:bg_none .s:fmt_none
" Typedef"
exe "hi! Special" .s:fg_green .s:bg_none .s:fmt_none
" SpecialChar"
" Tag"
" Delimiter"
" SpecialComment"
" Debug"
"
exe "hi! Underlined" .s:fg_blue .s:bg_none .s:fmt_none
exe "hi! Ignore" .s:fg_none .s:bg_none .s:fmt_none
exe "hi! Error" .s:fg_red .s:bg_darkred .s:fmt_undr
exe "hi! Todo" .s:fg_addfg .s:bg_none .s:fmt_none
" Quickfix window highlighting
exe "hi! qfLineNr" .s:fg_yellow .s:bg_none .s:fmt_none
" qfFileName"
" qfLineNr"
" qfError"
"}}}
" Diff Syntax Highlighting:"{{{
" ----------------------------------------------------------------------------
" Diff
" diffOldFile
" diffNewFile
" diffFile
" diffOnly
" diffIdentical
" diffDiffer
" diffBDiffer
" diffIsA
" diffNoEOL
" diffCommon
hi! link diffRemoved Constant
" diffChanged
hi! link diffAdded Special
" diffLine
" diffSubname
" diffComment
"}}}
"
" This is needed for some reason: {{{
let &background = s:style
" }}}
" Legal:"{{{
" ----------------------------------------------------------------------------
" Copyright (c) 2011 Ethan Schoonover
" Copyright (c) 2009-2012 NanoTech
" Copyright (c) 2012 w0ng
"
" Permission is hereby granted, free of charge, to any per‐
" son obtaining a copy of this software and associated doc‐
" umentation files (the “Software”), to deal in the Soft‐
" ware without restriction, including without limitation
" the rights to use, copy, modify, merge, publish, distrib‐
" ute, sublicense, and/or sell copies of the Software, and
" to permit persons to whom the Software is furnished to do
" so, subject to the following conditions:
"
" The above copyright notice and this permission notice
" shall be included in all copies or substantial portions
" of the Software.
"
" THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY
" KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
" THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICU‐
" LAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CON‐
" TRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON‐
" NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
" THE SOFTWARE.
" }}}

View file

@ -1,728 +0,0 @@
" Vim color file
"
" " __ _ _ _ "
" " \ \ ___| | |_ _| |__ ___ __ _ _ __ ___ "
" " \ \/ _ \ | | | | | _ \ / _ \/ _ | _ \/ __| "
" " /\_/ / __/ | | |_| | |_| | __/ |_| | | | \__ \ "
" " \___/ \___|_|_|\__ |____/ \___|\____|_| |_|___/ "
" " \___/ "
"
" "A colorful, dark color scheme for Vim."
"
" File: jellybeans.vim
" URL: github.com/nanotech/jellybeans.vim
" Scripts URL: vim.org/scripts/script.php?script_id=2555
" Maintainer: NanoTech (nanotech.nanotechcorp.net)
" Version: 1.6
" Last Change: October 18th, 2016
" License: MIT
" Contributors: Andrew Wong (w0ng)
" Brian Marshall (bmars)
" Daniel Herbert (pocketninja)
" David Liang <bmdavll at gmail dot com>
" Henry So, Jr. <henryso@panix.com>
" Joe Doherty (docapotamus)
" Karl Litterfeldt (Litterfeldt)
" Keith Pitt (keithpitt)
" Philipp Rustemeier (12foo)
" Rafael Bicalho (rbika)
" Rich Healey (richo)
" Siwen Yu (yusiwen)
" Tim Willis (willist)
"
" Copyright (c) 2009-2016 NanoTech
"
" Permission is hereby granted, free of charge, to any per‐
" son obtaining a copy of this software and associated doc‐
" umentation files (the “Software”), to deal in the Soft‐
" ware without restriction, including without limitation
" the rights to use, copy, modify, merge, publish, distrib‐
" ute, sublicense, and/or sell copies of the Software, and
" to permit persons to whom the Software is furnished to do
" so, subject to the following conditions:
"
" The above copyright notice and this permission notice
" shall be included in all copies or substantial portions
" of the Software.
"
" THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY
" KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
" THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICU‐
" LAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CON‐
" TRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON‐
" NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
" THE SOFTWARE.
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let colors_name = "jellybeans"
if has("gui_running") || (has('termguicolors') && &termguicolors)
let s:true_color = 1
else
let s:true_color = 0
endif
if s:true_color || &t_Co >= 88
let s:low_color = 0
else
let s:low_color = 1
endif
" Configuration Variables:
" - g:jellybeans_overrides (default = {})
" - g:jellybeans_use_lowcolor_black (default = 0)
" - g:jellybeans_use_gui_italics (default = 1)
" - g:jellybeans_use_term_italics (default = 0)
let s:background_color = "151515"
if exists("g:jellybeans_overrides")
let s:overrides = g:jellybeans_overrides
else
let s:overrides = {}
endif
" Backwards compatibility
if exists("g:jellybeans_background_color")
\ || exists("g:jellybeans_background_color_256")
\ || exists("g:jellybeans_use_term_background_color")
let s:overrides = deepcopy(s:overrides)
if !has_key(s:overrides, "background")
let s:overrides["background"] = {}
endif
if exists("g:jellybeans_background_color")
let s:overrides["background"]["guibg"] = g:jellybeans_background_color
endif
if exists("g:jellybeans_background_color_256")
let s:overrides["background"]["256ctermbg"] = g:jellybeans_background_color_256
endif
if exists("g:jellybeans_use_term_background_color")
\ && g:jellybeans_use_term_background_color
let s:overrides["background"]["ctermbg"] = "NONE"
let s:overrides["background"]["256ctermbg"] = "NONE"
endif
endif
if exists("g:jellybeans_use_lowcolor_black") && g:jellybeans_use_lowcolor_black
let s:termBlack = "Black"
else
let s:termBlack = "Grey"
endif
" When `termguicolors` is set, Vim[^1] ignores `hi Normal guibg=NONE`
" after Normal's `guibg` is already set to a color. See:
"
" - https://github.com/vim/vim/issues/981
" - https://github.com/nanotech/jellybeans.vim/issues/64
"
" To work around this, ensure we don't set the default background
" color before an override changes it to `NONE` by ensuring that the
" background color isn't set to a value different from its override.
"
" [^1]: Tested on 8.0.567. Does not apply to Neovim.
"
if has_key(s:overrides, "background") && has_key(s:overrides["background"], "guibg")
let s:background_color = s:overrides["background"]["guibg"]
endif
" Color approximation functions by Henry So, Jr. and David Liang {{{
" Added to jellybeans.vim by Daniel Herbert
if &t_Co == 88
" returns an approximate grey index for the given grey level
fun! s:grey_number(x)
if a:x < 23
return 0
elseif a:x < 69
return 1
elseif a:x < 103
return 2
elseif a:x < 127
return 3
elseif a:x < 150
return 4
elseif a:x < 173
return 5
elseif a:x < 196
return 6
elseif a:x < 219
return 7
elseif a:x < 243
return 8
else
return 9
endif
endfun
" returns the actual grey level represented by the grey index
fun! s:grey_level(n)
if a:n == 0
return 0
elseif a:n == 1
return 46
elseif a:n == 2
return 92
elseif a:n == 3
return 115
elseif a:n == 4
return 139
elseif a:n == 5
return 162
elseif a:n == 6
return 185
elseif a:n == 7
return 208
elseif a:n == 8
return 231
else
return 255
endif
endfun
" returns the palette index for the given grey index
fun! s:grey_color(n)
if a:n == 0
return 16
elseif a:n == 9
return 79
else
return 79 + a:n
endif
endfun
" returns an approximate color index for the given color level
fun! s:rgb_number(x)
if a:x < 69
return 0
elseif a:x < 172
return 1
elseif a:x < 230
return 2
else
return 3
endif
endfun
" returns the actual color level for the given color index
fun! s:rgb_level(n)
if a:n == 0
return 0
elseif a:n == 1
return 139
elseif a:n == 2
return 205
else
return 255
endif
endfun
" returns the palette index for the given R/G/B color indices
fun! s:rgb_color(x, y, z)
return 16 + (a:x * 16) + (a:y * 4) + a:z
endfun
else " assuming &t_Co == 256
" returns an approximate grey index for the given grey level
fun! s:grey_number(x)
if a:x < 14
return 0
else
let l:n = (a:x - 8) / 10
let l:m = (a:x - 8) % 10
if l:m < 5
return l:n
else
return l:n + 1
endif
endif
endfun
" returns the actual grey level represented by the grey index
fun! s:grey_level(n)
if a:n == 0
return 0
else
return 8 + (a:n * 10)
endif
endfun
" returns the palette index for the given grey index
fun! s:grey_color(n)
if a:n == 0
return 16
elseif a:n == 25
return 231
else
return 231 + a:n
endif
endfun
" returns an approximate color index for the given color level
fun! s:rgb_number(x)
if a:x < 75
return 0
else
let l:n = (a:x - 55) / 40
let l:m = (a:x - 55) % 40
if l:m < 20
return l:n
else
return l:n + 1
endif
endif
endfun
" returns the actual color level for the given color index
fun! s:rgb_level(n)
if a:n == 0
return 0
else
return 55 + (a:n * 40)
endif
endfun
" returns the palette index for the given R/G/B color indices
fun! s:rgb_color(x, y, z)
return 16 + (a:x * 36) + (a:y * 6) + a:z
endfun
endif
" returns the palette index to approximate the given R/G/B color levels
fun! s:color(r, g, b)
" map greys directly (see xterm's 256colres.pl)
if &t_Co == 256 && a:r == a:g && a:g == a:b && a:r > 3 && a:r < 243
return (a:r - 8) / 10 + 232
endif
" get the closest grey
let l:gx = s:grey_number(a:r)
let l:gy = s:grey_number(a:g)
let l:gz = s:grey_number(a:b)
" get the closest color
let l:x = s:rgb_number(a:r)
let l:y = s:rgb_number(a:g)
let l:z = s:rgb_number(a:b)
if l:gx == l:gy && l:gy == l:gz
" there are two possibilities
let l:dgr = s:grey_level(l:gx) - a:r
let l:dgg = s:grey_level(l:gy) - a:g
let l:dgb = s:grey_level(l:gz) - a:b
let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
let l:dr = s:rgb_level(l:gx) - a:r
let l:dg = s:rgb_level(l:gy) - a:g
let l:db = s:rgb_level(l:gz) - a:b
let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
if l:dgrey < l:drgb
" use the grey
return s:grey_color(l:gx)
else
" use the color
return s:rgb_color(l:x, l:y, l:z)
endif
else
" only one possibility
return s:rgb_color(l:x, l:y, l:z)
endif
endfun
fun! s:is_empty_or_none(str)
return empty(a:str) || a:str ==? "NONE"
endfun
" returns the palette index to approximate the 'rrggbb' hex string
fun! s:rgb(rgb)
if s:is_empty_or_none(a:rgb)
return "NONE"
endif
let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
return s:color(l:r, l:g, l:b)
endfun
fun! s:prefix_highlight_value_with(prefix, color)
if s:is_empty_or_none(a:color)
return "NONE"
else
return a:prefix . a:color
endif
endfun
fun! s:remove_italic_attr(attr)
let l:attr = join(filter(split(a:attr, ","), "v:val !=? 'italic'"), ",")
if empty(l:attr)
let l:attr = "NONE"
endif
return l:attr
endfun
" sets the highlighting for the given group
fun! s:X(group, fg, bg, attr, lcfg, lcbg)
if s:low_color
let l:cmd = "hi ".a:group.
\ " ctermfg=".s:prefix_highlight_value_with("", a:lcfg).
\ " ctermbg=".s:prefix_highlight_value_with("", a:lcbg)
else
let l:cmd = "hi ".a:group.
\ " guifg=".s:prefix_highlight_value_with("#", a:fg).
\ " guibg=".s:prefix_highlight_value_with("#", a:bg)
if !s:true_color
let l:cmd = l:cmd.
\ " ctermfg=".s:rgb(a:fg).
\ " ctermbg=".s:rgb(a:bg)
endif
endif
let l:attr = s:prefix_highlight_value_with("", a:attr)
if exists("g:jellybeans_use_term_italics") && g:jellybeans_use_term_italics
let l:cterm_attr = l:attr
else
let l:cterm_attr = s:remove_italic_attr(l:attr)
endif
if !exists("g:jellybeans_use_gui_italics") || g:jellybeans_use_gui_italics
let l:gui_attr = l:attr
else
let l:gui_attr = s:remove_italic_attr(l:attr)
endif
let l:cmd = l:cmd." gui=".l:gui_attr." cterm=".l:cterm_attr
exec l:cmd
endfun
" }}}
call s:X("Normal","e8e8d3",s:background_color,"","White","")
set background=dark
call s:X("CursorLine","","1c1c1c","","",s:termBlack)
call s:X("CursorColumn","","1c1c1c","","",s:termBlack)
" Some of Terminal.app's default themes have a cursor color
" too close to Jellybeans' preferred MatchParen background
" color to be easily distinguishable. Other terminals tend
" to use a brighter cursor color.
"
" Use a more distinct color in Terminal.app, and also in
" low-color terminals if the preferred background color is
" not available.
if !has('gui_running') && $TERM_PROGRAM == "Apple_Terminal"
let s:matchParenGuiFg = "dd0093"
let s:matchParenGuiBg = "000000"
else
let s:matchParenGuiFg = "ffffff"
let s:matchParenGuiBg = "556779"
endif
if s:termBlack != "Black"
let s:matchParenTermFg = "Magenta"
let s:matchParenTermBg = ""
else
let s:matchParenTermFg = ""
let s:matchParenTermBg = s:termBlack
endif
call s:X("MatchParen",s:matchParenGuiFg,s:matchParenGuiBg,"bold",
\ s:matchParenTermFg,s:matchParenTermBg)
call s:X("TabLine","000000","b0b8c0","italic","",s:termBlack)
call s:X("TabLineFill","9098a0","","","",s:termBlack)
call s:X("TabLineSel","000000","f0f0f0","italic,bold",s:termBlack,"White")
" Auto-completion
call s:X("Pmenu","ffffff","606060","","White",s:termBlack)
call s:X("PmenuSel","101010","eeeeee","",s:termBlack,"White")
call s:X("Visual","","404040","","",s:termBlack)
call s:X("Cursor",s:background_color,"b0d0f0","","","")
call s:X("LineNr","605958",s:background_color,"NONE",s:termBlack,"")
call s:X("CursorLineNr","ccc5c4","","NONE","White","")
call s:X("Comment","888888","","italic","Grey","")
call s:X("Todo","c7c7c7","","bold","White",s:termBlack)
call s:X("StatusLine","000000","dddddd","italic","","White")
call s:X("StatusLineNC","ffffff","403c41","italic","White","Black")
call s:X("VertSplit","777777","403c41","",s:termBlack,s:termBlack)
call s:X("WildMenu","f0a0c0","302028","","Magenta","")
call s:X("Folded","a0a8b0","384048","italic",s:termBlack,"")
call s:X("FoldColumn","535D66","1f1f1f","","",s:termBlack)
call s:X("SignColumn","777777","333333","","",s:termBlack)
call s:X("ColorColumn","","000000","","",s:termBlack)
call s:X("Title","70b950","","bold","Green","")
call s:X("Constant","cf6a4c","","","Red","")
call s:X("Special","799d6a","","","Green","")
call s:X("Delimiter","668799","","","Grey","")
call s:X("String","99ad6a","","","Green","")
call s:X("StringDelimiter","556633","","","DarkGreen","")
call s:X("Identifier","c6b6ee","","","LightCyan","")
call s:X("Structure","8fbfdc","","","LightCyan","")
call s:X("Function","fad07a","","","Yellow","")
call s:X("Statement","8197bf","","","DarkBlue","")
call s:X("PreProc","8fbfdc","","","LightBlue","")
hi! link Operator Structure
hi! link Conceal Operator
call s:X("Type","ffb964","","","Yellow","")
call s:X("NonText","606060",s:background_color,"",s:termBlack,"")
call s:X("SpecialKey","444444","1c1c1c","",s:termBlack,"")
call s:X("Search","f0a0c0","302028","underline","Magenta","")
call s:X("Directory","dad085","","","Yellow","")
call s:X("ErrorMsg","","902020","","","DarkRed")
hi! link Error ErrorMsg
hi! link MoreMsg Special
call s:X("Question","65C254","","","Green","")
" Spell Checking
call s:X("SpellBad","","902020","underline","","DarkRed")
call s:X("SpellCap","","0000df","underline","","Blue")
call s:X("SpellRare","","540063","underline","","DarkMagenta")
call s:X("SpellLocal","","2D7067","underline","","Green")
" Diff
hi! link diffRemoved Constant
hi! link diffAdded String
" VimDiff
call s:X("DiffAdd","D2EBBE","437019","","White","DarkGreen")
call s:X("DiffDelete","40000A","700009","","DarkRed","DarkRed")
call s:X("DiffChange","","2B5B77","","White","DarkBlue")
call s:X("DiffText","8fbfdc","000000","reverse","Yellow","")
" PHP
hi! link phpFunctions Function
call s:X("StorageClass","c59f6f","","","Red","")
hi! link phpSuperglobal Identifier
hi! link phpQuoteSingle StringDelimiter
hi! link phpQuoteDouble StringDelimiter
hi! link phpBoolean Constant
hi! link phpNull Constant
hi! link phpArrayPair Operator
hi! link phpOperator Normal
hi! link phpRelation Normal
hi! link phpVarSelector Identifier
" Python
hi! link pythonOperator Statement
" Ruby
hi! link rubySharpBang Comment
call s:X("rubyClass","447799","","","DarkBlue","")
call s:X("rubyIdentifier","c6b6fe","","","Cyan","")
hi! link rubyConstant Type
hi! link rubyFunction Function
call s:X("rubyInstanceVariable","c6b6fe","","","Cyan","")
call s:X("rubySymbol","7697d6","","","Blue","")
hi! link rubyGlobalVariable rubyInstanceVariable
hi! link rubyModule rubyClass
call s:X("rubyControl","7597c6","","","Blue","")
hi! link rubyString String
hi! link rubyStringDelimiter StringDelimiter
hi! link rubyInterpolationDelimiter Identifier
call s:X("rubyRegexpDelimiter","540063","","","Magenta","")
call s:X("rubyRegexp","dd0093","","","DarkMagenta","")
call s:X("rubyRegexpSpecial","a40073","","","Magenta","")
call s:X("rubyPredefinedIdentifier","de5577","","","Red","")
" Erlang
hi! link erlangAtom rubySymbol
hi! link erlangBIF rubyPredefinedIdentifier
hi! link erlangFunction rubyPredefinedIdentifier
hi! link erlangDirective Statement
hi! link erlangNode Identifier
" Elixir
hi! link elixirAtom rubySymbol
" JavaScript
hi! link javaScriptValue Constant
hi! link javaScriptRegexpString rubyRegexp
hi! link javaScriptTemplateVar StringDelim
hi! link javaScriptTemplateDelim Identifier
hi! link javaScriptTemplateString String
" CoffeeScript
hi! link coffeeRegExp javaScriptRegexpString
" Lua
hi! link luaOperator Conditional
" C
hi! link cFormat Identifier
hi! link cOperator Constant
" Objective-C/Cocoa
hi! link objcClass Type
hi! link cocoaClass objcClass
hi! link objcSubclass objcClass
hi! link objcSuperclass objcClass
hi! link objcDirective rubyClass
hi! link objcStatement Constant
hi! link cocoaFunction Function
hi! link objcMethodName Identifier
hi! link objcMethodArg Normal
hi! link objcMessageName Identifier
" Vimscript
hi! link vimOper Normal
" HTML
hi! link htmlTag Statement
hi! link htmlEndTag htmlTag
hi! link htmlTagName htmlTag
" XML
hi! link xmlTag Statement
hi! link xmlEndTag xmlTag
hi! link xmlTagName xmlTag
hi! link xmlEqual xmlTag
hi! link xmlEntity Special
hi! link xmlEntityPunct xmlEntity
hi! link xmlDocTypeDecl PreProc
hi! link xmlDocTypeKeyword PreProc
hi! link xmlProcessingDelim xmlAttrib
" Debugger.vim
call s:X("DbgCurrent","DEEBFE","345FA8","","White","DarkBlue")
call s:X("DbgBreakPt","","4F0037","","","DarkMagenta")
" vim-indent-guides
if !exists("g:indent_guides_auto_colors")
let g:indent_guides_auto_colors = 0
endif
call s:X("IndentGuidesOdd","","232323","","","")
call s:X("IndentGuidesEven","","1b1b1b","","","")
" Plugins, etc.
hi! link TagListFileName Directory
call s:X("PreciseJumpTarget","B9ED67","405026","","White","Green")
" Manual overrides for 256-color terminals. Dark colors auto-map badly.
if !s:low_color
hi StatusLineNC ctermbg=235
hi Folded ctermbg=236
hi DiffText ctermfg=81
hi DbgBreakPt ctermbg=53
hi IndentGuidesOdd ctermbg=235
hi IndentGuidesEven ctermbg=234
endif
if !empty("s:overrides")
fun! s:current_attr(group)
let l:synid = synIDtrans(hlID(a:group))
let l:attrs = []
for l:attr in ["bold", "italic", "reverse", "standout", "underline", "undercurl"]
if synIDattr(l:synid, l:attr, "gui") == 1
call add(l:attrs, l:attr)
endif
endfor
return join(l:attrs, ",")
endfun
fun! s:current_color(group, what, mode)
let l:color = synIDattr(synIDtrans(hlID(a:group)), a:what, a:mode)
if l:color == -1
return ""
else
return substitute(l:color, "^#", "", "")
endif
endfun
fun! s:load_color_def(group, def)
call s:X(a:group, get(a:def, "guifg", s:current_color(a:group, "fg", "gui")),
\ get(a:def, "guibg", s:current_color(a:group, "bg", "gui")),
\ get(a:def, "attr", s:current_attr(a:group)),
\ get(a:def, "ctermfg", s:current_color(a:group, "fg", "cterm")),
\ get(a:def, "ctermbg", s:current_color(a:group, "bg", "cterm")))
if !s:low_color
for l:prop in ["ctermfg", "ctermbg"]
let l:override_key = "256".l:prop
if has_key(a:def, l:override_key)
exec "hi ".a:group." ".l:prop."=".a:def[l:override_key]
endif
endfor
endif
endfun
fun! s:load_colors(defs)
for [l:group, l:def] in items(a:defs)
if l:group == "background"
call s:load_color_def("LineNr", l:def)
call s:load_color_def("NonText", l:def)
call s:load_color_def("Normal", l:def)
else
call s:load_color_def(l:group, l:def)
endif
unlet l:group
unlet l:def
endfor
endfun
call s:load_colors(s:overrides)
delf s:load_colors
delf s:load_color_def
delf s:current_color
delf s:current_attr
endif
" delete functions {{{
delf s:X
delf s:remove_italic_attr
delf s:prefix_highlight_value_with
delf s:rgb
delf s:is_empty_or_none
delf s:color
delf s:rgb_color
delf s:rgb_level
delf s:rgb_number
delf s:grey_color
delf s:grey_level
delf s:grey_number
" }}}

View file

@ -1,220 +0,0 @@
" ==============================================================================
" Name: One Half Dark
" Author: Son A. Pham <sp@sonpham.me>
" Url: https://github.com/sonph/onehalf
" License: The MIT License (MIT)
"
" A dark vim color scheme based on Atom's One. See github.com/sonph/onehalf
" for installation instructions, a light color scheme, versions for other
" editors/terminals, and a matching theme for vim-airline.
" ==============================================================================
set background=dark
highlight clear
syntax reset
let g:colors_name="onehalfdark"
let colors_name="onehalfdark"
let s:black = { "gui": "#282c34", "cterm": "236" }
let s:red = { "gui": "#e06c75", "cterm": "168" }
let s:green = { "gui": "#98c379", "cterm": "114" }
let s:yellow = { "gui": "#e5c07b", "cterm": "180" }
let s:blue = { "gui": "#61afef", "cterm": "75" }
let s:purple = { "gui": "#c678dd", "cterm": "176" }
let s:cyan = { "gui": "#56b6c2", "cterm": "73" }
let s:white = { "gui": "#dcdfe4", "cterm": "188" }
let s:fg = s:white
let s:bg = s:black
let s:comment_fg = { "gui": "#5c6370", "cterm": "241" }
let s:gutter_bg = { "gui": "#282c34", "cterm": "236" }
let s:gutter_fg = { "gui": "#919baa", "cterm": "247" }
let s:cursor_line = { "gui": "#313640", "cterm": "237" }
let s:color_col = { "gui": "#313640", "cterm": "237" }
let s:selection = { "gui": "#474e5d", "cterm": "239" }
let s:vertsplit = { "gui": "#313640", "cterm": "237" }
function! s:h(group, fg, bg, attr)
if type(a:fg) == type({})
exec "hi " . a:group . " guifg=" . a:fg.gui . " ctermfg=" . a:fg.cterm
else
exec "hi " . a:group . " guifg=NONE cterm=NONE"
endif
if type(a:bg) == type({})
exec "hi " . a:group . " guibg=" . a:bg.gui . " ctermbg=" . a:bg.cterm
else
exec "hi " . a:group . " guibg=NONE ctermbg=NONE"
endif
if a:attr != ""
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
else
exec "hi " . a:group . " gui=NONE cterm=NONE"
endif
endfun
" User interface colors {
call s:h("Normal", s:fg, s:bg, "")
call s:h("NonText", s:fg, "", "")
call s:h("Cursor", s:bg, s:blue, "")
call s:h("CursorColumn", "", s:cursor_line, "")
call s:h("CursorLine", "", s:cursor_line, "")
call s:h("LineNr", s:gutter_fg, s:gutter_bg, "")
call s:h("CursorLineNr", s:fg, "", "")
call s:h("DiffAdd", s:green, "", "")
call s:h("DiffChange", s:yellow, "", "")
call s:h("DiffDelete", s:red, "", "")
call s:h("DiffText", s:blue, "", "")
call s:h("IncSearch", s:bg, s:yellow, "")
call s:h("Search", s:bg, s:yellow, "")
call s:h("ErrorMsg", s:fg, "", "")
call s:h("ModeMsg", s:fg, "", "")
call s:h("MoreMsg", s:fg, "", "")
call s:h("WarningMsg", s:red, "", "")
call s:h("Question", s:purple, "", "")
call s:h("Pmenu", s:bg, s:fg, "")
call s:h("PmenuSel", s:fg, s:blue, "")
call s:h("PmenuSbar", "", s:selection, "")
call s:h("PmenuThumb", "", s:fg, "")
call s:h("SpellBad", s:red, "", "")
call s:h("SpellCap", s:yellow, "", "")
call s:h("SpellLocal", s:yellow, "", "")
call s:h("SpellRare", s:yellow, "", "")
call s:h("StatusLine", s:blue, s:cursor_line, "")
call s:h("StatusLineNC", s:comment_fg, s:cursor_line, "")
call s:h("TabLine", s:comment_fg, s:cursor_line, "")
call s:h("TabLineFill", s:comment_fg, s:cursor_line, "")
call s:h("TabLineSel", s:fg, s:bg, "")
call s:h("Visual", "", s:selection, "")
call s:h("VisualNOS", "", s:selection, "")
call s:h("ColorColumn", "", s:color_col, "")
call s:h("Conceal", s:fg, "", "")
call s:h("Directory", s:blue, "", "")
call s:h("VertSplit", s:vertsplit, s:vertsplit, "")
call s:h("Folded", s:fg, "", "")
call s:h("FoldColumn", s:fg, "", "")
call s:h("SignColumn", s:fg, "", "")
call s:h("MatchParen", s:blue, "", "underline")
call s:h("SpecialKey", s:fg, "", "")
call s:h("Title", s:green, "", "")
call s:h("WildMenu", s:fg, "", "")
" }
" Syntax colors {
call s:h("Comment", s:comment_fg, "", "")
call s:h("Constant", s:cyan, "", "")
call s:h("String", s:green, "", "")
call s:h("Character", s:green, "", "")
call s:h("Number", s:yellow, "", "")
call s:h("Boolean", s:yellow, "", "")
call s:h("Float", s:yellow, "", "")
call s:h("Identifier", s:red, "", "")
call s:h("Function", s:blue, "", "")
call s:h("Statement", s:purple, "", "")
call s:h("Conditional", s:purple, "", "")
call s:h("Repeat", s:purple, "", "")
call s:h("Label", s:purple, "", "")
call s:h("Operator", s:fg, "", "")
call s:h("Keyword", s:red, "", "")
call s:h("Exception", s:purple, "", "")
call s:h("PreProc", s:yellow, "", "")
call s:h("Include", s:blue, "", "")
call s:h("Define", s:purple, "", "")
call s:h("Macro", s:purple, "", "")
call s:h("PreCondit", s:yellow, "", "")
call s:h("Type", s:yellow, "", "")
call s:h("StorageClass", s:yellow, "", "")
call s:h("Structure", s:yellow, "", "")
call s:h("Typedef", s:yellow, "", "")
call s:h("Special", s:blue, "", "")
call s:h("SpecialChar", s:fg, "", "")
call s:h("Tag", s:fg, "", "")
call s:h("Delimiter", s:fg, "", "")
call s:h("SpecialComment", s:fg, "", "")
call s:h("Debug", s:fg, "", "")
call s:h("Underlined", s:fg, "", "")
call s:h("Ignore", s:fg, "", "")
call s:h("Error", s:red, s:gutter_bg, "")
call s:h("Todo", s:purple, "", "")
" }
" Plugins {
" GitGutter
call s:h("GitGutterAdd", s:green, s:gutter_bg, "")
call s:h("GitGutterDelete", s:red, s:gutter_bg, "")
call s:h("GitGutterChange", s:yellow, s:gutter_bg, "")
call s:h("GitGutterChangeDelete", s:red, s:gutter_bg, "")
" Fugitive
call s:h("diffAdded", s:green, "", "")
call s:h("diffRemoved", s:red, "", "")
" }
" Git {
call s:h("gitcommitComment", s:comment_fg, "", "")
call s:h("gitcommitUnmerged", s:red, "", "")
call s:h("gitcommitOnBranch", s:fg, "", "")
call s:h("gitcommitBranch", s:purple, "", "")
call s:h("gitcommitDiscardedType", s:red, "", "")
call s:h("gitcommitSelectedType", s:green, "", "")
call s:h("gitcommitHeader", s:fg, "", "")
call s:h("gitcommitUntrackedFile", s:cyan, "", "")
call s:h("gitcommitDiscardedFile", s:red, "", "")
call s:h("gitcommitSelectedFile", s:green, "", "")
call s:h("gitcommitUnmergedFile", s:yellow, "", "")
call s:h("gitcommitFile", s:fg, "", "")
hi link gitcommitNoBranch gitcommitBranch
hi link gitcommitUntracked gitcommitComment
hi link gitcommitDiscarded gitcommitComment
hi link gitcommitSelected gitcommitComment
hi link gitcommitDiscardedArrow gitcommitDiscardedFile
hi link gitcommitSelectedArrow gitcommitSelectedFile
hi link gitcommitUnmergedArrow gitcommitUnmergedFile
" }
" Fix colors in neovim terminal buffers {
if has('nvim')
let g:terminal_color_0 = s:black.gui
let g:terminal_color_1 = s:red.gui
let g:terminal_color_2 = s:green.gui
let g:terminal_color_3 = s:yellow.gui
let g:terminal_color_4 = s:blue.gui
let g:terminal_color_5 = s:purple.gui
let g:terminal_color_6 = s:cyan.gui
let g:terminal_color_7 = s:white.gui
let g:terminal_color_8 = s:black.gui
let g:terminal_color_9 = s:red.gui
let g:terminal_color_10 = s:green.gui
let g:terminal_color_11 = s:yellow.gui
let g:terminal_color_12 = s:blue.gui
let g:terminal_color_13 = s:purple.gui
let g:terminal_color_14 = s:cyan.gui
let g:terminal_color_15 = s:white.gui
let g:terminal_color_background = s:bg.gui
let g:terminal_color_foreground = s:fg.gui
endif
" }

View file

@ -1,103 +0,0 @@
"By default I have the windows adjustment functions set to <Ctrl+j> for down, <Ctrl+k> for up, <Ctrl+l> for right & <Ctrl +h> for left
"Adjust them to whatever suits your needs
nnoremap <silent> <C-j> :call DownHorizontal()<CR>
nnoremap <silent> <C-k> :call UpHorizontal()<CR>
nnoremap <silent> <C-l> :call RightVertical()<CR>
nnoremap <silent> <C-h> :call LeftVertical()<CR>
"WINDOW RESIZING Down
func! DownHorizontal()
let currentWin = winnr()
"If no window below or above leave as is, otherwise call function
wincmd j
if winnr() == currentWin
wincmd k
if winnr() == currentWin
wincmd k
else
exe currentWin . "wincmd w"
call DownHorizontalAdjust()
endif
else
exe currentWin . "wincmd w"
call DownHorizontalAdjust()
endif
endfun
func! DownHorizontalAdjust()
let currentWin = winnr()
"If very bottom window, decrease window size, otherwise just increase current window size
wincmd j
if winnr() == currentWin
resize -1
else
exe currentWin . "wincmd w"
resize +1
endif
endfun
"WINDOW RESIZING Up
func! UpHorizontal ()
let currentWin = winnr()
"If no window below or above leave as is
wincmd j
if winnr() == currentWin
wincmd k
if winnr() == currentWin
wincmd k
else
exe currentWin . "wincmd w"
call UpHorizontalAdjust()
endif
else
exe currentWin . "wincmd w"
call UpHorizontalAdjust()
endif
endfun
func! UpHorizontalAdjust()
let currentWin = winnr()
"If very top window, decrease window size, otherwise just increase current window size
wincmd k
if winnr() == currentWin
resize -1
else
resize -1
exe currentWin . "wincmd w"
endif
endfun
"WINDOW RESIZING Right (only requires 1 function)
func! RightVertical()
let currentWin = winnr()
" If very right window, decrease window size, otherwise just increase current window size
wincmd l
if winnr() == currentWin
vertical resize -1
else
exe currentWin . "wincmd w"
vertical resize +1
endif
endfun
"WINDOW RESIZING Left (only requires 1 function)
func! LeftVertical()
let currentWin = winnr()
" If very left window, decrease window size, otherwise just increase current window size
wincmd h
if winnr() == currentWin
vertical resize -1
else
vertical resize -1
exe currentWin . "wincmd w"
endif
endfun

29
vimrc
View file

@ -6,23 +6,19 @@ set list listchars=tab:\|_,nbsp:x,trail:*
set hlsearch incsearch ignorecase smartcase
" scroll before reaching the first / final line
set scrolloff=3 sidescrolloff=15 sidescroll=1
" disable bell
set noerrorbells visualbell t_vb=
" disable bell and fix termcap
set noerrorbells visualbell t_vb= t_8f=[38;2;%lu;%lu;%lum t_8b=[48;2;%lu;%lu;%lum
" indentation
set tabstop=3 softtabstop=4 shiftwidth=4 smarttab expandtab autoindent
" termcap fixes
set t_Co=256 t_ut= termencoding=utf-8 encoding=utf-8
" status line
set wildmenu showcmd ruler laststatus=2
set statusline=[%F]\ %R%H%W%M\ %=[%{&fenc}/%{&ff}]\ %y\ [%4l/%L:%3v]
" update window title
if !exists('g:tvim')
if $TERM =~ '^screen'
set t_ts=k
set t_fs=\
endif
set title titlestring=[%{hostname()}]\ %t\ -\ vim
if $TERM =~ '^screen'
set t_ts=k
set t_fs=\
endif
set title titlestring=[%{hostname()}]\ %t\ -\ vim
" enable case indentation
let g:sh_indent_case_labels=1
" version specific settings
@ -63,21 +59,14 @@ if v:version >= 800
xmap <Leader>a <Plug>(EasyAlign)
nmap <Leader>a <Plug>(EasyAlign)
" signify options
let g:signify_vcs_list = [ 'git' ]
let g:signify_sign_change = '~'
" enable packs based on filetype
let g:ale_python_flake8_executable = 'python2'
autocmd FileType python packadd ale | packadd jedi-vim
autocmd FileType sh packadd ale
if exists('g:tvim') || has('gui_running')
colorscheme jellybeans
elseif $TERM != 'linux'
let g:solarized_extra_hi_groups = 1
let g:solarized_use16 = 1
colorscheme solarized8
if $TERM != 'linux'
set termguicolors bg=dark ttymouse=sgr
colorscheme hybrid
endif
endif

12
zshrc
View file

@ -75,12 +75,8 @@ PROMPT3='%b%f?%(!.%F{red}.%F{black})#%f%b '
PROMPT4='%b%f+%N:%i%(!.%F{red}.%F{black})>%f%b '
precmd.title() {
case $TERM in
screen*)
printf '\033k%s\033\' ${HOST%%.*}
;;
*)
printf '\033]0;%s\007' ${HOST%%.*}
;;
(screen*) printf '\033k%s\033\' ${HOST%%.*};;
(*) printf '\033]2;%s\007' ${HOST%%.*};;
esac
}
precmd.is_git_repo() {
@ -174,10 +170,6 @@ alias atmux='command tmux -2 attach'
# screen
alias rscreen='command screen -Dr'
alias scr='command screen sudo -Es'
# neovim over vim
[[ -x $(whence nvim) ]] && alias vim='command nvim'
alias vi='vim'
# }}}
# {{{ plugins
# grc