IDE adds spaces...

Just starting out? Need help? Post your questions and find answers here.
User avatar
Michael Vogel
Addict
Addict
Posts: 2677
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

IDE adds spaces...

Post by Michael Vogel »

I was wondering why the Purebasic editor adds some spaces under certain situations, here's an example:

Code: Select all

Enumeration
	#highlight;		Grüne Felder
	#status;		Mausposition
EndEnumeration

Structure CursorType
	highlight.i;		Grüne Felder
	status.i;			Mausposition|
EndStructure
When the cursor (represented by '|') is set behind the last character of Mausposition and the 'Return' key is pressed, I will get the following result:

Code: Select all

	:
	highlight.i;		Grüne Felder
	status.i   ;			Mausposition
	|
EndStructure
So three spaces are inserted between 'status.i' and ';'. This is seen within the PB5.46 IDE using real tabs.
User avatar
skywalk
Addict
Addict
Posts: 3999
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: IDE adds spaces...

Post by skywalk »

The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
Michael Vogel
Addict
Addict
Posts: 2677
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: IDE adds spaces...

Post by Michael Vogel »

Interesting but weird - I would even say incorrect - at least when real tabs and proportional fonts are used.

Try to add lines here...:

Code: Select all

iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii();		i
i();								i
mmmmmmmmmmmmmmmmm();		m
m();							m
freak
PureBasic Team
PureBasic Team
Posts: 5929
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: IDE adds spaces...

Post by freak »

It is aligning the comment marks which is not an uncommon style to format comments.

Just because you don't like it doesn't make it incorrect. You can always turn the auto-indent feature off if you don't like what it does.
quidquid Latine dictum sit altum videtur
User avatar
Michael Vogel
Addict
Addict
Posts: 2677
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: IDE adds spaces...

Post by Michael Vogel »

freak wrote:It is aligning the comment marks which is not an uncommon style to format comments.

Just because you don't like it doesn't make it incorrect. You can always turn the auto-indent feature off if you don't like what it does.
It's not aligned, what seems uncommon to me indeed.
User avatar
Demivec
Addict
Addict
Posts: 4091
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: IDE adds spaces...

Post by Demivec »

Michael Vogel wrote:Interesting but weird - I would even say incorrect - at least when real tabs and proportional fonts are used.
I wouldn't expect to get any good results with proportional fonts when trying to align things up midway into the line where the comments take place.

Even so, it seems like it should work if only real tabs were being used instead of spaces.
Post Reply