Although Khan's first attack on Kirk was indeed a surprise....knowing where to hit the Enterprise and seriously impair her, that was his one whammy....Kirk made an unspoken promise to never get caught by surprise again. He was always one step ahead of Khan, even when the audience didn't know it.
Ok...Khan had two whammy's. Kirk and party did lead Khan to the Genesis Device, and Khan beamed it up....ok, two surprises he pulled on Kirk.
Ok....three, if you count the fact that Khan was crazy enough to actually use the Genesis Device to try and destroy Kirk in a final act of vengeance. Although the Enterprise escaped, it was due to Spock's sacrifice and death.
So, three surprises by Khan....surprises that were largely spawned from desperation in seeking revenge. Khan was a challenge, but as Spock pointed out "intelligent, but not experienced".
In the first encounter, Kirk was the one who thought up using Reliant's command codes to level the playing field a bit.
Spock: At least we know he doesn't have Genesis.
Kirk: (to Spock) Keep nodding as though I'm still giving orders. (To Saavik) Lieutenant, bring up the charts of Reliant's command console.
Saavik: Reliant's command--?
Kirk: (desperate whisper) Hurry!
Spock: The prefix code?
Kirk: It's all we've got.
------
The second time, yes, Spock spoke in code, so to speak, to Kirk on Regula I station.
Spock: Admiral, if we go "by the book", like Lieutenant Saavik, hours would seem like days.
Kirk: I read you, Captain, let's have it.
Spock: The situation is grave, Admiral. We won't have main power for six days. Auxiliary power has temporarily failed. Restoration may be possible in two days, by the book, Admiral.
Kirk: Meaning you can't even beam us back?
Spock: Not at present.
Kirk: (thinks for second) Captain Spock, if you don't hear from us within one hour, your orders are to restore what power you can, take the Enterprise to the nearest starbase, and alert Starfleet Command as soon as you're out of jamming range.
Uhura: Sir, we won't leave you behind!
Kirk: Uhura, if you don't hear from us, there won't be anyone left behind. Kirk, out.
(During this exchange, we see Khan has been monitoring these communications)
Khan was still in pursuit of the Enterprise at this point, with only maneuvering jets to continue the chase, until Joachim reports "Impulse power restored!" Since Kirk and Co were aboard the station, and not inside the moon itself, they banked on the fact that Khan
had to be listening in.)
(Then, two hours later)
Kirk: Kirk to Spock, it's two hours. Are you ready?
Spock: Right on schedule, Admiral. Just give us your coordinates, and we'll beam you aboard.
Kirk: All right! (mildly grinning at Saavik) I don't like to lose.
(Now, what seems to be unspoken here is that Kirk and Spock had to have switched to an encoded channel for that exchange.)
(As they're beaming up: )
Saavik: (voice modulated by transporter effect) We were immobilized. Captain Spock said it would be two days.
Kirk: Come, come, Lieutenant, you of all people who go by the book.
(salutations between Spock and Marcus)
Saavik: By the book?
Kirk: By-the-book! Regulation 45-A, when communications are being monitored during battle--
Saavik: --no uncoded messages on an open channel.
(Kirk nods to Saavik.)
Saavik: (to Spock) You lied.
Spock: I exaggerated.
Kirk: Hours instead of days....now we have minutes instead of hours!
So, while Spock gave a coded hint to Kirk to speak in terms of converted time, Kirk and Spock both gambled on the notion that Khan would go hunting for them back at Regula I. Their gambit paid off. The Enterprise managed to limp to the other side of the moon, well out of Khan's sight as he would approach Regula I. They could still beam Kirk and Co. out, but they could not stay hidden from Khan for long.
----
The third encounter, inside Mutara Nebula. Spock drops the big hint to Kirk:
Spock: Sporadic energy readings, portside aft. Could be an impulse turn.
Kirk: He won't break off now. He's followed me this far, he'll be back. But - from- where?
Spock: He's intelligent, but not experienced. His pattern indicates-- two-dimensional thinking.
Kirk: (grins in recognition) Z-minus 10,000 meters, stand by photon torpedoes.
------
In the last two cases, Spock simply offered hints to Kirk, who was quick on the uptake in both cases.
