1.

I cried unto the LORD with my voice; with my voice unto the LORD did I make my supplication.

With my voice; either,
1. With the voice of my soul. But so this addition would be superfluous, and much more the repetition of it, because that is necessarily implied in the former word,
I cried, and in the following, I make my supplication. Or rather,
2. With my corporeal voice, which the fervour of my soul forced me to use, when I could not do it without some danger, the enemy being at the mouth of the cave. And so this addition is emphatical, and therefore is repeated. But it is probable that David spoke with a low voice; and that he might do so without very great danger, is manifest from that discourse which passed between David and his men, even when Saul was entered into the cave, 1 Samuel 24:4-7.

2.

I poured out my complaint before him; I shewed before him my trouble.

I poured out; I did it fully, and fervently, and confidently.

3.

When my spirit was overwhelmed within me, then thou knewest my path. In the way wherein I walked have they privily laid a snare for me.

Thou knewest, to wit, practically, so as to direct me to it.
My path; what paths I should choose whereby I might escape Saul, when I fled hither and thither in deserts, and mountains, and woods; and which way I should get out of his hands when he and all his men were at the cave’s mouth, which passed my skill.
Wherein I walked; wherein I used to walk, or they supposed that I would walk.

4.

I looked on my right hand, and beheld, but there was no man that would know me: refuge failed me; no man cared for my soul.

Right hand; the place where the patron or assistant used to stand. See Psalms 16:8; Psalms 109:31; Psalms 121:5.
No man, to wit, in Saul’s court or camp; none of my former acquaintance, and friends. and relations.
Know me; own me, or show any respect or kindness to me.
For my soul; or, for my life, to wit, to preserve it; but they all conspired to take it away; which is here implied.

5.

I cried unto thee, O LORD: I said, Thou art my refuge and my portion in the land of the living.

Thou only art both my refuge to defend me from all evil, and
my portion to supply me with all the good which I need and desire.
In the land of the living; even in this life, wherein I doubt not to see God’s goodness, as he said, Psalms 27:13.

6.

Attend unto my cry; for I am brought very low: deliver me from my persecutors; for they are stronger than I.

7.

Bring my soul out of prison, that I may praise thy name: the righteous shall compass me about; for thou shalt deal bountifully with me.

Bring my soul out of prison; bring me safe out of this cave, wherein I am imprisoned, and set me at perfect liberty.
Shall compass me about; shall flock to me from all parts, partly out of curiosity to see such a spectacle and miracle of God’s power and mercy; and partly to rejoice and bless God with me and for me, and for all the benefits which they expect from my government.