Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completion is not triggered on the follow-up lines still used to provide addresses for a To:/Cc:/... header #9

Open
gwarf opened this issue Aug 1, 2024 · 2 comments

Comments

@gwarf
Copy link
Contributor

gwarf commented Aug 1, 2024

Hey @codybuell, following #7, I'm using the mail_header_only option that I like a lot.
But I realised that, maybe/likely related to my nvim setup, I have a non-optimal usage experience when I've a somewhat long list of addresses that are causing line returns, as the completion is only triggered when I'm on the line of the header.

In the example below, the completion doesn't seem to be triggered when I'm on the second line for the To:, with [email protected]. Thus, if I want to add a new address, I need to do it on the To: line, which is a bit suboptimal/counterintuitive.
Enabling completing after the headers till the next one, or to the body, if possible would be great.

From: [email protected]
To: [email protected], [email protected],
[email protected]
Cc:
Subject: Test

This is the body

Thanks!

@codybuell
Copy link
Owner

Hi @gwarf let me think on that for a bit to see if there is a good way to implement cleanly. In the meantime I'd recommend setting textwidth = 0 in your config for mail files. If you use long lines mutt will automatically switch to quoted-printable encoding which will look better than hard-wrapped lines in most mail clients, and it has the added benefit of not wrapping header lines. It needs to be set in the after directory to avoid being overwritten by vim/nvim's runtime.

~/.config/nvim/after/ftplugin/mail.lua

vim.opt_local.textwidth = 0

@gwarf
Copy link
Contributor Author

gwarf commented Aug 5, 2024

Thanks for the suggestion @codybuell, but the issue with the mail line light, is that for some emails or mailing lists/recipients it's not appropriate to send email with long lines.
I've been also using for some timeformat=flowed emails, and while I think it helps a lot on things like smartphones or tiny/unusual screens, I feel it's also a bit the same: it has some drawbacks and some people/channel still prefer or need to get hard-wrapped emails, and unfortunately I've not been able to find yet a solution that seems to play nicely with everything and everyone, so I moved a bit away from this.

If it could be possible to come up with a clean/working way to address this it would be great, otherwise I can leave with it, it's clearly not a big deal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants