The story of death of Salman Al-Farsi r.a. the Persian Sahabi of prophet is mentioned in different Shia books like this reference. It includes that Imam Ali passed a long distance in very short period of time, this action is called Tay al-Arz طي الأرض and is considered as a kind of Keramat and is mentioned in this verse:
قَالَ الَّذِي عِندَهُ عِلْمٌ مِّنَ الْكِتَابِ أَنَا آتِيكَ بِهِ قَبْلَ أَن يَرْتَدَّ إِلَيْكَ طَرْفُكَ ۚ فَلَمَّا رَآهُ مُسْتَقِرًّا عِندَهُ قَالَ هَٰذَا مِن فَضْلِ رَبِّي لِيَبْلُوَنِي أَأَشْكُرُ أَمْ أَكْفُرُ ۖ وَمَن شَكَرَ فَإِنَّمَا يَشْكُرُ لِنَفْسِهِ ۖ وَمَن كَفَرَ فَإِنَّ رَبِّي غَنِيٌّ كَرِيمٌ
Muhsin Khan Translation:
One with whom was knowledge of the Scripture said: "I will bring it to you within the twinkling of an eye!" then when [Sulaiman (Solomon)] saw it placed before him, he said: "This is by the Grace of my Lord to test me whether I am grateful or ungrateful! And whoever is grateful, truly, his gratitude is for (the good of) his ownself, and whoever is ungrateful, (he is ungrateful only for the loss of his ownself). Certainly! My Lord is Rich (Free of all wants), Bountiful."
According to Shia theology, it is believed that Imams and some of very pious scholars had and have this ability granted by Allah. There are many stories recorded in different books that says Imams and many of scholars did Tay al-Arz but usually they keep this ability secret from public and only their near friends know it.
Tay al-Arz is part of "knowledge of Kitab" mentioned in the Quran and hadith. it is narrated in a hadith (I think from Sunni also)
Abu Saeed Khidri asked from prophet who is "who has some of knowledge of Kitab" الَّذِي عِندَهُ عِلْمٌ مِّنَ الْكِتَابِ in the Quran? prophet replied: he is executor of my brother Solomon. then I asked and who is "who has knowledge of Kitab" مَنْ عِندَهُ عِلْمُ الْكِتَابِ in the Quran? prophet replied he is my brother Ali Ibn Abi Talib
جلد 3 احقاق الحق صفحه 280- 281
نور الثقلین جلد 2 صفحه 523