John Gills Exposition of the Bible Commentary - Psalms 18:20
The Lord rewarded me according to my righteousness ,.... Which, if applied to David, cannot be understood of his own personal righteousness, or of works of righteousness done by him, for these merit nothing at the hand of God; no reward, in strict justice, is due to them, or given to them: a man's own righteousness is imperfect, and by the law of God is not accounted a righteousness; and it is unprofitable to God, is no gain to him, and so not rewardable by him; and were it perfect, it is... read more
Matthew Henry's Complete Commentary - Psalms 18:20-28
Here, I. David reflects with comfort upon his own integrity, and rejoices in the testimony of his conscience that he had had his conversation in godly sincerity and not with fleshly wisdom, 2 Cor. 1:12. His deliverances were an evidence of this, and this was the great comfort of his deliverances. His enemies had misrepresented him, and perhaps, when his troubles continued long, he began to suspect himself; but, when God visibly took his part, he had both the credit and the comfort of his... read more