I eat foods high in fat before a heavy workout (so my liver/gallbladder "dumps"), which nixes side cramps. Also proteins/carbs, but it's the fats that create the "dump" of those organs... which creates more space for blood to flow through. My standby is hashbrowns and sausage and chocolate milk before a 2-4 hour heavy workout.
Then I eat clean proteins (fish, crustaceans, etc.) and something light (salad, rice noodles, etc.) afterward. My go tos are things like Thai red curry & coconut braised fish over rice noodles, chopped salad, seared shrimp over spinach w/ egg.
For an all day/ medium level workout (like hiking 20-30mi, or snowboarding for 10 hours, or sailing in 'on your toes' seas for 10 hours) I eat a lot of sandwiches. Typically 1 sandwich every 2 hours in addition to breakfast, lunch, dinner.
What I'm working on, however, is weightloss + endurance. If a person is trying to bulk up (muscle wise) one needs an entirely different kind of diet (HUGE on the protein to repair ripped muscles).
For the (healthy) weightloss... all I personally need to do is walk 5+ miles a day and eat "normally" (aka 5 times a day, so my body doesn't think a famine has hit). I lost over 100lbs that way. The endurance, however, for the sports I like to play (and because I have chronic pain from joints that are too loose, I have to keep my muscles strong in order to not be in blinding pain, my muscles hold my joints together instead of my tendons and ligaments) are why I work out.
((Unhealthy weightloss is a different matter. I can lose up 12lbs a day unhealthily, and drop 100 in 2 months, but that not only kills your metabolism, it damages your heart and other organs, including your bones. Taking 2 YEARS to drop over 100lbs actually had me in tears quite frequently, but it was the healthy way to go about it. I got pregnant 6mo after height of my anorexia 400 cal per day-week, and had to eat for the baby. I'd already gained back all my eating disorder weight (60 lbs). At 1800 calories per day -diet worked out with nutritionist, and strictly followed- I gained just over 180lbs. 2 years later I'd dropped slightly over 100 -not including what I carried in my uterus. Now I'm working on the last 50-70 a few years later.))
What you're trying to achieve REALLY impacts how one should eat to achieve that goal.
When I was competing (sports again), and when I was in the military in the field each I'd eat between 4000 & 6000 calories per MEAL.
If you don't replace what you use, your body thinks it's starving and starts hoarding every extra calorie as fat ("dieting" is how med professionals get anorexics to GAIN weight). I actually AM anorexic. When I was in a bad spot I was eating 400 calories per day TOPS while hiking 10mi a day and dancing 4-8 hours a day and was still gaining weight. My metabolism had ground to a halt. Versus when I was competing or in the military easily consuming over 10,000 calories per day and had trouble keeping weight ON.
"Dieting" + exercise to lose weight are about the absolute worst thing you can do for long term weight loss. Instead, eat a LOT (healthily) and exercise.