1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 09:35:01 +08:00
This commit is contained in:
Geezus
2019-05-16 14:30:26 -05:00
163 changed files with 3545 additions and 1379 deletions

View File

@ -17,7 +17,7 @@ snippet if
snippet ife
<%= if ${1} do %>
${2:${VISUAL}}
<%= else %>
<% else %>
${0}
<% end %>
snippet ft

View File

@ -0,0 +1,263 @@
# Port of Shopify Liquid Template Snippets
# https://marketplace.visualstudio.com/items?itemName=killalau.vscode-liquid-snippets
snippet if
{% if ${1:condition} %}
${0:${VISUAL}}
{% endif %}
snippet else
{% else %}
snippet elsif
{% elsif ${1:condition} %}
snippet ifelse
{% if ${1:condition} %}
${2}
{% else %}
${0}
{% endif %}
snippet unless
{% unless ${1:condition} %}
${0:${VISUAL}}
{% endunless %}
snippet case
{% case ${1:variable} %}
{% when ${2:condition} %}
${3}
{% else %}
${0}
{% endcase %}
snippet when
{% when ${1:condition} %}
${0}
snippet cycle
{% cycle '${1:odd}', '${2:even}' %}
snippet cyclegroup
{% cycle '${1:group name}': '${2:odd}', '${3:even}' %}
snippet for
{% for ${1:item} in ${2:collection} %}
${0}
{% endfor %}
snippet limit
limit: ${1:5}
snippet offset
offset: ${1:0}
snippet reversed
reversed
snippet break
{% break %}
snippet continue
{% continue %}
snippet tablerow
{% tablerow ${1:item} in ${2:collection} cols: ${3:2} %}
${0}
{% endtablerow %}
snippet assign
{% assign ${1:variable} = ${0:value} %}
snippet increment
{% increment ${0:variable} %}
snippet decrement
{% decrement ${0:variable} %}
snippet capture
{% capture ${1:variable} %}${0}{% endcapture %}
snippet include
{% include '${0:snippet}' %}
snippet includewith
{% include '${1:snippet}', ${2:variable}: ${0:value} %}
snippet section
{% section '${1:snippet}' %}
snippet raw
{% raw %}${0}{% endraw %}
snippet layout
{% layout '${1:layout}' %}
snippet layoutnone
{% layout none %}
snippet paginate
{% paginate ${1:collection.products} by ${2:12} %}
{% for ${3:product} in $1 %}
${0}
{% endfor %}
{% endpaginate %}
snippet schema
{% schema %}
{
${0}
}
{% endschema %}
snippet stylesheet
{% stylesheet %}
${0}
{% endstylesheet %}
snippet stylesheet_scss
{% stylesheet '${1:scss}' %}
${0}
{% endstylesheet %}
snippet javascript
{% javascript %}
${0}
{% endjavascript %}
snippet comment-
{%- comment -%}${0}{%- endcomment -%}
snippet if-
{%- if ${1:condition} -%}
${0:${VISUAL}}
{%- endif -%}
snippet else-
{%- else -%}
snippet elsif-
{%- elsif ${1:condition} -%}
snippet ifelse-
{%- if ${1:condition} -%}
${2}
{%- else -%}
${0}
{%- endif -%}
snippet unless-
{%- unless ${1:condition} -%}
${0:${VISUAL}}
{%- endunless -%}
snippet case-
{%- case ${1:variable} -%}
{%- when ${2:condition} -%}
${3}
{%- else -%}
${0}
{%- endcase -%}
snippet when-
{%- when ${1:condition} -%}
${0}
snippet cycle-
{%- cycle '${1:odd}', '${2:even}' -%}
snippet cyclegroup-
{%- cycle '${1:group name}': '${2:odd}', '${3:even}' -%}
snippet for-
{%- for ${1:item} in ${2:collection} -%}
${0}
{%- endfor -%}
snippet continue-
{%- continue -%}
snippet tablerow-
{%- tablerow ${1:item} in ${2:collection} cols: ${3:2} -%}
${0}
{%- endtablerow -%}
snippet assign-
{%- assign ${1:variable} = ${0:value} -%}
snippet capture-
{%- capture ${1:variable} -%}${0}{%- endcapture -%}
snippet include-
{%- include '${0:snippet}' -%}
snippet includewith-
{%- include '${1:snippet}', ${2:variable}: ${0:value} -%}
snippet join
| join: '${1:, }'
snippet first
| first
snippet last
| last
snippet concat
| concat: ${1:array}
snippet map
| map: '${1:key}'
snippet reverse
| reverse
snippet size
| size
snippet sort
| sort: '${1:key}'
snippet uniq
| uniq
snippet img_tag
| img_tag
snippet img_tag_param
| img_tag: '${1:alt}', '${2:class}'
snippet script_tag
| script_tag
snippet stylesheet_tag
| stylesheet_tag
snippet abs
| abs
snippet ceil
| ceil
snippet divided_by
| divided_by: ${1:2}
snippet floor
| floor
snippet minus
| minus: ${1:1}
snippet plus
| plus: ${1:1}
snippet round
| round: ${1:0}
snippet times
| times: ${1:1}
snippet modulo
| modulo: ${1:2}
snippet money
| money
snippet money_with_currency
| money_with_currency
snippet money_without_trailing_zeros
| money_without_trailing_zeros
snippet money_without_currency
| money_without_currency
snippet append
| append: '${1:string}'
snippet camelcase
| camelcase
snippet capitalize
| capitalize
snippet downcase
| downcase
snippet escape
| escape
snippet handleize
| handleize
snippet md5
| md5
snippet newline_to_br
| newline_to_br
snippet pluralize
| pluralize: '${1:item}', '${2:items}'
snippet prepend
| prepend: '${1:string}'
snippet remove
| remove: '${1:string}'
snippet remove_first
| remove_first: '${1:string}'
snippet replace
| replace: '${1:target}', '${2:replace}'
snippet replace_first
| replace_first: '${1:target}', '${2:replace}'
snippet slice
| slice: ${1:0}, ${2:5}
snippet slice_single
| slice: ${1:at}
snippet split
| split: '${1:,}'
snippet strip
| strip
snippet lstrip
| lstrip
snippet rstrip
| rstrip
snippet strip_html
| strip_html
snippet strip_newlines
| strip_newlines
snippet truncate
| truncate: ${1:20}, '${2:...}'
snippet truncatewords
| truncatewords: ${1:5}, '${2:...}'
snippet upcase
| upcase
snippet url_encode
| url_encode
snippet url_escape
| url_escape
snippet url_param_escape
| url_param_escape
snippet asset_url
| asset_url
snippet asset_img_url
| asset_img_url: '${1:medium}'
snippet img_url
| img_url: '${1:medium}'

View File

@ -7,16 +7,16 @@
# Header using Puppet Strings (YARD tags) https://puppet.com/docs/puppet/latest/modules_documentation.html
# More info: https://github.com/puppetlabs/puppet-strings
snippet classheader
# ${1:`vim_snippets#Filename(expand('%:p:s?.*modules/??:h:h'), 'class-name')`}
# ${1:`vim_snippets#Filename(substitute(expand('%:p:s?\v.{-}/(\w+)/manifests/(.+)\.pp?\1/\2?'), '/', '::', 'g'), 'class-name')`}
# ${2:A description of what this class does}
#
# @summary ${3:A short summary of the purpose of this class}
#
# @param ${4:parameter1} [${5:String}]
# @param ${4:parameter1}
# ${6:Explanation of what this parameter affects.}
#
# @example Simple use
# class { '$1': }
# include $1
#
# @example Use with params
# class { '$1':
@ -28,7 +28,7 @@ snippet classheader
# @note Copyright `strftime("%Y")` $8
#
class $1(
$$4 = undef,
${5:String} $$4 = undef,
) {
${0}
}

View File

@ -204,34 +204,34 @@ snippet fcite \footcite[]{}
\\footcite[${1}]{${2}}${0}
#Formating text: italic, bold, underline, small capital, emphase ..
snippet ita italic text
\\textit{${1:${VISUAL:text}}} ${0}
\\textit{${1:${VISUAL:text}}}${0}
snippet bf bold face text
\\textbf{${1:${VISUAL:text}}} ${0}
\\textbf{${1:${VISUAL:text}}}${0}
snippet under underline text
\\underline{${1:${VISUAL:text}}} ${0}
\\underline{${1:${VISUAL:text}}}${0}
snippet over overline text
\\overline{${1:${VISUAL:text}}} ${0}
\\overline{${1:${VISUAL:text}}}${0}
snippet emp emphasize text
\\emph{${1:${VISUAL:text}}}${0}
snippet sc small caps text
\\textsc{${1:${VISUAL:text}}} ${0}
\\textsc{${1:${VISUAL:text}}}${0}
#Choosing font
snippet sf sans serife text
\\textsf{${1:${VISUAL:text}}} ${0}
\\textsf{${1:${VISUAL:text}}}${0}
snippet rm roman font text
\\textrm{${1:${VISUAL:text}}} ${0}
\\textrm{${1:${VISUAL:text}}}${0}
snippet tt typewriter (monospace) text
\\texttt{${1:${VISUAL:text}}} ${0}
\\texttt{${1:${VISUAL:text}}}${0}
#Math font
snippet mf mathfrak
\\mathfrak{${1:${VISUAL:text}}} ${0}
\\mathfrak{${1:${VISUAL:text}}}${0}
snippet mc mathcal
\\mathcal{${1:${VISUAL:text}}} ${0}
\\mathcal{${1:${VISUAL:text}}}${0}
snippet ms mathscr
\\mathscr{${1:${VISUAL:text}}} ${0}
\\mathscr{${1:${VISUAL:text}}}${0}
#misc
snippet ft \footnote
\\footnote{${1:${VISUAL:text}}} ${0}
\\footnote{${1:${VISUAL:text}}}${0}
snippet fig figure environment (includegraphics)
\\begin{figure}
\\begin{center}