[Implemented] Real TABS instead if simple spaces

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

[Implemented] Real TABS instead if simple spaces

Post 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...
sverson
Enthusiast
Enthusiast
Posts: 286
Joined: Sun Jul 04, 2004 12:15 pm
Location: Germany

Post 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
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Post by Blade »

Thanks, but I meant the PB editor, the one you use to write code, not the editor gadget... :)
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

It would be a good idea to have that, in JapBe too if possible (well, i'm not sure Scintilla supports tabs)
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

whats wrong with the tabs in japbe?

isnt that just an xp style feature?
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

As an idea should be to add a Spin Gadget in the Editor preferences for "number of spaces per TAB" :idea:
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post 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 :)
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

i get it sorry didnt understand :)
Last edited by thefool on Thu Feb 24, 2005 11:50 am, edited 1 time in total.
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post 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:
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post 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
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Psychophanta -> But i think Purebasic adds 2 or 3 spaces, not really sure thought...
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post 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:
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Post 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.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post 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. :)
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

But what i would like is real tabs :) A tab is a tab, no ?
Post Reply