Is anybody using this feature?
One thing that I find mildly frustrating with mutt, is that once you
fire up the editor, you no longer have access to mutt's message browsing
capabilities.
For instance, when I'm in the middle of replying to a message and I need
to refer to other messages, I have to save the message I am currently
composing, exit the send menu where I am automatically directed, and
postpone the message before I can do anything else.
Then, after I have found what I was looking for, I need to recall the
message so that I can resume composition.
So as to avoid the above, I usually have a second instance of mutt
running in another window that I can switch to when I'm in editor mode
in the first mutt instance in the event, I should I need to browse the
contents of my mail boxes.
Over the weekend, I ran into vim's "clientserver" feature and thought
I'd give that a try and see if I could improve on my current setup.
Barring a few glitches, I pretty much got it to work, in my context,
although I haven't quite been able to make the whole thing as user
friendly and automated as I had hoped, mainly due to my imperfect
knowledge of mutt and vim's capabilites.
What I do is that I fire up an xterm, and start GNU/screen with a mutt
session and a vim server session in separate halves of a split window.
Vim is started via a 'vim --servername MAIL' command. In mutt, the
editor variable is set to 'vim --servername MAIL --remote'.
With this setup, hitting 'r', 'L', 'g' for replies or 'm' for new
messages in the mutt half of the display, causes the vim window in the
other half to display the corresponding message, ready to be edited.
Once I am done editing, I hit a key that I have mapped to a vim macro
that does some housekeeping and starts a second instance of mutt from
the vim session, which I have set up to take me directly to mutt's send
menu where I have access to all the usual functionalities - spell
checking, attaching files, etc.
Once the message is finalized, I hit 'y' to send and proceed to exit
the transient mutt instance to return to my vim session.
As seen by the user, this setup pretty much feels as if mutt were
running vim in a sub-window, alongside with the index and the pager,
with the ability to switch between them.
It also benefits from vim's tabbing capabilities, where you can for
instance start composing several messages concurrently in separate tabs,
say, if you were in the middle of writing something fairly involved like
the current message :-) and suddenly remember something more urgent.
As hinted earlier there are some glitches and limitations.
Since the vim clientserver capability has been around for quite some
time, I wouldn't be surprised if someone else had already come up with a
similar idea and hopefully an implementation that might be both more
robust and user-friendly.
Thanks,
Gen-Paul.