Lord, I have hoped for thy salvation
Either temporal salvation and deliverance from enemies, and from afflictions, which God had promised, and therefore he had reason to hope for; or spiritual and eternal salvation, resolved on in the mind of God, provided in covenant, promised to be wrought out by Christ, and which since has been accomplished; and therefore there is a sufficient foundation to hope for it;
and done thy commandments:
this was not the cause, ground, and foundation of his hope; for then it would not have been like an anchor, sure and steadfast, but as the hope of the hypocrite, which is as the spider's web; but this was the effect of his hope; because he had a good hope of salvation, therefore he was studiously concerned to do the commandments of God; his hope prompted him to it, and encouraged him in it; see ( 1 John 3:2 1 John 3:3 ) . Kimchi's note here is a good one; "and done thy commandments", not for hope of reward; but I have done them as thy commandments are with me and I know that I shall have salvation, and I have hoped for it.