mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-04-14 15:19:12 +08:00
Change git log pretty format
This commit is contained in:
parent
5b7607a11a
commit
25005c4a72
@ -1,9 +1,9 @@
|
||||
let s:JOB = SpaceVim#api#import('job')
|
||||
let s:BUFFER = SpaceVim#api#import('vim#buffer')
|
||||
|
||||
let g:git_log_pretty = "tformat:%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%an %ad)%Creset"
|
||||
let g:git_log_pretty = 'tformat:%Cred%h%Creset - %s %Cgreen(%an %ad)%Creset'
|
||||
|
||||
function! git#log#run(...)
|
||||
function! git#log#run(...) abort
|
||||
if len(a:1) == 1 && a:1[0] ==# '%'
|
||||
let cmd = ['git', 'log', '--graph', '--date=relative', '--pretty=' . g:git_log_pretty, expand('%')]
|
||||
else
|
||||
@ -53,7 +53,7 @@ function! s:openLogBuffer() abort
|
||||
return bufnr('%')
|
||||
endfunction
|
||||
|
||||
function! git#log#complete(ArgLead, CmdLine, CursorPos)
|
||||
function! git#log#complete(ArgLead, CmdLine, CursorPos) abort
|
||||
|
||||
return "%\n" . join(getcompletion(a:ArgLead, 'file'), "\n")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user