Add landscape.vim color scheme

This commit is contained in:
Anthony Rose 2021-09-23 12:30:23 +01:00
parent ad27bc0a5a
commit 51ae7de36e
8 changed files with 310 additions and 1 deletions

View file

@ -0,0 +1 @@
/doc/tags

View file

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2012-2015 itchyny
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -0,0 +1,15 @@
# landscape.vim
## editor be colorful, life be joyful
![](https://raw.githubusercontent.com/wiki/itchyny/landscape.vim/image/1.png)
![](https://raw.githubusercontent.com/wiki/itchyny/landscape.vim/image/2.png)
## Installation
Install with your favorite plugin manager.
## Author
itchyny (https://github.com/itchyny)
## License
This software is released under the MIT License, see LICENSE.

View file

@ -0,0 +1,107 @@
" landscape color scheme for vim-airline
let s:c = {
\ 'black' : [16, '#000000'],
\ 'white' : [231, '#ffffff'],
\
\ 'darkestgreen' : [22, '#005f00'],
\ 'darkgreen' : [28, '#008700'],
\
\ 'darkestcyan' : [21, '#0000ff'],
\ 'mediumcyan' : [117, '#87dfff'],
\
\ 'darkestblue' : [24, '#005f87'],
\ 'darkblue' : [31, '#0087af'],
\
\ 'darkestred' : [52, '#5f0000'],
\ 'darkred' : [88, '#870000'],
\ 'mediumred' : [124, '#af0000'],
\ 'brightred' : [160, '#df0000'],
\ 'brightestred' : [196, '#ff0000'],
\
\ 'darkestyellow' : [59, '#5f5f5f'],
\ 'darkyellow' : [100, '#878700'],
\ 'darkestpurple' : [57, '#5f00ff'],
\ 'mediumpurple' : [98, '#875fdf'],
\ 'brightpurple' : [189, '#dfdfff'],
\
\ 'brightorange' : [208, '#ff8700'],
\ 'brightestorange': [214, '#ffaf00'],
\
\ 'gray0' : [233, '#121212'],
\ 'gray1' : [235, '#262626'],
\ 'gray2' : [236, '#303030'],
\ 'gray3' : [239, '#4e4e4e'],
\ 'gray4' : [240, '#585858'],
\ 'gray5' : [241, '#606060'],
\ 'gray6' : [244, '#808080'],
\ 'gray7' : [245, '#8a8a8a'],
\ 'gray8' : [247, '#9e9e9e'],
\ 'gray9' : [250, '#bcbcbc'],
\ 'gray10' : [252, '#d0d0d0'],
\ }
" Normal mode
let s:N1 = [ 'darkestcyan', 'white' ]
let s:N2 = [ 'white', 'darkestcyan' ]
let s:N3 = [ 'white', 'gray2' ]
" Insert mode
let s:I1 = [ 'darkestgreen', 'white' ]
let s:I2 = [ 'white', 'darkestgreen' ]
let s:I3 = [ 'white', 'gray2' ]
" Visual mode
let s:V1 = [ 'darkestpurple', 'white' ]
let s:V2 = [ 'white', 'darkestpurple' ]
let s:V3 = [ 'white', 'gray2' ]
" Replace mode
let s:R1 = [ 'mediumred', 'white' ]
let s:R2 = [ 'white', 'mediumred' ]
let s:R3 = [ 'white', 'gray2' ]
" Replace mode
let s:RE = [ 'mediumred', 'white' ]
let s:file = copy(s:N3)
let g:airline#themes#landscape#palette = {}
let s:airline_z = [ 'gray2', 'gray10', '' ]
let s:airline_y = [ 'gray2', 'gray7', '' ]
let s:airline_x = [ 'gray9', 'gray4', '' ]
function! s:map(section1, section2, section3, file) abort
return {
\ 'airline_a': [ s:c[a:section1[0]][1], s:c[a:section1[1]][1], s:c[a:section1[0]][0], s:c[a:section1[1]][0], get(a:section1, 2, 'bold') ],
\ 'airline_b': [ s:c[a:section2[0]][1], s:c[a:section2[1]][1], s:c[a:section2[0]][0], s:c[a:section2[1]][0], get(a:section2, 2, '' ) ],
\ 'airline_c': [ s:c[a:section3[0]][1], s:c[a:section3[1]][1], s:c[a:section3[0]][0], s:c[a:section3[1]][0], get(a:section3, 2, '' ) ],
\ 'airline_z': s:color(s:airline_z),
\ 'airline_y': s:color(s:airline_y),
\ 'airline_x': s:color(s:airline_x),
\ 'airline_file': [ s:c[a:file[0]][1] , s:c[a:file[1]][1] , s:c[a:file[0]][0] , s:c[a:file[1]][0] , get(a:file , 2, '' ) ],
\ }
endfunction
function! s:color(name) abort
return [ s:c[a:name[0]][1], s:c[a:name[1]][1], s:c[a:name[0]][0], s:c[a:name[1]][0], a:name[2] ]
endfunction
let g:airline#themes#landscape#palette.normal = s:map(s:N1, s:N2, s:N3, s:file)
let g:airline#themes#landscape#palette.insert = s:map(s:I1, s:I2, s:I3, s:file)
let g:airline#themes#landscape#palette.visual = s:map(s:V1, s:V2, s:V3, s:file)
let g:airline#themes#landscape#palette.replace = s:map(s:R1, s:R2, s:R3, s:file)
" Inactive
let s:airline_z = [ 'gray2', 'gray0', '' ]
let s:airline_y = [ 'gray2', 'gray0', '' ]
let s:airline_x = [ 'gray2', 'gray0', '' ]
let s:A1 = [ 'gray2', 'gray0' ]
let s:A2 = [ 'gray2', 'gray0' ]
let s:A3 = [ 'gray2', 'gray0' ]
let g:airline#themes#landscape#palette.inactive = s:map(s:A1, s:A2, s:A3, s:file)

View file

@ -0,0 +1,116 @@
set background=dark
highlight clear
let g:colors_name = 'landscape'
if exists('syntax_on')
syntax reset
endif
highlight Normal gui=none guifg=#dddddd guibg=grey0
highlight Comment term=none ctermfg=243 ctermbg=none gui=none guifg=#767676
highlight Constant term=none ctermfg=111 gui=none guifg=#87afff
highlight String term=none ctermfg=215 ctermbg=none gui=none guifg=#ffaf5f
highlight Character term=none ctermfg=214 ctermbg=none gui=none guifg=#ffaf00
highlight Number term=none ctermfg=81 ctermbg=none gui=none guifg=#5fdfff
highlight Boolean term=none ctermfg=227 ctermbg=none gui=none guifg=#ffff5f
highlight Float term=none ctermfg=85 ctermbg=none gui=none guifg=#5fffaf
highlight Identifier term=none cterm=none ctermfg=117 ctermbg=none gui=none guifg=#87dfff
highlight Function term=none ctermfg=123 ctermbg=none gui=none guifg=#5fffff
highlight Statement term=none ctermfg=76 ctermbg=none gui=none guifg=#5fdf00
highlight Conditional term=none ctermfg=166 ctermbg=none gui=none guifg=#ef7f00
highlight default link Repeat Statement
highlight default link Label Statement
highlight Operator term=none ctermfg=220 ctermbg=none gui=none guifg=#ffdf00
highlight default link Keyword Statement
highlight default link Exception Statement
highlight PreProc term=none ctermfg=39 gui=none guifg=#00afff
highlight Include term=none ctermfg=38 gui=none guifg=#00afdf
highlight Define term=none ctermfg=37 gui=none guifg=#00afaf
highlight Macro term=none ctermfg=36 gui=none guifg=#00af87
highlight PreCondit term=none ctermfg=35 gui=none guifg=#00af5f
highlight Type term=none ctermfg=207 ctermbg=none gui=none guifg=#ff9fff
highlight StorageClass term=none ctermfg=201 ctermbg=none gui=none guifg=#ff7fff
highlight Structure term=none ctermfg=200 ctermbg=none gui=none guifg=#ff7fdf
highlight Typedef term=none ctermfg=199 ctermbg=none gui=none guifg=#ff7faf
highlight Special term=none ctermfg=178 gui=none guifg=orange
highlight SpecialChar term=none ctermfg=208 gui=none guifg=orange
highlight Tag term=none ctermfg=180 gui=none guifg=orange
highlight Delimiter term=none ctermfg=181 gui=none guifg=orange
highlight SpecialComment term=none ctermfg=182 gui=none guifg=violet
highlight Debug term=none ctermfg=183 gui=none guifg=violet
highlight TabLine ctermfg=253 ctermbg=241 guifg=#dadada guibg=#606060
highlight TabLineFill ctermfg=253 ctermbg=241 guifg=#dadada guibg=#606060
highlight TabLineSel cterm=bold ctermfg=253 guifg=#dadada
highlight Visual term=none ctermbg=240 guibg=#585858
highlight default link VisualNOS Visual
highlight Underlined term=underline ctermfg=45 gui=underline guifg=#00dfff
highlight Error term=none ctermfg=15 ctermbg=124 gui=none guifg=#ffffff guibg=#af0000
highlight WarningMsg term=none ctermfg=7 ctermbg=0 gui=none guifg=#c0c0c0 guibg=#000000
highlight WildMenu guibg=#ffaf00 ctermbg=214
highlight Todo cterm=none ctermfg=185 ctermbg=none gui=none guifg=#dfdf5f guibg=NONE
highlight DiffAdd term=none cterm=none ctermfg=none ctermbg=22 guifg=fg guibg=#005f00
highlight DiffChange term=none cterm=none ctermfg=none ctermbg=52 guifg=fg guibg=#5f0000
highlight DiffDelete term=none cterm=none ctermfg=none ctermbg=88 guifg=fg guibg=#870000
highlight DiffText term=none cterm=none ctermfg=none ctermbg=160 guifg=fg guibg=#df0000
highlight DiffFile term=none cterm=none ctermfg=47 ctermbg=none guifg=#00ff5f guibg=bg
highlight DiffNewFile term=none cterm=none ctermfg=199 ctermbg=none guifg=#ff00af guibg=bg
highlight default link DiffRemoved DiffDelete
highlight DiffLine term=none cterm=none ctermfg=129 ctermbg=none guifg=#af00ff guibg=bg
highlight default link DiffAdded DiffAdd
highlight default link ErrorMsg Error
highlight Ignore ctermbg=none gui=none guifg=bg
highlight ModeMsg ctermfg=none guifg=bg guibg=bg
highlight VertSplit term=none gui=none guifg=black guibg=darkgray gui=none ctermfg=black ctermbg=darkgray cterm=none
highlight Folded term=none ctermfg=247 ctermbg=235 guifg=#9e9e9e guibg=#262626
highlight FoldColumn term=none ctermfg=247 ctermbg=235 guifg=#9e9e9e guibg=#262626
highlight SignColumn term=none ctermfg=247 ctermbg=235 guifg=#9e9e9e guibg=#262626
highlight SpecialKey term=underline ctermfg=237 gui=none guifg=darkgray
highlight NonText term=none ctermfg=black gui=none guifg=black
highlight StatusLine term=none gui=none guifg=#1c1c1c guibg=#eeeeee gui=none ctermfg=234 ctermbg=255 cterm=none
highlight StatusLineNC term=none gui=none guifg=#262626 guibg=#585858 gui=none ctermfg=235 ctermbg=240 cterm=none
if get(g:, 'landscape_cursorline', 1)
highlight CursorLine term=none cterm=none ctermbg=235 gui=none guibg=#262626
highlight CursorLineNr term=underline cterm=bold ctermfg=148 ctermbg=235 gui=bold guifg=#afdf00 guibg=#262626
else
highlight clear CursorLine
highlight CursorLineNr term=none cterm=none ctermbg=none gui=none guibg=NONE
endif
highlight ColorColumn term=none cterm=none ctermbg=239 gui=none guibg=#4e4e4e
highlight Cursor term=reverse cterm=reverse gui=reverse guifg=NONE guibg=NONE
highlight CursorColumn term=none cterm=none ctermbg=235 gui=none guibg=#262626
highlight LineNr term=none ctermfg=58 ctermbg=none guifg=#5f5f00 guibg=bg
highlight MatchParen ctermfg=none ctermbg=238 guibg=#4e4e4e
highlight Pmenu ctermfg=233 ctermbg=249 gui=none guifg=#121212 guibg=#b2b2b2
highlight PmenuSel ctermfg=233 ctermbg=242 gui=none guifg=#121212 guibg=#666666
highlight PmenuSbar ctermfg=233 ctermbg=244 gui=none guifg=#121212 guibg=#808080
highlight PmenuThumb ctermfg=233 ctermbg=239 gui=none guifg=#121212 guibg=#4e4e4e
highlight Search cterm=reverse ctermfg=178 ctermbg=236 gui=reverse guifg=#dfaf00 guibg=#303030
highlight IncSearch cterm=reverse ctermfg=136 ctermbg=236 gui=reverse guifg=#af8700 guibg=#303030
highlight QuickFixLine cterm=bold ctermfg=none ctermbg=none gui=bold guifg=NONE guibg=NONE
highlight SpellBad term=none cterm=none ctermbg=52 gui=none guibg=#5f0000
highlight default link SpellCap SpellBad
highlight default link SpellLocal SpellBad
highlight default link SpellRare SpellBad
if exists('##CmdlineEnter')
highlight IncSearch cterm=reverse ctermfg=178 ctermbg=236 gui=reverse guifg=#dfaf00 guibg=#303030
augroup landscape-highlight-search
autocmd!
autocmd CmdlineEnter /,\? :highlight Search cterm=reverse ctermfg=100 ctermbg=236 gui=reverse guifg=#878700 guibg=#303030
autocmd CmdlineLeave /,\? :highlight Search cterm=reverse ctermfg=178 ctermbg=236 gui=reverse guifg=#dfaf00 guibg=#303030
augroup END
endif
" Conceal
" CursorIM
" Directory
" ModeMsg
" MoreMsg
" Question

View file

@ -0,0 +1,48 @@
*landscape.txt* A colorscheme and syntax for Vim
Author: itchyny (https://github.com/itchyny)
License: MIT License
Repository: https://github.com/itchyny/landscape.vim
CONTENTS *landscape-contents*
Introduction |landscape-introduction|
Airline Theme |landscape-airline|
==============================================================================
INTRODUCTION *landscape-introduction*
*landscape* is a colorscheme plugin for Vim.
It also provides some syntax files.
==============================================================================
AIRLINE THEME *landscape-airline*
This plugin also contains a theme for |airline|
(https://github.com/bling/vim-airline). You can use the theme by the following
setting.
>
let g:airline_theme = 'landscape'
<
Also, the following settings will be nice.
>
let g:airline#extensions#hunks#non_zero_only = 1
let g:airline#extensions#whitespace#enabled = 0
let g:airline#extensions#branch#enabled = 0
let g:airline#extensions#readonly#enabled = 0
let g:airline_section_b =
\ '%{airline#extensions#branch#get_head()}' .
\ '%{""!=airline#extensions#branch#get_head()?(" " . g:airline_left_alt_sep . " "):""}' .
\ '%{airline#extensions#readonly#get_mark()}' .
\ '%t%( %M%)'
let g:airline_section_c = ''
let s:sep = " %{get(g:, 'airline_right_alt_sep', '')} "
let g:airline_section_x =
\ '%{strlen(&fileformat)?&fileformat:""}'.s:sep.
\ '%{strlen(&fenc)?&fenc:&enc}'.s:sep.
\ '%{strlen(&filetype)?&filetype:"no ft"}'
let g:airline_section_y = '%3p%%'
let g:airline_section_z = get(g:, 'airline_linecolumn_prefix', '').'%3l:%-2v'
<
==============================================================================
vim:tw=78:sw=4:ts=8:ft=help:norl:noet:

View file

@ -10,6 +10,7 @@ Git submodules are slow, so handle this manually.
* [goyo.vim](https://github.com/junegunn/goyo.vim)
* [gruvbox](https://github.com/morhetz/gruvbox)
* [landscape.vim](https://github.com/itchyny/landscape.vim)
* [limelight.vim](https://github.com/junegunn/limelight.vim)
* [vim-speeddating](https://github.com/tpope/vim-speeddating)
* [vim-surround](https://github.com/tpope/vim-surround)

2
vimrc
View file

@ -126,7 +126,7 @@ if has("eval")
else
set t_Co=16
endif
colorscheme gruvbox
colorscheme landscape
if &term =~# '256color' && ( &term =~# '^screen' || &term =~# '^tmux' )
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"