From 0b98f6132ed54c4d5fe356e071e88570db20de6a Mon Sep 17 00:00:00 2001 From: Frans-Jan van Steenbeek Date: Tue, 15 Oct 2013 14:49:01 +0200 Subject: [PATCH] Add highlighting for trailing whitespace Double spaces are used in markdown to trigger a hard linebreak --- syntax/markdown.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/syntax/markdown.vim b/syntax/markdown.vim index 3024f2f..fda6c8c 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -92,6 +92,7 @@ if main_syntax ==# 'markdown' endif syn match markdownEscape "\\[][\\`*_{}()#+.!-]" +syn match markdownImplicitBreak "\s*\ \ $" containedin=ALL syn match markdownError "\w\@<=_\w\@=" hi def link markdownH1 htmlH1 @@ -123,6 +124,7 @@ hi def link markdownBoldItalic htmlBoldItalic hi def link markdownCodeDelimiter Delimiter hi def link markdownEscape Special +hi def markdownImplicitBreak ctermbg=darkgreen guibg=lightgreen hi def link markdownError Error let b:current_syntax = "markdown"