I love usig the mutt mail reader to turn through my
mail. I recently set it up to make use of my MacVim installation by adding the
following configuration to the
set editor="mvim --remote-tab-wait-silent "
This is pretty neat. When I go to reply or compose, I’m thrown into a new tab
in MacVim and I can compose / reply there. After hitting
properly handled the signal, but didn’t change OSX’s focus back to the
terminal window where Mutt was running. By changing the
editor to the
set editor="osascript $HOME/bin/mutt_edit.sh"
I was able to tell Mutt to send my temp file (for the edit) to
utility that runs Applscript. In
mutt_edit.sh I provided a bit of a wrapper
mvim command such that it told OSX to re-activate my terminal
session after the editing activity finished. Here’s the code:
on run argv tell application "Finder" do shell script "mvim --remote-tab-wait-silent " & item 1 of argv end tell tell application "iTerm (220.127.116.1111020)" activate end tell end run
And that’s all it took.