From f5d56602df70950de6b7d40966b00c9939c81763 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Sun, 26 Jan 2020 17:16:07 +0100 Subject: Intial commit of v2 See https://drewdevault.com/2019/12/30/dotfiles.html --- .vim/after/ftplugin/diff.vim | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .vim/after/ftplugin/diff.vim (limited to '.vim/after/ftplugin/diff.vim') diff --git a/.vim/after/ftplugin/diff.vim b/.vim/after/ftplugin/diff.vim new file mode 100644 index 0000000..49974ec --- /dev/null +++ b/.vim/after/ftplugin/diff.vim @@ -0,0 +1,33 @@ +" disable annoying plugins +let b:coc_enabled = 0 +silent NeomakeDisable + +command! FindMergeMarker execute 'normal /^<<<<<<' + +" shortcuts for 3-way merges +command! DiffGetLocal :diffget LOCAL +command! DiffGetRemote :diffget REMOTE +" quicksave +command! DiffSave :wqa + +cnoreabbrev fmm FindMergeMarker +cnoreabbrev dgl DiffGetLocal +cnoreabbrev dgr DiffGetRemote +cnoreabbrev ds DiffSave + + +let s:markers = { + \ 'ours': '^<<<<<<< ', + \ 'theirs': '^>>>>>>> ', + \ 'base': '^||||||| ', + \ 'delimiter': '^=======\r\?$', + \ } + +if &diff + " set custom ctags in diff mode + + let _ft=&filetype + let g:vista_ctags_cmd = { + \ _ft: 'ctags --format=2 --excmd=pattern --fields=nksSaf --file-scope=yes --sort=no --append=no --output-format=json --fields=-PF -f-', + \ } +endif -- cgit 1.4.1