So I’ve written some code of an assignment and i forgot the universities policy of
indent with 2spaces.
Normally I’ld have put a:
//vim: ts=2:tw=78: et:
at the top of my files, but this time I forgot.
How should I go about replacing all tabs with 2 space?
would
s/[TAB]/[SPACE][SPACE]
work?
(replacing [TAB] and [SPACE] with the respective key presses for the characters)
You should have a look at
retab.First set
tabstop,shiftwidthandexpandtab, then use theretabcommand: it will reformat all your file with the desired format.