Code Snippets

Discussion, questions and support.
Post Reply
nitai
Posts: 1
Joined: Sep 9th, ’19, 23:25

Post by nitai » Sep 9th, ’19, 23:52

Hi all,

First off, fantastic tool. After a few days trialing it, I bought it now, and will roll it out to my other users.

That said, I would like to build a shared "Code Snippet" Library. However, I'm facing the challenge of doing so with our Javascript code (I don't need FastKeys to execute JS code).

Here is an example:

function myFunc(p1, p2) {
(tab)let _var1 = 'test';
}

Now, when I add this, I first had the challenge that the "{" and "}" weren't inserted. I've "fixed" this by wrapping them with {{} and {}} (I hope that is correct?).

Despite this, the expander either always adds an additional "}" or the indentation is messed up.

Maybe someone can lead me in the right direction? How should "Code Snippets" be created to work?

Thank you for any feedback and help.
User avatar
Tom
Posts: 293
Joined: Nov 24th, ’15, 23:39

Post by Tom » Sep 10th, ’19, 11:53

Fastkeys sends the characters exactly as you would type them on the keyboard. You editor may introduce some automatic indents and closing braces. It this is so, remove the closing brace. Try in Notepad to see the difference.

Instead of putting special characters in braces, like {{} etc., you can use Send Raw Text option.
Post Reply