Correctly sending formating tab in SQL

Discussion, questions and support.
Post Reply
izeppelin
Posts: 5
Joined: Mar 14th, ’21, 21:55

Post by izeppelin » Jun 14th, ’22, 12:44

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!
User avatar
Tom
Posts: 791
Joined: Nov 24th, ’15, 23:39

Post by Tom » Jun 14th, ’22, 15:51

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.
izeppelin
Posts: 5
Joined: Mar 14th, ’21, 21:55

Post by izeppelin » Jun 15th, ’22, 13:15

This worked perfectly :)

Thanks a ton Tom!
Post Reply