tig integration

This commit is contained in:
madmaurice 2016-11-18 19:34:08 +01:00
parent 9e784ebfee
commit 1144673bb7
2 changed files with 15 additions and 0 deletions

9
vim/.vim/findgitroot.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/bash
while true; do
[[ "$(pwd)" == "/" ]] && exit 1
[[ -d "./.git" ]] && break
cd ..
done
exec $@

View file

@ -129,6 +129,11 @@ function! IsModified()
endif
return ''
endfunction
function! s:tig_status()
!~/.vim/findgitroot.sh "tig status"
endfunction
command! TigStatus call s:tig_status()
" }}}
" --- ModeColor {{{
@ -184,6 +189,7 @@ nnoremap <leader>rr :call RunCmdVimux()<cr>
nnoremap <leader>rq :call VimuxCloseRunner()<cr>
nnoremap <silent> ; :call AddSemicolon()<cr>
nnoremap <silent> <leader>t :g/TODO/<cr>
nnoremap <silent> <C-G> :TigStatus<CR>
" 0 should find first non blank
nmap 0 ^
" Easy buffer switching