hacker emblem
jaegerfesting
Search | Tags | Photos | Flights | Gas Mileage | Log in

Space intention

Posted by Linknoid on 2008-01-29 04:35:11

World-readable

I just don't get the whole spaces to indent phenomenon. Both Visual Studio and Delphi standardize on tabs = spaces. In Delphi they default to 2, all our code is written with 3, and Visual Studio defaults to 4. I suppose I could add tab settings to the language files in Vim, but I don't like messing around with those because they get replaced with each new release. But if everyone would just standardize on tabs instead, you can then set your tabstop to whatever you want and it will indent according to your settings.

The thing that bugs me about the behavior in Vim that your post describes is the separate tabstop and shiftwidth. Maybe there are uses for having them separate, but when I set one, I really want the other to be set too. I can't really think of any circumstances where I want separate settings.

One feature you forgot to mention that's invaluable when dealing with mixed indention is the :retab command. It goes through and replaces all intention with whatever standardized indention settings you have set. I find it very useful when I went and edited a Delphi or C# file (which uses spaces) and forgot to set expandtab so I don't have to go in and fix the tab/space mixture manually.


Reply

Secrets of tabs in vim (2008-01-17 21:00:08)