From 3fcd656c786cfef2e6b3c445ba643037e1668173 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Sun, 19 Feb 2017 09:37:36 +0100 Subject: [PATCH] Add vim config --- .vim/.netrwhist | 5 + .vim/colors/hjp.vim | 60 +++++++++++ .vim/colors/inkpot.vim | 216 ++++++++++++++++++++++++++++++++++++++++ .vim/doc/matchit.txt | 1 + .vim/doc/tags | 50 ++++++++++ .vim/plugin/matchit.vim | 1 + .vimrc | 17 ++++ 7 files changed, 350 insertions(+) create mode 100644 .vim/.netrwhist create mode 100644 .vim/colors/hjp.vim create mode 100644 .vim/colors/inkpot.vim create mode 120000 .vim/doc/matchit.txt create mode 100644 .vim/doc/tags create mode 120000 .vim/plugin/matchit.vim create mode 100644 .vimrc diff --git a/.vim/.netrwhist b/.vim/.netrwhist new file mode 100644 index 0000000..56abe75 --- /dev/null +++ b/.vim/.netrwhist @@ -0,0 +1,5 @@ +let g:netrw_dirhistmax =10 +let g:netrw_dirhist_cnt =3 +let g:netrw_dirhist_1='/home/hjp/wrk/luga/www/linux.at' +let g:netrw_dirhist_2='/usr/local/www/hjp/os/ext3-ext4' +let g:netrw_dirhist_3='/home/hjp/wrk/qpsmtpd-plugins/loner' diff --git a/.vim/colors/hjp.vim b/.vim/colors/hjp.vim new file mode 100644 index 0000000..f0d0dfa --- /dev/null +++ b/.vim/colors/hjp.vim @@ -0,0 +1,60 @@ +" local syntax file - set colors on a per-machine basis: +" vim: tw=0 ts=8 sw=4 +" Vim color file +" (adapted from zellner.vim) +" Maintainer: Peter J. Holzer +" Last Change: 2009-08-14 + +set background=light +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "hjp" + +hi Comment term=bold ctermfg=88 ctermbg=White guifg=Red +hi Constant term=underline ctermfg=90 guifg=Magenta +hi Error term=reverse ctermfg=15 ctermbg=9 guifg=White guibg=Red +hi Identifier term=underline ctermfg=22 ctermbg=NONE guifg=Blue +hi LineNr term=bold cterm=NONE ctermfg=Gray ctermbg=Blue gui=NONE guifg=DarkGrey guibg=NONE +hi Underlined term=underline cterm=underline ctermfg=163 gui=underline guifg=SlateBlue +hi MatchParen ctermbg=yellow +hi Normal guifg=black guibg=white +hi PreProc term=underline ctermfg=Magenta ctermbg=253 guifg=Purple +hi Search term=reverse cterm=NONE ctermfg=White ctermbg=Cyan gui=NONE guifg=Black guibg=Cyan +hi Special term=bold ctermfg=DarkMagenta ctermbg=253 guifg=Magenta +hi Statement term=bold ctermfg=DarkBlue gui=NONE guifg=Brown +hi StatusLine term=bold,reverse cterm=NONE ctermfg=Yellow ctermbg=DarkGray gui=NONE guifg=Yellow guibg=DarkGray +hi String term=bold ctermfg=90 ctermbg=NONE guifg=Magenta +hi Tag term=bold ctermfg=DarkGreen guifg=DarkGreen +hi Todo term=standout ctermbg=Yellow ctermfg=Black guifg=Blue guibg=Yellow +hi Type term=underline ctermfg=Blue gui=NONE guifg=Blue +hi Visual term=reverse ctermfg=Yellow ctermbg=Red gui=NONE guifg=Black guibg=Yellow +hi Title ctermfg=black +hi link Boolean Constant +hi link Character Constant +hi link Conditional Statement +hi link Debug Special +hi link Define PreProc +hi link Delimiter Special +hi link Exception Statement +hi link Float Number +hi link Function Identifier +hi link Include PreProc +hi link Keyword Statement +hi link Label Statement +hi link Macro PreProc +hi link Number Constant +hi link Operator Statement +hi link PreCondit PreProc +hi link Repeat Statement +hi link SpecialChar Special +hi link SpecialComment Special +hi link StorageClass Type +hi link String Constant +hi link Structure Type +hi link Typedef Type +hi! link ErrorMsg Visual +hi! link MoreMsg Comment +hi! link Question Comment +hi! link WarningMsg ErrorMsg diff --git a/.vim/colors/inkpot.vim b/.vim/colors/inkpot.vim new file mode 100644 index 0000000..c6ecb46 --- /dev/null +++ b/.vim/colors/inkpot.vim @@ -0,0 +1,216 @@ +" Vim color file +" Name: inkpot.vim +" Maintainer: Ciaran McCreesh +" Homepage: http://github.com/ciaranm/inkpot/ +" +" This should work in the GUI, rxvt-unicode (88 colour mode) and xterm (256 +" colour mode). It won't work in 8/16 colour terminals. +" +" To use a black background, :let g:inkpot_black_background = 1 + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif + +let colors_name = "inkpot" + +" map a urxvt cube number to an xterm-256 cube number +fun! M(a) + return strpart("0135", a:a, 1) + 0 +endfun + +" map a urxvt colour to an xterm-256 colour +fun! X(a) + if &t_Co == 88 + return a:a + else + if a:a == 8 + return 237 + elseif a:a < 16 + return a:a + elseif a:a > 79 + return 232 + (3 * (a:a - 80)) + else + let l:b = a:a - 16 + let l:x = l:b % 4 + let l:y = (l:b / 4) % 4 + let l:z = (l:b / 16) + return 16 + M(l:x) + (6 * M(l:y)) + (36 * M(l:z)) + endif + endif +endfun + +if ! exists("g:inkpot_black_background") + let g:inkpot_black_background = 0 +endif + +if has("gui_running") + if ! g:inkpot_black_background + hi Normal gui=NONE guifg=#cfbfad guibg=#1e1e27 + else + hi Normal gui=NONE guifg=#cfbfad guibg=#000000 + endif + + hi CursorLine guibg=#2e2e37 + + hi IncSearch gui=BOLD guifg=#303030 guibg=#cd8b60 + hi Search gui=NONE guifg=#303030 guibg=#ad7b57 + hi ErrorMsg gui=BOLD guifg=#ffffff guibg=#ce4e4e + hi WarningMsg gui=BOLD guifg=#ffffff guibg=#ce8e4e + hi ModeMsg gui=BOLD guifg=#7e7eae guibg=NONE + hi MoreMsg gui=BOLD guifg=#7e7eae guibg=NONE + hi Question gui=BOLD guifg=#ffcd00 guibg=NONE + + hi StatusLine gui=BOLD guifg=#b9b9b9 guibg=#3e3e5e + hi User1 gui=BOLD guifg=#00ff8b guibg=#3e3e5e + hi User2 gui=BOLD guifg=#7070a0 guibg=#3e3e5e + hi StatusLineNC gui=NONE guifg=#b9b9b9 guibg=#3e3e5e + hi VertSplit gui=NONE guifg=#b9b9b9 guibg=#3e3e5e + + hi WildMenu gui=BOLD guifg=#eeeeee guibg=#6e6eaf + + hi MBENormal guifg=#cfbfad guibg=#2e2e3f + hi MBEChanged guifg=#eeeeee guibg=#2e2e3f + hi MBEVisibleNormal guifg=#cfcfcd guibg=#4e4e8f + hi MBEVisibleChanged guifg=#eeeeee guibg=#4e4e8f + + hi DiffText gui=NONE guifg=#ffffcd guibg=#4a2a4a + hi DiffChange gui=NONE guifg=#ffffcd guibg=#306b8f + hi DiffDelete gui=NONE guifg=#ffffcd guibg=#6d3030 + hi DiffAdd gui=NONE guifg=#ffffcd guibg=#306d30 + + hi Cursor gui=NONE guifg=#404040 guibg=#8b8bff + hi lCursor gui=NONE guifg=#404040 guibg=#8fff8b + hi CursorIM gui=NONE guifg=#404040 guibg=#8b8bff + + hi Folded gui=NONE guifg=#cfcfcd guibg=#4b208f + hi FoldColumn gui=NONE guifg=#8b8bcd guibg=#2e2e2e + + hi Directory gui=NONE guifg=#00ff8b guibg=NONE + hi LineNr gui=NONE guifg=#8b8bcd guibg=#2e2e2e + hi NonText gui=BOLD guifg=#8b8bcd guibg=NONE + hi SpecialKey gui=BOLD guifg=#ab60ed guibg=NONE + hi Title gui=BOLD guifg=#af4f4b guibg=NONE + hi Visual gui=NONE guifg=#eeeeee guibg=#4e4e8f + + hi Comment gui=NONE guifg=#cd8b00 guibg=NONE + hi Constant gui=NONE guifg=#ffcd8b guibg=NONE + hi String gui=NONE guifg=#ffcd8b guibg=#404040 + hi Error gui=NONE guifg=#ffffff guibg=#6e2e2e + hi Identifier gui=NONE guifg=#ff8bff guibg=NONE + hi Ignore gui=NONE + hi Number gui=NONE guifg=#f0ad6d guibg=NONE + hi PreProc gui=NONE guifg=#409090 guibg=NONE + hi Special gui=NONE guifg=#c080d0 guibg=NONE + hi SpecialChar gui=NONE guifg=#c080d0 guibg=#404040 + hi Statement gui=NONE guifg=#808bed guibg=NONE + hi Todo gui=BOLD guifg=#303030 guibg=#d0a060 + hi Type gui=NONE guifg=#ff8bff guibg=NONE + hi Underlined gui=BOLD guifg=#df9f2d guibg=NONE + hi TaglistTagName gui=BOLD guifg=#808bed guibg=NONE + + hi perlSpecialMatch gui=NONE guifg=#c080d0 guibg=#404040 + hi perlSpecialString gui=NONE guifg=#c080d0 guibg=#404040 + + hi cSpecialCharacter gui=NONE guifg=#c080d0 guibg=#404040 + hi cFormat gui=NONE guifg=#c080d0 guibg=#404040 + + hi doxygenBrief gui=NONE guifg=#fdab60 guibg=NONE + hi doxygenParam gui=NONE guifg=#fdd090 guibg=NONE + hi doxygenPrev gui=NONE guifg=#fdd090 guibg=NONE + hi doxygenSmallSpecial gui=NONE guifg=#fdd090 guibg=NONE + hi doxygenSpecial gui=NONE guifg=#fdd090 guibg=NONE + hi doxygenComment gui=NONE guifg=#ad7b20 guibg=NONE + hi doxygenSpecial gui=NONE guifg=#fdab60 guibg=NONE + hi doxygenSpecialMultilineDesc gui=NONE guifg=#ad600b guibg=NONE + hi doxygenSpecialOnelineDesc gui=NONE guifg=#ad600b guibg=NONE + + if v:version >= 700 + hi Pmenu gui=NONE guifg=#eeeeee guibg=#4e4e8f + hi PmenuSel gui=BOLD guifg=#eeeeee guibg=#2e2e3f + hi PmenuSbar gui=BOLD guifg=#eeeeee guibg=#6e6eaf + hi PmenuThumb gui=BOLD guifg=#eeeeee guibg=#6e6eaf + + hi SpellBad gui=undercurl guisp=#cc6666 + hi SpellRare gui=undercurl guisp=#cc66cc + hi SpellLocal gui=undercurl guisp=#cccc66 + hi SpellCap gui=undercurl guisp=#66cccc + + hi MatchParen gui=NONE guifg=#cfbfad guibg=#4e4e8f + endif +else + if ! g:inkpot_black_background + exec "hi Normal cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(80) + else + exec "hi Normal cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(16) + endif + + exec "hi IncSearch cterm=BOLD ctermfg=" . X(80) . " ctermbg=" . X(73) + exec "hi Search cterm=NONE ctermfg=" . X(80) . " ctermbg=" . X(52) + exec "hi ErrorMsg cterm=BOLD ctermfg=" . X(16) . " ctermbg=" . X(48) + exec "hi WarningMsg cterm=BOLD ctermfg=" . X(16) . " ctermbg=" . X(68) + exec "hi ModeMsg cterm=BOLD ctermfg=" . X(38) . " ctermbg=" . "NONE" + exec "hi MoreMsg cterm=BOLD ctermfg=" . X(38) . " ctermbg=" . "NONE" + exec "hi Question cterm=BOLD ctermfg=" . X(52) . " ctermbg=" . "NONE" + + exec "hi StatusLine cterm=BOLD ctermfg=" . X(85) . " ctermbg=" . X(81) + exec "hi User1 cterm=BOLD ctermfg=" . X(28) . " ctermbg=" . X(81) + exec "hi User2 cterm=BOLD ctermfg=" . X(39) . " ctermbg=" . X(81) + exec "hi StatusLineNC cterm=NONE ctermfg=" . X(84) . " ctermbg=" . X(81) + exec "hi VertSplit cterm=NONE ctermfg=" . X(84) . " ctermbg=" . X(81) + + exec "hi WildMenu cterm=BOLD ctermfg=" . X(87) . " ctermbg=" . X(38) + + exec "hi MBENormal ctermfg=" . X(85) . " ctermbg=" . X(81) + exec "hi MBEChanged ctermfg=" . X(87) . " ctermbg=" . X(81) + exec "hi MBEVisibleNormal ctermfg=" . X(85) . " ctermbg=" . X(82) + exec "hi MBEVisibleChanged ctermfg=" . X(87) . " ctermbg=" . X(82) + + exec "hi DiffText cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(34) + exec "hi DiffChange cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(17) + exec "hi DiffDelete cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(32) + exec "hi DiffAdd cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(20) + + exec "hi Folded cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(35) + exec "hi FoldColumn cterm=NONE ctermfg=" . X(39) . " ctermbg=" . X(80) + + exec "hi Directory cterm=NONE ctermfg=" . X(28) . " ctermbg=" . "NONE" + exec "hi LineNr cterm=NONE ctermfg=" . X(39) . " ctermbg=" . X(80) + exec "hi NonText cterm=BOLD ctermfg=" . X(39) . " ctermbg=" . "NONE" + exec "hi SpecialKey cterm=BOLD ctermfg=" . X(55) . " ctermbg=" . "NONE" + exec "hi Title cterm=BOLD ctermfg=" . X(48) . " ctermbg=" . "NONE" + exec "hi Visual cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(38) + + exec "hi Comment cterm=NONE ctermfg=" . X(52) . " ctermbg=" . "NONE" + exec "hi Constant cterm=NONE ctermfg=" . X(73) . " ctermbg=" . "NONE" + exec "hi String cterm=NONE ctermfg=" . X(73) . " ctermbg=" . X(81) + exec "hi Error cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(32) + exec "hi Identifier cterm=NONE ctermfg=" . X(53) . " ctermbg=" . "NONE" + exec "hi Ignore cterm=NONE" + exec "hi Number cterm=NONE ctermfg=" . X(69) . " ctermbg=" . "NONE" + exec "hi PreProc cterm=NONE ctermfg=" . X(25) . " ctermbg=" . "NONE" + exec "hi Special cterm=NONE ctermfg=" . X(55) . " ctermbg=" . "NONE" + exec "hi SpecialChar cterm=NONE ctermfg=" . X(55) . " ctermbg=" . X(81) + exec "hi Statement cterm=NONE ctermfg=" . X(27) . " ctermbg=" . "NONE" + exec "hi Todo cterm=BOLD ctermfg=" . X(16) . " ctermbg=" . X(57) + exec "hi Type cterm=NONE ctermfg=" . X(71) . " ctermbg=" . "NONE" + exec "hi Underlined cterm=BOLD ctermfg=" . X(77) . " ctermbg=" . "NONE" + exec "hi TaglistTagName cterm=BOLD ctermfg=" . X(39) . " ctermbg=" . "NONE" + + if v:version >= 700 + exec "hi Pmenu cterm=NONE ctermfg=" . X(87) . " ctermbg=" . X(82) + exec "hi PmenuSel cterm=BOLD ctermfg=" . X(87) . " ctermbg=" . X(38) + exec "hi PmenuSbar cterm=BOLD ctermfg=" . X(87) . " ctermbg=" . X(39) + exec "hi PmenuThumb cterm=BOLD ctermfg=" . X(87) . " ctermbg=" . X(39) + + exec "hi SpellBad cterm=NONE ctermbg=" . X(32) + exec "hi SpellRare cterm=NONE ctermbg=" . X(33) + exec "hi SpellLocal cterm=NONE ctermbg=" . X(36) + exec "hi SpellCap cterm=NONE ctermbg=" . X(21) + exec "hi MatchParen cterm=NONE ctermbg=" . X(14) . "ctermfg=" . X(25) + endif +endif + +" vim: set et : diff --git a/.vim/doc/matchit.txt b/.vim/doc/matchit.txt new file mode 120000 index 0000000..d147b94 --- /dev/null +++ b/.vim/doc/matchit.txt @@ -0,0 +1 @@ +/usr/share/vim/addons/doc/matchit.txt \ No newline at end of file diff --git a/.vim/doc/tags b/.vim/doc/tags new file mode 100644 index 0000000..4ccdc87 --- /dev/null +++ b/.vim/doc/tags @@ -0,0 +1,50 @@ +:MatchDebug matchit.txt /*:MatchDebug* +MatchError matchit.txt /*MatchError* +[% matchit.txt /*[%* +]% matchit.txt /*]%* +b:match_col matchit.txt /*b:match_col* +b:match_debug matchit.txt /*b:match_debug* +b:match_ignorecase matchit.txt /*b:match_ignorecase* +b:match_ini matchit.txt /*b:match_ini* +b:match_iniBR matchit.txt /*b:match_iniBR* +b:match_match matchit.txt /*b:match_match* +b:match_pat matchit.txt /*b:match_pat* +b:match_skip matchit.txt /*b:match_skip* +b:match_table matchit.txt /*b:match_table* +b:match_tail matchit.txt /*b:match_tail* +b:match_wholeBR matchit.txt /*b:match_wholeBR* +b:match_word matchit.txt /*b:match_word* +b:match_words matchit.txt /*b:match_words* +g% matchit.txt /*g%* +matchit matchit.txt /*matchit* +matchit-% matchit.txt /*matchit-%* +matchit-\1 matchit.txt /*matchit-\\1* +matchit-activate matchit.txt /*matchit-activate* +matchit-backref matchit.txt /*matchit-backref* +matchit-bugs matchit.txt /*matchit-bugs* +matchit-choose matchit.txt /*matchit-choose* +matchit-configure matchit.txt /*matchit-configure* +matchit-debug matchit.txt /*matchit-debug* +matchit-details matchit.txt /*matchit-details* +matchit-highlight matchit.txt /*matchit-highlight* +matchit-hl matchit.txt /*matchit-hl* +matchit-intro matchit.txt /*matchit-intro* +matchit-languages matchit.txt /*matchit-languages* +matchit-modes matchit.txt /*matchit-modes* +matchit-newlang matchit.txt /*matchit-newlang* +matchit-o_% matchit.txt /*matchit-o_%* +matchit-parse matchit.txt /*matchit-parse* +matchit-s:notend matchit.txt /*matchit-s:notend* +matchit-s:sol matchit.txt /*matchit-s:sol* +matchit-spaces matchit.txt /*matchit-spaces* +matchit-troubleshoot matchit.txt /*matchit-troubleshoot* +matchit-v_% matchit.txt /*matchit-v_%* +matchit.txt matchit.txt /*matchit.txt* +matchit.vim matchit.txt /*matchit.vim* +o_[% matchit.txt /*o_[%* +o_]% matchit.txt /*o_]%* +o_g% matchit.txt /*o_g%* +v_[% matchit.txt /*v_[%* +v_]% matchit.txt /*v_]%* +v_a% matchit.txt /*v_a%* +v_g% matchit.txt /*v_g%* diff --git a/.vim/plugin/matchit.vim b/.vim/plugin/matchit.vim new file mode 120000 index 0000000..9304428 --- /dev/null +++ b/.vim/plugin/matchit.vim @@ -0,0 +1 @@ +/usr/share/vim/addons/plugin/matchit.vim \ No newline at end of file diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..a43c1b9 --- /dev/null +++ b/.vimrc @@ -0,0 +1,17 @@ +se nu +se ai +se ruler +se sm +se secure +se exrc +colorscheme hjp +map!  >I<yypa/O +se tw=72 +se sw=4 +se list +se listchars=tab:»·,trail:· +se modeline +syntax on +se comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-,n:\| +set expandtab +se nojoinspaces