Skip to content

netrw, diff, and lualine support #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions Makefile

This file was deleted.

70 changes: 70 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# vim-256noir

A dark 256-color color scheme for vim.

Have you ever wondered why most syntax highlighting of source code is about
as subtle and pretty as a candy shop explosion? A technical reason is the
historical constraints imposed by 16 color terminals, but fortunately this
limitation is easy to overcome.

## Features

- Minimal colors, to avoid distracting:
- Shades of gray for most elements
- Bright keywords to highlight structure.
- Dark comments & strings to emphasize surrounding code.
- Red for exceptional elements (constants & errors)
- Works in `vim` and `gvim`. Rudimentary support for 16-color terminals.

## Usage

- Enable [256 colors in vim ](http://vim.wikia.com/wiki/256_colors_in_vim).
Note that when using `ssh`, both client and server need to be properly configured.
- Put `256_noir.vim` in ~/.vim/colors/
- Add the following to `~/.vimrc`:

```vim
colorscheme 256_noir

" Change highlighting of cursor line when entering/leaving Insert Mode
set cursorline
highlight CursorLine cterm=NONE ctermfg=NONE ctermbg=233 guifg=NONE guibg=#121212
autocmd InsertEnter * highlight CursorLine cterm=NONE ctermfg=NONE ctermbg=234 guifg=NONE guibg=#1c1c1c
autocmd InsertLeave * highlight CursorLine cterm=NONE ctermfg=NONE ctermbg=233 guifg=NONE guibg=#121212
```

![screenshot of vim with noir colorscheme](screenshot.png)

![c-shot](shot-c.png)

![py-shot](shot-py.png)

The font in the above screenshots is the default xterm bitmap font
[fixed](https://en.wikipedia.org/wiki/Fixed_(typeface)) at 6x13.

## Bonus

- [mc](https://midnight-commander.org/), add the following to e.g. `~/.bashrc`:

```sh
export MC_SKIN=dark
```

- [mutt](http://www.mutt.org/), add the following to `~/.muttrc`:

color normal white default
color status black white
color indicator white red
color hdrdefault yellow default
color signature yellow default
color attachment brightyellow default
color markers brightred default
color quoted green default
color tilde blue default
color tree red default

Other recommended terminal apps with dark colors by default:

- https://ranger.github.io/
- http://hisham.hm/htop/
- https://github.com/andreasvc/cplay/
69 changes: 0 additions & 69 deletions README.rst

This file was deleted.

175 changes: 103 additions & 72 deletions colors/256_noir.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
" Vim color file
" Name: 256_noir.vim
" Name: 256_noir.vim
" Maintainer: Andreas van Cranenburgh <[email protected]>
" Homepage: https://github.com/andreasvc/vim-256noir/

Expand All @@ -12,73 +12,85 @@
highlight clear
set background=dark
if version > 580
" no guarantees for version 5.8 and below, but this makes it stop
" complaining
if exists("syntax_on")
syntax reset
endif
" no guarantees for version 5.8 and below, but this makes it stop
" complaining
if exists("syntax_on")
syntax reset
endif
endif
let g:colors_name = "256_noir"

if has("gui_running") || &t_Co == 256
hi Normal cterm=NONE ctermfg=250 ctermbg=16 gui=NONE guifg=#bcbcbc guibg=#000000
hi Keyword cterm=NONE ctermfg=255 ctermbg=16 gui=NONE guifg=#eeeeee guibg=#000000
hi Constant cterm=NONE ctermfg=252 ctermbg=16 gui=NONE guifg=#d0d0d0 guibg=#000000
hi String cterm=NONE ctermfg=245 ctermbg=16 gui=NONE guifg=#8a8a8a guibg=#000000
hi Comment cterm=NONE ctermfg=240 ctermbg=16 gui=NONE guifg=#585858 guibg=#000000
hi Number cterm=NONE ctermfg=196 ctermbg=16 gui=NONE guifg=#ff0000 guibg=#000000
hi Error cterm=NONE ctermfg=255 ctermbg=88 gui=NONE guifg=#eeeeee guibg=#870000
hi ErrorMsg cterm=NONE ctermfg=255 ctermbg=124 gui=NONE guifg=#eeeeee guibg=#af0000
hi Search cterm=NONE ctermfg=245 ctermbg=236 gui=NONE guifg=#8a8a8a guibg=#303030
hi IncSearch cterm=reverse ctermfg=255 ctermbg=245 gui=reverse guifg=#eeeeee guibg=#8a8a8a
hi DiffChange cterm=NONE ctermfg=160 ctermbg=255 gui=NONE guifg=#d70000 guibg=#eeeeee
hi DiffText cterm=bold ctermfg=250 ctermbg=196 gui=bold guifg=#bcbcbc guibg=#ff0000
hi SignColumn cterm=NONE ctermfg=124 ctermbg=240 gui=NONE guifg=#af0000 guibg=#585858
hi SpellBad cterm=undercurl ctermfg=255 ctermbg=88 gui=undercurl guifg=#eeeeee guibg=#870000
hi SpellCap cterm=NONE ctermfg=255 ctermbg=124 gui=NONE guifg=#eeeeee guibg=#af0000
hi SpellRare cterm=NONE ctermfg=124 ctermbg=16 gui=NONE guifg=#af0000 guibg=#000000
hi WildMenu cterm=NONE ctermfg=240 ctermbg=255 gui=NONE guifg=#585858 guibg=#eeeeee
hi Pmenu cterm=NONE ctermfg=255 ctermbg=240 gui=NONE guifg=#eeeeee guibg=#585858
hi PmenuThumb cterm=NONE ctermfg=232 ctermbg=240 gui=NONE guifg=#080808 guibg=#585858
hi SpecialKey cterm=NONE ctermfg=16 ctermbg=255 gui=NONE guifg=#000000 guibg=#eeeeee
hi MatchParen cterm=NONE ctermfg=16 ctermbg=240 gui=NONE guifg=#000000 guibg=#585858
hi CursorLine cterm=NONE ctermfg=NONE ctermbg=233 gui=NONE guifg=NONE guibg=#121212
hi StatusLine cterm=bold,reverse ctermfg=245 ctermbg=16 gui=bold,reverse guifg=#8a8a8a guibg=#000000
hi StatusLineNC cterm=reverse ctermfg=236 ctermbg=16 gui=reverse guifg=#303030 guibg=#000000
hi Visual cterm=reverse ctermfg=250 ctermbg=16 gui=reverse guifg=#bcbcbc guibg=#000000
hi TermCursor cterm=reverse ctermfg=NONE ctermbg=NONE gui=reverse guifg=NONE guibg=NONE
hi BNormal cterm=NONE ctermfg=250 ctermbg=16 gui=NONE guifg=#bcbcbc guibg=NONE
hi NeoKeyword cterm=NONE ctermfg=255 gui=NONE guifg=#eeeeee
""""
hi Keyword cterm=NONE ctermfg=255 gui=NONE guifg=#eeeeee
hi SpecialKey ctermfg=237 gui=reverse guifg=#4e4e4e
hi NeoSpecialKey cterm=NONE ctermfg=240 ctermbg=16 gui=NONE guifg=#585858 guibg=#000000
hi Number cterm=NONE ctermfg=196 gui=NONE guifg=#ff0000
hi NeoNumber cterm=NONE ctermfg=196 ctermbg=NONE gui=NONE guifg=#ff0000 guibg=#000000
hi FoldColor cterm=NONE ctermfg=124 gui=NONE guifg=#af0000
hi VertSplit ctermbg=NONE guibg=NONE
hi Foc ctermfg=255 ctermbg=235 guifg=#cccccc guibg=#121212 cterm=NONE gui=NONE
hi Unfoc ctermbg=243 ctermfg=235 guibg=#767676 guifg=#121212 cterm=NONE gui=NONE
""""
hi Normal cterm=NONE ctermfg=250 ctermbg=16 gui=NONE guifg=#bcbcbc guibg=#000000
hi Constant cterm=NONE ctermfg=252 ctermbg=16 gui=NONE guifg=#d0d0d0 guibg=#000000
hi String cterm=NONE ctermfg=245 ctermbg=NONE gui=NONE guifg=#8a8a8a guibg=NONE
hi Comment cterm=NONE ctermfg=240 ctermbg=NONE gui=NONE guifg=#585858 guibg=NONE
hi Error cterm=NONE ctermfg=255 ctermbg=88 gui=NONE guifg=#eeeeee guibg=#870000
hi ErrorMsg cterm=NONE ctermfg=255 ctermbg=124 gui=NONE guifg=#eeeeee guibg=#af0000
hi Search cterm=NONE ctermfg=245 ctermbg=236 gui=NONE guifg=#8a8a8a guibg=#303030
hi IncSearch cterm=reverse ctermfg=255 ctermbg=245 gui=reverse guifg=#eeeeee guibg=#8a8a8a
hi DiffChange cterm=NONE ctermfg=160 ctermbg=255 gui=NONE guifg=#d70000 guibg=#eeeeee
hi DiffText cterm=bold ctermfg=250 ctermbg=196 gui=bold guifg=#bcbcbc guibg=#ff0000
"hi SignColumn cterm=NONE ctermfg=124 ctermbg=240 gui=NONE guifg=#af0000 guibg=#585858
hi SignColumn cterm=NONE ctermfg=124 ctermbg=240 gui=NONE guifg=#af0000 guibg=#121212
hi SpellBad cterm=undercurl ctermfg=255 ctermbg=88 gui=undercurl guifg=#eeeeee guibg=#870000
hi SpellCap cterm=NONE ctermfg=255 ctermbg=124 gui=NONE guifg=#eeeeee guibg=#af0000
hi SpellRare cterm=NONE ctermfg=124 ctermbg=NONE gui=NONE guifg=#af0000 guibg=#000000
hi WildMenu cterm=NONE ctermfg=240 ctermbg=255 gui=NONE guifg=#585858 guibg=#eeeeee
hi Pmenu cterm=NONE ctermfg=255 ctermbg=240 gui=NONE guifg=#eeeeee guibg=#585858
hi PmenuThumb cterm=NONE ctermfg=232 ctermbg=240 gui=NONE guifg=#080808 guibg=#585858
hi MatchParen cterm=NONE ctermfg=16 ctermbg=240 gui=NONE guifg=#000000 guibg=#585858
hi CursorLine cterm=NONE ctermfg=NONE ctermbg=233 gui=NONE guifg=NONE guibg=#121212
hi StatusLine cterm=bold,reverse ctermfg=245 ctermbg=16 gui=bold,reverse guifg=#8a8a8a guibg=#000000
hi StatusLineNC cterm=reverse ctermfg=236 ctermbg=16 gui=reverse guifg=#303030 guibg=#000000
hi Visual cterm=reverse ctermfg=250 ctermbg=16 gui=reverse guifg=#bcbcbc guibg=#000000
hi TermCursor cterm=reverse ctermfg=NONE ctermbg=NONE gui=reverse guifg=NONE guibg=NONE
else
hi Normal cterm=NONE ctermfg=Gray ctermbg=Black
hi Keyword cterm=NONE ctermfg=White ctermbg=Black
hi Constant cterm=NONE ctermfg=Gray ctermbg=Black
hi String cterm=NONE ctermfg=Gray ctermbg=Black
hi Comment cterm=NONE ctermfg=DarkGray ctermbg=Black
hi Number cterm=NONE ctermfg=Red ctermbg=Black
hi Error cterm=NONE ctermfg=White ctermbg=DarkRed
hi ErrorMsg cterm=NONE ctermfg=White ctermbg=Red
hi Search cterm=NONE ctermfg=Gray ctermbg=DarkGray
hi IncSearch cterm=reverse ctermfg=White ctermbg=Gray
hi DiffChange cterm=NONE ctermfg=Red ctermbg=White
hi DiffText cterm=bold ctermfg=Gray ctermbg=Red
hi SignColumn cterm=NONE ctermfg=Red ctermbg=DarkGray
hi SpellBad cterm=undercurl ctermfg=White ctermbg=DarkRed
hi SpellCap cterm=NONE ctermfg=White ctermbg=Red
hi SpellRare cterm=NONE ctermfg=Red ctermbg=Black
hi WildMenu cterm=NONE ctermfg=DarkGray ctermbg=White
hi Pmenu cterm=NONE ctermfg=White ctermbg=DarkGray
hi PmenuThumb cterm=NONE ctermfg=Black ctermbg=DarkGray
hi SpecialKey cterm=NONE ctermfg=Black ctermbg=White
hi MatchParen cterm=NONE ctermfg=Black ctermbg=DarkGray
hi CursorLine cterm=NONE ctermfg=NONE ctermbg=Black
hi StatusLine cterm=bold,reverse ctermfg=Gray ctermbg=Black
hi StatusLineNC cterm=reverse ctermfg=DarkGray ctermbg=Black
hi Visual cterm=reverse ctermfg=Gray ctermbg=Black
hi TermCursor cterm=reverse ctermfg=NONE ctermbg=NONE
hi VertSplit ctermbg=NONE guibg=NONE
hi Normal cterm=NONE ctermfg=Gray ctermbg=Black
hi Keyword cterm=NONE ctermfg=White ctermbg=Black
hi Constant cterm=NONE ctermfg=Gray ctermbg=Black
hi String cterm=NONE ctermfg=Gray ctermbg=Black
hi Comment cterm=NONE ctermfg=DarkGray ctermbg=NONE
hi Number cterm=NONE ctermfg=Red ctermbg=Black
hi Error cterm=NONE ctermfg=White ctermbg=DarkRed
hi ErrorMsg cterm=NONE ctermfg=White ctermbg=Red
hi Search cterm=NONE ctermfg=Gray ctermbg=DarkGray
hi IncSearch cterm=reverse ctermfg=White ctermbg=Gray
hi DiffChange cterm=NONE ctermfg=Red ctermbg=White
hi DiffText cterm=bold ctermfg=Gray ctermbg=Red
hi SignColumn cterm=NONE ctermfg=Red ctermbg=DarkGray
hi SpellBad cterm=undercurl ctermfg=White ctermbg=DarkRed
hi SpellCap cterm=NONE ctermfg=White ctermbg=Red
hi SpellRare cterm=NONE ctermfg=Red ctermbg=Black
hi WildMenu cterm=NONE ctermfg=DarkGray ctermbg=White
hi Pmenu cterm=NONE ctermfg=White ctermbg=DarkGray
hi PmenuThumb cterm=NONE ctermfg=Black ctermbg=DarkGray
hi SpecialKey cterm=NONE ctermfg=Black ctermbg=White
hi MatchParen cterm=NONE ctermfg=Black ctermbg=DarkGray
hi CursorLine cterm=NONE ctermfg=NONE ctermbg=Black
"hi StatusLine cterm=bold,reverse ctermfg=Gray ctermbg=Black
"hi StatusLineNC cterm=reverse ctermfg=DarkGray ctermbg=Black
hi Visual cterm=reverse ctermfg=Gray ctermbg=Black
hi TermCursor cterm=reverse ctermfg=NONE ctermbg=NONE
endif
highlight! link Boolean Normal
highlight! link Delimiter Normal
highlight! link Identifier Normal
highlight! link Title Normal
highlight! link Title BNormal
highlight! link Debug Normal
highlight! link Exception Normal
highlight! link FoldColumn Normal
Expand All @@ -97,9 +109,6 @@ highlight! link Typedef Keyword
highlight! link Todo Keyword
highlight! link Label Keyword
highlight! link Define Keyword
highlight! link DiffAdd Keyword
highlight! link diffAdded Keyword
highlight! link diffCommon Keyword
highlight! link Directory Keyword
highlight! link PreCondit Keyword
highlight! link PreProc Keyword
Expand All @@ -109,22 +118,44 @@ highlight! link SpecialChar Keyword
highlight! link StorageClass Keyword
highlight! link SpecialComment String
highlight! link CursorLineNr String
highlight! link Character Number
highlight! link Float Number
highlight! link Tag Number
highlight! link Folded Number
highlight! link WarningMsg Number
highlight! link iCursor SpecialKey
highlight! link Character NeoNumber
highlight! link Float NeoNumber
highlight! link Tag NeoNumber
highlight! link Folded FoldColor
highlight! link WarningMsg NeoNumber
highlight! link iCursor NeSpecialKey
highlight! link SpellLocal SpellCap
highlight! link LineNr Comment
highlight! link NonText Comment
highlight! link DiffDelete Comment
highlight! link diffRemoved Comment
highlight! link PmenuSbar Visual
highlight! link PmenuSel Visual
highlight! link VisualNOS Visual
highlight! link VertSplit Visual
highlight! link Cursor StatusLine
highlight! link VertSplit Comment
highlight! link Underlined SpellRare
highlight! link rstEmphasis SpellRare
" status line
hi! link StatusLine Foc
hi! link StatusLineNC Unfoc
highlight! link Cursor StatusLine
"
highlight! link diffChanged DiffChange
highlight! link SignColumn SpecialSignColumn
highlight! link DiffDelete Comment
highlight! link diffRemoved Comment
highlight! link DiffAdd Keyword
highlight! link diffAdded Keyword
highlight! link diffCommon Keyword
" Netrw
highlight! link netrwExe Keyword
highlight! link netrwClassify Number
highlight! link netrwDir Comment
highlight! link netrwTreeBar Comment
highlight! link netrwDoc String
highlight! link netrwBak String
highlight! link netrwHdr String
highlight! link netrwObj String
highlight! link netrwMakefile String
highlight! link netrwPix Normal
highlight! link netrwPlain Normal
highlight! link netrwSymLink Normal
highlight! link netrwCompress Normal
Loading