This psalm is in many respects an extended commentary on the statement by Paul in Acts 17:28 that "in Him we live, and move, and have our being."
A. David and the Omniscient God - vv. 1-6
1. God knows his heart - v. 1
"Searching" is an anthropomorphic image, for "God knows all things naturally and as a matter of course, and not by any effort on his part. Searching ordinarily implies a measure of ignorance which is removed by observation; of course this is not the case with the Lord; but the meaning of the Psalmist is, that the Lord knows us thoroughly as if he had examined us minutely, and had pried into the most secret corners of our being" (Spurgeon, 258).
2. God knows his every posture - v. 2a
David's choice of words is designed to encompass the totality of his life's activities. God's knowledge extends to every posture, gesture, exercise, pursuit, state, and condition possible. "When I am active and when I am passive and everything in between . . . Thou knowest it all! My most common and casual acts, my most needful and trivial moments . . . none escape Thine eye!"
David employs a figure of speech called merism, in which polar opposites are used to indicate the totality of all generically related acts, events, localities, and so on.
3. God knows his every thought - v. 2b
Every emotion, feeling, idea, thought, conception, resolve, aim, doubt, motive, perplexity, and anxious moment lies before You like an open book. And you all this "from afar"! The distance between heaven and earth by which men vainly imagine God's knowledge to be circumscribed (limited, bounded) offers no obstacle.
"Though my thought be invisible to the sight, though as yet I be not myself cognizant of the shape it is assuming, yet thou hast it under thy consideration, and thou perceivest its nature, its source, its drift, its result. Never dost thou misjudge or wrongly interpret me; my inmost thought is perfectly understood by thine impartial mind. Though thou shouldest give but a glance at my heart, and see me as one sees a passing meteor moving afar, yet thou wouldst by that glimpse sum up all the meanings of my soul, so transparent is everything to thy piercing glance" (Spurgeon, 259).
4. God knows all his ways - v. 3
This verse serves only to heighten what was stated in v. 2. "All my ways" = every step, every move, every journey, all are under His gaze.
5. God knows his every word - v. 4
What possible hope of concealment is there when God knows what we will say before we do?
6. God's knowledge has hemmed him in - v. 5
7. David's response to God's omniscience - v. 6
B. David and the Omnipresent God - vv. 7-12
1. Neither ascent nor descent brings escape - vv. 7-10
Any attempt to flee from God in any direction is to fly into the center of the fire to escape the heat! In vv. 9-10 David appeals to the lightning like rapidity with which the rays of the sun dart from east to west as they first break out over the horizon at dawn. "If such speed of light were my chariot, even then I could not escape your presence."
Notice that David appeals to all four points of the compass to make his point: the heavens to the north, the depths to the south, the dawn in the east, and the seas to the west.
Says Spurgeon: "This (truth) makes it dreadful work to sin; for we offend the Almighty to His face, and commit acts of treason at the very foot of His throne. Go from Him, or flee from Him we cannot; neither by patient travel nor by hasty flight can we withdraw from the all-surrounding Deity. His mind is in our mind; Himself within ourselves. His spirit is over our spirit; our presence is ever in His presence" (260).
2. Neither darkness nor light brings escape - vv. 11-12
C. David and the Omnipotent God - vv. 13-18
It is essential that the reader take note of the causal particle, "for", with which v. 13 opens. This answers the question: "How is it that God knows David so intimately?" The answer, quite simply, is that it is He who formed him within in his mother's womb and ordained all his days. The point is, who can have a truer and deeper knowledge of a person than He who made him?
1. David's form was shaped by God - vv. 13-15
The word "form" in v. 13 literally means "to possess". "Inmost being" = the kidneys, in Hebrew thought = the inmost, secretive, sensitive locus of the personality. "You knit me together" = lit., "to weave," "to embroider."
2. David's days were ordained by God - v. 16
Both the number of his days and their content have been pre-ordained by God (cf. Ps.. 56:8). As each day of his life passes he may look upon it and confidently assert that everything which transpired had already been divinely ordained.
D. David's Praise of the Omniscient, Omnipresent, Omnipotent God - vv. 17-18
Rather than reacting with alarm that God exercises such all-encompassing control over his life, David is overwhelmed with joy. But how can it be that God's thoughts are precious to David? What does David mean when he says that what God thinks is precious to him? Most likely, the "thoughts" to which David refers are God's thoughts about David! David is overwhelmed and in awe of the fact that God is so profoundly and intimately concerned with him. Thus v. 18b means, "When I wake up from sleep I discover that I'm still in your thoughts. You have been thinking about me even while I sleep and you keep on thinking about me after I wake up!"
E. David's Zeal for God's Honor - vv. 19-24
1. His hatred of God's enemies - vv. 19-22
2. His desire for purity of heart - vv. 23-24