Page 1 of 1

Code Snippets

Posted: Sep 9th, ’19, 23:52
by nitai
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.

Re: Code Snippets

Posted: Sep 10th, ’19, 11:53
by Tom
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.