Page 1 of 1

Correctly sending formating tab in SQL

Posted: Jun 14th, ’22, 12:44
by izeppelin
Hi friends!

Basic question. I'm trying to create a super simple text expander with some SQL / Python code that relies on tabs for formating. E.g:

Code: Select all

SELECT
{tab}col_1
FROM table
However, when it's expanded the tab gets replicated in the line below screwing up with the formatting, i.e. it looks like this

Code: Select all

SELECT
	col_1
	FROM table
I've tried it both with the {tab} tag and a regular tab.

Hence, my question is: how to properly use and format tabs in FastKeys so that tabs don't get replicated a line below screwing up with my formatting? :)

Cheers!

Re: Correctly sending formating tab in SQL

Posted: Jun 14th, ’22, 15:51
by Tom
This depends on you editor settings. FastKeys sends text exactly as you would type it. If your editor is set to use auto indents, the result can be different.

To avoid this you may send text using clipboard - set option Text Expander/Advanced/Use clipboard if text length exceeds... to lower value (1).
Or {Shift down}{Tab}{Shift up} before the third line.

Re: Correctly sending formating tab in SQL

Posted: Jun 15th, ’22, 13:15
by izeppelin
This worked perfectly :)

Thanks a ton Tom!