Comments (3)
I just noticed another related thing: Thematic breaks plugins that alter highlighting such as vim-niji. The reason seems to be the same as what I mentioned above.
Perhaps a better approach here would be to add some hooks after a theme has been loaded. Something like this:
let g:thematic#themes.theme.post_hook = 'MyFunction'
Where MyFunction
is a function that is called after the theme has been loaded, and where I can make my customizations as desired.
from vim-thematic.
Colorscheme initialization can be a tricky problem, as you observe. :)
Thematic will alter colors typically upon demand, much as if the user typed :colo solarized
, which also will not re-initialize the customized highlights you had specified in your .vimrc
. A configurable post-load hook sounds like one way to address that, perhaps on a per-theme basis.
Better yet you can set up your own event-driven hook:
augroup MyCustomHighlights
autocmd!
autocmd colorscheme *
\ highlight SpellBad gui=bold guibg=#faa |
\ highlight SpellCap gui=bold guibg=#faf |
\ highlight SpellRare gui=bold guibg=#aff |
\ highlight SpellLocal gui=bold guibg=#ffa
augroup END
Regarding plugins like vim-niji that will override the highlighting, that's a more difficult problem. Ideally they should re-initialize after a user typed :colo solarized
, but at least that plugin does not. I'd ask its author to do an event-driven hook as above to re-initialize themselves.
Does that answer your concerns/questions?
from vim-thematic.
Yes, thank you!
from vim-thematic.
Related Issues (19)
- Ensure the color fixes work in console (non-gui) mode HOT 1
- Integrate with Lightline
- 'columns' option in theme no longer working (Yosemite behavior?) HOT 2
- If fullscreen, option to size columns to center on textwidth
- Support antialias, toolbar, and guioptions on gui vim
- Support cmdheight, cmdwinheight, fillchars, rulerformat, and title
- Lacking the option for font encoding HOT 1
- Font size not changing HOT 2
- Default themes directory HOT 1
- Feature Request: change theme based on syntax HOT 1
- Support command completion on the theme names for the 'Thematic' command HOT 1
- guifont error
- Can it provide a hotkey to save current theme? HOT 1
- Option to save theme on vim exit and restore on vim start
- Support initialization of theme when starting Vim HOT 1
- On widen/narrow command, force max lines
- Lacking vim documentation HOT 8
- transparency of 0 in defaults not respected HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-thematic.