My hero of the day is
sec.I guess all mutt/ng users know the problem that they forget to attach files to a mail because they don't think of it after writing it.
map __a_start :imap <C-V><CR> <C-O>__a_cmd\|imap <C-V><ESC> <C-V><ESC>__a_end\|imap <C-V><C-V><C-V><C-I> <C-V><C-N>\|imap <C-V><C-N> <C-V><C-X><C-V><C-F><CR>
noremap __a_end :iunmap <C-V><CR>\|iunmap <C-V><ESC>\|iunmap <C-V><C-V><C-V><C-I>\|iunmap <C-V><C-V><C-V><C-N><CR>dd`a:"ended.<CR>
noremap __a_cmd oAttach:<Space>
noremap __a_scmd 1G/^$/<CR>:noh<CR>OAttach:<Space>
map ,A ma__a_start__a_scmd
This
vim mapping auto-inserts the pseudo "Attach:" header to your mail which has a file as argument. You can also use to do file and path completion.
Be sure the the edit_headers option is set in your mutt/ngrc. You use the mapping with ,A and mark the end of it with .
Sec used ,a for this, I am using ,A because I am already using the great
map <LEADER>a G/^* /e+1<CR>ye1G}oHallo <c-r>",<cr><ESC>
mapping to greet the other.