Format list items with indent for subsequent items
naumad
Posts: 19 Bronze 1
in SQL Prompt
Prompt is no longer indenting subsequent list items when using tab only. For example, setting Whitespace tab behavior to Only Tabs and formatting the following code using any combination of 'Align Subsequent, Indent List Items):
create table dbo.tmp_dtru02_vehicle
( id bigint identity(1, 1)
, rundatetime_utc datetime null
, audit_createdatetimeutc datetime null
, audit_createdateutc date null
, audit_moddatetimeutc datetime null
, audit_isactive bit null);
results in the following formatted code with subsequent list items not indented with tabs:
create table dbo.tmp_test
(
id bigint identity(1, 1)
, rundatetime_utc datetime null
, audit_createdatetimeutc datetime null
, audit_createdateutc date null
, audit_moddatetimeutc datetime null
, audit_isactive bit null
);
create table dbo.tmp_dtru02_vehicle
( id bigint identity(1, 1)
, rundatetime_utc datetime null
, audit_createdatetimeutc datetime null
, audit_createdateutc date null
, audit_moddatetimeutc datetime null
, audit_isactive bit null);
results in the following formatted code with subsequent list items not indented with tabs:
create table dbo.tmp_test
(
id bigint identity(1, 1)
, rundatetime_utc datetime null
, audit_createdatetimeutc datetime null
, audit_createdateutc date null
, audit_moddatetimeutc datetime null
, audit_isactive bit null
);
Tagged:
Answers
Thanks for posting and sorry to hear you are having this issue.
I couldn't reproduce the issue in SQLPrompt_9.0.3.3299. Can you please upgrade and test again?
Thanks.
Tianjiao Li | Redgate Software
Have you visited our Help Center?
Would you be able to share the sample script and style file with us?
Tianjiao Li | Redgate Software
Have you visited our Help Center?
TerritoryID
, Name
, [Group] -- nvarchar(50)
, SalesYTD as YearToDate -- money
, SalesLastYear as LastYear -- money
from Sales.SalesTerritory
- Did you mean you want to use ' Only tabs' ?
Tianjiao Li | Redgate Software
Have you visited our Help Center?
You'd have to change the number of spaces in tabs:
Tianjiao Li | Redgate Software
Have you visited our Help Center?
It appears there is a tab in front of the first item and to align it with the subsequent list, I'm afraid you'll have to change the number of space in tabs to 2. Alternatively, you can use ' Tabs where possible'.
Tianjiao Li | Redgate Software
Have you visited our Help Center?
to be formatted like this:
The indent is one tab created only with standard tabs (not spaces) so that our documentation system will copy the code correctly. This used to work prior to the December 2017 release when the behavior for 'subsequent items' changed. Earlier in this thread, I attached the style file. If this is possible, please let me know which SQL Prompt style settings will accomplish this. If this is not possible and there will be no patch for this, please let me know and I will request a refund from my recent renewal.
After further investigation, the option 'Align subsequent items with first item' doesn't seem to work. We've logged this issue as SP-6811 in our internal bug tracking system and will keep you updated.
Thanks for your patience.
Tianjiao Li | Redgate Software
Have you visited our Help Center?
Thanks for your patience with this issue.
Unfortunately the development team hasn't been able to prioritise this work. Given the size of the backlog of higher-priority items, it doesn't look like it's something we will fix in the foreseeable future.
However we still have it logged as SP-6811 in our internal bug tracking system and we'll reassess it again in the future. Please keep an eye on the release note!
Tianjiao Li | Redgate Software
Have you visited our Help Center?
The development team had another look and it appears changing the highlighted setting resolves the issue.
Can you please give it a try?
Tianjiao Li | Redgate Software
Have you visited our Help Center?