diff options
author | johannst <stoelp@eit.uni-kl.de> | 2017-11-10 13:18:56 +0100 |
---|---|---|
committer | johannst <stoelp@eit.uni-kl.de> | 2017-11-10 13:18:56 +0100 |
commit | 13f044cc4dff561ac1e3d860c9a30925fff50c35 (patch) | |
tree | d9817806040d1744fe64a88c443a721f8f401f8a | |
parent | e949324f2730213366f9b502fefe0812508b9103 (diff) | |
download | dotfiles-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-- | vimrc | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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 |