When writing markdown, a double space at the end of a line indicates a line break. Currently, neither single trailing whitespaces nor double-whitespaces are being highlighted. Is it possible to have vim highlight trailing whitespace in one colour and markdown breaks (double trailing whitespace as another?). Not essential, but preferably this functionality will be toggleable.
Highlight double space in markdown
syntax highlighting;filetype markdown
Quick answer:syntax match Todo \s$syntax match Error \s\{2}$syntax match Visual \s\{3,}$This uses match groups already available from your colorscheme to highlight differently 1,2 or 3+ trailing spaces. You can define your own match groups instead (with more meaningful names for your usage and colored as you please) - see h: match for a quick example:highlight MarkdownTrailingSpaces ctermbg=green guibg=greensyntax match MarkdownTrailingSpaces \s\{2}$