SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[7.0] Sql Editor wish: wrapped indent

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[7.0] Sql Editor wish: wrapped indent
Author Message
Alextp



Joined: 13 Jun 2014
Posts: 22
Country: Russian Federation

Post [7.0] Sql Editor wish: wrapped indent Reply with quote
Can u accept this feature request?
http://synwrite.sourceforge.net/forums/viewtopic.php?f=17&t=351

(Same EControl engine, like sql editor)
Several good editors have it (UltraEdit and EmEditor)

Thank
Mon Jun 30, 2014 11:17 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Reply with quote
I'm not sure I understand the requested feature. Can you provide a SQL specific example instead of generic text paragraph?

By the way, that SQL Assistant does auto-indenting for you based on SQL keyword anchors? for example, if you enter

Code:
-- ... some code here ...
-- here comes an indented line
   SELECT blah...blah ... here you press Enter key and type keyword FROM
   FROM -- FROM appears indented to align with the SELECT. It works similarly for other keywords, column names and other elements as defined in code formatting rules in the Options.
   WHERE -- where is aligned too

Mon Jun 30, 2014 11:30 am View user's profile Send private message
Alextp



Joined: 13 Jun 2014
Posts: 22
Country: Russian Federation

Post Reply with quote
Sql example:

Code:

    procedure NNNNNN -- some procedure beginning, like in Oracle
          select ............................................................................................... from .............................................................. where .............................................. and ................... group by ................................ 
          select ............................................................................................... from .............................................................. where .............................................. and ................... group by ................................ 


These are 3 lines. Editor shld display wrapped parts (of lines 2/3) with indent, 10 spaces.
Mon Jun 30, 2014 11:36 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Reply with quote
Alextp wrote:
Sql example:

Code:

    procedure NNNNNN -- some procedure beginning, like in Oracle
          select ............................................................................................... from .............................................................. where .............................................. and ................... group by ................................ 
          select ............................................................................................... from .............................................................. where .............................................. and ................... group by ................................ 


These are 3 lines. Editor shld display wrapped parts (of lines 2/3) with indent, 10 spaces.


Something is not working for you there. I see a number of issues there, including code auto-formatting not working. Which database type are you connected to? which SQL Assistance type is selected in Options for that type? Are you using factory default options or custom?
Mon Jun 30, 2014 11:55 am View user's profile Send private message
Alextp



Joined: 13 Jun 2014
Posts: 22
Country: Russian Federation

Post Reply with quote
- I not connected yet, offline
- I chosen "Code formatting style: None" to not kill leading spaces
- now I enter text, with leading spaces, long lines, and get:


Mon Jun 30, 2014 12:04 pm View user's profile Send private message
Alextp



Joined: 13 Jun 2014
Posts: 22
Country: Russian Federation

Post Reply with quote

Mon Jun 30, 2014 12:06 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Reply with quote
For that to work with MS Assess you need to choose Code Assistant and some Formatting style in the Options, I recommend using T-SQL style as the closest.

MS Access is not a good test case. Please try this feature with other more advanced database servers.
Mon Jun 30, 2014 12:14 pm View user's profile Send private message
Alextp



Joined: 13 Jun 2014
Posts: 22
Country: Russian Federation

Post Reply with quote
"Formatting style" I need None, because i don't want to auto format text, I want it as I type, with leading spaces. And my wish allows to show my not formatted text - nice
Mon Jun 30, 2014 12:22 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Reply with quote
Alextp wrote:
"Formatting style" I need None, because i don't want to auto format text, I want it as I type, with leading spaces. And my wish allows to show my not formatted text - nice


But this disabled the auto-indenting feature which is part of the code formatting. Unfortunately you cannot have it disabled and still working for auto-indenting only.
Mon Jun 30, 2014 12:41 pm View user's profile Send private message
Alextp



Joined: 13 Jun 2014
Posts: 22
Country: Russian Federation

Post Reply with quote
Quote:
But this disabled the auto-indenting feature

No, I checked "Auto-indent" in Editor op dialog, and it works OK here, even W/out "Code formatter" enabled
Mon Jun 30, 2014 12:54 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Reply with quote
Glad you found s workaround.

Just in case, that one is not SQL syntax related. As compared to the SQL syntax based indenting, it won't indent joins, logical operators, sub-queries, etc... so you will need to type more, not less when code formatting is enabled.
Mon Jun 30, 2014 1:26 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.