Great Idea ! But ! The big oil companies own everything and just about everyone who could even try to make that decision. Maybe someday but sure not during my lifetime.
Should government ban gasoline(petrol) and diesel and highly subsidies electric vehicles and solar panels to save global warming?
No, the government should stay out of free enterprise.
The difficulty is that if we all chose to drive electric cars tomorrow we'd still have to get the electricity from somewhere.
Most electricity worldwide is still produced by burning fossil fuels. If, one day in the future most electricity is produced using renewable sources, then the utopia of electric cars and pollution-free cities might come to pass.
As a couple of people here have already noted, the oil companies won't want that. That is why they are employing "experts" to trash the whole idea of renewable energy sources.
Oil is king here in texas it may happen thirty years down the road