Indenting a block of code in script editor

Discuss all feature requests you have for a new Servoy versions here. Make sure to be clear about what you want, provide an example and indicate how important the feature is for you

Indenting a block of code in script editor

Postby jasantana » Fri Aug 13, 2010 11:32 am

Servoy IDE could be enhanced if we had an option in the Script Editor to indent a block of code.

For example if after writing a block of code I see that I need to place an IF condition I can indent that block just selecting and indenting it.

Thanks.
Best regards,
Juan Antonio Santana Medina
jasantana@nephos-solutions.co.uk
Servoy MVP 2015
Servoy 6.x - Servoy 7.x - Servoy 8.x - MySQL - PostgreSQL - Visual Foxpro 9
User avatar
jasantana
 
Posts: 554
Joined: Tue Aug 10, 2010 11:40 am
Location: Leeds - West Yorkshire - United Kingdom

Re: Indenting a block of code in script editor

Postby jcompagner » Fri Aug 13, 2010 11:38 am

select and then press TAB (or Shift TAB the other way) doesn't work for you?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8212
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Indenting a block of code in script editor

Postby Vaj » Fri Aug 13, 2010 12:09 pm

Like Johan said you should be able to use TAB. if not select the block of code and do [ CTRL + SHIFT + F ] this automatically formats the code for you. You can optionally define how you want to format the code by going in to Window --> Preferences --> JavaScript --> Formatter. Makes life much easier! :)
V Rathnayaka
Senior Systems Developer.
Space Air plc.
User avatar
Vaj
 
Posts: 64
Joined: Fri Jul 21, 2006 10:14 am
Location: Surrey, UK

Re: Indenting a block of code in script editor

Postby jasantana » Fri Aug 13, 2010 1:01 pm

Ups!! Sorry friends thats correct. I did not know that tricky, I´m new to Servoy and coming from VFP so sometimes I try to do things as I use to.

Thanks and sorry again.
Best regards,
Juan Antonio Santana Medina
jasantana@nephos-solutions.co.uk
Servoy MVP 2015
Servoy 6.x - Servoy 7.x - Servoy 8.x - MySQL - PostgreSQL - Visual Foxpro 9
User avatar
jasantana
 
Posts: 554
Joined: Tue Aug 10, 2010 11:40 am
Location: Leeds - West Yorkshire - United Kingdom

Re: Indenting a block of code in script editor

Postby Joas » Fri Aug 13, 2010 1:43 pm

jasantana wrote:Ups!! Sorry friends thats correct. I did not know that tricky, I´m new to Servoy and coming from VFP so sometimes I try to do things as I use to.

Thanks and sorry again.

Also try "Ctrl+i" when you have selected a block of code. It will add the right indentation for nested statements as well.
The functionality of "Ctrl+i" is about in the middle between doing just "Tab" and doing "Ctrl+Shift+f". :)
Joas de Haan
Yield Software Development: Need help on your project?
yieldsd.com
User avatar
Joas
Site Admin
 
Posts: 810
Joined: Mon Mar 20, 2006 4:07 pm
Location: Amersfoort, NL


Return to Discuss Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest