Live Templates without cmd+j

I just started to use live templates. I also downloaded some templates for laravel and they will be shown in the box while typing my code... but when i do my own live template i have to press cmd+j ... is there a way to handle this? I want my own templates to show in the box for autocompletion while writing the code.

0
3 comments

Hi there,

You have to provide some screenshots with your live templates -- how you did it; what the actual template is; what context you did choose for it etc

Also screenshots of them not showing in completion popup (but they should as per your words).

0

.... when i write oBlad... in my code i want to choose the snippet by hit return. now i have to hit cmd+j before access the snippet.

0

You are in HTML context. The code completion popup does not appear automatically as the entered text (oB) is a plain text .. so you have to invoke Code Completion pupup manually. But the same can be achieved with Cmd+J -- no difference should be here.

If you want it to be more automatic (no Cmd+J or alike) -- name your live template with very short and unique abbreviation (e.g. "qq") so typing qq[TAB] (or whatever the expand key is) would trigger that live template. (but here I'm facing another issue -- the blade tags get removed and only HTML part gets inserted... no idea why, possibly a bug or something)

As for your downloaded Laravel templates ... in what context they are used? If PHP -- yes, it's more determined so code completion appears automatically, not like here in HTML (again: "oBlade::formErrors" (your live template abbreviation) is just a plain text and code completion popup is not shown here).

1

Please sign in to leave a comment.