Sunan Ibn Majah 785
It was narrated that Ibn 'Abbas said:
"The houses of the Ansar were far from the mosque and they wanted to move closer. Then the following Verse was revealed: 'We record that which they send before (them), and their traces.'" [Ya-Sin: 12] He said: So they remained (where they were)."
حَدَّثَنَا عَلِيُّ بْنُ مُحَمَّدٍ، حَدَّثَنَا وَكِيعٌ، حَدَّثَنَا إِسْرَائِيلُ، عَنْ سِمَاكٍ، عَنْ عِكْرِمَةَ، عَنِ ابْنِ عَبَّاسٍ، قَالَ كَانَتِ الأَنْصَارُ بَعِيدَةً مَنَازِلُهُمْ مِنَ الْمَسْجِدِ فَأَرَادُوا أَنْ يَقْتَرِبُوا فَنَزَلَتْ ‏{وَنَكْتُبُ مَا قَدَّمُوا وَآثَارَهُمْ}‏ قَالَ فَثَبَتُوا ‏.‏