Changing the comments colors (molokai) - vim

so i am using vim with the molokai colorscheme but today i decided to change the comments color but i dont know how to that i want to make it #0000FF / blue i tried editing the molokai.vim file but it did not work (i am using c++). and i only want to change the comments colors because the rest of it is great.
" Vim color file
"
" Author: Tomas Restrepo <tomas#winterdom.com>
" https://github.com/tomasr/molokai
"
" Note: Based on the Monokai theme for TextMate
" by Wimer Hazenberg and its darker variant
" by Hamish Stuart Macpherson
"
hi clear
if version > 580
" no guarantees for version 5.8 and below, but this makes it stop
" complaining
hi clear
if exists("syntax_on")
syntax reset
endif
endif
let g:colors_name="molokai"
if exists("g:molokai_original")
let s:molokai_original = g:molokai_original
else
let s:molokai_original = 0
endif
hi Boolean guifg=#AE81FF
hi Character guifg=#E6DB74
hi Number guifg=#AE81FF
hi String guifg=#E6DB74
hi Conditional guifg=#F92672 gui=bold
hi Constant guifg=#AE81FF gui=bold
hi Cursor guifg=#000000 guibg=#F8F8F0
hi iCursor guifg=#000000 guibg=#F8F8F0
hi Debug guifg=#BCA3A3 gui=bold
hi Define guifg=#66D9EF
hi Delimiter guifg=#8F8F8F
hi DiffAdd guibg=#13354A
hi DiffChange guifg=#89807D guibg=#4C4745
hi DiffDelete guifg=#960050 guibg=#1E0010
hi DiffText guibg=#4C4745 gui=italic,bold
hi Directory guifg=#A6E22E gui=bold
hi Error guifg=#E6DB74 guibg=#1E0010
hi ErrorMsg guifg=#F92672 guibg=#232526 gui=bold
hi Exception guifg=#A6E22E gui=bold
hi Float guifg=#AE81FF
hi FoldColumn guifg=#465457 guibg=#000000
hi Folded guifg=#465457 guibg=#000000
hi Function guifg=#A6E22E
hi Identifier guifg=#FD971F
hi Ignore guifg=#808080 guibg=bg
hi IncSearch guifg=#C4BE89 guibg=#000000
hi Keyword guifg=#F92672 gui=bold
hi Label guifg=#E6DB74 gui=none
hi Macro guifg=#C4BE89 gui=italic
hi SpecialKey guifg=#66D9EF gui=italic
hi MatchParen guifg=#000000 guibg=#FD971F gui=bold
hi ModeMsg guifg=#E6DB74
hi MoreMsg guifg=#E6DB74
hi Operator guifg=#F92672
" complete menu
hi Pmenu guifg=#66D9EF guibg=#000000
hi PmenuSel guibg=#808080
hi PmenuSbar guibg=#080808
hi PmenuThumb guifg=#66D9EF
hi PreCondit guifg=#A6E22E gui=bold
hi PreProc guifg=#A6E22E
hi Question guifg=#66D9EF
hi Repeat guifg=#F92672 gui=bold
hi Search guifg=#000000 guibg=#FFE792
" marks
hi SignColumn guifg=#A6E22E guibg=#232526
hi SpecialChar guifg=#F92672 gui=bold
hi SpecialComment guifg=#7E8E91 gui=bold
hi Special guifg=#66D9EF guibg=bg gui=italic
if has("spell")
hi SpellBad guisp=#FF0000 gui=undercurl
hi SpellCap guisp=#7070F0 gui=undercurl
hi SpellLocal guisp=#70F0F0 gui=undercurl
hi SpellRare guisp=#FFFFFF gui=undercurl
endif
hi Statement guifg=#F92672 gui=bold
hi StatusLine guifg=#455354 guibg=fg
hi StatusLineNC guifg=#808080 guibg=#080808
hi StorageClass guifg=#FD971F gui=italic
hi Structure guifg=#66D9EF
hi Tag guifg=#F92672 gui=italic
hi Title guifg=#ef5939
hi Todo guifg=#FFFFFF guibg=bg gui=bold
hi Typedef guifg=#66D9EF
hi Type guifg=#66D9EF gui=none
hi Underlined guifg=#808080 gui=underline
hi VertSplit guifg=#808080 guibg=#080808 gui=bold
hi VisualNOS guibg=#403D3D
hi Visual guibg=#403D3D
hi WarningMsg guifg=#FFFFFF guibg=#333333 gui=bold
hi WildMenu guifg=#66D9EF guibg=#000000
hi TabLineFill guifg=#1B1D1E guibg=#1B1D1E
hi TabLine guibg=#1B1D1E guifg=#808080 gui=none
if s:molokai_original == 1
hi Normal guifg=#F8F8F2 guibg=#272822
hi Comment guifg=#75715E
hi CursorLine guibg=#3E3D32
hi CursorLineNr guifg=#FD971F gui=none
hi CursorColumn guibg=#3E3D32
hi ColorColumn guibg=#3B3A32
hi LineNr guifg=#BCBCBC guibg=#3B3A32
hi NonText guifg=#75715E
hi SpecialKey guifg=#75715E
else
hi Normal guifg=#F8F8F2 guibg=#1B1D1E
hi Comment guifg=#7E8E91
hi CursorLine guibg=#293739
hi CursorLineNr guifg=#FD971F gui=none
hi CursorColumn guibg=#293739
hi ColorColumn guibg=#232526
hi LineNr guifg=#465457 guibg=#232526
hi NonText guifg=#465457
hi SpecialKey guifg=#465457
end
"
" Support for 256-color terminal
"
if &t_Co > 255
if s:molokai_original == 1
hi Normal ctermbg=234
hi CursorLine ctermbg=235 cterm=none
hi CursorLineNr ctermfg=208 cterm=none
else
hi Normal ctermfg=252 ctermbg=233
hi CursorLine ctermbg=234 cterm=none
hi CursorLineNr ctermfg=208 cterm=none
endif
hi Boolean ctermfg=135
hi Character ctermfg=144
hi Number ctermfg=135
hi String ctermfg=144
hi Conditional ctermfg=161 cterm=bold
hi Constant ctermfg=135 cterm=bold
hi Cursor ctermfg=16 ctermbg=253
hi Debug ctermfg=225 cterm=bold
hi Define ctermfg=81
hi Delimiter ctermfg=241
hi DiffAdd ctermbg=24
hi DiffChange ctermfg=181 ctermbg=239
hi DiffDelete ctermfg=162 ctermbg=53
hi DiffText ctermbg=102 cterm=bold
hi Directory ctermfg=118 cterm=bold
hi Error ctermfg=219 ctermbg=89
hi ErrorMsg ctermfg=199 ctermbg=16 cterm=bold
hi Exception ctermfg=118 cterm=bold
hi Float ctermfg=135
hi FoldColumn ctermfg=67 ctermbg=16
hi Folded ctermfg=67 ctermbg=16
hi Function ctermfg=118
hi Identifier ctermfg=208 cterm=none
hi Ignore ctermfg=244 ctermbg=232
hi IncSearch ctermfg=193 ctermbg=16
hi keyword ctermfg=161 cterm=bold
hi Label ctermfg=229 cterm=none
hi Macro ctermfg=193
hi SpecialKey ctermfg=81
hi MatchParen ctermfg=233 ctermbg=208 cterm=bold
hi ModeMsg ctermfg=229
hi MoreMsg ctermfg=229
hi Operator ctermfg=161
" complete menu
hi Pmenu ctermfg=81 ctermbg=16
hi PmenuSel ctermfg=255 ctermbg=242
hi PmenuSbar ctermbg=232
hi PmenuThumb ctermfg=81
hi PreCondit ctermfg=118 cterm=bold
hi PreProc ctermfg=118
hi Question ctermfg=81
hi Repeat ctermfg=161 cterm=bold
hi Search ctermfg=0 ctermbg=222 cterm=NONE
" marks column
hi SignColumn ctermfg=118 ctermbg=235
hi SpecialChar ctermfg=161 cterm=bold
hi SpecialComment ctermfg=245 cterm=bold
hi Special ctermfg=81
if has("spell")
hi SpellBad ctermbg=52
hi SpellCap ctermbg=17
hi SpellLocal ctermbg=17
hi SpellRare ctermfg=none ctermbg=none cterm=reverse
endif
hi Statement ctermfg=161 cterm=bold
hi StatusLine ctermfg=238 ctermbg=253
hi StatusLineNC ctermfg=244 ctermbg=232
hi StorageClass ctermfg=208
hi Structure ctermfg=81
hi Tag ctermfg=161
hi Title ctermfg=166
hi Todo ctermfg=231 ctermbg=232 cterm=bold
hi Typedef ctermfg=81
hi Type ctermfg=81 cterm=none
hi Underlined ctermfg=244 cterm=underline
hi VertSplit ctermfg=244 ctermbg=232 cterm=bold
hi VisualNOS ctermbg=238
hi Visual ctermbg=235
hi WarningMsg ctermfg=231 ctermbg=238 cterm=bold
hi WildMenu ctermfg=81 ctermbg=16
hi Comment ctermfg=59
hi CursorColumn ctermbg=236
hi ColorColumn ctermbg=236
hi LineNr ctermfg=250 ctermbg=236
hi NonText ctermfg=59
hi SpecialKey ctermfg=59
if exists("g:rehash256") && g:rehash256 == 1
hi Normal ctermfg=252 ctermbg=234
hi CursorLine ctermbg=236 cterm=none
hi CursorLineNr ctermfg=208 cterm=none
hi Boolean ctermfg=141
hi Character ctermfg=222
hi Number ctermfg=141
hi String ctermfg=222
hi Conditional ctermfg=197 cterm=bold
hi Constant ctermfg=141 cterm=bold
hi DiffDelete ctermfg=125 ctermbg=233
hi Directory ctermfg=154 cterm=bold
hi Error ctermfg=222 ctermbg=233
hi Exception ctermfg=154 cterm=bold
hi Float ctermfg=141
hi Function ctermfg=154
hi Identifier ctermfg=208
hi Keyword ctermfg=197 cterm=bold
hi Operator ctermfg=197
hi PreCondit ctermfg=154 cterm=bold
hi PreProc ctermfg=154
hi Repeat ctermfg=197 cterm=bold
hi Statement ctermfg=197 cterm=bold
hi Tag ctermfg=197
hi Title ctermfg=203
hi Visual ctermbg=238
hi Comment ctermfg=244
hi LineNr ctermfg=239 ctermbg=235
hi NonText ctermfg=239
hi SpecialKey ctermfg=239
endif
end
" Must be at the end, because of ctermbg=234 bug.
" https://groups.google.com/forum/#!msg/vim_dev/afPqwAFNdrU/nqh6tOM87QUJ
set background=dark
this is the molokai.vim file without my edits.

You would have to add a line similar to the following in your vimrc. This line would make the comments appear as a deep blue colour.
hi Comment ctermfg=31 guifg=#0087af
Replace the values for ctermfg and guifg with whatever colour you would prefer. Use this site for reference if you are not familiar with how the codes represent colours.
However if you would like to change it from within the library, change the line that is line number 34 to represent whatever colour you like

Related

VIM - Syntax classes and colorscheme - Which class controls variable usage delimiters?

This is a sample of the colouring which is provided by the "darkbone.vim" colour scheme (updated):
On the "TMP=" line, the "${ }" delimiters are different from the "TMP" variable name. That is something I want to replicate in another colour scheme file.
However, I am unable to identify the Class which controls the delimiters separately from the variable itself (which I have identified as "PreProc").
Comparing different files, I found that "Delimiter" was not included in darkbone.vim, so I added that, specifying guifg=#FF0000 , but there was no identifiable change to my fullscreen display of the test file, where both the delimiters and the "called" variable name have the same colour.
Anyone have insights into how to control that for the delimiters ?
The 'scriptnames' report is as follows:
If it can make things easier, here is my draft colorscheme file:
"################################################################################################
" This Colour Scheme is NOT part of the VIM distribution
" This Colour Scheme is under development
"################################################################################################
"
" Name: OASIS_darkbone.vim
" Maintainer: Eric Marceau
" Last Change: 2021-04-16
" Revision: 0.1
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let g:colors_name = 'OASIS_darkbone'
""" Trying to identify Class in darkbone.vim controlling variable ${ } displayed using #CD5C5C IndianRed and TMP showing using #98FB98 PaleGreen
"################################################################################################
"""""""""""""" Group 0 (baseline specification)
hi Normal guifg=#AFAFAF guibg=#000000 gui=none "Confirmed -- All text not mapped to any Syntax Class
"""""""""""""" Group 1
hi Identifier guifg=#CF9F00 guibg=#000000 gui=bold "Confirmed -- Variable_DEFINE
hi Statement guifg=#30BB30 guibg=#000000 gui=bold "Confirmed -- Flow Control and some commands: while, for, do, done, case, esac, if, then, else, fi, sort, grep, echo, cat, exit, shift, rm,
hi PreProc guifg=#EFEF8F guibg=#000000 gui=none "Confirmed -- Variable_CALL (i.e. ${VAR} )
hi Special guifg=#FFFFFF guibg=#000000 gui=none "Confirmed -- Backquote clauses, EscapeSequences, i.e. "\n, \0, %d, %s, etc...
hi Function guifg=#4F4FFF guibg=#000000 gui=bold "Confirmed -- Function definition wrapper
hi MatchParen guifg=#000000 guibg=#BBBB00 gui=none "Confirmed -- Blink on matching parenthesis/brace
"hi Tags guifg=#FF0000 guibg=#000000 gui=none "Context was not identified
"""""""""""""" Group 2
hi Comment guifg=#5F5F9F guibg=#000000 gui=italic "Confirmed -- "ctermfg=Brown ctermbg=Black
"hi SpecialComment guifg=#FF0000 guibg=#000000 gui=italic "Context was not identified
hi Visual guifg=#000000 guibg=#707090 gui=none "Context was not identified
hi VisualNOS guifg=#9F9FBF guibg=#000000 gui=none "Context was not identified
hi Search guifg=#000000 guibg=#c0c0ff gui=none "Context was not identified
hi IncSearch guifg=#000000 guibg=#c0c0ff gui=none "Context was not identified
"""""""""""""" Group 3
hi LineNr guifg=#6F6F9F guibg=#000000 gui=none "Confirmed -- when displayed, number column on left
hi Error guifg=#ee1111 guibg=#000000 gui=none "Confirmed -- Error line displayed at bottom
hi StatusLine guifg=#CFCF4F guibg=#1F1F4F gui=bold "Confirmed -- detailed status line
hi StatusLineNC guifg=#606080 guibg=#000000 gui=bold,underline "Context was not identified
hi WarningMsg guifg=#EFCF8F guibg=#000000 gui=none "Context was not identified
hi MoreMsg guifg=#9F9FBF guibg=#000000 gui=none "Context was not identified
hi ErrorMsg guifg=#FF8F8F guibg=#000000 gui=none "Context was not identified
hi ModeMsg guifg=#9F9FBF guibg=#000000 gui=none "Context was not identified
hi WildMenu guifg=#000000 guibg=#c0c0ff gui=none "Context was not identified
hi VertSplit guifg=#606080 guibg=#606080 gui=none "Context was not identified
hi Todo guifg=#8090f0 guibg=#000000 gui=none "Context was not identified
hi Title guifg=#c0c0ff guibg=#000000 gui=bold "Context was not identified
hi Question guifg=#9F9FBF guibg=#000000 gui=none "Context was not identified
hi Directory guifg=#e0e0ff guibg=#000000 gui=bold "Context was not identified
hi NonText guifg=#606080 guibg=#101020 gui=none "Context was not identified
hi SpecialKey guifg=#404060 guibg=#000000 gui=none "Context was not identified
"""""""""""""" Group 4
hi CursorLine guibg=#181818 "Confirmed -- Display controlled in vimrc
hi CursorColumn guibg=#181818 "Confirmed -- Display controlled in vimrc
hi Cursor guifg=#000000 guibg=#FF9F1F "Confirmed -- Current position, normal
"hi iCursor guifg=#000000 guibg=#C08020 "Context was not identified
"hi nCursor guifg=#000000 guibg=#C08020 "Context was not identified
"hi rCursor guifg=#000000 guibg=#C08020 "Context was not identified
"hi lCursor guifg=#000000 guibg=#C08020 "Context was not identified
"hi CursorIM guifg=#000000 guibg=#C08020 "Context was not identified
"""""""""""""" Group 5
hi Number guifg=#FF4F1F guibg=#000000 gui=none "Confirmed -- Numbers assigned or used
hi String guifg=#D88F9F guibg=#000000 gui=none "Confirmed -- String text and all within awk command quotes
hi Char guifg=#00FFFF guibg=#000000 gui=none "Context was not identified
hi Boolean guifg=#d0e080 guibg=#000000 gui=none "Context was not identified
"hi Constant guifg=#000000 guibg=#FFAFAF gui=none "Context was not identified
"hi Float guifg=#FF0000 guibg=#000000 gui=none "Context was not identified
"""""""""""""" Group 6 (Either - in original and not used, or
"""""""""""""" - harvested from other schemes and not pidgeonholed )
"" Associated with Statement
hi Operator guifg=#EFEF8F guibg=#000000 gui=bold "Confirmed -- Quotes, semicolon ; pipe, Brackets
"hi Conditional guifg=#FF0000 guibg=#000000 gui=bold "Confirmed -- do, done, if, then, else, fi; NB overrides default Statement class
"hi Keyword guifg=#FF0000 guibg=#000000 gui=none "Context was not identified
"hi Exception guifg=#FF0000 guibg=#000000 gui=none "Context was not identified
"hi Repeat guifg=#FF0000 guibg=#000000 gui=none "Context was not identified
"hi Label guifg=#FF0000 guibg=#000000 gui=none "Context was not identified
"" Association TBD
"hi Delimiter guifg=#FF0000 guibg=#000000 gui=none "Context was not identified
"hi Subtitle guifg=#c0c0ff guibg=#000000 gui=italic "Context was not identified
"hi Ignore guifg=#FF0000 guibg=#000000 gui=none "Context was not identified
"hi Debug guifg=#FF0000 guibg=#000000 gui=none "Context was not identified
"hi Underlined guifg=#9F9FBF guibg=#000000 gui=underline "Context was not identified
"hi AltFunction guifg=#4F4FFF guibg=#000000 gui=bold "Context was not identified
"hi AltConstant guifg=#000000 guibg=#FFAFAF gui=none "Context was not identified
"hi Unique guifg=#000000 guibg=#FFAFAF gui=none "Context was not identified
"hi AltUnique guifg=#000000 guibg=#FFAFAF gui=none "Context was not identified
"hi SignColumn guibg=#000000 gui=none "Context was not identified
"" Associated with Special
"hi SpecialChar guifg=#FF0000 guibg=#000000 gui=none "Context was not identified
"" Associated with Type
"hi Type guifg=#e0e0ff guibg=#000000 gui=none "Context was not identified
"hi AltType guifg=#e0e0ff guibg=#000000 gui=none "Context was not identified
"hi StorageClass guifg=#FF0000 guibg=#000000 gui=none "Context was not identified
"hi Structure guifg=#FF0000 guibg=#000000 gui=none "Context was not identified
"hi Typedef guifg=#FF0000 guibg=#000000 gui=none "Context was not identified
"" Associated with PreProc
"hi Include guifg=#FF0000 guibg=#000000 gui=none "Context was not identified
"hi Define guifg=#FF0000 guibg=#000000 gui=none "Context was not identified
"hi Macro guifg=#FF0000 guibg=#000000 gui=none "Context was not identified
"hi PreCondit guifg=#FF0000 guibg=#000000 gui=none "Context was not identified
"""""""""""""" Group 7 (suppressed for impact assessment)
" Diff
"hi DiffAdd guifg=#8090f0 guibg=#000000 gui=none "Context was not identified
"hi DiffChange guifg=#8090f0 guibg=#000000 gui=none "Context was not identified
"hi DiffDelete guifg=#8090f0 guibg=#000000 gui=none "Context was not identified
"hi DiffText guifg=#8090f0 guibg=#000000 gui=bold "Context was not identified
"""""""""""""" Group 8
" Folds
hi Folded guifg=#9F9FBF guibg=#000000 "Context was not identified
hi FoldColumn guifg=#9F9FBF guibg=#102010 "Context was not identified
"""""""""""""" Group 9
"if version >= 700
" " Pmenu - Popup Completion Menu
" hi Pmenu guifg=#9F9FBF guibg=#202040 gui=none "Context was not identified
" hi PmenuSel guifg=#9F9FBF guibg=#404080 gui=underline "Context was not identified
" hi PmenuSbar guifg=#202040 guibg=#202040 gui=none "Context was not identified
" hi PmenuThumb guifg=#202040 guibg=#202040 gui=none "Context was not identified
"
" " Tab
" hi TabLine guifg=#606080 guibg=black gui=underline "Context was not identified
" hi TabLineFill guifg=#9F9FBF guibg=black gui=none "Context was not identified
" hi TabLineSel guifg=#c0c0ff guibg=#606080 gui=bold "Context was not identified
"endif
"""""""""""""" Group 10 (for future consideration)
" cool help screens (from 'anotherdark.vim)
" :he group-name
" :he highlight-groups
" :he cterm-colors
"""""""""""""" Group 11 (for future consideration)
" vim:set ts=8 sts=2 sw=2 tw=0:
Syntax highlighting is done in two steps:
highlight groups are defined with regular expressions in a "syntax script" and often linked to more generic ones,
visual attributes are assigned to highlight groups in a colorscheme.
The most immediate consequence of this is that the colorscheme can't highlight non-existing highlight groups.
Which leads to our next problem: as per the default syntax script for the sh filetype…
${ belongs to the shDeref and PreProc groups,
TMP belongs to shDeref and shDerefVar,
} belongs to PreProc,
they all resolve to the PreProc highlight group.
meaning that your colorscheme in its current form and the default syntax script for sh make it impossible to highlight ${} and TMP differently.
Here is how the two first lines of your script look with darkbone.vim and the default syntax script for sh:
And here is your screenshot:
You will notice that there are quite a few discrepancies.
So, if your colorscheme and the default syntax script both consider ${TMP} as a single "block" belonging to the PreProc highlight group, then you might be using a third-party syntax script that thinks otherwise.
Furthermore, the only highlight group highlighted in orange in your colorscheme is Function so there is definitely something, somewhere, that overrides the default highlight groups in one way or another.
FWIW, you can use the following command to identify the highlight group(s) of the item under your cursor:
command! SynStack echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')

Why is the formatting in my ftplugin applying to all files in every format?

I'm created a custom file format, .cheat, for my cheat sheets, and in that format only I am highlighting alternating rows to make it easy to see which keystroke combo triggers each command. Why is the formatting in my ftplugin applying to all files in every format?
Key lines from ~/.vim/vimrc:
set nocompatible
au BufNewFile,BufRead *.cheat set filetype=cheat
filetype off
" vundle stuff
filetype on
nmap <leader>? :75vsp ~/.vim/my.cheat
(Full vimrc below for reference.)
Full ~/.vim/ftdetect/cheat.vim:
if exists("b:did_load_filetypes") | finish | endif
let b:did_ftplugin = 1
au BufNewFile,BufRead *.cheat set filetype=cheat
syn match Oddlines "^.*$" contains=ALL nextgroup=Evenlines skipnl
syn match Evenlines "^.*$" contains=ALL nextgroup=Oddlines skipnl
hi Oddlines ctermbg=DarkGray ctermfg=White
hi Evenlines ctermbg=LightGray ctermfg=White
Full ~/.vim/vimrc:
set nocompatible
au BufNewFile,BufRead *.cheat set filetype=cheat
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'dracula/vim'
Plugin 'vim-airline/vim-airline'
Plugin 'tpope/vim-commentary'
Plugin 'neilagabriel/vim-geeknote'
Plugin 'tpope/vim-fugitive'
Plugin 'moll/vim-node'
Plugin 'danro/rename.vim'
Plugin 'vim-syntastic/syntastic'
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list=1
let g:syntastic_auto_loc_list=1
let g:syntastic_check_on_open=1
let g:syntastic_check_on_wq=0
call vundle#end()
filetype plugin indent on
set number
set wrap
set breakindent
set autoindent
set shiftwidth=2
set linebreak
set nolist
set cursorline
set cursorcolumn
set ruler
set laststatus=2
set timeoutlen=1000 ttimeoutlen=0
set splitright
hi CursorLine cterm=NONE ctermbg=Black ctermfg=None
hi CursorColumn cterm=NONE ctermbg=Black ctermfg=None
set updatetime=200
au CursorHold * silent! update
nmap <CR> o<Esc>
nmap <leader>? :75vsp ~/.vim/my.cheat
Your ftdetect/cheat.vim should only contain the following :
au BufNewFile,BufRead *.cheat set filetype=cheat
While the remaining configurations you should place in a ftplugin/cheat.vim :
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
syn match Oddlines "^.$" contains=ALL nextgroup=Evenlines skipnl
syn match Evenlines "^.$" contains=ALL nextgroup=Oddlines skipnl
hi Oddlines ctermbg=DarkGray ctermfg=White
hi Evenlines ctermbg=LightGray ctermfg=White

Custom syntax coloring vim

In vim can you call a theme for example, 'colo:desert' and colorize certain syntax which are not colorized like lets say i wanted to colorize the words "Access Validation" and "Panel" to green will Vim let met do that?
Below is my desert theme which i use to colorize my syntax
" cool help screens
" :he group-name
" :he highlight-groups
" :he cterm-colors
set background=dark
if version > 580
" no guarantees for version 5.8 and below, but this makes it stop
" complaining
hi clear
if exists("syntax_on")
syntax reset
endif
endif
let g:colors_name="desert"
hi Normal guifg=White guibg=grey20
" highlight groups
hi Cursor guibg=khaki guifg=slategrey
"hi CursorIM
"hi Directory
"hi DiffAdd
"hi DiffChange
"hi DiffDelete
"hi DiffText
"hi ErrorMsg
hi VertSplit guibg=#c2bfa5 guifg=grey50 gui=none
hi Folded guibg=grey30 guifg=gold
hi FoldColumn guibg=grey30 guifg=tan
hi IncSearch guifg=slategrey guibg=khaki
"hi LineNr
hi ModeMsg guifg=goldenrod
hi MoreMsg guifg=SeaGreen
hi NonText guifg=LightBlue guibg=grey30
hi Question guifg=springgreen
hi Search guibg=peru guifg=wheat
hi SpecialKey guifg=yellowgreen
hi StatusLine guibg=#c2bfa5 guifg=black gui=none
hi StatusLineNC guibg=#c2bfa5 guifg=grey50 gui=none
hi Title guifg=indianred
hi Visual gui=none guifg=khaki guibg=olivedrab
"hi VisualNOS
hi WarningMsg guifg=salmon
"hi WildMenu
"hi Menu
"hi Scrollbar
"hi Tooltip
" syntax highlighting groups
hi Comment guifg=SkyBlue
hi Constant guifg=#ffa0a0
hi Identifier guifg=palegreen
hi Statement guifg=khaki
hi PreProc guifg=indianred
hi Type guifg=darkkhaki
hi Special guifg=navajowhite
"hi Underlined
hi Ignore guifg=grey40
"hi Error
hi Todo guifg=orangered guibg=yellow2
" color terminal definitions
hi SpecialKey ctermfg=darkgreen
hi NonText cterm=bold ctermfg=darkblue
hi Directory ctermfg=darkcyan
hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1
hi IncSearch cterm=NONE ctermfg=yellow ctermbg=green
hi Search cterm=NONE ctermfg=grey ctermbg=blue
hi MoreMsg ctermfg=darkgreen
hi ModeMsg cterm=NONE ctermfg=brown
hi LineNr ctermfg=3
hi Question ctermfg=green
hi StatusLine cterm=bold,reverse
hi StatusLineNC cterm=reverse
hi VertSplit cterm=reverse
hi Title ctermfg=5
hi Visual cterm=reverse
hi VisualNOS cterm=bold,underline
hi WarningMsg ctermfg=1
hi WildMenu ctermfg=0 ctermbg=3
hi Folded ctermfg=darkgrey ctermbg=NONE
hi FoldColumn ctermfg=darkgrey ctermbg=NONE
hi DiffAdd ctermbg=4
hi DiffChange ctermbg=5
hi DiffDelete cterm=bold ctermfg=4 ctermbg=6
hi DiffText cterm=bold ctermbg=1
hi Comment ctermfg=darkcyan
hi Constant ctermfg=brown
hi Special ctermfg=5
hi Identifier ctermfg=6
hi Statement ctermfg=3
hi PreProc ctermfg=5
hi Type ctermfg=2
hi Underlined cterm=underline ctermfg=5
hi Ignore cterm=bold ctermfg=7
hi Ignore ctermfg=darkgrey
hi Error cterm=bold ctermfg=7 ctermbg=1
:setf sql
:set number
:highlight LineNr Ctermfg=red
:set nowrap
"vim: sw=4
You can add arbitrary syntax highlighting. In my .vimrc, I have one to mark trailing whitespace in red:
highlight ExtraWhitespace ctermbg=1 guibg=red
match ExtraWhitespace /\s\+$/
In your case, you could do:
highlight StackOverflow ctermfg=DarkGreen
match StackOverflow /Panel\|Access Validation/
Then you just have to set up autocmds that runs the match command for BufWinEnter, BufWinLeave, InsertEnter, and InsertLeave:
autocmd BufWinEnter * match StackOverflow /Panel\|Access Validation/
autocmd BufWinLeave * match StackOverflow /Panel\|Access Validation/
autocmd InsertEnter * match StackOverflow /Panel\|Access Validation/
autocmd InsertLeave * match StackOverflow /Panel\|Access Validation/
You can of course do it more fine-grained, if you just want it to apply to specific kinds of files.

where can I find a *.vim file for the default color scheme

After browsing tens of color schemes, I couldn't really find anything much better than the "default" vim color scheme.
I would like to twist it a little bit, but couldn't find the scheme file, does such file exist? or is there a way I can save current scheme into a file and edit it?
$VIMRUNTIME/colors/default.vim
won't help you much as it doesn't define a single color. The actual default colors are defined with a "special" syntax in:
$VIMRUNTIME/syntax/syncolor.vim
Here is the gist of it:
if &background == "dark"
SynColor Comment term=bold cterm=NONE ctermfg=Cyan ctermbg=NONE gui=NONE guifg=#80a0ff guibg=NONE
SynColor Constant term=underline cterm=NONE ctermfg=Magenta ctermbg=NONE gui=NONE guifg=#ffa0a0 guibg=NONE
SynColor Special term=bold cterm=NONE ctermfg=LightRed ctermbg=NONE gui=NONE guifg=Orange guibg=NONE
SynColor Identifier term=underline cterm=bold ctermfg=Cyan ctermbg=NONE gui=NONE guifg=#40ffff guibg=NONE
SynColor Statement term=bold cterm=NONE ctermfg=Yellow ctermbg=NONE gui=bold guifg=#ffff60 guibg=NONE
SynColor PreProc term=underline cterm=NONE ctermfg=LightBlue ctermbg=NONE gui=NONE guifg=#ff80ff guibg=NONE
SynColor Type term=underline cterm=NONE ctermfg=LightGreen ctermbg=NONE gui=bold guifg=#60ff60 guibg=NONE
SynColor Underlined term=underline cterm=underline ctermfg=LightBlue gui=underline guifg=#80a0ff
SynColor Ignore term=NONE cterm=NONE ctermfg=black ctermbg=NONE gui=NONE guifg=bg guibg=NONE
else
SynColor Comment term=bold cterm=NONE ctermfg=DarkBlue ctermbg=NONE gui=NONE guifg=Blue guibg=NONE
SynColor Constant term=underline cterm=NONE ctermfg=DarkRed ctermbg=NONE gui=NONE guifg=Magenta guibg=NONE
SynColor Special term=bold cterm=NONE ctermfg=DarkMagenta ctermbg=NONE gui=NONE guifg=SlateBlue guibg=NONE
SynColor Identifier term=underline cterm=NONE ctermfg=DarkCyan ctermbg=NONE gui=NONE guifg=DarkCyan guibg=NONE
SynColor Statement term=bold cterm=NONE ctermfg=Brown ctermbg=NONE gui=bold guifg=Brown guibg=NONE
SynColor PreProc term=underline cterm=NONE ctermfg=DarkMagenta ctermbg=NONE gui=NONE guifg=Purple guibg=NONE
SynColor Type term=underline cterm=NONE ctermfg=DarkGreen ctermbg=NONE gui=bold guifg=SeaGreen guibg=NONE
SynColor Underlined term=underline cterm=underline ctermfg=DarkMagenta gui=underline guifg=SlateBlue
SynColor Ignore term=NONE cterm=NONE ctermfg=white ctermbg=NONE gui=NONE guifg=bg guibg=NONE
endif
SynColor Error term=reverse cterm=NONE ctermfg=White ctermbg=Red gui=NONE guifg=White guibg=Red
SynColor Todo term=standout cterm=NONE ctermfg=Black ctermbg=Yellow gui=NONE guifg=Blue guibg=Yellow
This may be system dependent, but to see the name of the current colorscheme just use
:colorscheme
If it is default, you can find it via locate default.vim or find / -name default.vim.
For me it's in
/usr/share/vim/vim73/colors/default.vim
This is what is in my default.vim file
" Vim color file
" Maintainer: Bram Moolenaar <Bram#vim.org>
" Last Change: 2001 Jul 23
" This is the default color scheme. It doesn't define the Normal
" highlighting, it uses whatever the colors used to be.
" Set 'background' back to the default. The value can't always be estimated
" and is then guessed.
hi clear Normal
set bg&
" Remove all existing highlighting and set the defaults.
hi clear
" Load the syntax highlighting defaults, if it's enabled.
if exists("syntax_on")
syntax reset
endif
let colors_name = "default"
" vim: sw=2
As you can see there are no colors defined. However you can take a look at the other color schemes in the same folder as default.vim to get an idea of how to define colors, you can then either add them to the default.vim or create your own colorscheme.
Also see
:help coloring

Which line in vim colorscheme is coloring my FuzzyFinder popup?

I just installed FuzzyFinder for gvim, though for some reason it's using an ultra hot-pink background color that's burning my eyes, using my favorite desert colorscheme.
I've looked through desert.vim but I can't find any line which is defining this color (0xFF00FF) (desert.vim appended at end of post).
Can anyone say where this color is coming from so I can change it to something different? Perhaps it is one of the "cterm" colors? How can I find out where those cterm colors are defined from?
desert.vim:
" Vim color file
" Maintainer: Hans Fugal <hans#fugal.net>
" Last Change: $Date: 2004/06/13 19:30:30 $
" Last Change: $Date: 2004/06/13 19:30:30 $
" URL: http://hans.fugal.net/vim/colors/desert.vim
" Version: $Id: desert.vim,v 1.1 2004/06/13 19:30:30 vimboss Exp $
" cool help screens
" :he group-name
" :he highlight-groups
" :he cterm-colors
set background=dark
if version > 580
" no guarantees for version 5.8 and below, but this makes it stop
" complaining
hi clear
if exists("syntax_on")
syntax reset
endif
endif
let g:colors_name="desert"
hi Normal guifg=White guibg=grey20
" highlight groups
hi Cursor guibg=khaki guifg=slategrey
"hi CursorIM
"hi Directory
"hi DiffAdd
"hi DiffChange
"hi DiffDelete
"hi DiffText
"hi ErrorMsg
hi VertSplit guibg=#c2bfa5 guifg=grey50 gui=none
hi Folded guibg=grey30 guifg=gold
hi FoldColumn guibg=grey30 guifg=tan
hi IncSearch guifg=slategrey guibg=khaki
"hi LineNr
hi ModeMsg guifg=goldenrod
hi MoreMsg guifg=SeaGreen
hi NonText guifg=LightBlue guibg=grey30
hi Question guifg=springgreen
hi Search guibg=peru guifg=wheat
hi SpecialKey guifg=yellowgreen
hi StatusLine guibg=#c2bfa5 guifg=black gui=none
hi StatusLineNC guibg=#c2bfa5 guifg=grey50 gui=none
hi Title guifg=indianred
hi Visual gui=none guifg=khaki guibg=olivedrab
"hi VisualNOS
hi WarningMsg guifg=salmon
"hi WildMenu
"hi Menu
"hi Scrollbar
"hi Tooltip
" syntax highlighting groups
hi Comment guifg=SkyBlue
hi Constant guifg=#ffa0a0
hi Identifier guifg=palegreen
hi Statement guifg=khaki
hi PreProc guifg=indianred
hi Type guifg=darkkhaki
hi Special guifg=navajowhite
"hi Underlined
hi Ignore guifg=grey40
"hi Error
hi Todo guifg=orangered guibg=yellow2
" color terminal definitions
hi SpecialKey ctermfg=darkgreen
hi NonText cterm=bold ctermfg=darkblue
hi Directory ctermfg=darkcyan
hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1
hi IncSearch cterm=NONE ctermfg=yellow ctermbg=green
hi Search cterm=NONE ctermfg=grey ctermbg=blue
hi MoreMsg ctermfg=darkgreen
hi ModeMsg cterm=NONE ctermfg=brown
hi LineNr ctermfg=3
hi Question ctermfg=green
hi StatusLine cterm=bold,reverse
hi StatusLineNC cterm=reverse
hi VertSplit cterm=reverse
hi Title ctermfg=5
hi Visual cterm=reverse
hi VisualNOS cterm=bold,underline
hi WarningMsg ctermfg=1
hi WildMenu ctermfg=0 ctermbg=3
hi Folded ctermfg=darkgrey ctermbg=NONE
hi FoldColumn ctermfg=darkgrey ctermbg=NONE
hi DiffAdd ctermbg=4
hi DiffChange ctermbg=5
hi DiffDelete cterm=bold ctermfg=4 ctermbg=6
hi DiffText cterm=bold ctermbg=1
hi Comment ctermfg=darkcyan
hi Constant ctermfg=brown
hi Special ctermfg=5
hi Identifier ctermfg=6
hi Statement ctermfg=3
hi PreProc ctermfg=5
hi Type ctermfg=2
hi Underlined cterm=underline ctermfg=5
hi Ignore cterm=bold ctermfg=7
hi Ignore ctermfg=darkgrey
hi Error cterm=bold ctermfg=7 ctermbg=1
"vim: sw=4
try using
Pmenu Popup menu: normal item
:hi Pmenu ctermbg=red "for vim
:hi Pmenu guibg=red "for gvim

Resources