Reputation: 1373
I'm dealing with some code written in manner that is really, honestly, ugly. Is there a way to auto enforce proper tabs and remove all of the random multi-line white space entries?
Upvotes: 1
Views: 263
Reputation: 9
You can use any editor but I would prefer using Vim, with vim you can actually give proper tabs by selecting all the code in visual mode and then '='. You will also have to set sw=3 for only 3 space equal tab - preferred spacing in most of the code. Also set expandtabs this will ensure the code will look the same as it will replace '\t' with 3 space
Upvotes: 1
Reputation:
Old Unix people have a solution for everything, including lazy programmers. Enter GNU indent.
Upvotes: 4