some people buy those chlorine tabs for swimming pools...
but I wonder if vinegar, which AFAIK lasts a long time, would be an alternative?
Vinegar is an acid, and it is nowhere near as destructive to the proteins (which are also acids) in bacteria/viruses as a base like bleach. There are even bacteria that do better in a mildly acid environment. So, no, vinegar is not an answer, unless you go with pure vinegar and pickle your food. That's takes a lot of vinegar and does not help with drinking water.