Jabir said that the area round the mosque was vacant and that the Banu Salima wanted to move near the mosque, but when the Prophet heard of that he said to them, “I have heard that you want to move near the mosque.” They replied, “Yes, Messenger of God, that was our desire.” He said, “Banu Salima, if you keep to your present houses, your footprints will be recorded; if you keep to your present houses, your footprints will be recorded.”*
* I.e. you will receive a reward for the distance you have to go to the mosque.
Muslim transmitted it.
Abu Musa reported God’s Messenger as saying, “The one who will receive the greatest reward for prayer is he who lives farthest away, and he who has farthest to walk and he who waits for the prayer to observe it with the imam will have a greater reward than the one who observes it and then goes to sleep.”
Narrated Abu Huraira reported God’s Messenger as saying, “There are seven whom God will cover with His shade on the day when there will be no shade but His:
a just imam; a young man who grows up worshipping God; a man whose heart is attached to the mosque from the time he leaves it till he returns to it; two men who love one another for God's sake, meeting thus and separating thus; a man who remembers God in solitude, his eyes pouring forth tears; a man who, when accosted by a woman of rank and beauty, says, ‘I fear God’; and a man who gives alms concealing it so that his left hand does not know what his right hand bestows.”
Abu Huraira reported God’s Messenger as saying, “If anyone goes out in the morning or in the evening to the mosque, God will prepare for him his food in paradise as often as he goes out in the morning or in the evening.”