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
autocrlf = input
[merge]
tool = vimdiff
conflictstyle = diff3
prompt = false
[color]
branch = auto
diff = auto

17
.vimrc
View File

@ -15,6 +15,7 @@ set softtabstop=2
set expandtab
set listchars=tab:>-,trail:-
set list
set noshowmode
syntax on
filetype on
@ -27,12 +28,17 @@ nmap n nzz
nmap N Nzz
let g:lightline = {
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
\ },
\ 'component_function': {
\ 'gitbranch': 'gitbranch#name'
\ },
\ 'component': {
\ 'readonly': '%{&readonly?"":""}',
\ },
\ 'separator': { 'left': '', 'right': '' },
\ 'subseparator': { 'left': '', 'right': '' }
\ }
\}
map <C-p> :NERDTreeToggle<CR>
" automatically close vim if the only window open is nerdtree
@ -54,3 +60,8 @@ autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
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>