Passage
With the godly thou wilt shewe thy selfe godly: with the vpright man thou wilt shew thy selfe vpright.
With the godly thou wilt shewe thy selfe godly: with the vpright man thou wilt shew thy selfe vpright.
Psalms 18:23 I was vpright also with him, and haue kept me from my wickednes.
Psalms 18:24 Therefore the Lord rewarded me according to my righteousnesse, and according to the purenes of mine hands in his sight.
Psalms 18:25 With the godly thou wilt shewe thy selfe godly: with the vpright man thou wilt shew thy selfe vpright.
Psalms 18:26 With the pure thou wilt shewe thy selfe pure, and with the froward thou wilt shewe thy selfe froward.
Psalms 18:27 Thus thou wilt saue the poore people, and wilt cast downe the proude lookes.
The verse centers on "godly", "thou", "wilt", "shewe", "selfe", and "vpright". It is saying that the verse draws attention to "godly" and "thou", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 24's "Therefore the Lord rewarded me according to..." into verse 26's "With the pure thou wilt shewe thy...", so "godly" and "thou" belong inside that flow. In Psalms context, the local focus is worship, trust, the LORD's kingship, and covenant mercy.
A plain takeaway is to answer the verse's own emphasis on "godly" and "thou" with trust shaped by these words, not by a vague optimism outside the passage.