Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added space before opening brace in PHP's foreach.snippet #14

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion php/foreach.snippet
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
foreach ($${1:variable} as $${2:key}){
foreach ($${1:variable} as $${2:key}) {
${3:// code...}
}
1 change: 1 addition & 0 deletions php/hte.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
htmlentities(${1}, ${2:ENT_QUOTES}, ${3:'UTF-8'})${4}
1 change: 1 addition & 0 deletions php/hts.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
htmlspecialchars(${1}, ${2:ENT_QUOTES}, ${3:'UTF-8'})${4}
33 changes: 33 additions & 0 deletions twig.snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Basic Twig snippets
# Maintainer: F. Gabriel Gosselin <[email protected]>

# if
snippet if
{% if ${1} %}
${2}
{% endif %}
# for
snippet for
{% for ${2:} in ${1} %}
${3}{{ $2 }}
{% endfor %}
# include
snippet inc
{% include "${1}" %}
# extend
snippet ext
{% extends "${1}" %}
# Print variable
snippet }}
{{ ${1} }}${2}
# Single Regular execution block
snippet %%
{% ${1} %}${2}
# Open/close block
snippet %end
{% ${1:block} %}${2}{% end$1 %}
# Named block
snippet block
{% block ${1:name} %}${2}{% endblock %}
snippet f_date
{{ ${1:a_date}|date("${2:m/d/Y}") }}