468,133 Members | 1,486 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,133 developers. It's quick & easy.

indenting

bob
What tool do most of you people use to indent your code? Doing so by
hand is a bit tedious, I think.

Sep 24 '05 #1
9 1621
Ian
bo*@coolgroups.com wrote:
What tool do most of you people use to indent your code? Doing so by
hand is a bit tedious, I think.

A decent text editor! In my case emacs, but I'm sure just about every
IDE out there has auto indent.

Ian
Sep 24 '05 #2
bo*@coolgroups.com wrote:
What tool do most of you people use to indent your code?


The tab key.

--
Salu2
Sep 24 '05 #3
bo*@coolgroups.com writes:
What tool do most of you people use to indent your code?


The "tab" key.

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
Sep 25 '05 #4
dev c++

Sep 25 '05 #5
hde
Emacs >:-}, C/C++ mode.

Harley D. Eades III

Sep 25 '05 #6
* bo*@coolgroups.com:
[off-topic in clc++]

What tool do most of you people use to indent your code? Doing so by
hand is a bit tedious, I think.


The 'Tab' key + editor smarts.

Adding a standardized comment at the very top about indent and tab size:

// indent = tab = 4.

A great many editors support indenting a block by marking it and pressing
'Tab', and similarly, undenting by pressing 'Shift Tab'.

Some projects, e.g. Boost, have instead standardized on always using spaces.
I think that's counter-productive. Really, I hate code that uses spaces for
indenting. Ordinary navigation requires more key-presses. And if you want to
present that code using a proportional font, then there is in general nothing
that indicates whether a space is a just a space or whether it's used to line
up text vertically (spaces at the start of a line are a special case).

Not that I've ever done that proportional font presentation. However, some
folks (including Bjarne Stroustrup) do. It looks rather neat in an article.
Also, code using tab characters can alway be automatically converted to code
using spaces, e.g., the Visual Studio editor does this, and it should always
be done before posting code on Usenet or using it in an article, because of
different tab size conventions; it's trivial to do and no problem. Conversion
of spaces code to code with tabs is however in general impossible to fully
automate, although the mentioned editor attempts to do that, too: one example
where it requires manual editing is right hand comment vertical line-up.

XFUT: [comp.programming]

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Sep 25 '05 #7

<bo*@coolgroups.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
What tool do most of you people use to indent your code? Doing so by
hand is a bit tedious, I think.


See http://www.semdesigns.com/Products/F...Formatter.html
--
Ira D. Baxter, Ph.D., CTO 512-250-1018
Semantic Designs, Inc. www.semdesigns.com
Oct 1 '05 #8

bo*@coolgroups.com wrote:
What tool do most of you people use to indent your code? Doing so by
hand is a bit tedious, I think.

Exclipse, hands down

ctrl-i

Oct 1 '05 #9
bo*@coolgroups.com wrote:
What tool do most of you people use to indent your code? Doing so by
hand is a bit tedious, I think.


vim:
set tabstop=4 shiftwidth=4
=G

--
Marcus Kwok
Oct 5 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by David Ehmer | last post: by
2 posts views Thread by RobG | last post: by
1 post views Thread by sh4r4d | last post: by
2 posts views Thread by Leon Friesema | last post: by
5 posts views Thread by Jean Pion | last post: by
7 posts views Thread by Harrie | last post: by
reply views Thread by D. Shane Fowlkes | last post: by
6 posts views Thread by eugene.morozov | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.