diff options
-rwxr-xr-x | vim/colors/johannst.vim | 24 | ||||
-rw-r--r-- | vimrc | 27 |
2 files changed, 28 insertions, 23 deletions
diff --git a/vim/colors/johannst.vim b/vim/colors/johannst.vim index 4070881..00bec44 100755 --- a/vim/colors/johannst.vim +++ b/vim/colors/johannst.vim @@ -1,6 +1,6 @@ " dotfiles -- vim/colors/johannst " author: johannst -" derived from buddy +" derived from buddy let g:colors_name = "johannst" @@ -20,8 +20,8 @@ hi Folded ctermfg=146 ctermbg=238 cterm=NONE hi FoldColumn ctermfg=122 ctermbg=238 cterm=NONE hi Title ctermfg=230 ctermbg=NONE cterm=bold hi Todo ctermfg=232 ctermbg=222 cterm=NONE -hi NonText ctermfg=247 ctermbg=236 cterm=NONE -hi SpecialKey ctermfg=247 ctermbg=236 cterm=NONE +hi NonText ctermfg=247 ctermbg=236 cterm=NONE +hi SpecialKey ctermfg=238 ctermbg=NONE cterm=NONE hi Visual ctermfg=230 ctermbg=238 cterm=NONE hi VertSplit ctermfg=59 ctermbg=238 cterm=NONE hi Directory ctermfg=39 ctermbg=NONE cterm=NONE @@ -31,17 +31,17 @@ hi Directory ctermfg=39 ctermbg=NONE cterm=NONE "hi Cursor ctermfg=NONE ctermbg=241 cterm=NONE hi LineNr ctermfg=239 ctermbg=234 cterm=NONE -hi CursorLineNR ctermfg=255 ctermbg=208 cterm=bold +hi CursorLineNR ctermfg=255 ctermbg=208 cterm=bold hi CursorLine ctermfg=NONE ctermbg=236 cterm=NONE hi CursorColumn ctermfg=NONE ctermbg=236 cterm=NONE -hi MatchParen ctermfg=208 ctermbg=89 cterm=underline +hi MatchParen ctermfg=208 ctermbg=89 cterm=underline "}}} "{{{ Tabline hi TabLine ctermbg=235 ctermfg=244 cterm=none hi TabLineSel ctermbg=208 ctermfg=255 cterm=bold -hi TabLineFill ctermbg=235 ctermfg=0 cterm=NONE +hi TabLineFill ctermbg=235 ctermfg=0 cterm=NONE if exists('g:buftabline_enable') hi BufTabLineActive ctermbg=69 endif @@ -49,17 +49,17 @@ endif "}}} "{{{ Statusline -"hi StatusLine ctermfg=0 ctermbg=38 cterm=NONE +"hi StatusLine ctermfg=0 ctermbg=38 cterm=NONE hi StatusLine ctermfg=NONE ctermbg=125 cterm=NONE hi StatusLineNC ctermfg=144 ctermbg=238 cterm=NONE "}}} "{{{ Diff -hi DiffChange ctermfg=10 ctermbg=17 cterm=NONE -hi DiffText ctermfg=10 ctermbg=88 cterm=NONE -hi DiffAdd ctermfg=10 ctermbg=17 cterm=NONE -hi DiffDelete ctermfg=10 ctermbg=17 cterm=NONE +hi DiffChange ctermfg=10 ctermbg=17 cterm=NONE +hi DiffText ctermfg=10 ctermbg=88 cterm=NONE +hi DiffAdd ctermfg=10 ctermbg=17 cterm=NONE +hi DiffDelete ctermfg=10 ctermbg=17 cterm=NONE "}}} "{{{ Popup Menu @@ -137,7 +137,7 @@ hi Conditional ctermfg=11 ctermbg=NONE cterm=NONE "hi CTagsClass "hi Underlined "hi clear -"hi SpecialComment +"hi SpecialComment "}}} "% vim:fen:fdm=marker:fmr={{{,}}}:fdl=0:fdc=1 @@ -38,12 +38,12 @@ call vundle#end() "{{{ Plugin Config let s:gEnabledPlugins = [] -function! s:ParseVimrcForEnabledPlugins() +function! s:ParseVimrcForEnabledPlugins() let l:vimrc = readfile($MYVIMRC) let l:i = 0 while 1 let l:i = match(l:vimrc, '^Plugin', l:i+1) - if l:i == -1 + if l:i == -1 break endif call add(s:gEnabledPlugins, split(l:vimrc[l:i], "'")[1]) @@ -149,12 +149,17 @@ set noautoread " don't automatically re-read changed files. set number " display line numbers set relativenumber " display relative line numbers -set cursorline " cursor line highlighting -set cursorcolumn " cursor column highlighting +"set cursorline " cursor line highlighting +"set cursorcolumn " cursor column highlighting set virtualedit=block set list " show invisible character set listchars=tab:>-,trail:-,precedes:<,extends:> +augroup aug:HighlightTrailingWhitespace + autocmd! + autocmd BufEnter * 2match Error /\s\+$/ + autocmd BufLeave * 2match none +augroup end "}}} "{{{ Default Keymap Shadow @@ -215,7 +220,7 @@ augroup end "set expandtab " expand tabs to spaces set tabstop=3 " number of columns a tab counts -set shiftwidth=3 " number of columns text is indented +set shiftwidth=3 " number of columns text is indented set softtabstop=3 " number of columns tab counts in insert mode set shiftround " rounds indent to a multiple of shiftwidth @@ -239,7 +244,7 @@ execute "vnoremap <leader>r \"hy:%s/<C-r>h/<C-r>h/gc"repeat('<Left>', 4) set hidden " do not unload abandoned buffers noremap <leader>q :bd -" navigate between different buffers +" navigate between different buffers nnoremap <S-Left> :bprevious<CR> nnoremap <S-Right> :bnext<CR> nnoremap <S-h> :bprevious<CR> @@ -299,7 +304,7 @@ function! DynamicStatuslineHighlighting() execute 'hi! StatusLine ctermfg=NONE ctermbg=226 cterm=NONE' endif return '' -endfunction +endfunction let &statusline='' let &statusline.='%{DynamicStatuslineHighlighting()}' @@ -310,7 +315,7 @@ let &statusline.=' [%{&ft}]' "filetype let &statusline.='%=' " seperator between left and right alignment if v:version >= 800 - let &statusline.=' [A:%{GetAsyncJobStatus()}]' + let &statusline.=' [A:%{GetAsyncJobStatus()}]' endif let &statusline.=' [%b:0x%B]' " dec:hex ascii value of char under cursor let &statusline.=' [%l/%L -- %c]' " current line/num of lines -- current columen @@ -441,7 +446,7 @@ if v:version>=800 endfor echom l:cmd - let s:gAsyncJob = job_start(l:cmd, { + let s:gAsyncJob = job_start(l:cmd, { \ 'out_io': 'buffer', \ 'out_buf': g:gAsyncBuffer, \ 'out_cb': function('s:StdOutCB'), @@ -511,7 +516,7 @@ if v:version>=800 endfunction command! -complete=file -nargs=* Async call s:AsyncCmdProcessor(<f-args>) - nnoremap <leader>a :Async + nnoremap <leader>a :Async nnoremap <leader>ab :execute ':buffer ' . g:gAsyncBuffer<CR> nnoremap <leader>ak :call <SID>KillAsyncJob()<CR> execute "nnoremap <leader>fg :Async find . -type f -exec grep -nH {} +"repeat('<Left>', 6) @@ -521,7 +526,7 @@ endif "{{{ Sandbox let s:sandbox_enable = 1 -if s:sandbox_enable +if s:sandbox_enable " TODO: backup file creation " when opening file (of given filetype? maybe start with c/c++) create copy in this file in file_path/.bak/file_name |