From 856f581114f676e1093e64c145af0e128dc8c9e3 Mon Sep 17 00:00:00 2001 From: Martin Kolman Date: Tue, 16 Jul 2013 16:35:12 +0200 Subject: Initial commit --- ftplugin/diff_ShowTrailingWhitespace.vim | 17 +++++++++++++++++ ftplugin/mail_ShowTrailingWhitespace.vim | 22 ++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 ftplugin/diff_ShowTrailingWhitespace.vim create mode 100644 ftplugin/mail_ShowTrailingWhitespace.vim (limited to 'ftplugin') diff --git a/ftplugin/diff_ShowTrailingWhitespace.vim b/ftplugin/diff_ShowTrailingWhitespace.vim new file mode 100644 index 0000000..1d5ea79 --- /dev/null +++ b/ftplugin/diff_ShowTrailingWhitespace.vim @@ -0,0 +1,17 @@ +" diff_ShowTrailingWhitespace.vim: Whitespace exceptions for the "diff" filetype. +" +" DEPENDENCIES: +" - ShowTrailingWhitespace.vim autoload script. +" +" Copyright: (C) 2012 Ingo Karkat +" The VIM LICENSE applies to this script; see ':help copyright'. +" +" Maintainer: Ingo Karkat +" +" REVISION DATE REMARKS +" 1.00.001 02-Mar-2012 file creation + +" A single space at the beginning of a line can represent an empty context line. +call ShowTrailingWhitespace#SetLocalExtraPattern( '^\%( \@!\s\)$\|\%>1v') + +" vim: set ts=8 sts=4 sw=4 noexpandtab ff=unix fdm=syntax : diff --git a/ftplugin/mail_ShowTrailingWhitespace.vim b/ftplugin/mail_ShowTrailingWhitespace.vim new file mode 100644 index 0000000..57afec3 --- /dev/null +++ b/ftplugin/mail_ShowTrailingWhitespace.vim @@ -0,0 +1,22 @@ +" mail_ShowTrailingWhitespace.vim: Whitespace exceptions for the "mail" filetype. +" +" DEPENDENCIES: +" - ShowTrailingWhitespace.vim autoload script. +" +" Copyright: (C) 2012 Ingo Karkat +" The VIM LICENSE applies to this script; see ':help copyright'. +" +" Maintainer: Ingo Karkat +" +" REVISION DATE REMARKS +" 1.00.002 16-Mar-2012 Refined pattern. +" 001 03-Mar-2012 file creation + +" - The email signature separator consists of dash-dash-space. +" - Email headers from Outlook or the Thunderbird "External Editor" add-on +" may leave whitespace after mail headers. Ignore them unless it's the +" Subject: header. +" - Quoted empty lines may contain trailing whitespace. +call ShowTrailingWhitespace#SetLocalExtraPattern( '\%(^\%(--\|\%( \?>\)\+\|\%(From\|Sent\|To\|Cc\|Bcc\):.*\)\)\@