*Minor differences ignored. Grouped by changes, with first version listed as example.
For thou art my lamp, O Lord: and the Lord will lighten my darkness. See Gill on Psalm 18:28.
2-Samuel 22:29 commences the description of the help which David had already received from God in his conflict with the enemies of Israel, and which he would still receive.
29 For Thou art my lamp, O Jehovah!
And Jehovah maketh my darkness bright.
30 For through Thee I run troops,
And through my God I leap walls.
31 God - innocent is His way.
The word of Jehovah is refined,
A shield is He to all who trust in Him.
The explanatory כּי, with which the new description of the divine mercy commences, refers to the thought implied in 2-Samuel 22:28, that David belonged to the "afflicted people," whom the Lord always helps. As the Lord delivered him out of the danger of death, because He took pleasure in him, so He also gave him power over all his enemies. For He was his lamp, i.e., He had lifted him out of a condition of depression and contempt into one of glory and honour (see at 2-Samuel 21:17), and would still further enlighten his darkness, i.e., "would cause the light of His salvation to shine upon him and his tribe in all the darkness of their distress" (Hengstenberg). In the psalm the verse reads thus: "For Thou lightest (makest bright) my lamp (or candle), Jehovah my God enlighteneth my darkness;" the bold figure "Jehovah the lamp of David" being more literally explained. The figure is analogous to the one in Psalm 27:1, "The Lord is my light;" whilst the form ניר is a later mode of writing נר.
*More commentary available at chapter level.