Keywords to trigger pre-written code

Completed

There's a way to trigger custom code autocompletition via keywords?

 

Like:

parts => parts := strings.Split(firstVariablePassedInFunction.Stuff)

nparts => parts := strings.SplitN(firstVariablePassedInFunction.Stuff, n)

2 comments
Comment actions Permalink

Hello Dametto,

It is possible via the Live Templates feature, please see: https://www.jetbrains.com/help/go/using-live-templates.html

You can take a look at the Postfix code completion as well: https://www.jetbrains.com/help/go/auto-completing-code.html#postfix_completion

I hope it helps.

1
Comment actions Permalink

Exactly what I needed, thanks!

0

Please sign in to leave a comment.