Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij Live Templates in Code Complete list

If your familiar with visual studio you can select code snippets from the auto complete list. is this possible in IntelliJ

So for example if i type

for

it would show "for" and the live template "fori" in the code complete dropdown list

like image 624
Ryan Burnham Avatar asked Aug 25 '12 05:08

Ryan Burnham


People also ask

How do I autocomplete in IntelliJ?

Invoke basic completion By default, IntelliJ IDEA displays the code completion popup automatically as you type. If automatic completion is disabled, press Ctrl+Space or choose Code | Code Completion | Basic from the main menu. If necessary, press Ctrl+Space for the second time (or press Ctrl+Alt+Space ).

What is live template in IntelliJ?

Live Templates reduce the amount of code you need to type for the more common code constructs. You can use psvm or main to create the main Java method, for example. There are lots of live templates including fori for a for i loop and nn for not null, plus many more.


1 Answers

Turns out it is possible (unless I'm missing something) via the Registry editor:

Registry Screen Capture

See this answer on how to get to this editor.

like image 81
Vic Avatar answered Nov 02 '22 19:11

Vic