Q.Viney tomato plants
I bought 4 healthy tomato plants (4″ pots) in May, repotted them in larger pots with regular potting soil and soil with worm castings. Then I put them in my southern window. They grew and grew…and grew. 5′ tall now with no flowers and no tomatoes. They look great as greenery for my window but I wanted tomatoes! I can’t plant outside. What did I do wrong?

Certified GKH Gardening Expert
This sounds like a lack of light. A Southern facing window will not be near enough light to get a tomato to produce fruit. You will need to add, at least, 200 more watts of supplemental lighting to achieve a decent fruit set.
Along with lighting, they also have a heavy feeding requirement, which will not be met with potting soil alone.
This article will help you to grow tomatoes in container: https://www.gardeningknowhow.com/edible/vegetables/tomato/growing-tomatoes-pots-containers.htm
This article will give you a good rundown of the requirements for a good crop of tomatoes: https://www.gardeningknowhow.com/edible/vegetables/tomato/growing-tomatoes-guide.htm