Home > Software design >  Intellij typing character combinations like :=
Intellij typing character combinations like :=

Time:03-14

When programming in Go, I tend to use assignment statement using the operator := often. But I find it difficult to type these two characters :=. Is there any short cut or a autocomplete way to type := ?

CodePudding user response:

GoLand or IntelliJ IDEA with Go plugin has a handy shortcut to declare a new variable:

  • Type : where do you want to define a variable.
  • Press Tab to apply A short video on how to apply a live template

    You can configure an abbreviation or expand shortcut via Preferences/Settings | Editor | Live Templates | Go | Variable declaration.

  • Related