Attached: File1.jpg

On Tue, November 20, 2012 17:16, Eric Smith wrote:
> No Christian, perhpas it not clear enough.
>
> If course they are pseudo headers.
>
> So in my vim when composing (usually large) emails. I develop a
> collection of *pseudo* headers like in the block below.
> Then I copy and paste these in the text with descriptions and
> comments relevant to each header.
>
> So I want to copy and paste a grammatically more useful *pseudo*
> header text. Of course mutt could be made to accept anything
> unique as this pseudo header, so I asked if it is changeable
> without a hack of the source.
>
> Thats all.

Since your are using Vim, you can make Vim convert your new pseudo-
header to the one mutt expects using an autocommands (let's say BufWrite
autocommand):

augroup MyMailGroup
    au!
    au InsertEnter <buffer> let _a=winsaveview()
        \ 1,/^$/s/^\(Attach\)\(:.*$\)/\1ed\2/e
        \ call winrestview(_a)
    au BufWrite <buffer> let _a=winsaveview()
        \ 1,/^$/s/^\(Attach\)ed\(:.*$\)/\1\2/e
        \ call winrestview(_a)
augroup END

Put that into a file called ~/.vim/after/ftplugin/mail.vim and it
should work. (Make sure, your vimrc includes a :filetype plugin on
statement to have vim load filetype specific settings)

regards,
Christian

Reply via email to