add configuration for `git mergetool` and update lightline config
parent
ee5fff3d14
commit
e2e4cdfad8
|
@ -10,6 +10,11 @@
|
|||
eol = lf
|
||||
autocrlf = input
|
||||
|
||||
[merge]
|
||||
tool = vimdiff
|
||||
conflictstyle = diff3
|
||||
prompt = false
|
||||
|
||||
[color]
|
||||
branch = auto
|
||||
diff = auto
|
||||
|
|
17
.vimrc
17
.vimrc
|
@ -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>
|
||||
|
|
Reference in New Issue