mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-23 02:35:38 +01:00
git gutter + diffbase
This commit is contained in:
parent
85754df59b
commit
286471343e
1 changed files with 31 additions and 0 deletions
31
.vimrc
31
.vimrc
|
|
@ -18,6 +18,9 @@ set rtp+=~/.vim/bundle/vim-jsonnet/syntax/
|
|||
set rtp+=~/.vim/bundle/vim-jsonnet/ftdetect/
|
||||
set ignorecase
|
||||
set smartcase
|
||||
|
||||
" Reduce update time so that Git Gutter updates more quickly
|
||||
set updatetime=100
|
||||
call vundle#rc()
|
||||
|
||||
" let Vundle manage Vundle
|
||||
|
|
@ -57,6 +60,7 @@ Bundle 'google/vim-maktaba'
|
|||
Bundle 'bazelbuild/vim-bazel'
|
||||
Bundle 'chr4/nginx.vim'
|
||||
Bundle 'spwhitt/vim-nix'
|
||||
Bundle 'airblade/vim-gitgutter'
|
||||
" Bundle 'ensime/ensime-vim'
|
||||
|
||||
" Scala Bundles
|
||||
|
|
@ -149,6 +153,11 @@ autocmd FileType tex set nowrap
|
|||
autocmd InsertLeave *.tex highlight OverLength ctermbg=darkred ctermfg=white guibg=#FFD9D9
|
||||
autocmd InsertLeave *.tex match OverLength /\%82v.*/
|
||||
|
||||
augroup jsonnet_template
|
||||
au!
|
||||
autocmd BufNewFile,BufRead *.jsonnet.template set syntax=jsonnet
|
||||
augroup END
|
||||
|
||||
" automatically change window's cwd to file's dir
|
||||
set noautochdir
|
||||
|
||||
|
|
@ -247,3 +256,25 @@ command! -register CopyMatches call CopyMatches(<q-reg>)
|
|||
noremap <F5> :Autoformat<CR>
|
||||
let g:formatdef_scalafmt = '"scalafmt --config .scalafmt.conf"'
|
||||
let g:formatters_scala = ['scalafmt']
|
||||
|
||||
function! DiffBase(...)
|
||||
" Get the commit hash if it was specified
|
||||
let commit = a:0 == 0 ? 'databricks/master' : a:1
|
||||
|
||||
" Get the result of git show in a list
|
||||
let flist = system('git diff --name-only ' . commit . '...HEAD | grep -v zzz')
|
||||
let flist = split(flist, '\n')
|
||||
|
||||
" Create the dictionnaries used to populate the quickfix list
|
||||
let list = []
|
||||
for f in flist
|
||||
let dic = {'filename': f, "lnum": 1}
|
||||
call add(list, dic)
|
||||
endfor
|
||||
|
||||
" Populate the qf list
|
||||
call setqflist(list)
|
||||
|
||||
" Open the quickfix list
|
||||
vertical topleft cwindow
|
||||
endfunction
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue