Open reedes opened 10 years ago
@mattly What do you think of colorscheme-scoped definitions of a 'focus mode'?
The only base color I adjusted was medium_gray to reflect IA Writer's color for dimmed text.
I see that the cursor fg needs tweaking, but otherwise it's pretty close.
Hm. While I have limelight installed, I never use it.
Unfortunately I also think this highlights (pun intended, sorry) a problem with vim: lack of first-class color support makes it unclear where something like this should reside. Plugins can't accurately predict how they'll behave across all color schemes, and ideally color schemes should be lookup tables that respond to a handful of toggles.
I'll give it a shot over the weekend though, I have a piece I've been meaning to finish.
Agreed that it's unclear where the responsibility should reside. Plugins that muddy the lines separating color/syntax/etc. always seem to make compromises that sacrifice some strength of Vim. My repurposing of cursorline skirts the edge of such compromise.
Those toggles (notably set bg=
) could be thought of as sub-schemes -- variants on the mother color scheme to suit a particular purpose. They are specified explicitly by the scheme's designer rather than calculated algorithmically (as with Limelight). Ideally the set of toggles could be generic enough to be used across color schemes that support them.
Thanks for giving it a try. I'll be flipping between it and Limelight over the coming weeks to see if either is compelling.
Initial thoughts:
1) it doesn't play well with Goyo which I use instead of say, Vimroom, or MacVim's fullscreen mode. 2) Limelight seems to favor highlighting something over highlighting nothing. I prefer that behavior. 3) A handful of times I've gotten into a weird state where the cursor line is on but focus highlighting isn't. 4) After upgrading to a Retina Mac, I use M+ 1mn Light as my main font, which is already pretty lightweight, and I find the effect a bit annoying:
There may be better ways to offer focus, such as that of http://github.com/junegunn/limelight.vim
This experiment takes a different colorscheme-scoped approach to selectively dim colors via the highlight generator
h()
.Attached is image showing with bg=light. To see the focus in action, check out the branch: https://github.com/reedes/vim-colors-pencil/tree/focus-support
and then run the command...
:ToggleFocus