Move from if: to endif;

When we have a block (if block for example) with brackets we can move from the begginning to the end of the block ( "{" and "}" ) with CTRL+[ or CTRL+]

But It doesn't work when you have a block with the alternative syntax (using ":" for opening and closing with "end...;")

This is extremely useful when you are writting templates, and many times is very hard to find the corresponding "end" for a block.

How can we solve this with PHPStorm?

Thanks !

1
Avatar
Permanently deleted user

Should I open a feature request for this or is possible to do it right now and I'm missing it?

1

This is also relevant for template languages. Like in a helm chart it can look like this:

{{ if -- condition -- }}

# ... lots of code ...

{{- end }}

Here's a concrete example in the Elasticsearch helm chart:
https://github.com/elastic/helm-charts/blob/main/elasticsearch/templates/statefulset.yaml#L168

0

请先登录再写评论。