add configuration for `git mergetool` and update lightline config

master
Andrew Coleman 2019-07-24 12:00:22 -04:00
parent ee5fff3d14
commit e2e4cdfad8
2 changed files with 19 additions and 3 deletions

View File

@ -10,6 +10,11 @@
eol = lf eol = lf
autocrlf = input autocrlf = input
[merge]
tool = vimdiff
conflictstyle = diff3
prompt = false
[color] [color]
branch = auto branch = auto
diff = auto diff = auto

17
.vimrc
View File

@ -15,6 +15,7 @@ set softtabstop=2
set expandtab set expandtab
set listchars=tab:>-,trail:- set listchars=tab:>-,trail:-
set list set list
set noshowmode
syntax on syntax on
filetype on filetype on
@ -27,11 +28,16 @@ nmap n nzz
nmap N Nzz nmap N Nzz
let g:lightline = { let g:lightline = {
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
\ },
\ 'component_function': {
\ 'gitbranch': 'gitbranch#name'
\ },
\ 'component': { \ 'component': {
\ 'readonly': '%{&readonly?"":""}', \ 'readonly': '%{&readonly?"":""}',
\ }, \ }
\ 'separator': { 'left': '', 'right': '' },
\ 'subseparator': { 'left': '', 'right': '' }
\} \}
map <C-p> :NERDTreeToggle<CR> map <C-p> :NERDTreeToggle<CR>
@ -54,3 +60,8 @@ autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/ autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/ autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd BufWinLeave * call clearmatches() autocmd BufWinLeave * call clearmatches()
" shortcuts for 3-way merge
map <Leader>1 :diffget LOCAL<CR>
map <Leader>2 :diffget BASE<CR>
map <Leader>3 :diffget REMOTE<CR>