It wasn't a van (unless you're talking about another vehicle) and it wasn't exactly out in the open. It was in the yard with the handful a Walkers running around. Regardless of whether it had gas in it or not, wouldn't you at least try and hotwire it and exhaust all your options before deciding to take on the horde of Walkers in hand to hand combat? Worst case, you throw it in neutral and let it roll to another location that might be closer to an exit or safe spot (another vehicle, the silos, etc).
Yeah you'd try that or maybe roll down the window slightly and try to stab as many of them in the head as you could before even thinking of getting out (which really should have been certain death)