We use a cvs commitinfo action to reformat code (using JIndent, I think) into its normative format before checking in. Each developer is then free to reformat the code to their personal preferences while they are editing it. The personal formatting disappears upon commit.
David Smiley wrote: > It would be nice if IDEA could be more intelligent about how it handles tab > versus space settings. For example, I'd like it to work as so: > Here is the proposed configuration (b is boolean, # is number) > [b] use tab settings of edited file > (potentially other sub-options... threshholds... etc.) > [#] tab size (number of character lengths a tab key press moves) > [b] use tab character > [b] for beginning of line only > > FYI, these settings could be per-project. Some projects I work on have > different settings. > > The novel idea here is the first option. 'b' is my abbreviation here for > boolean option BTW. What IDEA could do is read the file, line by line, > looking for a line that starts with a tab character. It could begin this > search at the class declaration for .java files. If it finds one (or maybe > the criteria could be a certain percentage of lines that start with > white-space that is a tab) then tabs are to be used; otherwise spaces are to > be used. If spaces are used, IDEA will try to determine the tab size (# of > spaces equivalent to tab). It could also work, and this sounds really > great, by detecting the tab settings based on the vacinity of where the tab > key is pressed. > > An additional feature would be to have the "layout code" feature have an > option "[b] just convert spacing to [tabs]/[spaces]". > > A similar feature would be to automatically prompt me *upon file editing* to > convert spacing to one or the other *if the file has mixed leading > indentation*. There would be an option that says "don't ask this again for > this project" too, on this dialog that would map to something in the Project > Settings dialog. > > Does this sound reasonable? > > ~ David Smiley > > _______________________________________________ > Eap-list mailing list > [EMAIL PROTECTED] > http://www.intellij.com/mailman/listinfo/eap-list _______________________________________________ Eap-list mailing list [EMAIL PROTECTED] http://www.intellij.com/mailman/listinfo/eap-list
