From 9f9b5def410938a59cb85a1902bc7fa73a8f70f8 Mon Sep 17 00:00:00 2001 From: CaptainMcClellan Date: Fri, 3 Mar 2017 10:48:51 -0600 Subject: [PATCH] Added theming to the Vsplit divider. (#578) * Added title setting (Requires tcell pull!) and optimized tab display. * Changed tcell call to screen. * Fixed bad reference for getting Buffer name. * Themeable vsplit divider. * Bugfix. --- cmd/micro/view.go | 6 +++++- runtime/colorschemes/cmc-16.micro | 1 + runtime/colorschemes/funky-cactus.micro | 2 -- runtime/colorschemes/mc.micro | 4 +--- runtime/colorschemes/paper.micro | 4 +--- runtime/colorschemes/simple.micro | 4 +++- runtime/help/colors.md | 9 +++++---- 7 files changed, 16 insertions(+), 14 deletions(-) diff --git a/cmd/micro/view.go b/cmd/micro/view.go index 1c3b42ba..c3452de6 100644 --- a/cmd/micro/view.go +++ b/cmd/micro/view.go @@ -714,8 +714,12 @@ func (v *View) DisplayView() { } if v.x != 0 { + dividerStyle := defStyle + if style, ok := colorscheme["divider"]; ok { + dividerStyle = style + } // Draw the split divider - v.drawCell(screenX, screenY, '|', nil, defStyle.Reverse(true)) + v.drawCell(screenX, screenY, tcell.RuneVLine, nil, dividerStyle) screenX++ } diff --git a/runtime/colorschemes/cmc-16.micro b/runtime/colorschemes/cmc-16.micro index a7fc47d0..02b4a349 100644 --- a/runtime/colorschemes/cmc-16.micro +++ b/runtime/colorschemes/cmc-16.micro @@ -37,3 +37,4 @@ color-link gutter-error ",red" color-link gutter-warning "red" color-link color-column "cyan" color-link underlined.url "underline blue, white" +color-link divider "blue" diff --git a/runtime/colorschemes/funky-cactus.micro b/runtime/colorschemes/funky-cactus.micro index 5703d838..0ce0027b 100644 --- a/runtime/colorschemes/funky-cactus.micro +++ b/runtime/colorschemes/funky-cactus.micro @@ -23,11 +23,9 @@ color-link error "bold ,brightred" color-link todo "underline ,brightyellow" color-link indent-char "bold ,brightgreen" color-link line-number "green" -color-link line-number.scrollbar "green" color-link statusline "black,green" color-link tabbar "black,magenta" color-link current-line-number "bold magenta" -color-link current-line-number.scroller "red" color-link gutter-error ",red" color-link gutter-warning "red" color-link color-column "bold green" diff --git a/runtime/colorschemes/mc.micro b/runtime/colorschemes/mc.micro index f04f7a55..30100257 100644 --- a/runtime/colorschemes/mc.micro +++ b/runtime/colorschemes/mc.micro @@ -16,12 +16,10 @@ color-link error ",brightred" color-link todo ",brightyellow" color-link indent-char ",cyan" color-link line-number "green" -color-link line-number.scrollbar "white" color-link statusline "black,cyan" color-link tabbar "black,cyan" color-link current-line-number "black,cyan" -color-link current-line-number.scroller "cyan" color-link cursor-line "black,cyan" color-link gutter-error ",red" color-link gutter-warning "red" -color-link color-column "cyan" \ No newline at end of file +color-link color-column "cyan" diff --git a/runtime/colorschemes/paper.micro b/runtime/colorschemes/paper.micro index d83154ba..1d1c5792 100644 --- a/runtime/colorschemes/paper.micro +++ b/runtime/colorschemes/paper.micro @@ -19,11 +19,9 @@ color-link error ",brightred" color-link todo ",brightyellow" color-link indent-char ",brightgreen" color-link line-number "black" -color-link line-number.scrollbar "green" color-link statusline "white,black" color-link tabbar "white,black" color-link current-line-number "blue" -color-link current-line-number.scroller "red" color-link gutter-error ",red" color-link gutter-warning "red" -color-link color-column "black" \ No newline at end of file +color-link color-column "black" diff --git a/runtime/colorschemes/simple.micro b/runtime/colorschemes/simple.micro index d34d7719..6bda2f44 100644 --- a/runtime/colorschemes/simple.micro +++ b/runtime/colorschemes/simple.micro @@ -20,4 +20,6 @@ color-link color-column "white" #No extended types. (bool in C) color-link type.extended "default" #No bracket highlighting. -color-link symbol.brackets "default" \ No newline at end of file +color-link symbol.brackets "default" +#Color shebangs the comment color +color-link preproc.shebang "comment" diff --git a/runtime/help/colors.md b/runtime/help/colors.md index ca0696e7..15bb0531 100644 --- a/runtime/help/colors.md +++ b/runtime/help/colors.md @@ -52,7 +52,7 @@ Micro comes with a number of colorschemes by default. Here is the list: * paper-tc: A nice minimalist theme with a light background, good for editing documents on. Requires true color to look its best. Not to be confused with `-paper` suffixed themes. -* geany: Colorscheme +* geany: Colorscheme based on geany's default highlighting. * geany-alt-tc: Based on an alternate theme bundled with geany. @@ -140,9 +140,9 @@ Here is a list of the colorscheme groups that you can use: * underlined * error * todo -* statusline (color of the statusline) -* tabbar ( color of the tabbar that lists open files.) -* indent-char (color of the character which indicates tabs if the option is enabled) +* statusline ( Color of the statusline) +* tabbar ( Color of the tabbar that lists open files.) +* indent-char ( Color of the character which indicates tabs if the option is enabled) * line-number * gutter-error * gutter-warning @@ -150,6 +150,7 @@ Here is a list of the colorscheme groups that you can use: * current-line-number * color-column * ignore +* divider ( Color of the divider between vertical splits. ) Colorschemes must be placed in the `~/.config/micro/colorschemes` directory to be used.