John Gill's Exposition of the Whole Bible
Proverbs 20:18
[Every] purpose is established by counsel,.... Or "the thought" f of a man, everyone of them, what he has thought to do, formed a scheme of in his mind, and resolved upon, by taking advice of his friends, and especially by asking counsel of God, who gives, wisdom liberally, and upbraids not; he is confirmed in his good designs; and he cheerfully pursues them, and they are ordered and directed to the glory of God, his own good and the good of others; for this can only be understood of wise and good thoughts and purposes;
and with good advice make war; this should not be entered upon rashly, without first considering whether there is a just and lawful cause of it; and without consulting the necessary charge and expense of it; whether there is a sufficiency of men and money to carry it on; and what may probably be the issue of it. It is right in a king to advise with his privy council, or with the chief council of the nation; but, above all, both he and his people should seek advice of the Lord on such an occasion; see Luke 14:31. This may be applied to our spiritual warfare with sin, Satan, and the world; not that it should be any doubt with whether we should engage in such a war; but we should advise with experienced soldiers, and especially with God and his word, what weapons to take, and how to use them; and consider in whose name and strength we are to fight; and inquire and learn the force, methods, and designs of the enemy, and where to guard against them or attack them. Jarchi interprets it of making war with Satan by repentance, prayer, and fasting.
f מחשבות "cogitationes", V. L. Pagninus, Montanus, Cocceius, Gejerus; "unaquaeque cogitationum", Piscator, Mercerus, Michaelis.