[OT] Which IDE / Editor do you use?

H. S. Teoh hsteoh at quickfur.ath.cx
Sun Sep 15 19:06:13 PDT 2013


On Sun, Sep 15, 2013 at 04:49:58PM -0400, Nick Sabalausky wrote:
> On Sun, 15 Sep 2013 19:18:14 +0200
> Joseph Rushton Wakeling <joseph.wakeling at webdrake.net> wrote:
> 
> > On 13/09/13 21:48, Namespace wrote:
> > > Just out of interest.
> > >
> > > I use Sublime 2, Notepad++ and as IDE currently Mono-D. But I will
> > > try this evening VisualD.
> > 
> > Vim, on Ubuntu. :-)
> > 
> > The actual reason is rather trivial.  I've always favoured a mixed
> > tab-space indent style for code ("tabs for indentation, spaces for
> > alignment"), as described here:
> > http://www.emacswiki.org/emacs/SmartTabs
> > 
> 
> I love that comic!
> 
> I actually did the same tab/space thing for awhile. But my editors
> didn't really have a native understanding of it so it became manual
> editing of invisible characters, so now I just avoid that style of
> alignment regardless of tabs or spaces. Ie, instead of:
> 
> foobar(aaaaa, bbbbb, ccccc,
>        dddd, eeeee, fffff);
> 
> I'll just do:
> 
> foobar(
>     aaaaa, bbbbb, ccccc,
>     dddd, eeeee, fffff
> );
> 
> Not as pretty,

I disagree. I think it's prettier. :) The first style above has the
disadvantage that the exact amount of indentation is usually a
non-integral multiple of the indent size of the rest of the code, which
I find jarring.


> but it works, it makes things simpler, Plus it avoids the former
> style's tendency to wind up with gigantically-sized indents.

Yeah... I'm torn between the two. The first style saves vertical space,
which is important to me, but the second style makes more sense IMO,
plus it lets you format complicated nested expressions in a nicer way,
i.e.:

	foobar(
		isNumber(x) ?
			aVeryLongNestedExpression :
			anotherVeryLongNestedExpression,
		isIdent(y) ?
			yetAnotherVeryLongExpression :
			guessWhatAnotherLongExpression,
		(
			(x*x + y*y)^^2 +
			(z*z + w*w)^^2 +
			2.0*(
				sin(x+y-z)^^2 +
				cos(x-y+z)^^2
			)
		) - (
			3.0*(
				tan(x+y+z)^^2 +
				sec(x-y-z)^^2
			)
		),
		(real x, real y) {
			return (
				someConvolutedCode(x) +
				moreConvolutedCode(y)
			) - (
				hahaImHavingFun(x+y) +
				makingUpStuff(x-y)
			);
		}
	);


T

-- 
Once the bikeshed is up for painting, the rainbow won't suffice. -- Andrei Alexandrescu


More information about the Digitalmars-d mailing list