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 --- vimrc | 43 ++++++++++++++++++------------------------- 1 file changed, 18 insertions(+), 25 deletions(-) (limited to 'vimrc') 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