I've found a somewhat unusual way to bring spaceplanes into orbit. Raise to ~20km and hold to gain speed, then aim downwards JUST a little and slowly drift down to 10-15km, then aim nearly straight up. When you exist atmosphere, stage over to rockets.
The idea here is to gain as much horizontal speed while near 20km, then lower to enter more atmosphere (lose some speed but that's fine) and rise up again, so you have your existing horizontal speed, plus the vertical speed you'll be gaining with airbreathers. If you can get your apoapsis above 70km then you can usually use your rockets to pick up a stable orbit.
That sounds really familiar from something I've seen/read. I remember it was fiction and thinking "no way that would work like that. The thick atmosphere would kill all the speed." Maybe it's closer to possible than I thought. Seems like it would be pretty stressful craft/crew wise.
It doesn't really work in KSP. The thick atmosphere kills most of the gain you could have had from using the atmosphere for lift. What actually happens, as I've found, is that you're repeating your ascent, but have much lower mass due to having lost all that fuel, and thus can attain a higher velocity and maintain a greater angle of ascent, plus have less mass to push with your rocket stage. Generally, if you can do that, in KSP you'd be better off just keeping up the acceleration.
It's a whole other kind of ball game if you use FAR, or Real Life
tm. The atmosphere doesn't kill your velocity nearly as well if you're aerodynamic, and you actually gain a whole lot of upwards momentum from taking a dive into the atmosphere.
I can attest though, that even if for a different reason, the trick does work in KSP Stock. One of my more elaborate SSTO designs once suffered an uneven flameout, and tumbled out of its ascent trajectory, necessitating a dip way down to the low 10's of kilometers. The ascent from there was massively efficient, and I made orbit with way more fuel than normally. I wrote it off as a bug back then, as I haven't been able to really replicate it later, but I might try again, harder this time. ^_^