Giter Club home page Giter Club logo

papercolor-theme's Introduction

PaperColor Theme

license GitHub release Travis CI Build Status

Light & Dark color schemes for terminal and graphic Vim awesome editor

Inspired by Google's Material Design

Improve code readability; great for presentation

Inclusive support

Color Ranges

Support True color / GUI-color and identical 256-color that the design is based on.

Also gracefully support down to 16-color terminal, which will use terminal native colors. You need to change the terminal colors to PaperColor palette.

In 8-color and 4-color, it might lack the necessary variation of colors to express PaperColor, but seriously let me know if you still use these kinds of terminals.

Languages and Plugins

Currently designed for these languages:

  • Haskell, Erlang, Elixir, Clojure
  • C, C++, Java, Golang, JavaScript, Python, Ruby, Pascal, PHP, Perl, LUA
  • DTrace, SystemTap, SQL/MySQL, Octave/MATLAB, R, Lex/Flex & Yacc/Bison, Assembly (MIPS, GAS, NASM), Bash/Shell script, Sed, Awk, Vim script
  • Dockerfile, Makefile, CMake, NGINX, Cucumber, YAML, JSON, HTML, XML, Markdown, reStructuredText, PlantUML, Dosini, Mail, Git commit message
  • Ada, COBOL, Fortran, (what's your other favorite dinosaur?)

Other file types can still display well as long as your Vim is set up to recognize the language syntax even though that may not be the optimal experience. So, if the language you are working on isn't listed here, feel free to make a design request.

Plugin support: vimdiff, netrw, NERDTree, tagbar, tabline, vim-airline, vim-indent-guides, vim-startify, Agit

(see below for syntax-highlighting plugins target)

Installation

Place 'PaperColor.vim' file into 'colors' folder within your Vim directory, e.g. ~/.vim/colors/

Or simply use a plugin manager like Vundle (recommended for easy :PluginUpdate):

Plugin 'NLKNguyen/papercolor-theme'

Then, put this in your ~/.vimrc

set t_Co=256   " This is may or may not needed.

set background=light
colorscheme PaperColor

Or using the dark version:

set background=dark
colorscheme PaperColor

To switch to dark or light variant during session: :set background=dark or :set background=light

To quickly toggle between them, use vim-unimpaired's keymap cob

Optional: turn on line numbers and status bar

set number
set laststatus=2

User-config Options

This theme currently provides theme options and language-specific options. All config options can be stored in global variable g:PaperColor_Theme_Options which can be set in your .vimrc

Note:

  • This g:PaperColor_Theme_Options variable must be placed anywhere before color PaperColor command.
  • if the same option is provided in both a theme and a theme's variant, the value in the theme's variant options will take precedence.

Theme Options

Within section theme, options for each theme can be specified under the theme name. The original PaperColor theme is default. For example:

let g:PaperColor_Theme_Options = {
  \   'theme': {
  \     'default': {
  \       'transparent_background': 1
  \     }
  \   }
  \ }

Or if you want to specify options only for a variant (dark or light) of a theme, you can specify using this pattern [theme name].light or [theme name].dark. For example:

let g:PaperColor_Theme_Options = {
  \   'theme': {
  \     'default.dark': {
  \       'transparent_background': 1
  \     }
  \   }
  \ }

Color overriding

You can override any color of the theme of interest. This example is for default theme (original PaperColor Theme), but you can specify any other theme that is registered.

The overriding setting is placed in override key of g:PaperColor_Theme_Options variable that you set in .vimrc like this.

let g:PaperColor_Theme_Options = {
  \   'theme': {
  \     'default.dark': { 
  \       'override' : {
  \         'color00' : ['#080808', '232'],
  \         'linenumber_bg' : ['#080808', '232']
  \       }
  \     }
  \   }
  \ }

See DESIGN.md for more details and full list of color names.

Currently available theme options

option value default
transparent_background 1: use terminal background 0: use theme background
allow_bold 1: use bold for certain text, 0: not at all decided by the theme
allow_italic 1: use italics for certain text, 0: not at all decided by the theme
override dictionary of color key-value

Language-specific options

In general, for each language, built-in functions and constants are not highlighted. This is intentional; the vim syntax file often lags behind actual language development. To override the default behavior, optionally place a language section in g:PaperColor_Theme_Options. An example configuration is available below

let g:PaperColor_Theme_Options = {
  \   'language': {
  \     'python': {
  \       'highlight_builtins' : 1
  \     },
  \     'cpp': {
  \       'highlight_standard_library': 1
  \     },
  \     'c': {
  \       'highlight_builtins' : 1
  \     }
  \   }
  \ }

Currently available language options

language option value default
c highlight_builtins 1: enable 0: disable
cpp highlight_standard_library 1: enable 0: disable
python highlight_builtins 1: enable 0: disable

Syntax Highlighting Plugins Target

There are syntax highlighting enhancement plugins that improve upon Vim built-in syntax highlighting, and each can have many different implementations. This is the list of plugins that this color scheme targets.

Screenshots

Default Light

Sample Ruby code

Sample DTrace code

Sample MySQL code

Sample Assembly code

Sample Vimdiff w/ git tool

Default Dark

Sample Ruby code

Sample Go code

Sample JavaScript code

Sample C code

Sample Vimdiff w/ git tool

Have screenshots to contribute? Use this thread to upload images and get direct links.


Vim-airline support

To set vim-airline theme:

let g:airline_theme='papercolor'

To set lightline theme:

let g:lightline = { 'colorscheme': 'PaperColor' }

For more sceenshots, story behind the project, and other users' designs inspired by Paper Color, go to this blog post

Suggestions/Wishes/Questions/Comments are welcome via Github issues or via the blog above.

Related Projects Based On PaperColor

Material iTerm theme by Christoph Hermann

Material Terminator (terminal emulator) theme by Marco Herrero

Terminal Theme by Fixles

PaperColor Light for iTerm2 by ASeom Han

PaperColor Theme for Vis Editor by Jan Christoph Ebersbach

Airline PaperColor Theme for Emacs Powerline by Anthony DiGirolamo

Airline PaperColor Theme for Vim Lightline

Ninrod's vim + tmux + zsh dotfiles by Filipe Silva

PaperColor for Vscode by rozbo

PaperColor theme for Hyper by Rafael Rinaldi

Feel free to add related projects here!

papercolor-theme's People

Contributors

aseom avatar chechorp avatar chrisbra avatar claudiaj avatar jamietanna avatar leeiio avatar leonardt avatar mrzechonek avatar ninrod avatar nlknguyen avatar pappasam avatar rafaelrinaldi avatar renechz avatar ysheng26 avatar

Watchers

 avatar

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.