The psalmist employed a figure of speech (merism) to express completeness ( Psalm 139:2). In merisms, the opposites named represent everything in between them. God knew every move David made. Furthermore, He understood his motives as well as his actions. "Afar" probably refers to time rather than space. The "Thou" or "You" is emphatic in the Hebrew text. God also knew David"s daily activities ( Psalm 139:3). This is another merism with going out and lying down representing a whole day"s activities. Psalm 139:4 presents the greatest proof of God"s omniscience. Before David spoke, the Lord knew what he was about to say. [source][source][source]