Psalms 18:22

For all his judgments were before me, and I did not put away his statutes from me.

David kept all of God's judgments continually before him, holding them constantly in view. He did not abandon them, put them away from himself, or turn aside from God's statutes. This keeping is faithfulness to the Lord. It is the assurance of one guided by Christ who remains obedient to God's commands.

Together with its surrounding verses it teaches that God rewards righteousness and obedience. It describes the upright. Those who keep their hands from evil can claim this same faithful obedience as their own.