Who would like syntax definition to include formatting

Ideas for new features

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply

Who would like syntax definition to include formatting settings as well as color

Ohh please
4
27%
yes
5
33%
not bothered
1
7%
not much use
3
20%
Why??
2
13%
 
Total votes: 15

space cadet
Posts: 5
Joined: Thu Sep 18, 2003 10:38 am
Location: Manchester
Contact:

Who would like syntax definition to include formatting

Post by space cadet »

Basically a rip from visual studio - that is run time code formatting

This formatting would mean that IF's CASE's and loops could be defined with tab/space settings

eg The line after a line that starts IF is automatically tabbed in once then if a line starts with ELSE or END then the line is tabbed back to be inline with the initial IF after the return key is pressed

Similar settings could be defined for CASE and SWITCH conditionals

Just a thought really
User avatar
ramonsky
Posts: 88
Joined: Fri Nov 14, 2003 10:54 am

Post by ramonsky »

You're talking about smart indentation, aren't you?

Presumably this could be done just by considering braces ({ and }). You wouldn't also need to consider keywords - at least, not in C++. (Python is another matter).

I haven't voted yet, because I haven't properly understood what you want. May I assume that when you say "CASE" you actually mean "case" (etc.), or are you talking about some different language which uses uppercase keywords and with which I am unfamiliar?

Jill
space cadet
Posts: 5
Joined: Thu Sep 18, 2003 10:38 am
Location: Manchester
Contact:

Post by space cadet »

yeah smart indentation - if you've used visual studio then you will know what i mean.

With regards to CASE - i tend to capatalise keywords just to make them stand out a bit better, i wasn't refering to case sensitive formatting i meant CASE as in

Code: Select all

CASE var1
   when var1 = 1 then ...
   when var1 = 2 then...
ELSE
...
END
So the syntax definition would need to include something for indenting on these conditions
EG: [CASE(0)|WHEN(+3)|ELSE(0)|END(0)]

could define how to format a CASE WHEN ELSE END structure.[/code]
Post Reply