aboutsummaryrefslogtreecommitdiff
path: root/linux/home
diff options
context:
space:
mode:
Diffstat (limited to 'linux/home')
-rw-r--r--linux/home/.vim/colors/colors/colorscheme.vim247
-rw-r--r--linux/home/.vim/colors/colors/default.vim175
-rw-r--r--linux/home/.vim/ftplugin/ftplugin/after/vim.vim12
3 files changed, 434 insertions, 0 deletions
diff --git a/linux/home/.vim/colors/colors/colorscheme.vim b/linux/home/.vim/colors/colors/colorscheme.vim
new file mode 100644
index 0000000..ce0526e
--- /dev/null
+++ b/linux/home/.vim/colors/colors/colorscheme.vim
@@ -0,0 +1,247 @@
+" Vim Colorscheme
+" Name: cherryblossom.vim
+" Author: Luo Boming
+" Version: 0.3
+" License: The MIT Licence
+
+"{{{ Pre-setting
+let g:colors_name = expand('<sfile>:t:r')
+
+"hi clear
+"if exists("syntax_on")
+" syntax reset
+"endif
+
+if ! exists("g:terminal_italics")
+ let g:terminal_italics = 0
+endif
+
+"if ! exists("g:switch_statusline_bg_in_insert")
+" let g:switch_statusline_bg_in_insert = 0
+"endif
+
+if ! exists("g:spell_undercurl")
+ let g:spell_undercurl = 0
+endif
+
+"}}}
+"{{{ Color Palette
+" Color Entity
+let s:black = { "gui": "#171717", "cterm": "16" }
+let s:white = { "gui": "#EAE8E7", "cterm": "231" }
+
+let s:gray = { "gui": "#3a3f52", "cterm": "247" }
+
+let s:green = { "gui": "#30B536", "cterm": "34" }
+let s:pink = { "gui": "#D36DD3", "cterm": "170" }
+let s:orange = { "gui": "#FC923F", "cterm": "208" }
+let s:purple = { "gui": "#B586E7", "cterm": "141" }
+let s:light_cyan = { "gui": "#D7FFFF", "cterm": "195" }
+let s:dark_cyan = { "gui": "#00AF87", "cterm": "36" }
+let s:ultramarine = { "gui": "#229EC0", "cterm": "38" }
+let s:skyblue = { "gui": "#9BE7F8", "cterm": "195" }
+
+let s:white_pink = { "gui": "#FEF7FE", "cterm": "231" }
+let s:white_pink_deep = { "gui": "#FEF0FE", "cterm": "255" }
+let s:black_green = { "gui": "#053703", "cterm": "235" }
+let s:black_green_bright = { "gui": "#074005", "cterm": "239" }
+let s:middle_gray = { "gui": "#8a8a8a", "cterm": "245" }
+
+let s:light_gray = { "gui": "#E1DCDA", "cterm": "253" }
+let s:light_green = { "gui": "#B7EFA5", "cterm": "157" }
+let s:light_pink = { "gui": "#FEDCFE", "cterm": "225" }
+let s:light_yellow = { "gui": "#EDE682", "cterm": "228" }
+let s:light_red = { "gui": "#EB5A7C", "cterm": "204" }
+
+let s:dark_gray = { "gui": "#4D4A48", "cterm": "241" }
+let s:dark_green = { "gui": "#09570A", "cterm": "22" }
+let s:dark_yellow = { "gui": "#BC922B", "cterm": "3" }
+let s:dark_pink = { "gui": "#B365A2", "cterm": "133" }
+let s:dark_red = { "gui": "#D9372D", "cterm": "160" }
+let s:NONE = { "gui": "NONE", "cterm": "NONE" }
+
+" Color Alias
+if &background == "light"
+ let s:norm = s:black
+ let s:bg = s:NONE
+ let s:bg_subtle = s:white_pink_deep
+ let s:gray_fg = s:middle_gray
+ let s:green_fg = s:green
+ let s:yellow_fg = s:dark_yellow
+ let s:pink_fg = s:dark_pink
+ let s:cyan_fg = s:dark_cyan
+ let s:blue_fg = s:ultramarine
+ let s:red_fg = s:dark_red
+ let s:gray_bg = s:light_gray
+ let s:green_bg = s:light_green
+ let s:yellow_bg = s:light_yellow
+ let s:pink_bg = s:light_pink
+ let s:cyan_bg = s:light_cyan
+ let s:blue_bg = s:skyblue
+ let s:red_bg = s:light_red
+endif
+
+if &background == "dark"
+ let s:norm = s:white
+ let s:bg = s:NONE
+ let s:bg_subtle = s:gray
+ let s:gray_fg = s:middle_gray
+ let s:green_fg = s:light_green
+ let s:yellow_fg = s:light_yellow
+ let s:pink_fg = s:light_pink
+ let s:cyan_fg = s:light_cyan
+ let s:blue_fg = s:skyblue
+ let s:red_fg = s:light_red
+ let s:gray_bg = s:dark_gray
+ let s:green_bg = s:green
+ let s:yellow_bg = s:dark_yellow
+ let s:pink_bg = s:pink
+ let s:cyan_bg = s:dark_cyan
+ let s:blue_bg = s:ultramarine
+ let s:red_bg = s:dark_red
+endif
+"}}}
+"{{{ Highlight Function
+" shamelessly stolen from pencil: https://github.com/reedes/vim-colors-pencil
+function! s:hi(group, style)
+ if g:terminal_italics == 0
+ if has_key(a:style, "cterm") && a:style["cterm"] == "italic"
+ unlet a:style.cterm
+ endif
+ if has_key(a:style, "term") && a:style["term"] == "italic"
+ unlet a:style.term
+ endif
+ endif
+ 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")
+ \ "term=" (has_key(a:style, "term") ? a:style.term : "NONE")
+endfunction
+
+if g:spell_undercurl == 1
+ let s:attr_un = 'undercurl'
+else
+ let s:attr_un = 'underline'
+endif
+
+"}}}
+"{{{ Common Highlighting
+call s:hi("Normal", {"fg": s:norm, "bg": s:bg})
+call s:hi("Cursor", {})
+call s:hi("Comment", {"fg": s:gray_fg, "gui": "italic", "cterm": "italic", "term": "italic"})
+
+call s:hi("Constant", {"fg": s:pink_fg})
+hi! link String Constant
+hi! link Character Constant
+hi! link Number Constant
+hi! link Boolean Constant
+hi! link Float Constant
+
+call s:hi("Identifier", {"fg": s:red_fg})
+hi! link Function Identifier
+
+call s:hi("Statement", {"fg": s:green_fg})
+hi! link Conditonal Statement
+hi! link Repeat Statement
+hi! link Label Statement
+hi! link Operator Statement
+hi! link Keyword Statement
+hi! link Exception Statement
+
+call s:hi("PreProc", {"fg": s:blue_fg})
+hi! link Include PreProc
+hi! link Define PreProc
+hi! link Macro PreProc
+hi! link PreCondit PreProc
+
+call s:hi("Type", {"fg": s:yellow_fg})
+hi! link StorageClass Type
+hi! link Structure Type
+hi! link Typedef Type
+
+call s:hi("Special", {"fg": s:orange})
+hi! link SpecialChar Special
+hi! link Tag Special
+hi! link Delimiter Special
+hi! link SpecialComment Special
+hi! link Debug Special
+
+call s:hi("Underlined", {"gui": "underline", "cterm": "underline"})
+call s:hi("Ignore", {"fg": s:bg_subtle})
+call s:hi("Error", {"fg": s:white, "bg": s:red_fg , "gui": "bold", "cterm": "bold"})
+call s:hi("Todo", {"bg": s:yellow_bg, "gui": "bold", "cterm": "bold"})
+
+"}}}
+"{{{ Semi-Common Highlighting
+call s:hi("SpecialKey", {"fg": s:purple, "gui": "bold", "cterm": "bold", "term": "bold"})
+call s:hi("NonText", {"fg": s:cyan_bg, "gui": "bold", "cterm": "bold", "term": "bold"})
+call s:hi("Directory", {"fg": s:blue_fg, "gui": "bold", "cterm": "bold", "term": "bold"})
+call s:hi("ErrorMsg", {"fg": s:red_fg, "gui": "bold", "cterm": "bold", "term": "bold"})
+call s:hi("IncSearch", {"gui": "reverse", "cterm": "reverse", "term": "reverse"})
+call s:hi("Search", {"fg": s:norm, "bg": s:pink_bg})
+call s:hi("MoreMsg", {"fg": s:pink_fg, "gui": "bold", "cterm": "bold", "term": "bold"})
+call s:hi("ModeMsg", {"fg": s:pink_fg, "gui": "bold", "cterm": "bold", "term": "bold"})
+call s:hi("LineNr", {"fg": s:gray})
+call s:hi("CursorLineNr", {"fg": s:pink_fg, "gui": "bold", "cterm": "bold", "term": "bold"})
+call s:hi("Question", {"fg": s:purple, "gui": "bold", "cterm": "bold", "term": "bold"})
+"call s:hi("StatusLine", {"fg": s:norm, "bg": s:green_bg, "gui": "bold", "cterm": "bold", "term": "bold"})
+"call s:hi("StatusLineNC", {"fg": s:norm, "bg": s:gray_bg})
+call s:hi("Conceal", {"fg": s:yellow_fg})
+call s:hi("VertSplit", {"gui": "reverse", "cterm": "reverse", "term": "reverse"})
+call s:hi("Title", {"fg": s:pink_fg, "gui": "bold", "cterm": "bold", "term": "bold"})
+call s:hi("Visual", {"gui": "reverse", "cterm": "reverse", "term": "reverse"})
+call s:hi("VisualNOS", {"gui": "bold,underline", "cterm": "bold,underline", "term": "bold,underline"})
+call s:hi("WarningMsg", {"fg": s:orange, "gui": "bold", "cterm": "bold", "term": "bold"})
+call s:hi("WildMenu", {"fg": s:norm, "bg": s:blue_bg})
+call s:hi("Folded", {"fg": s:green_fg, "bg": s:gray_bg})
+call s:hi("FoldColumn", {"fg": s:green_fg, "bg": s:gray_bg})
+call s:hi("DiffAdd", {"bg": s:green_bg})
+call s:hi("DiffChange", {"bg": s:yellow_bg})
+call s:hi("DiffDelete", {"bg": s:red_bg})
+call s:hi("DiffText", {"bg": s:blue_bg, "gui": "bold", "cterm": "bold", "term": "bold"})
+call s:hi("SignColumn", {"fg": s:green_fg, "bg": s:gray})
+if has("gui_running")
+ call s:hi("SpellBad", {"gui": s:attr_un, "sp": s:red_bg})
+ call s:hi("SpellCap", {"gui": s:attr_un, "sp": s:yellow_bg})
+ call s:hi("SpellRare", {"gui": s:attr_un, "sp": s:blue_bg})
+ call s:hi("SpellLocal", {"gui": s:attr_un, "sp": s:green_bg})
+else
+ call s:hi("SpellBad", {"cterm": s:attr_un, "fg": s:red_fg})
+ call s:hi("SpellCap", {"cterm": s:attr_un, "fg": s:yellow_fg})
+ call s:hi("SpellRare", {"cterm": s:attr_un, "fg": s:blue_fg})
+ call s:hi("SpellLocal", {"cterm": s:attr_un, "fg": s:green_fg})
+endif
+call s:hi("Pmenu", {"bg": s:gray_bg})
+call s:hi("PmenuSel", {"bg": s:pink_bg})
+call s:hi("PmenuSbar", {"bg": s:gray_bg})
+call s:hi("PmenuThumb", {"bg": s:gray_bg})
+call s:hi("TabLine", {"bg": s:bg_subtle})
+call s:hi("TabLineSel", {"bg": s:pink_bg})
+call s:hi("TabLineFill", {"bg": s:bg_subtle})
+call s:hi("CursorColumn", {"bg": s:yellow_fg})
+call s:hi("CursorLine", {"bg": s:bg_subtle})
+call s:hi("ColorColumn", {"bg": s:bg_subtle})
+call s:hi("MatchParen", {"fg": s:pink_fg, "gui": "underline", "cterm": "underline"})
+call s:hi("qfLineNr", {"fg": s:gray})
+
+"}}}
+""{{{ Switching StatusLine bg
+"function! s:changebg(group, color)
+" execute "highlight" a:group "guibg=" a:color.gui "ctermbg=" a:color.cterm
+"endfunction
+"
+"if g:switch_statusline_bg_in_insert == 1
+" "" Change Color when entering Insert Mode
+" autocmd InsertEnter * call s:changebg("StatusLine", s:pink_bg)
+" "" Revert Color to default when leaving Insert Mode
+" autocmd InsertLeave * call s:changebg("StatusLine", s:green_bg)
+"endif
+
+"}}}
+" vim: set foldmethod=marker:
+
diff --git a/linux/home/.vim/colors/colors/default.vim b/linux/home/.vim/colors/colors/default.vim
new file mode 100644
index 0000000..ebc66e8
--- /dev/null
+++ b/linux/home/.vim/colors/colors/default.vim
@@ -0,0 +1,175 @@
+"{{{ Pre-setting
+let g:colors_name = expand('<sfile>:t:r')
+
+if ! exists("g:terminal_italics")
+ let g:terminal_italics = 0
+endif
+
+if ! exists("g:spell_undercurl")
+ let g:spell_undercurl = 0
+endif
+"}}}
+
+"{{{ Color Palette (updated to match official Vim default colors)
+" Note: Hex colors chosen to reflect official Vim default colorscheme
+
+let s:black = { "gui": "#171717", "cterm": "16" }
+let s:white = { "gui": "#EAE8E7", "cterm": "231" }
+let s:gray = { "gui": "#808080", "cterm": "244" }
+
+" Reds
+let s:red_fg = { "gui": "#FFFFFF", "cterm": "231" } " White fg on red bg for errors
+let s:red_bg = { "gui": "#A40000", "cterm": "52" } " DarkRed bg (ErrorMsg bg)
+
+" Blues and Cyan
+let s:blue_fg = { "gui": "#6A5ACD", "cterm": "60" } " SlateBlue
+let s:dark_cyan = { "gui": "#008B8B", "cterm": "36" } " DarkCyan
+let s:cyan_bg = { "gui": "#00CED1", "cterm": "38" } " DarkTurquoise
+
+" Greens
+let s:green_fg = { "gui": "#008000", "cterm": "22" } " DarkGreen
+let s:green_bg = { "gui": "#90EE90", "cterm": "120" } " LightGreen
+
+" Yellows and Oranges
+let s:yellow_fg = { "gui": "#A52A2A", "cterm": "94" } " Brown (used in Vim default)
+let s:yellow_bg = { "gui": "#FFFF00", "cterm": "226" } " Yellow bg
+
+let s:orange = { "gui": "#FFA500", "cterm": "214" } " Orange
+
+" Purples
+let s:purple = { "gui": "#6A0DAD", "cterm": "90" } " DarkMagenta
+
+" Grays
+let s:light_gray = { "gui": "#D3D3D3", "cterm": "252" }
+let s:dark_gray = { "gui": "#4D4D4D", "cterm": "240" }
+
+" No color
+let s:NONE = { "gui": "NONE", "cterm": "NONE" }
+
+" Alias for Normal fg and background depending on background setting
+if &background == "light"
+ let s:norm = s:black
+ let s:bg = s:NONE
+ let s:bg_subtle = s:light_gray
+ let s:gray_fg = s:gray
+ let s:green_fg = s:green_fg
+ let s:yellow_fg = s:yellow_fg
+ let s:pink_fg = s:purple
+ let s:cyan_fg = s:dark_cyan
+ let s:blue_fg = s:blue_fg
+ let s:red_fg = s:red_bg
+ let s:gray_bg = s:light_gray
+ let s:green_bg = s:green_bg
+ let s:yellow_bg = s:yellow_bg
+ let s:pink_bg = s:orange
+ let s:cyan_bg = s:cyan_bg
+ let s:blue_bg = s:blue_fg
+ let s:red_bg = s:red_bg
+else
+ let s:norm = s:white
+ let s:bg = s:NONE
+ let s:bg_subtle = s:dark_gray
+ let s:gray_fg = s:gray
+ let s:green_fg = s:green_bg
+ let s:yellow_fg = s:yellow_bg
+ let s:pink_fg = s:orange
+ let s:cyan_fg = s:cyan_bg
+ let s:blue_fg = s:blue_bg
+ let s:red_fg = s:red_bg
+ let s:gray_bg = s:dark_gray
+ let s:green_bg = s:green_fg
+ let s:yellow_bg = s:yellow_fg
+ let s:pink_bg = s:purple
+ let s:cyan_bg = s:dark_cyan
+ let s:blue_bg = s:blue_fg
+ let s:red_bg = s:red_bg
+endif
+"}}}
+
+"{{{ Highlight Function (keep your existing function)
+function! s:hi(group, style)
+ if g:terminal_italics == 0
+ if has_key(a:style, "cterm") && a:style["cterm"] == "italic"
+ unlet a:style.cterm
+ endif
+ if has_key(a:style, "term") && a:style["term"] == "italic"
+ unlet a:style.term
+ endif
+ endif
+ 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")
+ \ "term=" (has_key(a:style, "term") ? a:style.term : "NONE")
+endfunction
+
+if g:spell_undercurl == 1
+ let s:attr_un = 'undercurl'
+else
+ let s:attr_un = 'underline'
+endif
+"}}}
+
+"{{{ Common Highlighting updated to match official Vim default colorscheme
+
+call s:hi("Normal", {"fg": s:norm, "bg": s:bg})
+call s:hi("Cursor", {})
+call s:hi("Conceal", {"fg": s:yellow_fg})
+call s:hi("ErrorMsg", {"fg": s:red_fg, "bg": s:red_bg, "gui": "bold", "cterm": "bold"})
+call s:hi("IncSearch", {"gui": "reverse", "cterm": "reverse"})
+call s:hi("ModeMsg", {"gui": "bold", "cterm": "bold"})
+call s:hi("NonText", {"fg": s:blue_fg, "gui": "bold", "cterm": "bold"})
+call s:hi("PmenuSbar", {"bg": s:gray_bg})
+call s:hi("StatusLine", {"gui": "reverse,bold", "cterm": "reverse,bold"})
+call s:hi("StatusLineNC", {"gui": "reverse", "cterm": "reverse"})
+call s:hi("TabLineFill", {"gui": "reverse", "cterm": "reverse"})
+call s:hi("TabLineSel", {"gui": "bold", "cterm": "bold"})
+call s:hi("TermCursor", {"gui": "reverse", "cterm": "reverse"})
+call s:hi("WinBar", {"gui": "bold", "cterm": "bold"})
+call s:hi("WildMenu", {"fg": s:black, "bg": s:yellow_bg})
+
+call s:hi("VertSplit", {"link": "Normal"})
+call s:hi("WinSeparator", {"link": "VertSplit"})
+call s:hi("WinBarNC", {"link": "WinBar"})
+call s:hi("DiffTextAdd", {"link": "DiffText"})
+call s:hi("EndOfBuffer", {"link": "NonText"})
+call s:hi("LineNrAbove", {"link": "LineNr"})
+call s:hi("LineNrBelow", {"link": "LineNr"})
+call s:hi("QuickFixLine", {"link": "Search"})
+call s:hi("CursorLineSign", {"link": "SignColumn"})
+call s:hi("CursorLineFold", {"link": "FoldColumn"})
+call s:hi("CurSearch", {"link": "Search"})
+call s:hi("PmenuKind", {"link": "Pmenu"})
+call s:hi("PmenuKindSel", {"link": "PmenuSel"})
+call s:hi("PmenuMatch", {"link": "Pmenu"})
+call s:hi("PmenuMatchSel", {"link": "PmenuSel"})
+call s:hi("PmenuExtra", {"link": "Pmenu"})
+call s:hi("PmenuExtraSel", {"link": "PmenuSel"})
+call s:hi("ComplMatchIns", {})
+call s:hi("Substitute", {"link": "Search"})
+call s:hi("Whitespace", {"link": "NonText"})
+call s:hi("MsgSeparator", {"link": "StatusLine"})
+call s:hi("NormalFloat", {"link": "Pmenu"})
+call s:hi("FloatBorder", {"link": "WinSeparator"})
+call s:hi("FloatTitle", {"link": "Title"})
+call s:hi("FloatFooter", {"link": "Title"})
+
+call s:hi("Error", {"fg": s:red_fg, "bg": s:red_bg, "gui": "bold", "cterm": "bold"})
+call s:hi("Todo", {"fg": s:black, "bg": s:yellow_bg, "gui": "bold", "cterm": "bold"})
+
+call s:hi("String", {"link": "Constant"})
+call s:hi("Character", {"link": "Constant"})
+call s:hi("Number", {"link": "Constant"})
+call s:hi("Boolean", {"link": "Constant"})
+call s:hi("Float", {"link": "Number"})
+call s:hi("Function", {"link": "Identifier"})
+call s:hi("Conditional", {"link": "Statement"})
+call s:hi("Repeat", {"link": "Statement"})
+call s:hi("Label", {"link": "Statement"})
+call s:hi("Operator", {"link": "Statement"})
+call s:hi("Keyword", {"link": "Statement"})
+call s:hi("Exception",
diff --git a/linux/home/.vim/ftplugin/ftplugin/after/vim.vim b/linux/home/.vim/ftplugin/ftplugin/after/vim.vim
new file mode 100644
index 0000000..3548816
--- /dev/null
+++ b/linux/home/.vim/ftplugin/ftplugin/after/vim.vim
@@ -0,0 +1,12 @@
+" Enable Vim-specific options
+setlocal tabstop=4
+setlocal shiftwidth=4
+setlocal softtabstop=4
+setlocal expandtab
+setlocal foldmethod=marker
+setlocal keywordprg=:help
+setlocal iskeyword+=:
+
+" Spell-check off by default
+setlocal nospell
+