Created
June 4, 2016 23:03
-
-
Save rgrinberg/a4fee40ee917836a60a253d564830d6d to your computer and use it in GitHub Desktop.
This file contains 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! 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