Genesis 21:22

22 At that time Abim'elech and Phicol the commander of his army said to Abraham, "God is with you in all that you do;

Genesis 21:22 Meaning and Commentary

Genesis 21:22

And it came to pass at that time
Not when Ishmael was grown up and married, but when Isaac was weaned and Ishmael was expelled:

that Abimelech, and Phichol, the chief captain of his host, spake unto
Abraham;
Abimelech was king of Gerar, the same that is spoken of in the preceding chapter, and Phichol was the general of his army; these two great personages came together and paid Abraham a visit, and had some conversation with him, who was still in Gerar, or however in some part of that country not far from it:

saying, God [is] with thee in all that thou doest;
greatly prospered him in the things of the world, for of them only could they make a judgment; they saw that he increased in worldly substance, and that his family was increased, and that he succeeded in everything in which he engaged; and, being jealous of his growing greatness and power, were desirous of securing an interest in him and in his favour.

Genesis 21:22 In-Context

20 And God was with the lad, and he grew up; he lived in the wilderness, and became an expert with the bow.
21 He lived in the wilderness of Paran; and his mother took a wife for him from the land of Egypt.
22 At that time Abim'elech and Phicol the commander of his army said to Abraham, "God is with you in all that you do;
23 now therefore swear to me here by God that you will not deal falsely with me or with my offspring or with my posterity, but as I have dealt loyally with you, you will deal with me and with the land where you have sojourned."
24 And Abraham said, "I will swear."
Revised Standard Version of the Bible, copyright 1952 [2nd edition, 1971] by the Division of Christian Education of the National Council of the Churches of Christ in the United States of America. Used by permission. All rights reserved.