Skip to content

Instantly share code, notes, and snippets.

@rgrinberg
Created June 4, 2016 23:03
Show Gist options
  • Save rgrinberg/a4fee40ee917836a60a253d564830d6d to your computer and use it in GitHub Desktop.
Save rgrinberg/a4fee40ee917836a60a253d564830d6d to your computer and use it in GitHub Desktop.
function! InsertMyArg(e)
let @i = a:e
call feedkeys('"ip')
endfunction
function! s:complete_email(A, L, P)
if a:A
return ""
else
let query = substitute(a:A, '\*', '', 'g')
return system("nottoomuch-addresses.sh " . query)
endif
endfunction
command! -complete=custom,s:complete_email -nargs=1 Iemail call InsertMyArg('<args>')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment