fun with vi

Normally I use vim for my editing needs. However there are times when vim is not available. No big deal, I can use vi. But one of the things that I use in vim is the ability to have tabs represented as spaces. After much trial and error, I finally have a way to do this in vi!

This is what I stuck in my .exrc

" convert tabs to spaces using expand(1)
map #t 1G!Gexpand -t 4^M

Now I just have to hit '#t' to convert all the tabs to 4 spaces.