dictionary completion for words including `@' sign

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

dictionary completion for words including `@' sign

ericmsmith
I don't only want to enjoy autocomplete of my contacts when in gmail, but also
for my mutt.

I have a file with all my email addresses and
set dict=emails.txt.

When I complete with dictionary completion (mapped to <tab>), then I only receive
the first part of the email addresses, like,

foo<tab>
foo.bar

How do I return
foo<tab>
[hidden email]

And if I go.
<tab>
it expands to
foo.bar
baz

Here are one of the many settings of isfname, that I tried, all
without a breakthrough;
set isfname=@,48-57,/,\\,.,-,_,+,,,#,$,%,{,},[,],:,@-@,!,~,=

what gives?

Eric

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: dictionary completion for words including `@' sign

Nikolay Aleksandrovich Pavlov
2016-05-19 21:40 GMT+03:00 Eric Smith <[hidden email]>:

> I don't only want to enjoy autocomplete of my contacts when in gmail, but also
> for my mutt.
>
> I have a file with all my email addresses and
> set dict=emails.txt.
>
> When I complete with dictionary completion (mapped to <tab>), then I only receive
> the first part of the email addresses, like,
>
> foo<tab>
> foo.bar
>
> How do I return
> foo<tab>
> [hidden email]
>
> And if I go.
> <tab>
> it expands to
> foo.bar
> baz
>
> Here are one of the many settings of isfname, that I tried, all
> without a breakthrough;
> set isfname=@,48-57,/,\\,.,-,_,+,,,#,$,%,{,},[,],:,@-@,!,~,=
>
> what gives?
>
> Eric
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.


Why &isfname? Given that &dict option documentation speaks about
“words” and “keyword characters” I guess you need &iskeyword.

Note that altering this may break some syntax files. Also many syntax
and filetype files have no idea that &iskeyword is a *user* setting
and they should even use `:syntax iskeyword` and not `setlocal
iskeyword=…` (added only recently!).

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: dictionary completion for words including `@' sign

ericmsmith
In reply to this post by ericmsmith

I worked exhaustively on iskeyword and then followed some advice
to set isfname. Neither of the help descriptions of these two
settings were clear descriptions of their function (to me).

It do not need syntax highlighting in my vims spawned from mutt,
but I do want email address completion!

So still, any takers?

ciao
E

>Why &isfname? Given that &dict option documentation speaks about
>“words” and “keyword characters” I guess you need &iskeyword.
>
>Note that altering this may break some syntax files. Also many syntax
>and filetype files have no idea that &iskeyword is a *user* setting
>and they should even use `:syntax iskeyword` and not `setlocal
>iskeyword=…` (added only recently!).


Eric Smith wrote on Thu-19-May 16  8:40PM

>> I don't only want to enjoy autocomplete of my contacts when in gmail, but also
>> for my mutt.
>>
>> I have a file with all my email addresses and
>> set dict=emails.txt.
>>
>> When I complete with dictionary completion (mapped to <tab>), then I only receive
>> the first part of the email addresses, like,
>>
>> foo<tab>
>> foo.bar
>>
>> How do I return
>> foo<tab>
>> [hidden email]
>>
>> And if I go.
>> <tab>
>> it expands to
>> foo.bar
>> baz
>>
>> Here are one of the many settings of isfname, that I tried, all
>> without a breakthrough;
>> set isfname=@,48-57,/,\\,.,-,_,+,,,#,$,%,{,},[,],:,@-@,!,~,=
>>
>> what gives?
>>
>> Eric

--
Eric Smith

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: dictionary completion for words including `@' sign

Erik Christiansen
On 20.05.16 09:56, Eric Smith wrote:
> It do not need syntax highlighting in my vims spawned from mutt,
> but I do want email address completion!

If including '@' in a vim dictionary remains problematic, the fact that
you're using mutt provides an alternative method. Mutt email aliases
allow the user to work with more human-friendly recipient names than
long-winded and cryptic email addresses - all without swearword letters. ;-)

Once headed down the path of short aliases for recipients, there's also
groups, e.g. "family", "bicycle_club", or whatever, so one soon steps
back entirely from any concern over what the actual low-level email
address might be.

The ease of focusing on What, rather than How, leaves more mental energy
for other stuff, I find. I'm never going to remember the email address
of the local shire council, but mutt knows what I mean when I address a
missive to "council", and I don't need to use any effort or swearword
letters.

Erik

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: dictionary completion for words including `@' sign

Bram Moolenaar
In reply to this post by Nikolay Aleksandrovich Pavlov

Nikolay Pavlov wrote:

> 2016-05-19 21:40 GMT+03:00 Eric Smith <[hidden email]>:
> > I don't only want to enjoy autocomplete of my contacts when in gmail, but also
> > for my mutt.
> >
> > I have a file with all my email addresses and
> > set dict=emails.txt.
> >
> > When I complete with dictionary completion (mapped to <tab>), then I only receive
> > the first part of the email addresses, like,
> >
> > foo<tab>
> > foo.bar
> >
> > How do I return
> > foo<tab>
> > [hidden email]
> >
> > And if I go.
> > <tab>
> > it expands to
> > foo.bar
> > baz
> >
> > Here are one of the many settings of isfname, that I tried, all
> > without a breakthrough;
> > set isfname=@,48-57,/,\\,.,-,_,+,,,#,$,%,{,},[,],:,@-@,!,~,=
> >
> > what gives?
> >
> > Eric
>
> Why &isfname? Given that &dict option documentation speaks about
> “words” and “keyword characters” I guess you need &iskeyword.
>
> Note that altering this may break some syntax files. Also many syntax
> and filetype files have no idea that &iskeyword is a *user* setting
> and they should even use `:syntax iskeyword` and not `setlocal
> iskeyword=…` (added only recently!).

You can indeed set 'iskeyword', e.g.:
        :set iskeyword+=.,@-@

However, this has many side effects.  I had a vague plan to split
'iskeyword' into a group of options, where it applies in different
situations. But that didn't get realized yet.

A workaround is to remap certain keys, e.g. Tab, to set the option,
perform the operation, and restore the option.

--
Hacker: Someone skilled in computer programming (good guy).
Cracker: A hacker that uses his skills to crack software (bad guy).

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: dictionary completion for words including `@' sign

Christian Brabandt
In reply to this post by ericmsmith
Hi Eric!

On Fr, 20 Mai 2016, Eric Smith wrote:

>
> I worked exhaustively on iskeyword and then followed some advice
> to set isfname. Neither of the help descriptions of these two
> settings were clear descriptions of their function (to me).
>
> It do not need syntax highlighting in my vims spawned from mutt,
> but I do want email address completion!

I have documented my vim and mutt setup here:
http://www.256bit.org/~chrisbra/cms/vim_as_e-mail_editor.html

Unfortunately, the last upgrade broke mod_userdir, so this page gives
currently 403. I am trying to get this back online, but it might take
some time.

The wayback machine has it still here:
https://web.archive.org/web/20150111032455/http://www.256bit.org/~chrisbra/cms/vim_as_e-mail_editor.html

Mit freundlichen Grüßen
Christian

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: dictionary completion for words including `@' sign

Chong He
In reply to this post by ericmsmith
It sounds like what snippet is for? Have you tried making snippets for the email addresses or even signature?

On Friday, May 20, 2016 at 2:40:40 AM UTC+8, Eric Smith wrote:

> How do I return
> foo<tab>
> [hidden email]
>
> And if I go.
> <tab>
> it expands to
> foo.bar
> baz
>
> what gives?
>
> Eric
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.