From d2966139243e247e8fc3e07b6e9c8bae71330087 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Thu, 21 Jun 2012 21:02:07 +0200 Subject: [PATCH] vim/colors/simon.vim: Add, custom color scheme. Also enable it in vimrc. --- vim/colors/simon.vim | 170 +++++++++++++++++++++++++++++++++++++++++++ vimrc | 5 ++ 2 files changed, 175 insertions(+) create mode 100644 vim/colors/simon.vim diff --git a/vim/colors/simon.vim b/vim/colors/simon.vim new file mode 100644 index 0000000..d9a781e --- /dev/null +++ b/vim/colors/simon.vim @@ -0,0 +1,170 @@ +" Vim color scheme. +" +" Designed for dark and partially transparent terminals with 256 colors. It +" doesn't work (yet) with GVim. +" +" Tested with xterm and (u)rxvt (both with -256color). +" +" Not all available highlight groups are used at the moment. +" +" Some new highlight groups are defined which can be used in syntax files, see +" "GENERAL ADDITIONS" below. They have to be configured to work. +" +" Maintainer: Simon Ruderich +" Last Change: 2012-06-21 +" License: GPL v3+ + +" Copyright (C) 2011-2012 Simon Ruderich +" +" This file is free software: you can redistribute it and/or modify +" it under the terms of the GNU General Public License as published by +" the Free Software Foundation, either version 3 of the License, or +" (at your option) any later version. +" +" This file is distributed in the hope that it will be useful, +" but WITHOUT ANY WARRANTY; without even the implied warranty of +" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +" GNU General Public License for more details. +" +" You should have received a copy of the GNU General Public License +" along with this file. If not, see . + + +" This color scheme only works with 256 colors. +if &t_Co != 256 + echoerr 'Colorscheme "simon" needs 256 colors. Aborting.' + finish +endif + + +" This color scheme is (only) designed for a dark background. +set background=dark +highlight clear + +" :highlight clear resets this variable, so put it after it. +let g:colors_name = 'simon' + + +" GENERAL HIGHLIGHT SETTINGS + +" Normal text (very light gray on default terminal background). ctermbg=NONE +" necessary for transparency. +highlight Normal ctermfg=252 ctermbg=NONE + +" Comments (violet on default). +highlight Comment ctermfg=135 +" Constants (light dark red on default). +highlight Constant ctermfg=160 + " Strings, e.g. ".." (dark orange on default). + highlight String ctermfg=208 + " Characters, e.g. '.' in C (lighter dark orange on default). + highlight Character ctermfg=215 + " Numbers (light magenta on default). + highlight Number ctermfg=207 + highlight Float ctermfg=207 +" Identifier (cyan on default). cterm=NONE to prevent bold. +highlight Identifier ctermfg=51 cterm=NONE + " Function names, often used for predefined functions (cyan on default). + highlight Function ctermfg=51 cterm=NONE +" Statements, e.g. return, continue, etc. (yellow on default). +highlight Statement ctermfg=227 cterm=bold +" Preprocessor commands, e.g. #include in cpp (light blue on default). +highlight PreProc ctermfg=63 cterm=bold +" Types of variables, e.g. int, long, etc. (light green on default). +highlight Type ctermfg=83 cterm=bold + " static, volatile, etc. (lighter green on default). + highlight StorageClass ctermfg=120 cterm=bold +" Special characters (red on default). +highlight Special ctermfg=160 + " Special characters in a string, e.g. '\n' (red on default). + highlight SpecialChar ctermfg=160 + " Delimiter characters, e.g. braces around function arguments in some + " languages (dark red on default). + highlight Delimiter ctermfg=52 + " Special items inside a comment (light violent on darker violet). + highlight SpecialComment ctermfg=135 ctermbg=93 +" (Syntax) Errors (white on red). +highlight Error ctermfg=231 ctermbg=196 +" Todo items and other important stuff (e.g. TODO, XXX, etc.) (black on +" yellow). +highlight Todo ctermfg=16 ctermbg=226 + + +" Additional highlights used by the "GUI", not directly by syntax +" highlighting. + +" Columns set with 'colorcolumn' (default on bright violet). +highlight ColorColumn ctermbg=57 +" Cursor color (black on light yellow). +highlight Cursor ctermfg=16 ctermbg=227 +" Cursor color when IME or XIM is on, :h CursorIM (not used, keep in sync with +" Cursor). +highlight CursorIM ctermfg=16 ctermbg=227 +" Current cursor column/line (current color on light gray). cterm=NONE to +" prevent underlining. +highlight CursorColumn ctermbg=241 cterm=NONE +highlight CursorLine ctermbg=241 cterm=NONE +" Directories in file listings (blue on default). +highlight Directory ctermfg=27 cterm=bold +" Error messages (white on red). +highlight ErrorMsg ctermfg=231 ctermbg=196 +" Fold column, left of number column (lighter yellow on default), ctermbg=NONE +" necessary for transparency. +highlight FoldColumn ctermfg=228 ctermbg=NONE +" Current search match during incremental search (black on orange). +highlight IncSearch ctermfg=16 ctermbg=214 +" Line number in line number column (light yellow on default). +highlight LineNr ctermfg=227 +" Matching brace/bracket when the cursor is currently on the other one +" (default on light green). +highlight MatchParen ctermbg=40 +" 'showmode' message, e.g. "-- INSERT --" (light gray on default). +highlight ModeMsg ctermfg=247 +" More prompt (:h more-prompt) (light green on default). +highlight MoreMsg ctermfg=119 +" Characters which do not really exist in the text (:h NonText) (gray-like +" blue on default). +highlight NonText ctermfg=105 +" Last search pattern for 'hlsearch' (keep in sync with IncSearch). +highlight Search ctermfg=16 ctermbg=214 +" Special characters, e.g. tabs, control characters (e.g. ^K), etc. (light +" blue on default). +highlight SpecialKey ctermfg=69 +" Spelling mistake (default on light violet). +highlight SpellBad ctermbg=127 +" Wrong capitalization (default on light blue). +highlight SpellCap ctermbg=27 +" Status line of the currently active window (bold and reverse). +highlight StatusLine cterm=reverse,bold +" Status line of inactive windows (reverse). +highlight StatusLineNC cterm=reverse +" Titles in output from :set all, :autocmd, etc. (light blue on default). Also +" used by AsciiDoc. +highlight Title ctermfg=63 cterm=bold +" Vertical split column (black on default), black to try to hide it +" (ctermfg=NONE doesn't work), cterm=NONE is necessary to remove reverse. +highlight VertSplit ctermfg=16 cterm=NONE +" Current visual selection (default on light gray). +highlight Visual ctermbg=246 +" Warning messages (white on orange). +highlight WarningMsg ctermfg=231 ctermbg=166 + +" Cursor color when language mappings are used, :h lCursor (not used, keep in +" sync with Cursor). +highlight lCursor ctermfg=16 ctermbg=227 + + +" GENERAL ADDITIONS + +" Tab characters (if 'list' is enabled) to reduce their visibility in +" comparison with SpecialKey (darker gray on default). +" +" Needs matchadd('specialKeyTab', '\t') in vimrc. +highlight specialKeyTab ctermfg=239 + +" Statement control keywords (e.g. continue, break, return, goto, etc.), extra +" syntax item to make them extra visible (keep in sync with Statement, except +" underline). +" +" Needs a modified syntax file or additional rules in after/syntax/. +highlight statementControl ctermfg=227 cterm=bold,underline diff --git a/vimrc b/vimrc index e040414..3b1ca66 100644 --- a/vimrc +++ b/vimrc @@ -173,6 +173,11 @@ set hidden " colors for a dark terminal. set background=dark +" Use my color scheme if 256 colors are available. +if &t_Co == 256 + colorscheme simon +endif + " Display line numbers. set number " But use as little space as possible for the numbers column. Thanks to James -- 2.45.2