summary refs log tree commit diff
path: root/.vim/after/ftplugin/diff.vim
blob: 49974ec1ac7d4e5237df25baad2d852a11c66256 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
" disable annoying plugins
let b:coc_enabled = 0
silent NeomakeDisable

command! FindMergeMarker execute 'normal /^<<<<<<</<CR>'

" 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