casid / jte-intellij

IntelliJ plugin for jte template files.
https://github.com/casid/jte
Apache License 2.0
23 stars 5 forks source link

adjust live template values for better typing flow #22

Closed maxwellt closed 2 years ago

maxwellt commented 2 years ago

I've been using JTE for a demo project and found it very useful (will be writing a blog post about it soon). I did find some small issues with regards to typing flow for the IntelliJ live templates and have adjusted these here.

For instance when using the @if live template, the cursor stops in the space between the brackets of the if condition, so I changed the template value to:

if($CONDITION$)
    $END$
endif

The same for @for, @else and @elseif. It allows for a more natural typing flow I feel.

casid commented 2 years ago

Hey @maxwellt, thank you for the heads up! And I really like those live template improvements :-)

I'll try to review and merge this weekend.

casid commented 2 years ago

I gave it a try and it is a lot more fun to write conditions now than it was before. Thanks!

I added a small optimization, so that other indentation settings than four spaces are working too.

maxwellt commented 2 years ago

Awesome, glad I could contribute somehing :-)