1 " Vim filetype plugin file
4 " Maintainer: Simon Ruderich <simon@ruderich.org>
7 " Copyright (C) 2009-2013 Simon Ruderich
9 " This file is free software: you can redistribute it and/or modify
10 " it under the terms of the GNU General Public License as published by
11 " the Free Software Foundation, either version 3 of the License, or
12 " (at your option) any later version.
14 " This file is distributed in the hope that it will be useful,
15 " but WITHOUT ANY WARRANTY; without even the implied warranty of
16 " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 " GNU General Public License for more details.
19 " You should have received a copy of the GNU General Public License
20 " along with this file. If not, see <http://www.gnu.org/licenses/>.
23 " Use only 65 characters per line as given in rfc1855.
26 " Remove trailing whitespace after quotes.
27 silent! %s/^>.\{-}\zs\s\+$//
28 " Remove spaces between quotes (> > to >>).
29 silent! %s/^>\+\zs >/>/g
30 silent! %s/^>\+\zs >/>/g
31 silent! %s/^>\+\zs >/>/g
33 " Move directly after the headers.
36 " And if the mail contains a reply move the cursor after the quote.
37 if search('^On .\+ wrote:$', 'n')
41 " Fold quotes. Thanks to Teemu Likonen <tlikonen@iki.fi>
42 " (http://permalink.gmane.org/gmane.editors.vim.devel/20890,
43 " <20080809190407.GA7584@mithlond.arda.local>) and danielsh_ in #mutt on
44 " Freenode (2010-07-10 13:01 CEST) for letting me know.
45 setlocal foldmethod=expr foldminlines=2
46 setlocal foldexpr=strlen(substitute(substitute(getline(v:lnum),'\\s','','g'),'[^>].*','',''))