21 Yahweh rewarded me according to my righteousness. He rewarded me according to the cleanness of my hands.
*Minor differences ignored. Grouped by changes, with first version listed as example.
The LORD rewarded me according to my (l) righteousness: according to the cleanness of my hands hath he recompensed me.
(l) Toward Saul and my enemies.
The Lord rewarded me according to my righteousness: according to the cleanness of my hands hath he recompensed me. See Gill on Psalm 18:20.
21 Jehovah rendered to me according to my righteousness,
According to the cleanness of my hands He recompensed me.
22 For I have observed the ways of Jehovah,
And have not wickedly departed from my God.
23 For all His rights are before my eyes;
And His statutes,-I do not depart from them.
24 And I was innocent towards Him,
And kept myself from mine iniquity.
גּמל signifies to do to a person good or evil, like the Greek εὖ and κακῶς πράττειν τινά. The righteousness and cleanness of hands, i.e., the innocence, which David attributed to himself, were not perfect righteousness or holiness before God, but the righteousness of his endeavours and deeds as contrasted with the unrighteousness and wickedness of his adversaries and pursuers, and consisted in the fact that he endeavoured earnestly and sincerely to walk in the ways of God and to keep the divine commandments. מן רשׁע, to be wicked from, is a pregnant expression, signifying to depart wickedly from God. לנגדּי, i.e., as a standard before my eye. In the psalm we find עמּו תמים, innocent in intercourse with the Lord, instead of לו תמים (see Deuteronomy 18:13); and for the fact itself, David's own testimony in 1-Samuel 26:23-24, the testimony of God concerning him in 1-Kings 14:8, and the testimony of history in 1-Kings 15:5. מעוני, from mine iniquity, i.e., from the iniquity which I might have committed.
*More commentary available at chapter level.