"Stair-ify" a string
Pyth, 63 bytes
V_Q aY?}rN0"aeiou"=hZ?}N" "=tZZ;Jh.mbYKh.MZYjC.b++*d+JNY*dK_YQ
^^^^^
|||||
|tabs
space
The spaces in the middle is actually a single tab character, but StackExchange renders it as four spaces.
Try it online!
Python 2, 141 137 bytes
def S(s,l=[0]):
for c in s:l+=[l[-1]-(c in"aeiouAEIOU")+(c<"!")]
for h in sorted(set(l)):print"".join([" ",c][i==h]for i,c in zip(l,s))
JavaScript (Firefox 30-57), 151 bytes
s=>[...s].map((c,i)=>r[c<'!'?n++:/[AEIOU]/i.test(c)?n--:n][i]=c,n=s.length,r=[for(_ of s+s)[]])&&[for(a of r)if(s=[for(c of a)c||' '].join``)s].join`\n`
Where \n
represents the literal newline character.