Heat pumps account for 2/3 of new heating installations in Germany [1].
Modern buildings with effective insulation seem to make them quite viable, but that hinges on the availability of attractive electricity prices.
The second factor is that carbon-based fuels may become more expensive over time, so perhaps electricity costs “just” needs to remain stable to become attractive.
I'm sorry but this thread does not talk about using PV to heat your home in the winter. But it is absolutely possible to use electricity to heat homes, it's widely used in northern countries. And the nice thing about electricity is that it can be generated in one place and used in another.
This thread is talking about reduction of dependence on oil&gas supplied by various nefarious regimes, though. Still quite a challenge in the winter, with barely any sun out there.
"it can be generated in one place and used in another."
It can, but we are far from having such a robust grid all across the continent. I am not even sure if we are getting closer. Both economic and political aspects come into play, which might be harder to address than the purely technical ones.
For example, France really does not want cheap Spanish solar energy to flood the French market, hence the inadequate connection over the Pyrenees.
Everyone knows that, including the European Commission, but France is one of the two really big continental players who can do anything they want and cannot be effectively punished. The "everyone is equal, but some are more equal" principle.
If you mean getting rid of oil and gas on a short scale, there won't be majority for that. By 2040 or 2050 maybe, with some significant exceptions (I don't believe in large electric jets; small aircraft maybe).
I think >95% of global electricity will be renewables or nuclear by 2032[0], >85% road vehicles green by 2035[1]; for everything else, limits are *at a minimum* 50% of the MTBF for the equipment but may be even harder, e.g. hydrogen jet fuel is theoretically possible but there's no obvious path to it.
[0] just extrapolate growth curves for PV and wind and you get 100% by then even without nuclear, but in practice last 5% of anything is hard
[1] needs new electricity not yet on the various grids, but not as much as the thermal power of the fuel burned as EVs are more efficient; mainly limited by production of batteries, and that itself is accelerating