gabrielelana / vim-markdown

Markdown for Vim: a complete environment to create Markdown files with a syntax highlight that doesn't suck!
MIT License
740 stars 59 forks source link

Highlighting Two Trailing Blanks #57

Closed StaticNoiseLog closed 6 years ago

StaticNoiseLog commented 7 years ago

It would be nice if there was a way to highlight two trailing blanks on a line. This is the way to enforce a new line within the same paragraph (break line). Tim Pope's markdown.vim does it correctly and I find this very useful.

srsudar commented 6 years ago

I get this by using ntpeters/vim-better-whitespace.

srsudar commented 6 years ago

Well I take it back. It works in file types other than markdown. If I get it fixed I'll report back. I'm finding this plugin to be pretty opinionated about the settings it overrides...

StaticNoiseLog commented 6 years ago

Thanks for looking into it!

srsudar commented 6 years ago

Got it. My criticism of opinionated setting overrides was misplaced on this one. The ntpeters/vim-better-whitespace plugin has markdown blacklisted by default.

I now have trailing spaces with that plugin installed and the following in my .vimrc (this is the default minus markdown):

let g:better_whitespace_filetypes_blacklist=['diff', 'gitcommit', 'unite', 'qf', 'help']
StaticNoiseLog commented 6 years ago

Awesome!