Keywords to trigger pre-written code

已完成

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)

评论操作 固定链接

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
评论操作 固定链接

Exactly what I needed, thanks!

0

请先登录再写评论。