Riyad as-Salihin 1056
Jabir (May Allah be pleased with him) reported:
There were some plots of land lying vacant around the mosque. The people of Banu Salamah decided to move to this land and come nearer to the mosque. The Messenger of Allah (ﷺ) heard about it and said to them, "I have heard that you intend to move near the mosque." They said: "Yes, O Messenger of Allah! We have decided to do that." Thereupon the Messenger of Allah (ﷺ) said, "O Banu Salamah! Stay in your houses, because your footprints (when you come to the mosque) will be recorded." He said this twice. They said: "We would not have liked it, had we moved near the mosque." [Muslim] .
وعن جابر رضي الله عنه قال‏:‏ خلت البقاع حول المسجد فأراد بنو سلمة أن ينتقلوا قرب المسجد، فبلغ ذلك النبي صلى الله عليه وسلم فقال لهم‏:‏ ‏"‏بلغني أنكم تريدون أن تنتقلوا قرب المسجد‏؟‏ قالوا‏:‏ نعم يا رسول الله قد أردنا ذلك، فقال‏:‏ ‏"‏ بني سلمة دياركم تكتب آثاركم، دياركم تكتب آثاركم‏"‏ فقالوا‏:‏ ما يسرنا أنا كنا تحولنا‏"‏ ‏(‏‏(‏رواه مسلم، وروى البخاري معناه من رواية أنس‏)‏‏)‏‏.‏