Rashi on the Former Prophets
1 Samuel 23
s God has given him into my hand. Meaning, delivered, and similarly, "And do not look on, on the day of your brother, on the day of his being delivered [נכרו]." This is the conjugation of the strong [verbs e.g., Pi'el], as in, "He destroyed and broke her bars." If he desired to speak in the conjugation of the weak [verbs e.g., Kal], it would have been punctuated thus: נָכַר.
For he has been shut in by entering a city that has doors and a bolt. He will rely on that, and will not care to flee from it.
Planning evil. Plotting the evil.
Will Keilah's residents hand me over… This teaches us that one who consults regarding two matters, receives a reply concerning only one, and that reply concerns the first one. And here, Dovid asked in an inverted order, because he should have first asked, "Will Shaul come down? Will [the residents of Keilah] hand me over?" But he was answered according to the [proper] order.
Wherever they could go. In a place where it is proper to go, in a place where they would be saved.
And he strengthened his hand. He renewed the covenant which was between them.
And it is ours to hand him over. It is our obligation to deliver him.
For [someone] told me. The one who told.
He is very cunning. He is accustomed to behave cunningly, by being in one place today and tomorrow somewhere else, so that his place not be known.
Well prepared. With an accurate and true statement.
Ahead of Shaul. For Shaul was destined to go after them, and they went before him, to search exactly [where Dovid was].
Were surrounding. Encircling and surrounding from side to side, like a crown which encircles the head.
A messenger came. A real angel [in the guise of a messenger], in order to save Dovid.
The "Rock of Divisions." Shaul's heart was divided by two thoughts, whether to return to save his country from the Philistines, or to pursue and catch Dovid; thus renders Targum Yonoson.
You arrive at the cited line; the whole work is yours to read around it. The text is set from the cited public-domain edition.