jalvesaq / zotcite

Neovim plugin for integration with Zotero
GNU General Public License v3.0
169 stars 14 forks source link

Feature Request: Highlight trailing whitespace #39

Closed acorreya closed 2 years ago

acorreya commented 2 years ago

Hi! It would be great to have trailing whitespaces highlighted to show that it will be complied to a newline. I tried :set listchars=, but did not reach anywhere good. I have seen one of those markdown highlighters (plasticboy/vim-markdown i think) having ↩ appear instead of trailing spaces. What say?

jalvesaq commented 2 years ago

I can't add this feature to Zotcite because it would be beyond its scope.

The option listchars works with the default Markdown syntax highlighting. Example based on Neovim's default value:

set listchars=trail:-

But you may prefer something like:

autocmd Syntax markdown syn match mdNewLine /  \ze$/ conceal cchar=⤶ | syn match Error /    *$/

For a list of arrow options, see: https://stackoverflow.com/questions/18927672/newline-symbol-unicode-character/21644958