dotfiles

<-- duh.
Log | Files | Refs | LICENSE

commit f69573fde38330cfb2b3fc2065760f795548ff39
parent c3ecb4a2518ebe4338ac24af15cae20eaf500193
Author: Hayden Hamilton <hayden@haydenvh.com>
Date:   Sun,  8 Mar 2020 21:51:44 +0000

Once upon a time, I feel into the vimscript lion hole

Diffstat:
D.config/nvim/abbrs.vim! | 3---
D.config/nvim/colors/duochrome.vim | 313-------------------------------------------------------------------------------
D.config/nvim/colors/plain.vim | 294-------------------------------------------------------------------------------
D.config/nvim/colors/wal.vim | 196-------------------------------------------------------------------------------
M.config/nvim/init.vim | 46+++++++++++++++++++++++++---------------------
R.config/nvim/abbrs.vim -> .config/nvim/modules/abbrs.vim | 0
A.config/nvim/modules/buffs.vim | 3+++
A.config/nvim/modules/splits.vim | 17+++++++++++++++++
A.config/nvim/modules/statusline.vim | 79+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.config/nvim/modules/theme.vim | 6++++++
A.scripts/bin/dmenu/dgrep | 4++++
M.scripts/bin/misc/popupmpv | 2+-
12 files changed, 135 insertions(+), 828 deletions(-)

diff --git a/.config/nvim/abbrs.vim! b/.config/nvim/abbrs.vim! @@ -1,3 +0,0 @@ -iabbrev eemail hayden@haydenvh.com -iabbrev ccopy Copyright (c) 2019 Hayden Hamilton -iabbrev ssig --<CR>Hayden Hamilton - hayden@haydenvh.com diff --git a/.config/nvim/colors/duochrome.vim b/.config/nvim/colors/duochrome.vim @@ -1,313 +0,0 @@ -" Name: duochrome.vim -" Version: 0.1 -" Maintainer: github.com/sdothum -" License: The MIT License (MIT) -" -" Based on -" -" https://github.com/andreypopp/vim-colors-plain -" -" which in turn based on -" -" https://github.com/pbrisbin/vim-colors-off (MIT License) -" -" which in turn based on -" -" https://github.com/reedes/vim-colors-pencil (MIT License) -" -""" -hi clear - -if exists('syntax on') - syntax reset -endif - -let g:colors_name='duochrome' - -let s:black = { "gui": "#222222", "cterm": "0" } -let s:medium_gray = { "gui": "#767676", "cterm": "243" } -let s:white = { "gui": "#f7f3ee", "cterm": "15" } " flatwhite bg -let s:orange = { "gui": "#c18401", "cterm": "208" } " one color orange 2 -let s:light_black = { "gui": "#424242", "cterm": "8" } -let s:lighter_black = { "gui": "#545454", "cterm": "240" } -let s:subtle_black = { "gui": "#303030", "cterm": "236" } -let s:light_gray = { "gui": "#999999", "cterm": "249" } -let s:lighter_gray = { "gui": "#CCCCCC", "cterm": "251" } -let s:lightest_gray = { "gui": "#E5E5E5", "cterm": "251" } -let s:dark_red = { "gui": "#C30771", "cterm": "1" } -let s:light_red = { "gui": "#E32791", "cterm": "1" } -let s:dark_blue = { "gui": "#008EC4", "cterm": "4" } -let s:light_blue = { "gui": "#B6D6FD", "cterm": "153" } -let s:dark_cyan = { "gui": "#20A5BA", "cterm": "6" } -let s:light_cyan = { "gui": "#4FB8CC", "cterm": "14" } -let s:dark_green = { "gui": "#10A778", "cterm": "2" } -let s:light_green = { "gui": "#5FD7A7", "cterm": "10" } -let s:dark_purple = { "gui": "#523C79", "cterm": "5" } -let s:light_purple = { "gui": "#6855DE", "cterm": "13" } -let s:light_yellow = { "gui": "#F3E430", "cterm": "11" } -let s:dark_yellow = { "gui": "#A89C14", "cterm": "3" } -let s:iawriter = { "gui": "#20fccf", "cterm": "51" } " iA writer cursor - -if &background == "dark" - let s:bg = s:black - let s:bg_subtle = s:light_black - let s:bg_very_subtle = s:subtle_black - let s:norm = s:lighter_gray - let s:norm_subtle = s:light_gray - let s:norm_very_subtle = s:medium_gray - let s:purple = s:light_purple - let s:cyan = s:light_cyan - let s:green = s:light_green - let s:red = s:light_red - let s:yellow = s:light_yellow - let s:visual = s:lighter_black - let s:cursor_line = s:subtle_black - let s:constant = s:light_blue - let s:comment = s:light_gray - let s:selection = s:dark_yellow - let s:selection_fg = s:black - let s:ok = s:light_green - let s:warning = s:yellow - let s:error = s:light_red -else - let s:bg = s:white - let s:bg_subtle = s:lighter_gray - let s:bg_very_subtle = s:light_gray - let s:norm = s:light_black - let s:norm_subtle = s:lighter_black - let s:norm_very_subtle = s:medium_gray - let s:purple = s:dark_purple - let s:cyan = s:dark_cyan - let s:green = s:dark_green - let s:red = s:dark_red - let s:yellow = s:dark_yellow - let s:visual = s:light_blue - let s:cursor_line = s:white " no highlight - let s:constant = s:dark_blue - let s:comment = s:orange - let s:selection = s:light_yellow - let s:selection_fg = s:light_black - let s:ok = s:light_green - let s:warning = s:yellow - let s:error = s:dark_red -endif - -" unlet s:black -unlet s:medium_gray -unlet s:white -unlet s:orange -unlet s:light_black -unlet s:lighter_black -" unlet s:subtle_black -unlet s:light_gray -unlet s:lighter_gray -unlet s:lightest_gray -unlet s:dark_red -unlet s:light_red -unlet s:dark_blue -unlet s:light_blue -unlet s:dark_cyan -unlet s:light_cyan -unlet s:dark_green -unlet s:light_green -unlet s:dark_purple -unlet s:light_purple -unlet s:light_yellow -unlet s:dark_yellow - -" https://github.com/noahfrederick/vim-hemisu/ -function! s:h(group, style) - execute "highlight" a:group - \ "guifg=" (has_key(a:style, "fg") ? a:style.fg.gui : "NONE") - \ "guibg=" (has_key(a:style, "bg") ? a:style.bg.gui : "NONE") - \ "guisp=" (has_key(a:style, "sp") ? a:style.sp.gui : "NONE") - \ "gui=" (has_key(a:style, "gui") ? a:style.gui : "NONE") - \ "ctermfg=" (has_key(a:style, "fg") ? a:style.fg.cterm : "NONE") - \ "ctermbg=" (has_key(a:style, "bg") ? a:style.bg.cterm : "NONE") - \ "cterm=" (has_key(a:style, "cterm") ? a:style.cterm : "NONE") -endfunction - -" __Normal__ -if has("gui") - call s:h("Normal", {"fg": s:norm, "bg": s:bg}) - call s:h("Cursor", {"fg": s:black, "bg": s:iawriter}) " iA writer cursor -else - call s:h("Normal", {"fg": s:norm}) - hi! link Cursor Identifier -endif -hi! link Identifier Normal -hi! link Function Identifier -hi! link Type Normal -hi! link StorageClass Type -hi! link Structure Type -hi! link Typedef Type -hi! link Special Normal -hi! link SpecialChar Special -hi! link Tag Special -hi! link Delimiter Special -hi! link SpecialComment Special -hi! link Debug Special -hi! link VertSplit Normal -hi! link PreProc Normal -hi! link Define PreProc -hi! link Macro PreProc -hi! link PreCondit Comment " highlight code sections - -" __Operator__ -call s:h("Noise", {"fg": s:norm_subtle, "gui": "NONE"}) -hi! link Operator Noise -hi! link LineNr Noise -hi! link CursorLineNr LineNr -hi! link FoldColumn LineNr -hi! link SignColumn LineNr - -" __Comment__ -call s:h("Comment", {"fg": s:comment, "gui": "italic"}) - -" __Constant__ -call s:h("Constant", {"fg": s:constant}) -hi! link Character Constant -hi! link Number Constant -hi! link Boolean Constant -hi! link Float Constant -hi! link String Constant -hi! link Directory Constant -hi! link Title Constant - -" __Statement__ -call s:h("Statement", {"fg": s:subtle_black, "gui": "bold"}) -hi! link Include Statement -hi! link Conditonal Statement -hi! link Repeat Statement -hi! link Label Statement -hi! link Keyword Statement -hi! link Exception Statement - -" __ErrorMsg__ -call s:h("ErrorMsg", {"fg": s:error}) -hi! link Error ErrorMsg -hi! link Question ErrorMsg -" __WarningMsg__ -call s:h("WarningMsg", {"fg": s:warning}) -" __MoreMsg__ -call s:h("MoreMsg", {"fg": s:norm_subtle, "cterm": "bold", "gui": "bold"}) -hi! link ModeMsg MoreMsg - -" __NonText__ -call s:h("NonText", {"fg": s:norm_very_subtle}) -hi! link Folded NonText -hi! link qfLineNr NonText - -" __Search__ -call s:h("Search", {"bg": s:selection, "fg": s:selection_fg}) -call s:h("IncSearch", {"bg": s:selection, "fg": s:selection_fg, "gui": "bold"}) - -" __Visual__ -call s:h("Visual", {"bg": s:visual}) -" __VisualNOS__ -call s:h("VisualNOS", {"bg": s:bg_subtle}) - -call s:h("Ignore", {"fg": s:bg}) - -" __DiffAdd__ -call s:h("DiffAdd", {"fg": s:green}) -" __DiffDelete__ -call s:h("DiffDelete", {"fg": s:red}) -" __DiffChange__ -call s:h("DiffChange", {"fg": s:yellow}) -" __DiffText__ -call s:h("DiffText", {"fg": s:constant}) - -if has("gui_running") - call s:h("SpellBad", {"gui": "underline", "sp": s:red}) - call s:h("SpellCap", {"gui": "underline", "sp": s:ok}) - call s:h("SpellRare", {"gui": "underline", "sp": s:error}) - call s:h("SpellLocal", {"gui": "underline", "sp": s:ok}) -else - call s:h("SpellBad", {"cterm": "underline", "fg": s:red}) - call s:h("SpellCap", {"cterm": "underline", "fg": s:ok}) - call s:h("SpellRare", {"cterm": "underline", "fg": s:error}) - call s:h("SpellLocal", {"cterm": "underline", "fg": s:ok}) -endif - -hi! link helpHyperTextEntry Title -hi! link helpHyperTextJump String - -" __StatusLine__ -call s:h("StatusLine", {"gui": "underline", "bg": s:bg, "fg": s:norm_very_subtle}) -" __StatusLineNC__ -call s:h("StatusLineNC", {"gui": "underline", "bg": s:bg, "fg": s:bg_subtle}) -" __WildMenu__ -call s:h("WildMenu", {"gui": "underline,bold", "bg": s:bg, "fg": s:norm}) - -call s:h("StatusLineOk", {"gui": "underline", "bg": s:bg, "fg": s:ok}) -call s:h("StatusLineError", {"gui": "underline", "bg": s:bg, "fg": s:error}) -call s:h("StatusLineWarning", {"gui": "underline", "bg": s:bg, "fg": s:warning}) - -" __Pmenu__ -call s:h("Pmenu", {"fg": s:norm, "bg": s:cursor_line}) -hi! link PmenuSbar Pmenu -hi! link PmenuThumb Pmenu -" __PmenuSel__ -call s:h("PmenuSel", {"fg": s:norm, "bg": s:cursor_line, "gui": "bold"}) - -hi! link TabLine Normal -hi! link TabLineSel Keyword -hi! link TabLineFill Normal - -" __CursorLine__ -call s:h("CursorLine", {"bg": s:cursor_line}) -" __CursorColumn__ -call s:h("ColorColumn", {"bg": s:cursor_line}) - -" __MatchParen__ -call s:h("MatchParen", {"bg": s:bg_subtle, "fg": s:norm}) - -hi! link htmlH1 Normal -hi! link htmlH2 Normal -hi! link htmlH3 Normal -hi! link htmlH4 Normal -hi! link htmlH5 Normal -hi! link htmlH6 Normal - -hi link diffRemoved DiffDelete -hi link diffAdded DiffAdd - -" Signify, git-gutter -hi link SignifySignAdd LineNr -hi link SignifySignDelete LineNr -hi link SignifySignChange LineNr -hi link GitGutterAdd LineNr -hi link GitGutterDelete LineNr -hi link GitGutterChange LineNr -hi link GitGutterChangeDelete LineNr - -hi link jsFlowTypeKeyword Statement -hi link jsFlowImportType Statement -hi link jsFunction Statement -hi link jsGlobalObjects Normal -hi link jsGlobalNodeObjects Normal -hi link jsArrowFunction Noise -hi link StorageClass Statement - -hi link xmlTag Constant -hi link xmlTagName xmlTag -hi link xmlEndTag xmlTag -hi link xmlAttrib xmlTag - -hi link markdownH1 Statement -hi link markdownH2 Statement -hi link markdownH3 Statement -hi link markdownH4 Statement -hi link markdownH5 Statement -hi link markdownH6 Statement -hi link markdownListMarker Constant -hi link markdownCode Constant -hi link markdownCodeBlock Constant -hi link markdownCodeDelimiter Constant -hi link markdownHeadingDelimiter Constant - -hi link yamlBlockMappingKey Statement -hi link pythonOperator Statement - - diff --git a/.config/nvim/colors/plain.vim b/.config/nvim/colors/plain.vim @@ -1,294 +0,0 @@ -" Name: plain.vim -" Version: 0.1 -" Maintainer: github.com/andreypopp -" License: The MIT License (MIT) -" -" Based on -" -" https://github.com/pbrisbin/vim-colors-off (MIT License) -" -" which in turn based on -" -" https://github.com/reedes/vim-colors-pencil (MIT License) -" -""" -hi clear - -if exists('syntax on') - syntax reset -endif - -let g:colors_name='plain' - -let s:none = {"cterm": "NONE"} - -let s:dark_black = {"cterm": "0"} -let s:black = {"cterm": "8"} - -let s:dark_red = {"cterm": "1"} -let s:red = {"cterm": "9"} - -let s:dark_green = {"cterm": "2"} -let s:green = {"cterm": "10"} - -let s:dark_yellow = {"cterm": "3"} -let s:yellow = {"cterm": "11"} - -let s:dark_blue = {"cterm": "4"} -let s:blue = {"cterm": "12"} - -let s:dark_magenta = {"cterm": "5"} -let s:magenta = {"cterm": "13"} - -let s:dark_cyan = {"cterm": "6"} -let s:cyan = {"cterm": "14"} - -let s:dark_white = {"cterm": "7"} -let s:white = {"cterm": "15"} - -let s:always_dark_black = {"cterm": "16"} -let s:always_black = {"cterm": "17"} - -let s:always_dark_white = {"cterm": "18"} -let s:always_white = {"cterm": "19"} - -let s:bg = s:none -let s:bg_subtle = s:dark_white -let s:norm = s:none -let s:norm_subtle = s:black -let s:visual = s:cyan -let s:visual_fg = s:white -let s:cursor_line = {"cterm": "20"} -let s:constant = s:cyan -let s:comment = s:black -let s:selection = s:yellow -let s:selection_fg = s:always_dark_black -let s:ok = s:green -let s:warning = s:dark_yellow -let s:error = s:dark_red - -" https://github.com/noahfrederick/vim-hemisu/ -function! s:h(group, style) - execute "highlight" a:group - \ "ctermfg=" (has_key(a:style, "fg") ? a:style.fg.cterm : "NONE") - \ "ctermbg=" (has_key(a:style, "bg") ? a:style.bg.cterm : "NONE") - \ "cterm=" (has_key(a:style, "cterm") ? a:style.cterm : "NONE") - \ "guisp=" (has_key(a:style, "guisp") ? a:style.guisp : "NONE") - \ "guifg=NONE" - \ "guibg=NONE" - \ "gui=NONE" -endfunction - -" __Normal__ -if has("gui") - call s:h("Normal", {"fg": s:norm, "bg": s:bg}) - call s:h("Cursor", {"fg": s:bg, "bg": s:norm}) -else - call s:h("Normal", {"fg": s:norm}) - hi! link Cursor Identifier -endif -hi! link Identifier Normal -hi! link Function Identifier -hi! link Type Normal -hi! link StorageClass Type -hi! link Structure Type -hi! link Typedef Type -hi! link Special Normal -hi! link SpecialChar Special -hi! link Tag Special -hi! link Delimiter Special -hi! link SpecialComment Special -hi! link Debug Special -hi! link VertSplit Normal -hi! link PreProc Normal -hi! link Define PreProc -hi! link Macro PreProc -hi! link PreCondit PreProc - -" __Operator__ -call s:h("Noise", {"fg": s:norm_subtle}) -hi! link Operator Noise -hi! link LineNr Noise -hi! link CursorLineNr LineNr -hi! link FoldColumn LineNr -hi! link SignColumn LineNr - -" __Comment__ -call s:h("Comment", {"fg": s:comment, "cterm": "italic"}) - -" __Constant__ -call s:h("Constant", {"fg": s:constant}) -hi! link Character Constant -hi! link Number Constant -hi! link Boolean Constant -hi! link Float Constant -hi! link String Constant -hi! link Directory Constant -hi! link Title Constant - -" __Statement__ -call s:h("Statement", {"fg": s:norm, "cterm": "bold"}) -hi! link Include Statement -hi! link Conditonal Statement -hi! link Repeat Statement -hi! link Label Statement -hi! link Keyword Statement -hi! link Exception Statement - -" __ExtraWhitespace__ -call s:h("ExtraWhitespace", {"bg": s:error}) - -" __ErrorMsg__ -call s:h("ErrorMsg", {"fg": s:error}) -hi! link Error ErrorMsg -hi! link Question ErrorMsg -" __WarningMsg__ -call s:h("WarningMsg", {"fg": s:warning}) -" __InfoMsg__ -call s:h("InfoMsg", {"fg": s:dark_magenta, "cterm": "bold"}) -" __MoreMsg__ -call s:h("MoreMsg", {"fg": s:norm_subtle, "cterm": "bold"}) -hi! link ModeMsg MoreMsg - -" __NonText__ -call s:h("NonText", {"fg": s:norm_subtle}) -hi! link Folded NonText -hi! link qfLineNr NonText - -" __Visual__ -call s:h("Visual", {"bg": s:visual, "fg": s:visual_fg}) -" __VisualNOS__ -call s:h("VisualNOS", {"bg": s:bg_subtle, "fg": s:visual_fg}) - -call s:h("Ignore", {"fg": s:bg}) - -" __DiffAdd__ -call s:h("DiffAdd", {"fg": s:dark_green}) -" __DiffDelete__ -call s:h("DiffDelete", {"fg": s:dark_red}) -" __DiffChange__ -call s:h("DiffChange", {"fg": s:dark_yellow}) -" __DiffText__ -call s:h("DiffText", {"fg": s:constant}) - -if has("gui_running") - call s:h("SpellBad", {"sp": s:dark_red}) - call s:h("SpellCap", {"sp": s:ok}) - call s:h("SpellRare", {"sp": s:error}) - call s:h("SpellLocal", {"sp": s:ok}) -else - call s:h("SpellBad", {"cterm": "underline", "fg": s:dark_red}) - call s:h("SpellCap", {"cterm": "underline", "fg": s:ok}) - call s:h("SpellRare", {"cterm": "underline", "fg": s:error}) - call s:h("SpellLocal", {"cterm": "underline", "fg": s:ok}) -endif - -hi! link helpHyperTextEntry Title -hi! link helpHyperTextJump String - -call s:h("StatusLine", { - \"cterm": "bold,underline", - \"bg": s:bg, - \"fg": s:norm - \}) -call s:h("StatusLineNC", { - \"cterm": "bold,underline", - \"bg": s:bg, - \"fg": s:bg_subtle - \}) - -" Semantic status line highlights -call s:h("StatusLineOk", { - \"cterm": "bold,underline", - \"bg": s:bg, - \"fg": s:ok - \}) -call s:h("StatusLineError", { - \"cterm": "bold,underline", - \"bg": s:bg, - \"fg": s:error - \}) -call s:h("StatusLineWarning", { - \"cterm": "bold,underline", - \"bg": s:bg, - \"fg": s:warning - \}) - -call s:h("WildMenu", {"cterm": "underline,bold", "bg": s:bg, "fg": s:norm}) - -" __Pmenu__ -call s:h("Pmenu", {"fg": s:norm, "bg": s:cursor_line}) -hi! link PmenuSbar Pmenu -hi! link PmenuThumb Pmenu -" __PmenuSel__ -call s:h("PmenuSel", {"fg": s:norm, "bg": s:cursor_line, "cterm": "bold"}) - -hi! link TabLine Normal -hi! link TabLineSel Keyword -hi! link TabLineFill Normal - -" __CursorLine__ -call s:h("CursorLine", {"bg": s:cursor_line}) -" __CursorColumn__ -call s:h("ColorColumn", {"bg": s:cursor_line}) - -" __MatchParen__ -call s:h("MatchParen", {"bg": s:yellow, "fg": s:always_dark_black}) - -hi! link htmlH1 Normal -hi! link htmlH2 Normal -hi! link htmlH3 Normal -hi! link htmlH4 Normal -hi! link htmlH5 Normal -hi! link htmlH6 Normal - -hi link diffRemoved DiffDelete -hi link diffAdded DiffAdd - -" Signify, git-gutter -hi link SignifySignAdd LineNr -hi link SignifySignDelete LineNr -hi link SignifySignChange LineNr -hi link GitGutterAdd LineNr -hi link GitGutterDelete LineNr -hi link GitGutterChange LineNr -hi link GitGutterChangeDelete LineNr - -hi link jsFlowTypeKeyword Statement -hi link jsFlowImportType Statement -hi link jsFunction Statement -hi link jsGlobalObjects Normal -hi link jsGlobalNodeObjects Normal -hi link jsArrowFunction Noise -hi link StorageClass Statement - -hi link xmlTag Constant -hi link xmlTagName xmlTag -hi link xmlEndTag xmlTag -hi link xmlAttrib xmlTag - -hi link markdownH1 Statement -hi link markdownH2 Statement -hi link markdownH3 Statement -hi link markdownH4 Statement -hi link markdownH5 Statement -hi link markdownH6 Statement -hi link markdownListMarker Constant -hi link markdownCode Constant -hi link markdownCodeBlock Constant -hi link markdownCodeDelimiter Constant -hi link markdownHeadingDelimiter Constant - -hi link yamlBlockMappingKey Statement -hi link pythonOperator Statement - -hi link ALEWarning WarningMsg -hi link ALEWarningSign WarningMsg -hi link ALEError ErrorMsg -hi link ALEErrorSign ErrorMsg -hi link ALEInfo InfoMsg -hi link ALEInfoSign InfoMsg - -" __Search__ (make sure it comes after everything else) -call s:h("Search", {"bg": s:selection, "fg": s:selection_fg}) -hi! link IncSearch Search diff --git a/.config/nvim/colors/wal.vim b/.config/nvim/colors/wal.vim @@ -1,196 +0,0 @@ -" wal.vim -- Vim color scheme. -" Author: Dylan Araps -" Webpage: https://github.com/dylanaraps/wal -" Description: A colorscheme that uses your terminal colors, made to work with 'wal'. - -hi clear -set background=dark - -if exists('syntax_on') - syntax reset -endif - -" Colorscheme name -let g:colors_name = 'wal' - -" highlight groups {{{ - -" set t_Co=16 -hi Normal ctermbg=NONE ctermfg=7 -hi NonText ctermbg=NONE ctermfg=0 -hi Comment ctermbg=NONE ctermfg=8 -hi Constant ctermbg=NONE ctermfg=3 -hi Error ctermbg=1 ctermfg=7 -hi Identifier ctermbg=NONE ctermfg=1 cterm=BOLD -hi Ignore ctermbg=8 ctermfg=0 -hi PreProc ctermbg=NONE ctermfg=3 -hi Special ctermbg=NONE ctermfg=6 -hi Statement ctermbg=NONE ctermfg=1 -hi String ctermbg=NONE ctermfg=2 -hi Number ctermbg=NONE ctermfg=3 -hi Todo ctermbg=2 ctermfg=0 -hi Type ctermbg=NONE ctermfg=3 -hi Underlined ctermbg=NONE ctermfg=1 cterm=underline -hi StatusLine ctermbg=7 ctermfg=0 -hi StatusLineNC ctermbg=8 ctermfg=0 -hi TabLine ctermbg=NONE ctermfg=8 -hi TabLineFill ctermbg=NONE ctermfg=8 -hi TabLineSel ctermbg=4 ctermfg=0 -hi TermCursorNC ctermbg=3 ctermfg=0 -hi VertSplit ctermbg=8 ctermfg=0 -hi Title ctermbg=NONE ctermfg=4 -hi CursorLine ctermbg=2 ctermfg=0 -hi LineNr ctermbg=NONE ctermfg=8 -hi CursorLineNr ctermbg=NONE ctermfg=8 -hi helpLeadBlank ctermbg=NONE ctermfg=7 -hi helpNormal ctermbg=NONE ctermfg=7 -hi Visual ctermbg=0 ctermfg=15 cterm=reverse term=reverse -hi VisualNOS ctermbg=NONE ctermfg=1 -hi Pmenu ctermbg=8 ctermfg=7 -hi PmenuSbar ctermbg=6 ctermfg=7 -hi PmenuSel ctermbg=4 ctermfg=0 -hi PmenuThumb ctermbg=8 ctermfg=8 -hi FoldColumn ctermbg=NONE ctermfg=7 -hi Folded ctermbg=NONE ctermfg=8 -hi WildMenu ctermbg=2 ctermfg=0 -hi SpecialKey ctermbg=NONE ctermfg=8 -hi DiffAdd ctermbg=NONE ctermfg=2 -hi DiffChange ctermbg=NONE ctermfg=8 -hi DiffDelete ctermbg=NONE ctermfg=1 -hi DiffText ctermbg=NONE ctermfg=4 -hi IncSearch ctermbg=3 ctermfg=0 -hi Search ctermbg=3 ctermfg=0 -hi Directory ctermbg=NONE ctermfg=4 -hi MatchParen ctermbg=1 ctermfg=8 -hi ColorColumn ctermbg=4 ctermfg=0 -hi signColumn ctermbg=NONE ctermfg=4 -hi ErrorMsg ctermbg=NONE ctermfg=8 -hi ModeMsg ctermbg=NONE ctermfg=2 -hi MoreMsg ctermbg=NONE ctermfg=2 -hi Question ctermbg=NONE ctermfg=4 -hi WarningMsg ctermbg=1 ctermfg=0 -hi Cursor ctermbg=NONE ctermfg=8 -hi Structure ctermbg=NONE ctermfg=5 -hi CursorColumn ctermbg=8 ctermfg=7 -hi ModeMsg ctermbg=NONE ctermfg=7 -hi SpellBad ctermbg=NONE ctermfg=1 cterm=underline -hi SpellCap ctermbg=NONE ctermfg=4 cterm=underline -hi SpellLocal ctermbg=NONE ctermfg=5 cterm=underline -hi SpellRare ctermbg=NONE ctermfg=6 cterm=underline -hi Boolean ctermbg=NONE ctermfg=5 -hi Character ctermbg=NONE ctermfg=1 -hi Conditional ctermbg=NONE ctermfg=5 -hi Define ctermbg=NONE ctermfg=5 -hi Delimiter ctermbg=NONE ctermfg=5 -hi Float ctermbg=NONE ctermfg=5 -hi Include ctermbg=NONE ctermfg=4 -hi Keyword ctermbg=NONE ctermfg=5 -hi Label ctermbg=NONE ctermfg=3 -hi Operator ctermbg=NONE ctermfg=7 -hi Repeat ctermbg=NONE ctermfg=3 -hi SpecialChar ctermbg=NONE ctermfg=5 -hi Tag ctermbg=NONE ctermfg=3 -hi Typedef ctermbg=NONE ctermfg=3 -hi vimUserCommand ctermbg=NONE ctermfg=1 cterm=BOLD - hi link vimMap vimUserCommand - hi link vimLet vimUserCommand - hi link vimCommand vimUserCommand - hi link vimFTCmd vimUserCommand - hi link vimAutoCmd vimUserCommand - hi link vimNotFunc vimUserCommand -hi vimNotation ctermbg=NONE ctermfg=4 -hi vimMapModKey ctermbg=NONE ctermfg=4 -hi vimBracket ctermbg=NONE ctermfg=7 -hi vimCommentString ctermbg=NONE ctermfg=8 -hi htmlLink ctermbg=NONE ctermfg=1 cterm=underline -hi htmlBold ctermbg=NONE ctermfg=3 cterm=BOLD -hi htmlItalic ctermbg=NONE ctermfg=5 -hi htmlEndTag ctermbg=NONE ctermfg=7 -hi htmlTag ctermbg=NONE ctermfg=7 -hi htmlTagName ctermbg=NONE ctermfg=1 cterm=BOLD -hi htmlH1 ctermbg=NONE ctermfg=7 - hi link htmlH2 htmlH1 - hi link htmlH3 htmlH1 - hi link htmlH4 htmlH1 - hi link htmlH5 htmlH1 - hi link htmlH6 htmlH1 -hi cssMultiColumnAttr ctermbg=NONE ctermfg=2 - hi link cssFontAttr cssMultiColumnAttr - hi link cssFlexibleBoxAttr cssMultiColumnAttr -hi cssBraces ctermbg=NONE ctermfg=7 - hi link cssAttrComma cssBraces -hi cssValueLength ctermbg=NONE ctermfg=7 -hi cssUnitDecorators ctermbg=NONE ctermfg=7 -hi cssValueNumber ctermbg=NONE ctermfg=7 - hi link cssValueLength cssValueNumber -hi cssNoise ctermbg=NONE ctermfg=8 -hi cssTagName ctermbg=NONE ctermfg=1 -hi cssFunctionName ctermbg=NONE ctermfg=4 -hi scssSelectorChar ctermbg=NONE ctermfg=7 -hi scssAttribute ctermbg=NONE ctermfg=7 - hi link scssDefinition cssNoise -hi sassidChar ctermbg=NONE ctermfg=1 -hi sassClassChar ctermbg=NONE ctermfg=5 -hi sassInclude ctermbg=NONE ctermfg=5 -hi sassMixing ctermbg=NONE ctermfg=5 -hi sassMixinName ctermbg=NONE ctermfg=4 -hi javaScript ctermbg=NONE ctermfg=7 -hi javaScriptBraces ctermbg=NONE ctermfg=7 -hi javaScriptNumber ctermbg=NONE ctermfg=5 -hi markdownH1 ctermbg=NONE ctermfg=7 - hi link markdownH2 markdownH1 - hi link markdownH3 markdownH1 - hi link markdownH4 markdownH1 - hi link markdownH5 markdownH1 - hi link markdownH6 markdownH1 -hi markdownAutomaticLink ctermbg=NONE ctermfg=2 cterm=underline - hi link markdownUrl markdownAutomaticLink -hi markdownError ctermbg=NONE ctermfg=7 -hi markdownCode ctermbg=NONE ctermfg=3 -hi markdownCodeBlock ctermbg=NONE ctermfg=3 -hi markdownCodeDelimiter ctermbg=NONE ctermfg=5 -hi markdownItalic cterm=Italic -hi markdownBold cterm=Bold -hi xdefaultsValue ctermbg=NONE ctermfg=7 -hi rubyInclude ctermbg=NONE ctermfg=4 -hi rubyDefine ctermbg=NONE ctermfg=5 -hi rubyFunction ctermbg=NONE ctermfg=4 -hi rubyStringDelimiter ctermbg=NONE ctermfg=2 -hi rubyInteger ctermbg=NONE ctermfg=3 -hi rubyAttribute ctermbg=NONE ctermfg=4 -hi rubyConstant ctermbg=NONE ctermfg=3 -hi rubyInterpolation ctermbg=NONE ctermfg=2 -hi rubyInterpolationDelimiter ctermbg=NONE ctermfg=3 -hi rubyRegexp ctermbg=NONE ctermfg=6 -hi rubySymbol ctermbg=NONE ctermfg=2 -hi rubyTodo ctermbg=NONE ctermfg=8 -hi rubyRegexpAnchor ctermbg=NONE ctermfg=7 - hi link rubyRegexpQuantifier rubyRegexpAnchor -hi pythonOperator ctermbg=NONE ctermfg=5 -hi pythonFunction ctermbg=NONE ctermfg=4 -hi pythonRepeat ctermbg=NONE ctermfg=5 -hi pythonStatement ctermbg=NONE ctermfg=1 cterm=Bold -hi pythonBuiltIn ctermbg=NONE ctermfg=4 -hi phpMemberSelector ctermbg=NONE ctermfg=7 -hi phpComparison ctermbg=NONE ctermfg=7 -hi phpParent ctermbg=NONE ctermfg=7 -hi cOperator ctermbg=NONE ctermfg=6 -hi cPreCondit ctermbg=NONE ctermfg=5 -hi SignifySignAdd ctermbg=NONE ctermfg=2 -hi SignifySignChange ctermbg=NONE ctermfg=4 -hi SignifySignDelete ctermbg=NONE ctermfg=1 -hi NERDTreeDirSlash ctermbg=NONE ctermfg=4 -hi NERDTreeExecFile ctermbg=NONE ctermfg=7 -hi ALEErrorSign ctermbg=NONE ctermfg=1 -hi ALEWarningSign ctermbg=NONE ctermfg=3 -hi ALEError ctermbg=NONE ctermfg=1 -hi ALEWarning ctermbg=NONE ctermfg=3 - -" }}} - -" Plugin options {{{ - -let g:limelight_conceal_ctermfg = 8 - -" }}} - diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim @@ -6,19 +6,16 @@ " Copyright (c) 2019 Hayden Hamilton. " -"Note: scripts are found in .vim/plugin/ or .vim/autoload/ +"Note: plugins can found in .vim/plugin/ or .vim/autoload/ " goyo - centres text " surround - allows operation on surrounding characters " commentary - comments stuff out " repeat - repeat things " vimling (ipa, deadkeys, prose) - deadkeys - -"Source abbrevs -source ~/.config/nvim/abbrs.vim +" vimagit - git in vim "Leader let mapleader="," -let maplocalleader=",." "Cursor let &t_SI.="\033[6 q" "SI = INSERT mode @@ -44,6 +41,10 @@ set hlsearch filetype plugin on "Leader keys +noremap <leader>ve :vsplit ~/.config/nvim/init.vim<CR> +noremap <leader>vs :source ~/.config/nvim/init.vim<CR> +map <leader><leader><leader> <leader>vs + noremap <leader>g :Goyo \| set linebreak<CR> noremap <leader>c :!sudo make all install clean \| set linebreak<CR> noremap <leader>oc :!groff -T pdf % - > /tmp/grff \| zathura -<Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left> @@ -60,8 +61,6 @@ noremap <leader>ss :set syntax= inoremap <leader><leader>ss <Esc>:set syntax= noremap <leader>w :w \| set linebreak<CR> noremap <leader>W :w !sudo tee %<CR> -noremap <leader>ve :vsplit ~/.config/nvim/init.vim<CR> -noremap <leader>vs :source ~/.config/nvim/init.vim<CR> noremap <leader>" ea"<esc>bi"<esc> noremap <leader>u" ds" noremap <leader>' ea'<esc>bi'<esc> @@ -69,6 +68,7 @@ noremap <leader>u' ds' noremap <leader>sp o<esc>pi noremap <leader>nn :set number! relativenumber!<CR> +noremap <leader><leader>nn :setlocal number! relativenumber!<CR> noremap <leader>j 0/<++><Enter>"_c4l noremap <leader>J 0/<++><Enter>"_d4l @@ -115,16 +115,6 @@ vnoremap <Space> zf noremap <leader>m :Magit \| set linebreak<CR> let g:magit_default_fold_level=0 -"Splits -set splitbelow splitright -noremap <leader>z :vsplit \| set linebreak<CR> -noremap <leader>Z :split \| set linebreak<CR> -noremap <C-h> <C-w>h -noremap <C-j> <C-w>j -noremap <C-k> <C-w>k -noremap <C-l> <C-w>l -noremap <C-c> <C-w>c - "Vimling noremap <leader>ld :call ToggleDeadKeys()<CR> inoremap <leader>ld <esc>:call ToggleDeadKeys()<CR>a @@ -151,7 +141,21 @@ ino <Down> <Nop> ino <Left> <Nop> ino <Right> <Nop> -"Statusline -set statusline=%f\ -\ %y%m "File -set statusline+=%= -set statusline+=%l/%L,\ %-11c[%n] "Position +augroup autocmd + "Get rid of shitty indenting + autocmd BufRead * :normal gg=G + + "Nowrap + autocmd FileType html :setlocal nowrap + + "C + autocmd FileType C :noremap <buffer> <leader>end $a;<esc> + autocmd FileType C :inoremap <buffer> <leader><leader>end <esc>$a;<esc> +augroup END + +"Modules +source ~/.config/nvim/modules/theme.vim +source ~/.config/nvim/modules/abbrs.vim +source ~/.config/nvim/modules/statusline.vim +source ~/.config/nvim/modules/splits.vim +source ~/.config/nvim/modules/buffs.vim diff --git a/.config/nvim/abbrs.vim b/.config/nvim/modules/abbrs.vim diff --git a/.config/nvim/modules/buffs.vim b/.config/nvim/modules/buffs.vim @@ -0,0 +1,3 @@ +hi TabLine cterm=none ctermfg=256 ctermbg=0 +hi TabLineSel cterm=bold ctermfg=252 ctermbg=1 +hi TabLineFill cterm=none ctermfg=none ctermbg=none diff --git a/.config/nvim/modules/splits.vim b/.config/nvim/modules/splits.vim @@ -0,0 +1,17 @@ +set splitbelow splitright +noremap <leader>z :vsplit \| set linebreak<CR> +noremap <leader>Z :split \| set linebreak<CR> +noremap <C-h> <C-w>h +noremap <C-j> <C-w>j +noremap <C-k> <C-w>k +noremap <C-l> <C-w>l +noremap <C-c> <C-w>c +inoremap <C-h> <C-w>h +inoremap <C-j> <C-w>j +inoremap <C-k> <C-w>k +inoremap <C-l> <C-w>l +inoremap <C-c> <C-w>c + +set fillchars+=vert:\ +hi VertSplit ctermbg=0 ctermfg=0 +hi StatusLine ctermbg=0 ctermfg=0 diff --git a/.config/nvim/modules/statusline.vim b/.config/nvim/modules/statusline.vim @@ -0,0 +1,79 @@ +hi Modecol ctermbg=10 ctermfg=254 gui=bold +hi Basecol ctermbg=0 +hi Filecol ctermbg=2 ctermfg=7 gui=bold +hi Branchcol ctermbg=9 ctermfg=7 gui=bold +hi Positioncol ctermbg=3 ctermfg=254 gui=bold +hi Buffcol ctermbg=4 ctermfg=159 + +let g:currentmode={ + \'n' : 'Normal ', + \'no' : 'N·Operator Pending ', + \'v' : 'Visual ', + \'V' : 'V·Line ', + \'^V' : 'V·Block ', + \'s' : 'Select ', + \'S': 'S·Line ', + \'^S' : 'S·Block ', + \'i' : 'Insert ', + \'R' : 'Replace ', + \'Rv' : 'V·Replace ', + \'c' : 'Command ', + \'cv' : 'Vim Ex ', + \'ce' : 'Ex ', + \'r' : 'Prompt ', + \'rm' : 'More ', + \'r?' : 'Confirm ', + \'!' : 'Shell ', + \'t' : 'Terminal ' + \} + +function! Modecurrent() abort + let l:modecurrent = mode() + let l:modelist = toupper(get(g:currentmode, l:modecurrent, 'V·Block ')) + let l:current_status_mode = l:modelist + return l:current_status_mode +endfunction + +function! Gitbranch() + return system("git branch | tr -d '\n'") +endfunction + +function! Activestatus() + ""Mode + let s="%#Modecol#" + let s.=" %{Modecurrent()}" + let s.="%#Basecol#" + ""File + let s.="%#Filecol#" + let s.=" %f\ -\ %y%m " + let s.="%#Basecol#" + let s.="%=" + ""Branch + " let s.="%#Branchcol#" + " let s.=" %{Gitbranch()} " + " let s.="%#Basecol#" + ""Position + let s.="%#Positioncol#" + let s.=" %l/%L,\ %c " + let s.="%#Basecol#" + ""Buffer + let s.="%#Buffcol#" + let s.=" [%n] " + let s.="%#Basecol#" + + return s +endfunction + +function! Inactivestatus() + ""File + let s="%#Basecol#" + let s.=" %f\ -\ %y%m" + + return s +endfunction + +augroup Statusline + autocmd! + autocmd WinEnter,BufEnter * setlocal statusline=%!Activestatus() + autocmd WinLeave,BufLeave * setlocal statusline=%!Inactivestatus() +augroup END diff --git a/.config/nvim/modules/theme.vim b/.config/nvim/modules/theme.vim @@ -0,0 +1,6 @@ +hi Error ctermbg=10 ctermfg=0 +hi Todo cterm=bold ctermbg=3 ctermfg=255 +hi NvimInternalError ctermbg=3 ctermfg=3 +hi Float ctermfg=13 cterm=bold +hi LineNr ctermfg=11 +hi CursorLineNr ctermfg=11 cterm=bold diff --git a/.scripts/bin/dmenu/dgrep b/.scripts/bin/dmenu/dgrep @@ -0,0 +1,4 @@ +#!/bin/sh + +regex=$(echo '' | dmenu -i -p "Enter regex (no '/'s on either side):") +grep "$regex" < /dev/stdin | dmenu -i -p "Select line:" | xclip diff --git a/.scripts/bin/misc/popupmpv b/.scripts/bin/misc/popupmpv @@ -1,3 +1,3 @@ #!/bin/sh -exec st -e mpv $@ +exec $TERMINAL -e mpv $@