Page 1 of 3

[Implemented] Real TABS instead if simple spaces

Posted: Wed Feb 23, 2005 7:04 pm
by Blade
I'd like the editor to ure REAL tabs spacing, not just a couple of spaces...
As you may know, it's a normal feature in all common text editors, and many times it's optional too...

Posted: Wed Feb 23, 2005 7:59 pm
by sverson
RichEdit controls support real tabs.

Use SendMessage_ with #EM_SETPARAFORMAT and PARAMFORMAT2

More information on parameters and commands are here:
http://msdn.microsoft.com/library/defau ... format.asp
http://msdn.microsoft.com/library/defau ... ormat2.asp

A good startingpoint coult be the linenumbering thread
viewtopic.php?t=13467

Sorry i can't give you examples at the moment cause I'm in a hurry.
Maybe I can tell you more in a few hours...

:wink: sverson

Posted: Wed Feb 23, 2005 8:53 pm
by Blade
Thanks, but I meant the PB editor, the one you use to write code, not the editor gadget... :)

Posted: Wed Feb 23, 2005 8:55 pm
by Polo
It would be a good idea to have that, in JapBe too if possible (well, i'm not sure Scintilla supports tabs)

Posted: Wed Feb 23, 2005 9:41 pm
by thefool
whats wrong with the tabs in japbe?

isnt that just an xp style feature?

Posted: Wed Feb 23, 2005 9:46 pm
by Psychophanta
As an idea should be to add a Spin Gadget in the Editor preferences for "number of spaces per TAB" :idea:

Posted: Wed Feb 23, 2005 9:58 pm
by Polo
What i would want is just a tab like in other programs, a tab is a tab, not a few space, i don't know why purebasic does that, but i hope fred can replace it, it's faster to delete one tab than 2+ spaces :)

Posted: Wed Feb 23, 2005 10:01 pm
by thefool
i get it sorry didnt understand :)

Posted: Wed Feb 23, 2005 10:02 pm
by Psychophanta
Polo, a TAB is usually 8 or 9 spaces. But there are no standards for it. Each text editor treats differently the TAB key.
Bests editors allow to user to customize that key and/or that ascii value (9) :wink:

Posted: Thu Feb 24, 2005 11:58 am
by DoubleDutch
A real TAB would be great, its the only thing I don't like about the editor - everything else is great! :D

-Anthony

Posted: Thu Feb 24, 2005 1:59 pm
by Polo
Psychophanta -> But i think Purebasic adds 2 or 3 spaces, not really sure thought...

Posted: Thu Feb 24, 2005 4:46 pm
by Psychophanta
Polo wrote:Psychophanta -> But i think Purebasic adds 2 or 3 spaces, not really sure thought...
PB Editor converts the tab key input to 2 spaces (it outputs $2020).
As i said before, the idea should be TAB key input to be customizable by PB editor. I mean convert it to a given "selectable" number of space characters. :wink:

Posted: Thu Feb 24, 2005 4:51 pm
by tinman
Psychophanta wrote:As i said before, the idea should be TAB key input to be customizable by PB editor. I mean convert it to a given "selectable" number of space characters.
???

In the File->Preferences window there is an option to set how many spaces in a tab there are.

I'd quite like the option of using either method, but it typically ends up being a mess, depending on how the editor works. Quite a few seem to get confused and then end up mixing spaces and tabs, which of course goes horribly wrong when someone with a different tab length views your code.

Posted: Thu Feb 24, 2005 5:09 pm
by Psychophanta
tinman wrote:In the File->Preferences window there is an option to set how many spaces in a tab there are.
Wooops! There is.

Blade, Polo, DoubleDutch,
You see? So the solution was before the request this time. :wink:
tinman wrote:I'd quite like the option of using either method, but it typically ends up being a mess, depending on how the editor works. Quite a few seem to get confused and then end up mixing spaces and tabs, which of course goes horribly wrong when someone with a different tab length views your code.
Totally agree.
And of course I use always 2 spaces per TAB, the default option. :)

Posted: Thu Feb 24, 2005 6:16 pm
by Polo
But what i would like is real tabs :) A tab is a tab, no ?