Giter Club home page Giter Club logo

colorific.vim's Introduction

colorific.vim

Vim theme (dark and light) built to produce readable diffs, unlike the default theme, and clear syntax highlighting that doesn't use overly bright colors that make your eyes bleed after prolonged use.

The theme comes with two color sets for 256-color (cterm) and truecolor terminals. 16-color ones are unsupported, and the theme will not work with them. To use truecolor (e.g., #ABC123) support, make sure that you have set termguicolors in your vimrc.

Syntax highlighting uses material colors manually tweaked to lower the saturation and brightness. Why material colors? Because when you try to find good highlighting colors out of all the colors available, it helps to have a starting point.

The theme comes in three light and dark UI variants that correspond to some prominent GTK themes:

  • light and dark use blue-grey primary colors to match those used in the Adapta GTK theme.
  • light2 and dark2 use white and black for starker contrast, similar to the Plata and Materia GTK themes.
  • light3 and dark3 use the off-blue and greyish colors from the Arc GTK theme. Contrast between colors is too low for good cterm support, so make sure truecolor support is enabled.

Note that colorific will not override the system background color, so pick the variant that looks best with your system theme.

Another point worth noting is that this theme overrides some of the Vim syntax highlighter defaults for various languages so that coloration appears more consistent across them.

Installation

To install, clone the repository and run ./install. This will install the Vim themes along with all the extras.

To install a specific component instead of everything, pass any of the following flags:

./install usage:
  -a|--alacritty   install alacritty files
  -g|--gitk        install gitk files
  -k|--kitty       install kitty files
  -n|--neovim      install neovim files
  -t|--tmux        install tmux files
  -v|--vim         install vim files
  -h|--help        print this message

To uninstall, use ./uninstall. The same program-specific flags in the installation script apply here.

Configuration

Vim / Neovim

For Vim, edit your .vimrc file to contain:

let g:colorific_style='<style>'
colo colorific
set background=<bg>
syntax on
  • <style> is the name of the theme to load. Possible values are light, light2, light3, dark, dark2, dark3.

  • <bg> refers to the background color of your terminal or system theme. Set it to light for a light background and darkfor a dark one.

For Neovim, edit the .config/nvim/init.vim file instead.

Note: If Vim is invoked as root or via the EDITOR environmental variable by a program running as root (e.g. visudo), you may need to install colorific to the root Vim directory. To do so, run ./install while root and edit the /root/.vimrc (or /root/.config/nvim/init.vim) as described above.

Airline

Colorific can also be used to color the airline bar. Load the theme by adding to your vimrc (for Vim) or init.vim (for Neovim):

let g:airline_theme='colorific'

Note For root, edit /root/.vimrc or /root/.config/nvim/init.vim as applicable.

Examples

Light Dark
CSS CSS CSS
HTML HTML HTML
XML XML XML
Ruby Ruby Ruby
Python Python Python
C/C++ C++ C++
R R R
Julia Julia Julia
Perl Perl Perl
Javascript Javascript Javascript
Bash Bash Bash
LaTeX LaTeX LaTeX

Extras

alacritty

Running the install script (either ./install or ./install -a will copy the YAML theme file in alacritty/ to ~/.config/alacritty.

To enable a theme, edit your alacritty config file to include:

import:
 - ~/.config/alacritty/colorific.yml

To load a particular theme, edit the ~/.config/alacritty/colorific.yml file and change the value of colors at the bottom to the desired variant (e.g. *dark2, *light2, etc.)

gitk

The gitk stylings are installed by running ./install or running ./install -g. This only copies all the gitk-* variants in the git/ directory of this repository to ~/.config/git/.

To actually load a theme, copy/rename/move one of these installed variants to ~/.config/git/gitk. The file name must be 'gitk.'

kitty

The installation script (run either ./install or ./install -k) copies the kitty themes in kitty/ to a directory called ~/.config/kitty/themes.

To enable a particular theme, edit the kitty.conf file to have:

include ./themes/<theme>.conf

where <theme> corresponds to one of the available variants (e.g. dark2, light2, etc.).

tmux

Themes for tmux are available in the tmux/ directory. They are installed to the ~/.tmux directory when running ./install or ./install -t. To use them, edit the ~/.tmux.conf file to have the line:

source-file <path>/<to>/<theme>.tmuxtheme

where <theme> refers to one of the available variants (light3, dark3, light2, dark2, dark, or light).

colorific.vim's People

Contributors

sudorook avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

colorific.vim's Issues

gitk-light3 tweaks

Hi there,

Sorry I should do this as a PR, if I remember I will. I've been doing a deep dive on superuser into making gitk prettier, and I used your gitk-light3 theme, however I made some slight tweaks, here below is what I have changed with comments.

This is what I get at the end:

Screenshot from 2022-03-02 13-39-07

I'm using the yaru tk theme with Pop OS.

A couple of things I noticed:

  • Your uifgdisabledcolor for the light themes is a dark purple that doesn't seem to match - I replaced it with a light grey
  • It's hard to tell the difference between the 3 light themes - when comparing screenshots I noticed the slight difference in the uicolor for which the light3 theme best matched the yaru theme
  • I preferred the GitHub style diffbgcolors
  • You're including other settings other than the colours setting in your configs - I think its better to leave them out (except for the want_ttk which affects the colours).
set uicolor #f5f6f7
set want_ttk 1
set bgcolor #ffffff
set fgcolor #5c616c
set uifgcolor #5c616c
set uifgdisabledcolor #d3dae3
set colors {#00d96f #e34f4c #73c2e6 #ff79c6 #f8f8f8 #ffb86c #ffb86c}
set diffcolors {{#5c616c} #5c616c #73c2e6}
set mergecolors {#e34f4c #73c2e6 #00d96f #73c2e6 #ffb86c #8be9fd #ff79c6 #f1fa8c #8be9fd #ff79c6 #8be9fd #ffb86c #8be9fd #00d96f #ffb86c #ff79c6}
set markbgcolor #ffffff
set diffcontext 3
set selectbgcolor #e7e8eb
set foundbgcolor #f1fa8c
set currentsearchhitbgcolor #ffb86c
set extdifftool meld
set perfile_attrs 0
set headbgcolor #00d96f
set headfgcolor black
set headoutlinecolor #5c616c
set remotebgcolor #ffb86c
set tagbgcolor #f1fa8c
set tagfgcolor black
set tagoutlinecolor #5c616c
set reflinecolor #5c616c
set filesepbgcolor #f5f6f7
set filesepfgcolor #5c616c
set linehoverbgcolor #f1fa8c
set linehoverfgcolor black
set linehoveroutlinecolor #5c616c
set mainheadcirclecolor #f1fa8c
set workingfilescirclecolor #e34f4c
set indexcirclecolor #00d96f
set circlecolors {#ffffff #73c2e6 #f5f6f7 #73c2e6 #73c2e6}
set linkfgcolor #73c2e6
set circleoutlinecolor #f5f6f7
set diffbgcolors {{#ffd7d5} #e6ffec}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.