From 7de4fef9947d63dc12d5f0fde9f19d58f38517b5 Mon Sep 17 00:00:00 2001 From: johannst Date: Thu, 19 Apr 2018 10:31:08 +0200 Subject: vim minor changes in colorscheme and cleanup in statusline --- vim/colors/johannst.vim | 22 +++++++++++----------- vimrc | 43 ++++++++++++++++++------------------------- 2 files changed, 29 insertions(+), 36 deletions(-) diff --git a/vim/colors/johannst.vim b/vim/colors/johannst.vim index 00bec44..b09b9f8 100755 --- a/vim/colors/johannst.vim +++ b/vim/colors/johannst.vim @@ -11,11 +11,11 @@ if exists("syntax_on") endif hi clear -"{{{ Vim Basic +"{{{ Vim Basic hi Normal ctermfg=253 ctermbg=234 cterm=NONE -hi Search ctermfg=0 ctermbg=11 cterm=NONE -hi IncSearch ctermfg=0 ctermbg=11 cterm=NONE +hi Search ctermfg=198 ctermbg=NONE cterm=underline +hi IncSearch ctermfg=198 ctermbg=NONE cterm=underline hi Folded ctermfg=146 ctermbg=238 cterm=NONE hi FoldColumn ctermfg=122 ctermbg=238 cterm=NONE hi Title ctermfg=230 ctermbg=NONE cterm=bold @@ -25,19 +25,19 @@ 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 +hi MatchParen ctermfg=0 ctermbg=82 cterm=NONE "}}} -"{{{ Cursor & LineNumber +"{{{ Cursor & LineNumber "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 CursorLine ctermfg=NONE ctermbg=236 cterm=NONE hi CursorColumn ctermfg=NONE ctermbg=236 cterm=NONE -hi MatchParen ctermfg=208 ctermbg=89 cterm=underline "}}} -"{{{ Tabline +"{{{ Tabline hi TabLine ctermbg=235 ctermfg=244 cterm=none hi TabLineSel ctermbg=208 ctermfg=255 cterm=bold @@ -47,14 +47,14 @@ if exists('g:buftabline_enable') endif "}}} -"{{{ Statusline +"{{{ Statusline "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 +"{{{ Diff hi DiffChange ctermfg=10 ctermbg=17 cterm=NONE hi DiffText ctermfg=10 ctermbg=88 cterm=NONE @@ -62,7 +62,7 @@ hi DiffAdd ctermfg=10 ctermbg=17 cterm=NONE hi DiffDelete ctermfg=10 ctermbg=17 cterm=NONE "}}} -"{{{ Popup Menu +"{{{ Popup Menu hi PMenu ctermfg=NONE ctermbg=235 cterm=NONE hi PMenuSel ctermfg=255 ctermbg=208 cterm=NONE @@ -70,7 +70,7 @@ hi PMenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE hi PMenuThumb ctermfg=NONE ctermbg=101 cterm=NONE "}}} -"{{{ Language +"{{{ Language hi Comment ctermfg=144 ctermbg=NONE cterm=NONE hi Label ctermfg=221 ctermbg=NONE cterm=NONE @@ -108,7 +108,7 @@ hi Statement ctermfg=220 ctermbg=NONE cterm=NONE hi Conditional ctermfg=11 ctermbg=NONE cterm=NONE "}}} -"{{{ not classified yet +"{{{ not classified yet "hi Debug ctermfg=194 ctermbg=NONE cterm=NONE "hi WildMenu "hi SignColumn diff --git a/vimrc b/vimrc index b07b11e..c3c274e 100644 --- a/vimrc +++ b/vimrc @@ -14,7 +14,7 @@ nnoremap sv :source ~/.vimrc "let $VIMHOME='~/.vim' -"{{{ Plugin Management +"{{{ Plugin Management " to install plugins open vim and run :PluginInstall from within vim OR " vim +PluginInstall +qall from cmd line @@ -41,7 +41,7 @@ Plugin 'w0rp/ale' call vundle#end() "}}} -"{{{ Plugin Config +"{{{ Plugin Config let s:gEnabledPlugins = [] function! s:ParseVimrcForEnabledPlugins() @@ -195,7 +195,7 @@ nnoremap dw :windo diffthis nnoremap dn :diffoff! "}}} -"{{{ Default Keymap Shadow +"{{{ Default Keymap Shadow " lookup word under cursor in man pages nnoremap @@ -203,14 +203,14 @@ nnoremap nnoremap "}}} -"{{{ Basic Movement +"{{{ Basic Movement augroup aug:HelpPageKeyMaps autocmd! autocmd FileType help nnoremap augroup end -" ctrl-ae jump to line start/end +" ctrl-ae jump to line start/end nnoremap 0 nnoremap $ inoremap 0 @@ -226,7 +226,7 @@ cnoremap cnoremap "}}} -"{{{ Folding +"{{{ Folding set foldlevel=0 set foldcolumn=1 @@ -249,7 +249,7 @@ augroup aug:FoldMarkerKeymaps augroup end "}}} -"{{{ Tabwidth +"{{{ Tabwidth "set expandtab " expand tabs to spaces set tabstop=3 " number of columns a tab counts @@ -272,7 +272,7 @@ nnoremap n :noh execute "vnoremap r \"hy:%s/h/h/gc"repeat('', 4) "}}} -"{{{ Buffer & Splits +"{{{ Buffer & Splits set hidden " do not unload abandoned buffers noremap q :bd @@ -302,7 +302,7 @@ nnoremap h "(deprecated) map 5> "}}} -"{{{ Statusline +"{{{ Statusline set laststatus=2 " always show status line @@ -341,19 +341,12 @@ function! DynamicStatuslineHighlighting() return '' endfunction -function! GetDiffStatus() - if (&diff) - return 'diff' - else - return '' -endfunction - let &statusline='' let &statusline.='%{DynamicStatuslineHighlighting()}' let &statusline.='[%{g:ModeMap[mode()]}]' let &statusline.=' %t' " file name let &statusline.=' {%M%R%H}' " modified/read-only/help-page -let &statusline.=' [%{GetDiffStatus()}]' +let &statusline.='%{&diff==1?" [diff]":""}' let &statusline.=' [%{&ft}]' "filetype let &statusline.='%=' " seperator between left and right alignment @@ -365,7 +358,7 @@ let &statusline.=' [%l/%L -- %c]' " current line/num of lines -- current columen let &statusline.=' (%p%%)' " current line in percent "}}} -"{{{ Indentation +"{{{ Indentation nnoremap ri mzgg=G`z set autoindent " copy indent from current line when starting a new line @@ -383,7 +376,7 @@ augroup aug:CLangStyle augroup end "}}} -"{{{ Wildmenu +"{{{ Wildmenu " Vim command completion settings set wildmenu " turn on the wild menu @@ -391,7 +384,7 @@ set wildmode=list:longest " print list of all matches and complete til set wildignore+=*.o,*.obj,.git,*.pyc,*~ " Ignore these files when completing "}}} -"{{{ Save & Restore +"{{{ Save & Restore augroup aug:AutoSaveLastSession autocmd! @@ -402,7 +395,7 @@ augroup end nnoremap :execute "source " . $VIMHOME . "/session.last_quit" "}}} -"{{{ QuickFix +"{{{ QuickFix augroup aug:QuickFixConfig autocmd! @@ -411,7 +404,7 @@ augroup aug:QuickFixConfig augroup end "}}} -"{{{ SCons Integration +"{{{ SCons Integration function! TriggerSCons(...) let l:base_cmd = 'scons' @@ -427,7 +420,7 @@ endfunction command! -nargs=* SCons call TriggerSCons() "}}} -"{{{ Tmux Specific +"{{{ Tmux Specific "" tmux will send xterm-style keys when its xterm-keys option is on "if &term =~ '^screen' @@ -438,14 +431,14 @@ command! -nargs=* SCons call TriggerSCons() "endif "}}} -"{{{ Project Specific vimrc +"{{{ Project Specific vimrc if !empty(glob('.local_vimrc')) source .local_vimrc endif "}}} -"{{{ Sandbox +"{{{ Sandbox let s:sandbox_enable = 1 if s:sandbox_enable -- cgit v1.2.3