On Tue, Feb 10, at 09:00 Tom Link wrote: > > > For example, with a such entry in my aliases file : > > alias chuck Chuck Nurris <his.em...@invalid.invalid> > > could have a (case insensitive) completion based on the alias, the first > > name, name or the email. > > The simplest solution would be to keep the e-mails in a dictionary but > that wouldn't meet your requirements. I think you could write a > completefunc, that reads the file with readfile() and returns a list > of lines (but without the alias part) that match the arglead. >
Here is one I use, (substitute the path to your aliases file): function! Reademailaddress(A,L,P) let list = readfile(expand("$HOME")."/.mutt/aliases") call map(list, 'substitute(v:val, ''.*<\(.*\)>'', ''\1'', ''g'')') return filter(list[0:-2], 'v:val =~ "^".a:A') endfunction call input("To: ", "", "customlist,Reademailaddress") Regards, Ag. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---