Closed mon10a closed 10 years ago
Could have something to do with sneak storing the highlight id in a window-local (w:
) variable.
after leaving full screen the highlights don't show up at all
For regular sneak too? Does syntax-highlighting still work at that point?
Same problem for regular sneak.
Syntax highlighting (markdown for me) is off at that point. However, it usually comes back on with a cursor move.
Could you do a quick test? Comment out this line: https://github.com/justinmk/vim-sneak/blob/master/autoload/sneak/streak.vim#L151
Then restart vim and see if the problem continues.
Did not solve the problem (or seem to do anything). Happy to try other things.
That's a good thing, it eliminates some complication. @junegunn Have you seen this issue?
@justinmk Nope, but I just tested it, and it is reproducible. But you don't need Goyo to see the problem, just change color scheme between sneaks.
@junegunn Thanks, that helps a lot! I expected :ownsyntax
to cause problems with changing colorschemes, but now I'm stumped.
Is there a way to reload sneak-streak to fix the highlighting without restarting Vim?
Yes I think so (or rather I think I have a solution), I'll look into it today. Promise :)
@mon10a This should be fixed now, let me know how it goes.
Note: if you have custom SneakFoo
highlight definitions, then you must add them on autocmd ColorScheme *
.
Works! Thanks!
Out of curiosity, what was wrong?
m
Colorschemes always clear existing highlights when they are loaded, so the plugin highlights were getting cleared, but not restored. So, sneak now listens to autocmd ColorScheme *
, and re-initializes the highlight definitions if that event is raised.
Justin,
Not sure if this is Sneak's issue or Goyo's, but I thought I would start here.
I just started using Goyo (Writeroom for Vim) and Sneak in Streak mode works fine while I am in full screen mode, but after leaving full screen the highlights don't show up at all. I am using your April 11 version of Sneak.
Thanks.
m