The interpretation of Habakkuk 2:4 is a case in point of reading a verse in the context of its book. the Book is in three chapters. Chapter 1 is a dialogue between the Prophet and God over the sad state of Israel in the 7th Century BCE. When the Lord tells the Prophet that his instrument of correction is the Babylonian Empire, the Prophet has a fit! He says that he will stand on the ramparts and wait for an answer.
The answer comes and it is verse 4.
“Behold, his soul is puffed up; it is not upright within him,
but the righteous shall live by his faith.
The exegetical arguments are often whether this verse proves the theological point of Justification by Faith – since it is tied to Romans 1:16-17.
If one reads this a the turning point of the book, then we see that v. 4a, the part about Babylon (“he is puffed up”) is explained in the remainder of chapter 2 with 5 “woes” or words of prophetic judgment. yes, God will use Babylon, but he will also hold them accountable for their excesses.
Then if one reads chapter 3, it is the prophet’s prayer/hymn to the Lord – in it he expresses faith –
O Lord, I have heard the report of you,
and your work, O Lord, do I fear.
In the midst of the years revive it;
in the midst of the years make it known;
in wrath remember mercy.
Though the fig tree should not blossom,
nor fruit be on the vines,
the produce of the olive fail
and the fields yield no food,
the flock be cut off from the fold
and there be no herd in the stalls,
 yet I will rejoice in the Lord;
I will take joy in the God of my salvation.
 God, the Lord, is my strength;
he makes my feet like the deer’s;
he makes me tread on my high places.
So it seems that the righteous live by faith in God, not in their own goodness or strength, whereas the puffed up live in confidence and trust in themselves and their power. Faith is contrasted with arrogance, self-trust and violence. Faith is based on what is promised, not what is actually seen.
so the application of “the just shall live by faith” in the New Testament passages of Romans 1:16-17, Galatians 3:11 and Hebrews 10:38 make particular applications of that general principle. Romans says it well, that the righteousness of God is “from faith for faith” or “from faith from first to last.”
That is the start, the middle and the end are lived by faith, not self-confidence, not confidence in what is seen or touched or experienced, but in God who speaks truthfully.