SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[12.4.476 Pro] - Inserting TABs from snippets

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[12.4.476 Pro] - Inserting TABs from snippets
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2109

Post [12.4.476 Pro] - Inserting TABs from snippets Reply with quote
I've run into a funomaly, which I'm not sure whether to classify as a bug or a feature – it might well be both.

When inserting a code snippet, the snippet may contain either spaces or TABs as whitespace. Now, the SQL Editor has a setting that controls whether the editor uses spaces or TABs, but this setting is disregarded or overridden when the code is inserted from a snippet. This is where it becomes interesting.

My editor is set to use spaces, and as a result, I normally cannot enter TAB characters into the code, except when using snippets.

Check out this short video here.

The video shows the contents of two snippets with control characters. The BEGIN snippet includes one indented line with a TAB, and the "arbitrary" snippet includes one line indented with spaces and another with a TAB. Now, if I trigger the BEGIN snippet and replace its TAB-indented line with one indented by spaces, then triggering the "arbitrary" snippet on the indented line will indent all the lines in the "arbitrary" snippet to the level where the caret was when invoking the snippet, while preserving the TAB explicitly included in the snippet.

However, if I leave the original TAB from the BEGIN snippet, invoking the "arbitrary" snippet will indent all its lines using TAB characters instead of spaces.

Is this behavior intentional or accidental?

EDIT:
In addition to the above, SA inserts plain table expansions using TABs, regardless of that setting.

Check out this short video here.
Wed Nov 22, 2023 10:10 am 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.