summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjohannst <stoelp@eit.uni-kl.de>2017-11-10 13:18:56 +0100
committerjohannst <stoelp@eit.uni-kl.de>2017-11-10 13:18:56 +0100
commit13f044cc4dff561ac1e3d860c9a30925fff50c35 (patch)
treed9817806040d1744fe64a88c443a721f8f401f8a
parente949324f2730213366f9b502fefe0812508b9103 (diff)
downloaddotfiles-13f044cc4dff561ac1e3d860c9a30925fff50c35.tar.gz
dotfiles-13f044cc4dff561ac1e3d860c9a30925fff50c35.zip
vimrc: added keymap for diff open windows and diffoff all diffs + added diff status in statusline
-rw-r--r--vimrc10
1 files changed, 10 insertions, 0 deletions
diff --git a/vimrc b/vimrc
index 0f95cfe..87df409 100644
--- a/vimrc
+++ b/vimrc
@@ -169,6 +169,8 @@ augroup end
set clipboard=unnamed " additionally use (") register as clipboard to (+) register
nnoremap <leader>w :set wrap!<CR>
+nnoremap <leader>dw :windo diffthis<CR>
+nnoremap <leader>dn :diffoff!<CR>
"}}}
"{{{ Default Keymap Shadow
@@ -317,11 +319,19 @@ 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.=' [%{&ft}]' "filetype
let &statusline.='%=' " seperator between left and right alignment