xolox / vim-notes

Easy note taking in Vim
http://peterodding.com/code/vim/notes/
1.6k stars 112 forks source link

Multiline item highlighting #2

Open pointlessone opened 13 years ago

pointlessone commented 13 years ago

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

xolox commented 13 years ago

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.

sportpeppers commented 10 years ago

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.

xolox commented 9 years ago

@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 commented 9 years ago

@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 :-)