tig integration
This commit is contained in:
parent
9e784ebfee
commit
1144673bb7
2 changed files with 15 additions and 0 deletions
9
vim/.vim/findgitroot.sh
Executable file
9
vim/.vim/findgitroot.sh
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
[[ "$(pwd)" == "/" ]] && exit 1
|
||||||
|
[[ -d "./.git" ]] && break
|
||||||
|
cd ..
|
||||||
|
done
|
||||||
|
|
||||||
|
exec $@
|
|
@ -129,6 +129,11 @@ function! IsModified()
|
||||||
endif
|
endif
|
||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:tig_status()
|
||||||
|
!~/.vim/findgitroot.sh "tig status"
|
||||||
|
endfunction
|
||||||
|
command! TigStatus call s:tig_status()
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" --- ModeColor {{{
|
" --- ModeColor {{{
|
||||||
|
@ -184,6 +189,7 @@ nnoremap <leader>rr :call RunCmdVimux()<cr>
|
||||||
nnoremap <leader>rq :call VimuxCloseRunner()<cr>
|
nnoremap <leader>rq :call VimuxCloseRunner()<cr>
|
||||||
nnoremap <silent> ; :call AddSemicolon()<cr>
|
nnoremap <silent> ; :call AddSemicolon()<cr>
|
||||||
nnoremap <silent> <leader>t :g/TODO/<cr>
|
nnoremap <silent> <leader>t :g/TODO/<cr>
|
||||||
|
nnoremap <silent> <C-G> :TigStatus<CR>
|
||||||
" 0 should find first non blank
|
" 0 should find first non blank
|
||||||
nmap 0 ^
|
nmap 0 ^
|
||||||
" Easy buffer switching
|
" Easy buffer switching
|
||||||
|
|
Loading…
Reference in a new issue