Yasnippet Configurations
Table of Contents
- 1. snippet
- 1.1. default
- 1.1.1. css-mode/
- 1.1.2. emacs-lisp-mode/
- 1.1.3. fish-mode/
- 1.1.4. fundamental-mode/
- 1.1.5. snippet-mode/
- 1.1.6. git-commit-mode/
- 1.1.7. go-mode/
- 1.1.8. js-mode/
- 1.1.9. js2-mode/
- 1.1.10. lisp-mode/
- 1.1.11. makefile-mode/
- 1.1.12. markdown-mode/
- 1.1.13. org-mode/
- 1.1.14. php-mode/
- 1.1.15. prog-mode/
- 1.1.16. prisma-mode/
- 1.1.17. robots-txt-mode/
- 1.1.18. snippet-mode/
- 1.1.19. sql-mode/
- 1.1.20. ssh-config-mode/
- 1.1.21. terraform-mode/
- 1.1.22. toml-mode/
- 1.1.23. typescript-mode/
- 1.1.24. typescript-tsx-mode/
- 1.1.25. vue-mode/
- 1.1.26. web-mode/
- 1.1.27. web-php-blade-mode/
- 1.1. default
1. snippet
1.1. default
1.1.1. css-mode/
- template
# -*- mode: snippet -*- # name: template # key: template # -- * { padding: 0; margin: 0; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; overscroll-behavior-y: contain; $0 } a { text-decoration: none; }
- media
# -*- mode: snippet -*- # name: media # key: media # -- @media (${1:max-width}: ${2:768px}) { $0 }
1.1.2. emacs-lisp-mode/
- cond
# -*- mode: snippet -*- # contributor: Xah Lee (XahLee.org) # name: cond # key: cond # -- (cond (${1:condition} ${2:body})$0)
- header
# -*- mode: snippet; -*- # contributor: kchenphy <https://www.github.com/kchenphy> # name: package header # key: header # -- ;;; ${1:name}.el --- ${2:summary} -*- lexical-binding: t -*- ;; Author: ${3:`(user-full-name)`} ;; Maintainer: ${4:`(user-full-name)`} ;; Version: ${5:version} ;; Package-Requires: (${6:dependencies}) ;; Homepage: ${7:homepage} ;; Keywords: ${8:keywords} ${9: ;; This file is not part of GNU Emacs ;; This file is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 3, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; For a full copy of the GNU General Public License ;; see <http://www.gnu.org/licenses/>. } ;;; Commentary: ;; ${10:commentary} ;;; Code: ${11:(message "Hello World!")} (provide '$1) ;;; $1.el ends here
- kill-buffer
# -*- mode: snippet -*- # contributor: Xah Lee (XahLee.org) # name: kill-buffer # key: kill-buffer # key: kb # -- (kill-buffer $0)
- lambda
# -*- mode: snippet; -*- # contributor: Xah Lee (XahLee.org) # name: lambda # key: lam # -- (lambda ($1) ${2:(interactive${3: "$4"}) }$0)
- minor
# -*- mode: snippet -*- # name: minor # key: minor # -- (defvar ${1:mode}-modeline-indicator " ${2:indicator}" "call ($1-install-mode) again if this is changed") (defvar $1-mode nil) (make-variable-buffer-local '$1-mode) (put '$1-mode 'permanent-local t) (defun $1-mode (&optional arg) "$0" (interactive "P") (setq $1-mode (if (null arg) (not $1-mode) (> (prefix-numeric-value arg) 0))) (force-mode-line-update)) (provide '$1-mode)
1.1.3. fish-mode/
- bang
# name: bang # key: ! # -- #!/usr/bin/env fish $0
- block
# name: begin ... end # key: block # -- begin $0 end
- breakpoint
# name: breakpoint # key: breakpoint # -- breakpoint $0
- for
# name: for loop # key: for # -- for ${1:var} in ${2:stuff} $0 end
- function
# name: function # key: function # -- function ${1:name} $0 end
- if
# name: if ... ... else ... end # key: if # -- if ${1:cond} ${2:stuff} else ${3:other} end $0
- switch
# name: switch # key: switch # -- switch ${1:condition} case ${2:*} ${0} end
- while
# name: while loop # key: while # -- while ${1:cond} $0 end
1.1.4. fundamental-mode/
1.1.5. snippet-mode/
1.1.6. git-commit-mode/
1.1.7. go-mode/
- append
# name: for append # key: append # -- $1 = append($1, $0)
- case
# name: switch case # key: case # -- case $1: $0
- error
# name: error # key: error # -- if err != nil { $0 }
- for
# name: for range # key: range # -- for ${3:key}, ${2:value} := range ${1:target} { $0 }
- func
# name: func # key: func # -- func ($2) $1 ($3) { $0 }
- handler
# -*- mode: snippet -*- # name: handler # key: handler # -- var $1 = func(w http.ResponseWriter, r *http.Request) { $0 }
- init
# name: init # key: init # -- func init(){ $0 }
- interface
# name: interface # key: type # -- type $1 interface { $0 }
- main
# name: main # key: main # -- func main() { $0 }
- package
# name: package # key: package # -- package ${1:main}
- struct
# name: struct # key: struct # -- type $1 struct { $0 }
- switch
# name: for switch # key: switch # -- switch $1 { case $2: $0 default: }
- test
# name: test # key: test # -- func Test$1(t *testing.T) { $0 }
1.1.8. js-mode/
- alert
# name: alert # key: alert # -- alert($0);
- class
# name: class # key: class # -- class ${1:Class}${2: extends ${3:ParentClass}} { ${4:constructor(${5:arg}) { ${6:super(arg);} $7 }} $0 }
- const
# name: const declaration # key: const # -- const ${1:name} = ${2:initial};
- each
# name: each # -- ${1:collection}.forEach(function (${2:elem}) { $0 });
- else
# name: else # key: else # -- else { $0 }
- export-const
# -*- mode: snippet -*- # name: export-const # key: export-const # -- export const ${1:functionName} = (${2:params}) => { $0 }
- export-default
# name: export-default # key: export-default # -- export default (${1:params}) => { $0 }
- for-in
# name: for-in # key: for-in # -- for(const ${1:item} in ${2:object}) { ${0} }
- for-of
# name: for-of # key: fof-of # -- for(const ${1:item} of ${2:object}) { ${0} }
- for
# name: for # -- for (let ${1:i} = ${2:0}; $1 < ${3:collection}.length; $1++) { $0 }
- function
# name: function # key: function # -- function ${1:name}(${2:arg}) { $0 }
- if
# name: if # -- if (${1:condition}) { $0 }
- lambda
# name: lambda # key: lambda # -- const ${1:name} = (${2:args}) => { $0 };
- log
# name: log (console.log) # key: log # -- console.log(${2:"$3 >> ", }${1:var})
- import
# name: import # key: import # -- import ${2:moduleName} from '${1:module}'$0
- let
# name: let declaration # key: let # -- let ${1:name} = ${2:initial};
- setInterval
# name: setInterval # key: setInterval # -- setInterval(() => { ${2} }, ${0:intervalInms})
- setTimeout
# name: setTimeOut # key: setTimeOut # -- setTimeout(() => { ${2} }, ${1:delayInms})
- styled
# name: styled # key: styled # -- const $1 = styled.$2\` $0 \`
- switch
# name: switch # key: switch # -- switch (${1:condition}) { case ${2:expression}: $0 break; default: }
- try-catch
# name: try...catch statement # key: try # -- try { $1 } catch (err) { $2 }${3: finally { $4 }}
1.1.10. lisp-mode/
- main
# name: main # key: main # -- (defun main () $0)
- class
# name: class # key: cls # -- (defclass ${1:name} (${2:inherits}) (${4:slot}) (:documentation "${3:doc}")) $0
- comment
# name: comment # key: /* # -- #|${1:type the comment here}|# $0
- cond
# name: cond # key: cond # -- (cond (${1:case1} (${2:do-this})) (${3:case2} (${4:do-this})) (t ${5:default})) $0
- defun
# name: defun # key: defun # -- (defun ${1:fun} (${2:args}) $0 )
- defpackage
# name: defpackage # key: defp # -- (defpackage #:${1:name} (:nicknames #:${2:nick}) (:use #:cl #:closer-mop #:${3:package}) (:shadow :${4.symbol}) (:shadowing-import-from #:${5:package} #:${6:symbol}) (:export :$0))
- do
# name: do # key: do # -- (do ((${1:var1} ${2:init-form} ${3:step-form}) (${4:var2} ${5:init-form} ${6:step-form})) (${7:condition} ${8:return-value}) (${9:body})) $0
- for
# name: do # key: for # -- (dotimes (${1:var} ${2:count-form}) ${3:body}) $0
- foreach
# name: do # key: foreach # -- (dolist (${1:var} ${2:list-form}) ${3:body}) $0
- format
# name: format # key: print # -- (format t "~& $0 ~%")
- if
# name: if # key: if # -- (when (${1:condition}) (${2:then-do-this})) $0
- ifelse
# name: ifelse (...) (...) (...) ... # key: ifelse # -- (if (${1:condition}) (${2:then}) (${3:else})) $0
- ifnot
# name: ifnot (...) (...) ... # key: ifnot # -- (unless (${1:condition}) (${2:then-do-this})) $0
- slot
# name: slot # key: slot # -- (${1:name} :initarg :${1:$(yas/substr yas-text "[^: ]*")} :initform (error ":${1:$(yas/substr yas-text "[^: ]*")} must be specified") ;; :accessor ${1:$(yas/substr yas-text "[^: ]*")} :reader ${1:$(yas/substr yas-text "[^: ]*")}-changed :writer set-${1:$(yas/substr yas-text "[^: ]*")} :type :allocation ${3::class :instance} :documentation "${2:about-slot}") $0
- typecast
# name: typecast # name: cast # -- (coerce ${1:object} ${2:type}) $0
1.1.11. makefile-mode/
1.1.12. markdown-mode/
- code
# name: Code block # key: code # -- \`\`\`$1 $0 \`\`\`
- highlight
# name: Highlight # contributor: nguyenvinhlinh <nguyenvinhlinh93@gmail.com> # key: highlight # -- {% highlight ${1:language} %} ${0:content} {% endhighlight %}
- hr
# name: Horizontal Rule (-) # key: hr # -- ---------- $0
- img
# name: Image # contributor: Peng Deng <dengpeng@gmail.com> # key: img # --  $0
- link
# name: Link # contributor: Peng Deng <dengpeng@gmail.com> # key: link # -- [${1:Link Text}](${2:URL} $3) $0
1.1.13. org-mode/
- author
# name: author # key: author # -- #+AUTHOR: $0
- center
# name: center # key: center # -- #+begin_center $0 #+end_center
- date
# name: date # key: date # -- #+DATE: ${1:year}:${2:month}:${3:day}
- description
# name: description # key: desc # -- #+DESCRIPTION: $0
- email
# name: email # key: email # -- #+email: $0
- embedded
# name: embedded # key: embedded # -- src_${1:lang}${2:[${3:where}]}{${4:code}}
- entry
# name: entry # key: entry # -- #+begin_html --- layout: ${1:default} title: ${2:title} --- #+end_html
- exampleblock
# name: example # key: example # -- #+begin_example $0 #+end_example
- export
# name: export # key: export # -- #+begin_export ${1:type} $0 #+end_export
- figure
# name: figure # key: figure # -- #+caption: ${1:caption} #+attr_latex: ${2:scale=0.75} #+label: fig:${3:label}$0
- html
# name: html # key: html # -- #+html:$1
- image
# name: image # key: image # -- #+caption: ${1:caption of the image} [[file:${2:image_path}]]$0
- img
# name: img # key: img # -- <img src="$1" alt="$2" align="${3:left}" title="${4:image title}" class="img" $5/>$0
- include
# name: include # key: include # -- #+include: $0
- keywords
# name: keywords # key: keywords # -- #+keywords: $0
- language
# name: language # key: language # -- #+language: ${1:en}
- link
# name: link # key: link # -- [[${1:link}][${2:description}]]
- matrix
# name: matrix # key: matrix # possible improvement, compute the number of lines from the argument to array # -- \left \( \begin{array}{${1:ccc}} ${2:v1 & v2} \\ $0 \end{array} \right \)
- options
# name: options # key: options # -- #+options: h:${1:1} num:${2:t||nil} toc:${3:t||nil}$0
- rvbackground
# name: reveal_single_colored_background # key: reveal_single_colored_background # -- :properties: :reveal_background: ${1: #123456} :end:
- rvimagebackground
# name: reveal_image_background # key: <rib # -- :properties: :reveal_background: ${1: path of the image} :reveal_background_trans: ${2: default||cube||page||concave||zoom||linear||fade||none||slide} :end:
- setup
# name: setup # key: setup # -- #+setup: $0
- setupfile
# name: setupfile # key: setupfile # -- #+setupfile: $0
- style
# name: style # key: style # -- #+style: <link rel="stylesheet" type="text/css" href="$1" />
- table
# name: table # key: table # -- #+caption: ${1: caption of the table} |${2:column 1} | ${3: column 2} | |--------------+----------------|
- title
# name: title # key: title # -- #+title: $0
- uml
# name: uml # key: uml # contributor : Robert O'Connor # -- #+begin_uml $1 #+end_uml
- verse
# name: verse # key: verse # -- #+begin_verse $0 #+end_verse
- video
# name: video # key: video # -- [[${1:link of the video}][file:${2:link of the image}]
- roam
# name: roam # key: <roam # -- #+roam_tags: $0
1.1.14. php-mode/
- .yas-setup.el
(require 'yasnippet) (defun yas-php-get-class-name-by-file-name () "Return name of class-like construct by `file-name'. \"class-like\" contains class, trait and interface." (file-name-nondirectory (file-name-sans-extension (or (buffer-file-name) (buffer-name (current-buffer))))))
- _call
# -*- mode: snippet -*- # contributor: USAMI Kenta <tadsan@zonu.me> # name: __call() # key: __call # group: Magic Methods # -- public function __call($name, $args) { $0 }
- _construct
# -*- mode: snippet -*- # name: __construct() # key: __construct # -- public function __construct(${1:private }) {$0 }
- abstruct
# -*- mode: snippet -*- # name: abstract # key: abstract # -- abstract class ${1:`(yas-php-get-class-name-by-file-name)`} { $0 }
- class
# -*- mode: snippet -*- # name: class # key: class # group: definitions # -- class ${1:`(yas-php-get-class-name-by-file-name)`} { $0 }
- const
# -*- mode: snippet -*- # contributor: USAMI Kenta <tadsan@zonu.me> # name: const # key: const # group: definitions # -- const ${1:NAME} = ${2:value};
- dd
# -*- mode: snippet -*- # name: dd # key: dd # -- dd($1);
- ddd
# -*- mode: snippet -*- # name: ddd # key: ddd # -- ddd($1);
- declare
# -*- mode: snippet -*- # name: declare # key: declare # group: generic # -- declare(strict_types=1);
- doc
# -*- mode: snippet -*- # key: /** # group: annotation # -- /** * ${1:Summary} */
- dumptype
# -*- mode: snippet -*- # name: dumptype # key: dumptype # -- \PHPStan\dumpType($0);
- enum
# -*- mode: snippet -*- # contributor: takeo obara<bararararatty@gmail.com> # name: enum # key: enum # group : definitions # -- enum ${1:Name} { case: ${2:One}; case: ${2:Two}; $0 }
- final
# -*- mode: snippet -*- # name: final # key: final # group: definitions # -- final class ${1:`(yas-php-get-class-name-by-file-name)`} { $0 }
- foreach
# -*- mode: snippet -*- # contributor: USAMI Kenta <tadsan@zonu.me> # name: foreach # key: foreach # group : control structure # -- foreach (${1:$expression} as \$${2:value}) { $0 }
- function
# -*- mode: snippet -*- # name: function # key: function # -- ${1:public} function ${2:name}(${3:$arg, ...}): ${4:type} { $0 }
- interface
# -*- mode: snippet -*- # contributor: USAMI Kenta <tadsan@zonu.me> # name: interface # key: interface # group : definitions # -- interface ${1:`(yas-php-get-class-name-by-file-name)`} { $0 }
- php
# -*- mode: snippet -*- # name: php # key: php # group: generic # -- <?php declare(strict_types=1); $0
- psysh
# -*- mode: snippet -*- # contributor: USAMI Kenta <tadsan@zonu.me> # name: psysh # key: psysh # group: generic # -- eval(\Psy\sh());
- match
# -*- mode: snippet -*- # contributor: takeo obara<bararararatty@gmail.com> # name: match # key: match # group : control structure # -- match (${1:$var}) { ${2:$cond} => ${3:$return}, $0 };
- trait
# -*- mode: snippet -*- # contributor: USAMI Kenta <tadsan@zonu.me> # name: trait # key: trait # group : definitions # -- trait ${1:`(yas-php-get-class-name-by-file-name)`} { $0 }
- template
# -*- mode: snippet -*- # name: template # key: template # -- <?php declare(strict_types=1); namespace $1; final class ${2:`(yas-php-get-class-name-by-file-name)`}${3: extends $4}${5: implements $6} {$0 }
- vardump
# -*- mode: snippet -*- # contributor: USAMI Kenta <tadsan@zonu.me> # name: var_dump() # key: vd # group: generic # -- var_dump(${1:$var});
- @phpstan-ignore-line
# -*- mode: snippet -*- # name: @phpstan-ignore-line # key: phpstan-ignore-line # -- // @phpstan-ignore-line$0
- @phpstan-ignore-next-line
# -*- mode: snippet -*- # name: @phpstan-ignore-next-line # key: phpstan-ignore-next-line # -- // @phpstan-ignore-next-line$0
1.1.15. prog-mode/
- .yas-setup.el
(require 'yasnippet) ;; whitespace removing functions from Magnar Sveen ;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun yas-s-trim-left (s) "Remove whitespace at the beginning of S." (if (string-match "\\`[ \t\n\r]+" s) (replace-match "" t t s) s)) (defun yas-s-trim-right (s) "Remove whitespace at the end of S." (if (string-match "[ \t\n\r]+\\'" s) (replace-match "" t t s) s)) (defun yas-s-trim (s) "Remove whitespace at the beginning and end of S." (yas-s-trim-left (yas-s-trim-right s))) (defun yas-string-reverse (str) "Reverse a string STR manually to be compatible with emacs versions < 25." (apply #'string (reverse (string-to-list str)))) (defun yas-trimmed-comment-start () "This function returns `comment-start' trimmed by whitespaces." (yas-s-trim comment-start)) (defun yas-trimmed-comment-end () "This function returns `comment-end' trimmed by whitespaces if `comment-end' is not empty. Otherwise the reversed output of function `yas-trimmed-comment-start' is returned." (if (eq (length comment-end) 0) (yas-string-reverse (yas-trimmed-comment-start)) (yas-s-trim comment-end)))
- comment
# contributor: sh-ow <sh-ow@users.noreply.github.com> # name: comment # key: co # -- `(yas-trimmed-comment-start)` ${1:comment}`(unless (eq (length comment-end) 0) (concat " " (yas-trimmed-comment-end)))`$0
- comment-block
# name: comment-block # key: comment-block # -- ${1:$(let* ((col (current-column)) (str "") (lastcom (substring (yas-trimmed-comment-start) -1)) (start (yas-trimmed-comment-start)) (end (yas-trimmed-comment-end)) (over (- (+ (string-width yas-text) (length start) (length end) col) 77))) (while (< (length str) (+ (- 79 (length start) (length end) col) (if (> over 0) over 0))) (setq str (concat str lastcom))) (concat start str end))} ${1:$(let* ((col (current-column)) (str "") (start (yas-trimmed-comment-start)) (end (yas-trimmed-comment-end))) (while (< (length str) (ffloor (/ (- 78.0 (+ col (length start) (string-width yas-text) (length end))) 2.0))) (setq str (concat str " "))) (concat start str))} ${1:comment} ${1:$(let* ((col (current-column)) (str "") (start (yas-trimmed-comment-start)) (end (yas-trimmed-comment-end))) (while (< (length str) (- 79.0 (if (eq (mod (string-width yas-text) 2) 1) (- col 1) col) (length end))) (setq str (concat str " "))) (concat str end))} ${1:$(let* ((col (current-column)) (str "") (lastcom (substring (yas-trimmed-comment-start) -1)) (start (yas-trimmed-comment-start)) (end (yas-trimmed-comment-end)) (over (- (+ (string-width yas-text) (length start) (length end) col) 77))) (while (< (length str) (+ (- 79 (length start) (length end) col) (if (> over 0) over 0))) (setq str (concat str lastcom))) (concat start str end))}$0
- commentblock-two
# name: commentblock-two # key: commentblock-two # -- /* |-------------------------------------------------------------------------- | $1 |-------------------------------------------------------------------------- | | $2 | */ $0
- fixme
# name: fixme # key: fi # condition: (not (eq major-mode 'sh-mode)) # -- `comment-start`FIXME: $0`comment-end`
- todo
# name: todo # key: t # -- `comment-start`TODO: $0`comment-end`
- xxx
# name: xxx # key: x # -- `comment-start`XXX: $0`comment-end`
1.1.16. prisma-mode/
1.1.17. robots-txt-mode/
1.1.18. snippet-mode/
1.1.19. sql-mode/
- constraint
# -*- mode: snippet -*- # name: constraint # key: constraint # -- CONSTRAINT [${1:PK_Name}] PRIMARY KEY ${2:CLUSTERED} ([${3:ColumnName}])
- create
# -*- mode: snippet -*- # name: create # key: create # -- CREATE TABLE [${1:dbo}].[${2:TableName}] ( ${3:Id} ${4:INT IDENTITY(1,1)} ${5:NOT NULL} $0 CONSTRAINT [${6:PK_}] PRIMARY KEY ${7:CLUSTERED} ([$3]) )
- insert
# name: insert # key: ins # -- INSERT INTO ${table-name} (${col1, col2}) VALUES (${'val1', 'val2'});$0
1.1.20. ssh-config-mode/
1.1.21. terraform-mode/
- provider
# -*- mode: snippet -*- # name: provider # key: provider # -- provider "${1:name}" { $0 }
- locals
# -*- mode: snippet -*- # name: locals # key: locals # -- locals { {$1:name} = ${2:value} }
- module
# -*- mode: snippet -*- # name: module # key: mod # -- module "${1:name}" { source = "${2:location}" $0 }
- resource
# -*- mode: snippet -*- # name: resource # key: resource # -- resource "${1:type}" "${2:name}" { $0 }
- output
# -*- mode: snippet -*- # name: output # key: output # -- output "${1:name}" { value = ${2:value} }
- variable
# name: variable # key: variable # -- variable "$1" { type = ${2:string} $0 }
- data
# -*- mode: snippet -*- # name: data # key: data # -- data "${1:type}" "${2:name}" { $0 }
- terraform
# -*- mode: snippet -*- # name: terraform # key: terraform # -- terraform { backend "${1:backend}" { $0 } }
- variables
# -*- mode: snippet -*- # name: variable # key: variable # -- variable "${1:name}" { ${2:default = "$3"} }
1.1.23. typescript-mode/
- .yas-parents
js-mode
- abstract
# name: abstract # key: abstract # -- abstract class ${1:Class} { ${2:constructor(${3:arg}) { ${4:super(arg);} $5 }} $0 }
- export-type
# -*- mode: snippet -*- # name: export-type # key: export-type # -- export type ${1:name} { $0 }
- interface
# -*- mode: snippet -*- # name: interface # key: interface # -- interface $1 ${2: extends ${3:Parent}} = { $0 }
- namespace
# name: namespace # key: namespace # -- namespace $1 { $0 }
- type
# name: type # key: type # -- type $1 = { $0 }
1.1.24. typescript-tsx-mode/
1.1.25. vue-mode/
1.1.26. web-mode/
- html5
# -*- mode: snippet -*- # name: html5 # key: html # -- <!DOCTYPE html> <html lang="${1:ja}"> <head> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"> <title>$2</title> </head> <body> $0 </body> </html>
- style
# -*- mode: snippet -*- # name: style # key: style # -- <style type="text/css" media="${1:screen}"> $0 </style>
- form
# -*- mode: snippet -*- # key: form # name: form # -- <form${1: method="$2"}${3: action="$4"}> $0 </form>
- href
# -*- mode: snippet -*- # name: href # key: href # -- <a href="$1">$0</a>
- input
# -*- mode: snippet -*- # name: input # key: input # -- <input${1: type="$2"}${3: name="$4"}${5: value="$6"}>$0
- img
# -*- mode: snippet -*- # name: img # key: img # -- <img src="$1"${2: alt="$3"}>$0
- favicon
# -*- mode: snippet -*- # name: favicon # key: favicon # -- <link rel="icon" href="${1:/favicon.ico}">$0
- meta
# -*- mode: snippet -*- # name: meta # key: meta # -- <meta name="title" content="${1:title}"> <meta name="description" content="${2:description}"> <meta name="keywords" content="${3:keywords}">
- ogp
# -*- mode: snippet -*- # name: ogp # key: ogp # -- <meta property="og:title" content=""> <meta property="og:type" content=""> <meta property="og:url" content=""> <meta property="og:image" content=""> <meta property="og:site_name" content=""> <meta property="og:description" content=""> <meta name="twitter:site" content=""> <meta name="twitter:card" content="">
- dns-prefetch
# -*- mode: snippet -*- # name: dns-prefetch # key: dns-prefetch # -- <link as="${1:stylesheet}" rel="dns-prefetch" href="$2">$0
- preload
# -*- mode: snippet -*- # name: preload # key: preload # -- <link as="${1:stylesheet}" rel="preload" href="$2">$0
- prefetch
# -*- mode: snippet -*- # name: prefetch # key: prefetch # -- <link as="${1:stylesheet}" rel="prefetch" href="$2">$0
- preconnect
# -*- mode: snippet -*- # name: preconnect # key: preconnect # -- <link rel="preconnect" href="$1">$0
1.1.27. web-php-blade-mode/
- auth
# -*- mode: snippet -*- # name: auth # key: auth # -- @auth${1:('user')} $0 @endauth
- empty
# -*- mode: snippet -*- # name: empty # key: empty # -- @empty($1) $0 @endempty
- env
# -*- mode: snippet -*- # name: env # key: env # -- @env(['${1:staging}']) $0 @endenv
- error
# -*- mode: snippet -*- # name: error # key: error # -- @error('${1:title}') $0 @enderror
- for
# -*- mode: snippet -*- # name: name # key: key # -- @for ($${1:index} = ${2:0}; $1 < ${3:10}; $1++) $0 @endfor
- foreach
# -*- mode: snippet -*- # name: foreach # key: foreach # -- @foreach ($${1} as ${2:$key =>} ${3:value}) $0 @endforeach
- guest
# -*- mode: snippet -*- # name: guest # key: guest # -- @guest $0 @endguest
- if
# -*- mode: snippet -*- # name: if # key: if # -- @if ($1)$0 ${2:@elseif ()} @endif
- include
# -*- mode: snippet -*- # name: include # key: include # -- @include('$0')
- isset
# -*- mode: snippet -*- # name: isset # key: isset # -- @isset($1) $0 @endisset
- once
# -*- mode: snippet -*- # name: once # key: once # -- @once $0 @endonce
- php
# -*- mode: snippet -*- # name: php # key: php # -- @php $0 @endphp
- production
# -*- mode: snippet -*- # name: production # key: production # -- @production $0 @endproduction
- section
# -*- mode: snippet -*- # name: section # key: section # -- @section('${1:content}') $0 @endsection
- switch
# -*- mode: snippet -*- # name: switch # key: switch # -- @switch($1) @case($2) $0 @break @default @break @endswitch
- unless
# -*- mode: snippet -*- # name: unless # key: unless # -- @unless ($1) $0 @endunless
- yield
# -*- mode: snippet -*- # name: yield # key: yeild # -- @yeild('$0')
- while
# -*- mode: snippet -*- # name: while # key: while # -- @while ($1) $0 @endwhile