When using code completion, you can accept the current selection in the suggestions list with &shortcut:EditorCompleteStatement;. IntelliJ IDEA Community will not only insert the selected string, but also turn the current code construct into a syntactically correct one (balance parentheses, add missing braces and semicolons, and so on).