I just found out 〜たとたん
, meaning "as soon as"; I already knew なり
with (apparently) the same meaning:
今度は横になるなりほぼ即座に寝ついていた
As soon as I lay down, I almost immedialy fell asleep
「ミキちゃん、どこにいたの。心配したよ」と言ったとたん、ミキは泣き出した
As soon as I asked "Where were you, Miki? I was worried", Miki started crying
I tried figuring out what's different, if anything, between these forms, but I can't find なり
in my grammars and the only thing comparing the two I found is this page, which says they are similar, it doesn't explain why, beside saying one asks for dictionary form and the other for short past.
Edit: Also, not sure about the differences between 〜たとたん
and 〜たとたんに
.