This is a slimmed down, truecolor-focused re-implementation of papercolor-theme that:
- Has no abstraction, which simplifies user color mapping overrides.
- Targets
gui
options (guifg
,guibg
,gui
) with truecolor support. Runecho $COLORTERM
from your terminal. If it respondstruecolor
, you havetruecolor
support. - Limited to the following highlight groups for consistency across languages
- Supports both
background=light
andbackground=dark
. - Is compatible with both Vim and Neovim.
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.
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
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.
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:
- Use the PaperColorSlim-provided background colors (e.g., don't put the above in your
vimrc
) - Perform further customization, tweaking
guifg
andguibg
colors where necessary - Use a different Vim
colorscheme
that better-supports your background preferences
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
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
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.
Special thanks to Nikyle Nguyen and all their great work on papercolor-theme over the years!