vim-notes icon indicating copy to clipboard operation
vim-notes copied to clipboard

Multiline item highlighting

Open pointlessone opened this issue 15 years ago • 4 comments

It seems there's a problem with multiline items highlighting. When I put a keyword in front of item all lines get highlighted: http://cl.ly/2A3f350h3l303k1X3i30 But when I move cursor to the second line and back to the first (or any other) the second line loses highlighting: http://cl.ly/2k0k273T0w3U253K0i34

pointlessone avatar Dec 23 '10 19:12 pointlessone

I've been aware of this problem for a while but so far haven't found a way to fix it. Maybe this sort of highlighting isn't really suited to Vim. Either that or I haven't gotten to know Vim's highlighting engine quite well enough :-). I've committed bd4d971cac33d65fff628b4afac39c540c95e3d6 which adds a note about this to the to-do list. If/when I fix this problem I'll post a follow up here.

xolox avatar Dec 23 '10 23:12 xolox

This command seems to fix it: 'syntax sync fromstart' I fixed this permanently for myself by adding this command to the file ~/.vim/syntax/notes.vim, although this seems quite hacky.

sportpeppers avatar Oct 28 '14 20:10 sportpeppers

@sportpeppers: Thanks a lot for the tip! I could swear I tried this a couple of times and it didn't help, but I just tried and it definitely seems to work now. This may have negative performance implications, but for now I've added syntax sync fromstart to the syntax script. If the plug-in gets (even) slow(er), well, we'll just cross that bridge when we get there :-)

xolox avatar Nov 03 '14 21:11 xolox

@cheba: In case you're still using the vim-notes plug-in (almost four years after reporting this issue!) I would love to hear whether this fixes the issue for you as well :-)

xolox avatar Nov 03 '14 21:11 xolox