]> git.madduck.net Git - code/mailplate.git/blobdiff - README

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

add vim/mutt config to README
[code/mailplate.git] / README
diff --git a/README b/README
index 04f395d00f8b87c44e904c83e675ec79296bb6c6..76fb2ef2110a73106ff0c1c9da1996a23ba07e0c 100644 (file)
--- a/README
+++ b/README
@@ -7,6 +7,26 @@ find an example configuration and template files in
 
 The tool will install defaults in your home directory in first invocation.
 
+I have the following settings in my muttrc and vimrc:
+
+~/.mutt/muttrc:
+  set editor="~/.bin/mail/mailplate --edit --auto --keep-unknown"
+
+~/.mutt/keybindings:
+  #TODO this is a hack until mailplate does not readd headers.
+  macro compose     e ':set my_editor="$editor"<enter>:set editor=sensible-editor<enter><edit-headers>:set editor="$my_editor"<enter>' "invoke normal editor to edit message"
+  macro index,pager e ':set my_editor="$editor"<enter>:set editor=sensible-editor<enter><edit>:set editor="$my_editor"<enter>' "invoke normal editor to edit message"
+
+~/.vim/ftplugin/mail.vim:
+  nmap <buffer> <F1>      :w<CR>:%!mailplate --keep-unknowni --auto<CR>
+  nmap <buffer> <C-P><F1> :w<CR>:%!mailplate --keep-unknown private<CR>
+  nmap <buffer> <C-P><F2> :w<CR>:%!mailplate --keep-unknown debian<CR>
+
+Now when I reply to a message, mailplate automatically choses the right
+template, and if I later change my mind, I can press C-p,<F1> to override the
+choice and select the private template, or just hit <F1> to have it re-run the
+auto-detection.
+
 The source code is maintained in git, so if you want to contribute, use the
 following URL to clone: