Skip to content

(Neo)Vim colorscheme that is pretty, slim, and performant

Notifications You must be signed in to change notification settings

pappasam/papercolor-theme-slim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

PaperColorSlim Colorscheme

This is a slimmed down, truecolor-focused re-implementation of papercolor-theme that:

  1. Has no abstraction, which simplifies user color mapping overrides.
  2. Targets gui options (guifg, guibg, gui) with truecolor support. Run echo $COLORTERM from your terminal. If it responds truecolor, you have truecolor support.
  3. Limited to the following highlight groups for consistency across languages
  4. Supports both background=light and background=dark.
  5. Is compatible with both Vim and Neovim.

Screenshot

Installation

If using vim-plug:

Plug 'pappasam/papercolor-theme-slim'

Then run the Ex command:

:PlugInstall

I personally use vim-packager, so if you'd like to go down the "package" rabbit hole, I suggest giving that a try.

Dark and light

We use the dark variant by default:

colorscheme PaperColorSlim

The light variant can be used at start-up by setting background=light before loading this colorscheme.

set background=light
colorscheme PaperColorSlim

You may change to the light/dark variant at any time by running :set background=light or :set background=dark

Customization

You can configure virtually anything you want with Vim's native syntax highlighting tooling and autocmds. What follows are some common configuration customization requests by users, along with their solution.

Transparent background

Some users want the background of their Vim to match their terminal's background color. To achieve this with PaperColorSlim, put the following code somewhere in your vimrc:

augroup custom_papercolorslim_transparent_background
  autocmd!
  autocmd ColorScheme PaperColorSlim highlight Normal guibg=NONE
augroup end

Note: if your terminal background differs too much from #1c1c1c when using background=dark, or #eeeeee when using background=light, PaperColorSlim may not contrast well with your terminal's background. In this case, you will need to do one of the following:

  1. Use the PaperColorSlim-provided background colors (e.g., don't put the above in your vimrc)
  2. Perform further customization, tweaking guifg and guibg colors where necessary
  3. Use a different Vim colorscheme that better-supports your background preferences

Override color for only one &background type

Suppose, hypothetically, that you like the default guibg color for &background == 'dark' but want to change the guibg color for &background == 'light' to #fffff0. You can do this by adding the following snippet to your vimrc:

augroup custom_papercolorslim_light_background
  autocmd!
  autocmd ColorScheme PaperColorSlim
        \ if &background == 'light' |
        \ execute 'highlight Normal guibg=#fffff0' |
        \ endif
augroup end

Modify highlight linking

Sometimes you want to change the group that a plugin's matched group is linked to. Although this colorscheme doesn't handle that for you, it's trivial to do this linking yourself. Here are some examples from my vimrc for gitsigns and nvim-tree:

augroup custom_highlight_linking
  autocmd!
  autocmd ColorScheme PaperColorSlim
        \ highlight link GitSignsAddNr DiffAdd |
        \ highlight link GitSignsChangeNr DiffChange |
        \ highlight link GitSignsDeleteNr DiffDelete |
        \ highlight link GitSignsDeleteNr DiffDelete |
        \ highlight link NvimTreeExecFile PreProc |
        \ highlight link NvimTreeImageFile NONE |
        \ highlight link NvimTreeSpecialFile NONE |
        \ highlight link NvimTreeSymlink NONE
augroup end

Development

If you want to contribute and assuming you use Neovim, I suggest installing and using nvim-colorizer. It will let you see the colors associated with the hex codes, greatly simplifying development.

Credits

Special thanks to Nikyle Nguyen and all their great work on papercolor-theme over the years!

About

(Neo)Vim colorscheme that is pretty, slim, and performant

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published