Re: pgindent (Re: [HACKERS] LONG varsize - how to go on)t
От | Bruce Momjian |
---|---|
Тема | Re: pgindent (Re: [HACKERS] LONG varsize - how to go on)t |
Дата | |
Msg-id | 199912200229.VAA20208@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: pgindent (Re: [HACKERS] LONG varsize - how to go on)t (Peter Eisentraut <peter_e@gmx.net>) |
Список | pgsql-hackers |
[Charset ISO-8859-1 unsupported, filtering to ASCII...] > On 1999-12-18, Bruce Momjian mentioned: > > > I remember clear mention that we did not like: > > > > if () { > > > > } > > > > I see you are writing your shell scripts with that, and am not a fan of > > it, but it is only a shell script. > > What do I know about shell scripting? :) > > Seriously though, I didn't use to do that, but I get to like it more every > day ... I was going to look for an example of uglily-formatted code now, > but can't find one. My concern was more about the 4-space-tabs, because a > tab is 8 spaces in the rest of the world. I have no problem with 4 space > indentation and the good old bsd format. As a workaround, there is a C program I wrote called entab in pgsql/src/tools/entab. It has a manual page and everything. It does a good job of converting tabs to any size, or removing all tabs. It does certain fancy things like prevent tab changes inside quoted strings, and clip trailing whitespace. That is what I do in my print filters. I admit our current system is a pain. Our options are: o go to 8 space tabs and 8 space indentingo go to 8 space tabs and 4 space indentingo keep 4 space tabs and 4 space indenting The first option is out. Eight space indenting is a pain, and our code would look terrible. Eight is just too much and prevents meaningful indenting. The second option is your preference. It is easier to print, but editing the file can be a pain for editors that don't support different tab/indent values. Also, I like cursoring over tabs, so having some indents as 4 spaces and some as full tabs give the code a funny feeling for me. I print a lot less, and use entab do handle the 4-space issue, so it seems the best for me. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: