Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge remote-tracking branch 'juanpabloaj/master'

Conflicts:
	plugin/extradite.vim
  • Loading branch information...
commit 14ac68e18acb7fbf6dbe872b6108dd917fba21c3 2 parents 8e1857a + cad3761
Jez Ng authored
1  .gitignore
View
@@ -1 +1,2 @@
tags
+*un~
6 .gitremotes
View
@@ -0,0 +1,6 @@
+adamreeve git://github.com/adamreeve/vim-extradite.git (fetch)
+adamreeve git://github.com/adamreeve/vim-extradite.git (push)
+int3 https://github.com/int3/vim-extradite.git (fetch)
+int3 https://github.com/int3/vim-extradite.git (push)
+origin git@github.com:juanpabloaj/vim-extradite.git (fetch)
+origin git@github.com:juanpabloaj/vim-extradite.git (push)
3  doc/extradite.txt
View
@@ -16,6 +16,9 @@ COMMANDS *extradite-commands*
current window. Adding |!| makes it open in a vertical
split instead. The width of the split is set with
*g:extradite_width*
+ To show abbreviated commit hashes in the buffer, set
+ *g:extradite_showhash*
+ to 1 in your .vimrc
MAPPINGS *extradite-mappings*
19 plugin/extradite.vim
View
@@ -12,6 +12,10 @@ if !exists('g:extradite_width')
let g:extradite_width = 60
endif
+if !exists('g:extradite_showhash')
+ let g:extradite_showhash = 0
+endif
+
autocmd User Fugitive command! -buffer -bang Extradite :execute s:Extradite(<bang>0)
autocmd Syntax extradite call s:ExtraditeSyntax()
@@ -69,7 +73,11 @@ function! s:ExtraditeLoadCommitData(bang, base_file_name, template_cmd, ...) abo
endif
let git_cmd = fugitive#buffer().repo().git_command()
- let cmd = a:template_cmd + ['--pretty=format:\%an \%d \%s', '--', path]
+ if (g:extradite_showhash)
+ let cmd = a:template_cmd + ['--pretty=format:\%h \%an \%d \%s', '--', path]
+ else
+ let cmd = a:template_cmd + ['--pretty=format:\%an \%d \%s', '--', path]
+ endif
let basecmd = call(fugitive#buffer().repo().git_command,cmd,fugitive#buffer().repo())
let extradata_cmd = a:template_cmd + ['--pretty=format:%h %ad', '--', path]
let extradata_basecmd = call(fugitive#buffer().repo().git_command,extradata_cmd,fugitive#buffer().repo())
@@ -167,7 +175,13 @@ endfunction
function! s:ExtraditeSyntax() abort
let b:current_syntax = 'extradite'
- syn match ExtraditeLogName "\(\w\| \)\+\t"
+ if (g:extradite_showhash)
+ syn match ExtraditeLogId "^\(\w\)\+"
+ syn match ExtraditeLogName "\t\(\w\| \)\+\t"
+ hi def link ExtraditeLogId Comment
+ else
+ syn match ExtraditeLogName "^\(\w\| \)\+\t"
+ endif
syn match ExtraditeLogTag "(.*)\t"
hi def link ExtraditeLogName String
hi def link ExtraditeLogTag Identifier
@@ -234,6 +248,7 @@ function! s:SimpleDiff(git_cmd,a,b) abort
setlocal ft=diff buftype=nofile nomodifiable
let b:files = { 'a': a:a, 'b': a:b }
+ normal! zR
keepjumps wincmd p
endfunction
Please sign in to comment.
Something went wrong with that request. Please try again.