#JetBrainsIDEテクニック – Postfix Completionのカスタマイズ #jbtips

Postfix CompletionはJetBrains IDEで生産性を上げる上で最も重要なテクニックのうちの1つです。
さらにPostfix Completionはご自分で新しいものを定義することもできます。

創造性を発揮して開発をより早く、より正確に、より楽しいものにしましょう!
動画で紹介している .last の他に、Javaでは以下のようなカスタムPostfix Completionを定義するのがオススメです。

キー Applicable
expression types
パターン
last java.util.List $EXPR$.get($EXPR$.size()-1)$END$
last array $EXPR$[$EXPR$.length-1]
ae non void assertEquals($END$,$EXPR$);
at boolean assertTrue($EXPR$);
af boolean assertFalse($EXPR$);

言語によってはまだカスタムPostfix Completionを定義できないものもございます。
以下に、各言語のYouTrackの課題をリンクいたしました。必要な方は是非ログインして投票してください。
Python: Allow creation of custom postfix templates for Python
Ruby: Ability to add custom Ruby postfix completion
Kotlin: Support custom postfix completion
Scala: Editable Postfix Code Completion for Scala
Groovy: Postfix templates support for Groovy
Swift: Add postfix completion for Swift

対応IDE: IntelliJ IDEA、PyCharm、Rider、GoLand、PhpStorm、RubyMine、CLion、AppCode、DataGrip、WebStorm