Created
June 18, 2014 14:09
-
-
Save scheakur/56fb1aa81f12c1333cf0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:complete_log(findstart, base) | |
if a:findstart == 1 | |
return col('.') | |
endif | |
let cmd = '\git log --pretty=format:%s --author=`\git config user.name` -30' | |
return split(system(cmd), '\n') | |
endfunction | |
function! s:fname(name) | |
let sid = matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze_fname$') | |
return printf('<SNR>%s_%s', sid, a:name) | |
endfunction | |
execute 'setlocal omnifunc=' . s:fname('complete_log') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment