mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-14 05:23:04 +00:00
* Imported ""# condition:" directive to all snippets
* Start writing the insert tag snippet-command
This commit is contained in:
parent
088ba32300
commit
fb1a98dcbf
@ -2,5 +2,6 @@
|
|||||||
# key: !
|
# key: !
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: IE Conditional Comment: Internet Explorer 5.0 only
|
# name: IE Conditional Comment: Internet Explorer 5.0 only
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<!--[if IE 5.0]>${1:${TM_SELECTED_TEXT: IE Conditional Comment: Internet Explorer 5.0 only }}<![endif]-->$0
|
<!--[if IE 5.0]>${1:${TM_SELECTED_TEXT: IE Conditional Comment: Internet Explorer 5.0 only }}<![endif]-->$0
|
@ -2,5 +2,6 @@
|
|||||||
# key: !
|
# key: !
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: IE Conditional Comment: Internet Explorer 5.5 only
|
# name: IE Conditional Comment: Internet Explorer 5.5 only
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<!--[if IE 5.5000]>${1:${TM_SELECTED_TEXT: IE Conditional Comment: Internet Explorer 5.5 only }}<![endif]-->$0
|
<!--[if IE 5.5000]>${1:${TM_SELECTED_TEXT: IE Conditional Comment: Internet Explorer 5.5 only }}<![endif]-->$0
|
@ -2,5 +2,6 @@
|
|||||||
# key: !
|
# key: !
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: IE Conditional Comment: Internet Explorer 5.x
|
# name: IE Conditional Comment: Internet Explorer 5.x
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<!--[if lt IE 6]>${1:${TM_SELECTED_TEXT: IE Conditional Comment: Internet Explorer 5.x }}<![endif]-->$0
|
<!--[if lt IE 6]>${1:${TM_SELECTED_TEXT: IE Conditional Comment: Internet Explorer 5.x }}<![endif]-->$0
|
@ -2,5 +2,6 @@
|
|||||||
# key: !
|
# key: !
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: IE Conditional Comment: Internet Explorer 6 and below
|
# name: IE Conditional Comment: Internet Explorer 6 and below
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<!--[if lte IE 6]>${1:${TM_SELECTED_TEXT: IE Conditional Comment: Internet Explorer 6 and below }}<![endif]-->$0
|
<!--[if lte IE 6]>${1:${TM_SELECTED_TEXT: IE Conditional Comment: Internet Explorer 6 and below }}<![endif]-->$0
|
@ -2,5 +2,6 @@
|
|||||||
# key: !
|
# key: !
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: IE Conditional Comment: Internet Explorer 6 only
|
# name: IE Conditional Comment: Internet Explorer 6 only
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<!--[if IE 6]>${1:${TM_SELECTED_TEXT: IE Conditional Comment: Internet Explorer 6 only }}<![endif]-->$0
|
<!--[if IE 6]>${1:${TM_SELECTED_TEXT: IE Conditional Comment: Internet Explorer 6 only }}<![endif]-->$0
|
@ -2,5 +2,6 @@
|
|||||||
# key: !
|
# key: !
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: IE Conditional Comment: Internet Explorer 7 and above
|
# name: IE Conditional Comment: Internet Explorer 7 and above
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<!--[if gte IE 7]>${1:${TM_SELECTED_TEXT: IE Conditional Comment: Internet Explorer 7 and above }}<![endif]-->$0
|
<!--[if gte IE 7]>${1:${TM_SELECTED_TEXT: IE Conditional Comment: Internet Explorer 7 and above }}<![endif]-->$0
|
@ -2,5 +2,6 @@
|
|||||||
# key: !
|
# key: !
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: IE Conditional Comment: Internet Explorer
|
# name: IE Conditional Comment: Internet Explorer
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<!--[if IE]>${1:${TM_SELECTED_TEXT: IE Conditional Comment: Internet Explorer }}<![endif]-->$0
|
<!--[if IE]>${1:${TM_SELECTED_TEXT: IE Conditional Comment: Internet Explorer }}<![endif]-->$0
|
@ -2,5 +2,6 @@
|
|||||||
# key: !
|
# key: !
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: IE Conditional Comment: NOT Internet Explorer
|
# name: IE Conditional Comment: NOT Internet Explorer
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<!--[if !IE]><!-->${1:${TM_SELECTED_TEXT: IE Conditional Comment: NOT Internet Explorer }}<!-- <![endif]-->$0
|
<!--[if !IE]><!-->${1:${TM_SELECTED_TEXT: IE Conditional Comment: NOT Internet Explorer }}<!-- <![endif]-->$0
|
@ -2,5 +2,6 @@
|
|||||||
# key: arrow
|
# key: arrow
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: →
|
# name: →
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
→
|
→
|
@ -2,5 +2,6 @@
|
|||||||
# key: backspace
|
# key: backspace
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: ⌫
|
# name: ⌫
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
⌫
|
⌫
|
@ -2,5 +2,6 @@
|
|||||||
# key: backtab
|
# key: backtab
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: ⇤
|
# name: ⇤
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
⇤
|
⇤
|
@ -2,5 +2,6 @@
|
|||||||
# key: command
|
# key: command
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: ⌘
|
# name: ⌘
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
⌘
|
⌘
|
@ -2,5 +2,6 @@
|
|||||||
# key: control
|
# key: control
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: ⌃
|
# name: ⌃
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
⌃
|
⌃
|
@ -2,5 +2,6 @@
|
|||||||
# key: delete
|
# key: delete
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: ⌦
|
# name: ⌦
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
⌦
|
⌦
|
@ -2,5 +2,6 @@
|
|||||||
# key: down
|
# key: down
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: ↓
|
# name: ↓
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
↓
|
↓
|
@ -2,5 +2,6 @@
|
|||||||
# key: enter
|
# key: enter
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: ⌅
|
# name: ⌅
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
⌅
|
⌅
|
@ -2,5 +2,6 @@
|
|||||||
# key: escape
|
# key: escape
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: ⎋
|
# name: ⎋
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
⎋
|
⎋
|
@ -2,5 +2,6 @@
|
|||||||
# key: left
|
# key: left
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: ←
|
# name: ←
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
←
|
←
|
@ -2,5 +2,6 @@
|
|||||||
# key: option
|
# key: option
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: ⌥
|
# name: ⌥
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
⌥
|
⌥
|
@ -2,5 +2,6 @@
|
|||||||
# key: return
|
# key: return
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: ↩
|
# name: ↩
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
↩
|
↩
|
@ -2,5 +2,6 @@
|
|||||||
# key: right
|
# key: right
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: →
|
# name: →
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
→
|
→
|
@ -2,5 +2,6 @@
|
|||||||
# key: shift
|
# key: shift
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: ⇧
|
# name: ⇧
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
⇧
|
⇧
|
@ -2,5 +2,6 @@
|
|||||||
# key: tab
|
# key: tab
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: ⇥
|
# name: ⇥
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
⇥
|
⇥
|
@ -2,5 +2,6 @@
|
|||||||
# key: up
|
# key: up
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: ↑
|
# name: ↑
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
↑
|
↑
|
@ -1,6 +1,7 @@
|
|||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Non-Breaking Space
|
# name: Non-Breaking Space
|
||||||
# binding: "~ "
|
## binding: "~ "
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
|
|
@ -1,6 +1,7 @@
|
|||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Emphasize
|
# name: Emphasize
|
||||||
# binding: "@i"
|
# binding: "A-i"
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
${0:${TM_SELECTED_TEXT/\A<em>(.*)<\/em>\z|.*/(?1:$1:<em>$0<\/em>)/m}}
|
(yas/html-wrap-selection-if-not-wrapped-already "em")
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
|
# type: command
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Strong
|
# name: Strong
|
||||||
# binding: "@b"
|
# binding: "A-b"
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
${0:${TM_SELECTED_TEXT/\A<strong>(.*)<\/strong>\z|.*/(?1:$1:<strong>$0<\/strong>)/m}}
|
(yas/html-wrap-selection-if-not-wrapped-already "strong")
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# key: doctype
|
# key: doctype
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: HTML — 4.01 Strict
|
# name: HTML — 4.01 Strict
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||||
"http://www.w3.org/TR/html4/strict.dtd">
|
"http://www.w3.org/TR/html4/strict.dtd">
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# key: doctype
|
# key: doctype
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: XHTML — 1.0 Frameset
|
# name: XHTML — 1.0 Frameset
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# key: doctype
|
# key: doctype
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: XHTML — 1.0 Strict
|
# name: XHTML — 1.0 Strict
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# key: doctype
|
# key: doctype
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: XHTML — 1.0 Transitional
|
# name: XHTML — 1.0 Transitional
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# key: doctype
|
# key: doctype
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: XHTML — 1.1
|
# name: XHTML — 1.1
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
||||||
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# key: doctype
|
# key: doctype
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: HTML — 4.01 Transitional
|
# name: HTML — 4.01 Transitional
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
"http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
48
extras/imported/html-mode/Insert Tag Pair.yasnippet
Normal file
48
extras/imported/html-mode/Insert Tag Pair.yasnippet
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
# -*- mode: snippet -*-
|
||||||
|
# type: command
|
||||||
|
# contributor: joaotavora, adapted from TextMate HTML bundle, work in progress
|
||||||
|
# name: Insert Open/Close Tag (With Current Word)
|
||||||
|
# binding: "^<"
|
||||||
|
## condition: "text.html,"
|
||||||
|
# --
|
||||||
|
(let* ((tag yas/selected-text)
|
||||||
|
(single-no-arg "\\(br\\|hr\\)")
|
||||||
|
(single "\\(img\\|meta\\|link\\|input\\|base\\|area\\|col\\|frame\\|param\\)"))
|
||||||
|
(cond ((string-match single-no-arg yas/selected-text))))
|
||||||
|
# This script will expand the current word into: <word></word>
|
||||||
|
# It will recognize HTML 4.0 tags that need no close tag.
|
||||||
|
#
|
||||||
|
# With no current word, it will insert: <p></p> and allows you
|
||||||
|
# to overwrite the tag name and add potential arguments.
|
||||||
|
#
|
||||||
|
# The result is inserted as a snippet, so it's
|
||||||
|
# possible to tab through the place holders.
|
||||||
|
|
||||||
|
# single tags
|
||||||
|
single_no_arg = /^(?:br|hr)$/i
|
||||||
|
single = /^(?:img|meta|link|input|base|area|col|frame|param)$/i
|
||||||
|
|
||||||
|
# we are not in HTML mode, so let's scrap the above hardcoded tag lists
|
||||||
|
unless ENV.has_key? 'TM_HTML_EMPTY_TAGS' then
|
||||||
|
single_no_arg = /(?=not)possible/
|
||||||
|
single = /(?=not)possible/
|
||||||
|
end
|
||||||
|
|
||||||
|
# handle the case where caret is in the middle of a word, assume only the left part is the tag
|
||||||
|
index = ENV['TM_LINE_INDEX'].to_i - ENV['TM_INPUT_START_LINE_INDEX'].to_i
|
||||||
|
tag, suffix = STDIN.read, ''
|
||||||
|
if index < tag.length && !ENV['TM_SELECTED_TEXT']
|
||||||
|
tag, suffix = tag[0...index], tag[index..-1]
|
||||||
|
end
|
||||||
|
|
||||||
|
xhtml = ENV['TM_XHTML'].to_s
|
||||||
|
|
||||||
|
print case tag
|
||||||
|
when single_no_arg then "<#{tag}#{xhtml}>"
|
||||||
|
when single then "<#{tag} $1#{xhtml}>"
|
||||||
|
when '' then "<${1:#{ENV['TM_DEFAULT_TAG'] || 'p'}}>$2</${1/\\s.*//}>"
|
||||||
|
else "<#{tag}>$1</#{tag.strip[/^\S+/]}>"
|
||||||
|
end
|
||||||
|
|
||||||
|
print suffix
|
||||||
|
|
@ -2,6 +2,7 @@
|
|||||||
# key: movie
|
# key: movie
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Embed QT Movie
|
# name: Embed QT Movie
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<object width="$2" height="$3" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
|
<object width="$2" height="$3" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
|
||||||
<param name="src" value="$1"${TM_XHTML}>
|
<param name="src" value="$1"${TM_XHTML}>
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# key: fieldset
|
# key: fieldset
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Fieldset
|
# name: Fieldset
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<fieldset id="${1/[[:alpha:]]+|( )/(?1:_:\L$0)/g}" ${2:class="${3:}"}>
|
<fieldset id="${1/[[:alpha:]]+|( )/(?1:_:\L$0)/g}" ${2:class="${3:}"}>
|
||||||
<legend>${1:`yas/selected-text`}</legend>
|
<legend>${1:`yas/selected-text`}</legend>
|
||||||
|
@ -2,5 +2,6 @@
|
|||||||
# key: input
|
# key: input
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Input with Label
|
# name: Input with Label
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<label for="${2:${1/[[:alpha:]]+|( )/(?1:_:\L$0)/g}}">$1</label><input type="${3:text/submit/hidden/button}" name="${4:$2}" value="$5"${6: id="${7:$2}"}${TM_XHTML}>
|
<label for="${2:${1/[[:alpha:]]+|( )/(?1:_:\L$0)/g}}">$1</label><input type="${3:text/submit/hidden/button}" name="${4:$2}" value="$5"${6: id="${7:$2}"}${TM_XHTML}>
|
||||||
|
@ -2,5 +2,6 @@
|
|||||||
# key: opt
|
# key: opt
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Option
|
# name: Option
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<option${1: value="${2:option}"}>${3:$2}</option>
|
<option${1: value="${2:option}"}>${3:$2}</option>
|
@ -2,6 +2,7 @@
|
|||||||
# key: select
|
# key: select
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Select Box
|
# name: Select Box
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<select name="${1:some_name}" id="${2:$1}"${3:${4: multiple}${5: onchange="${6:}"}${7: size="${8:1}"}}>
|
<select name="${1:some_name}" id="${2:$1}"${3:${4: multiple}${5: onchange="${6:}"}${7: size="${8:1}"}}>
|
||||||
<option${9: value="${10:option1}"}>${11:$10}</option>
|
<option${9: value="${10:option1}"}>${11:$10}</option>
|
||||||
|
@ -2,5 +2,6 @@
|
|||||||
# key: input
|
# key: input
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Input
|
# name: Input
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<input type="${1:text/submit/hidden/button}" name="${2:some_name}" value="$3"${4: id="${5:$2}"}${TM_XHTML}>
|
<input type="${1:text/submit/hidden/button}" name="${2:some_name}" value="$3"${4: id="${5:$2}"}${TM_XHTML}>
|
@ -2,5 +2,6 @@
|
|||||||
# key: textarea
|
# key: textarea
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Text Area
|
# name: Text Area
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<textarea name="${1:Name}" rows="${2:8}" cols="${3:40}">$0</textarea>
|
<textarea name="${1:Name}" rows="${2:8}" cols="${3:40}">$0</textarea>
|
@ -2,5 +2,6 @@
|
|||||||
# key: mailto
|
# key: mailto
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Mail Anchor
|
# name: Mail Anchor
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<a href="mailto:${1:joe@example.com}?subject=${2:feedback}">${3:email me}</a>
|
<a href="mailto:${1:joe@example.com}?subject=${2:feedback}">${3:email me}</a>
|
@ -2,5 +2,6 @@
|
|||||||
# key: base
|
# key: base
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Base
|
# name: Base
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<base href="$1"${2: target="$3"}${TM_XHTML}>
|
<base href="$1"${2: target="$3"}${TM_XHTML}>
|
@ -2,6 +2,7 @@
|
|||||||
# key: body
|
# key: body
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Body
|
# name: Body
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<body id="${1:${TM_FILENAME/(.*)\..*/\L$1/}}"${2: onload="$3"}>
|
<body id="${1:${TM_FILENAME/(.*)\..*/\L$1/}}"${2: onload="$3"}>
|
||||||
$0
|
$0
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Br
|
# name: Br
|
||||||
# binding: "^
"
|
## binding: "^
"
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<br${TM_XHTML}>
|
<br${TM_XHTML}>
|
@ -2,6 +2,7 @@
|
|||||||
# key: div
|
# key: div
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Div
|
# name: Div
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<div${1: id="${2:name}"}>
|
<div${1: id="${2:name}"}>
|
||||||
`yas/selected-text`$0
|
`yas/selected-text`$0
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# key: form
|
# key: form
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Form
|
# name: Form
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<form action="${1:${TM_FILENAME/(.*?)\..*/$1_submit/}}" method="${2:get}" accept-charset="utf-8">
|
<form action="${1:${TM_FILENAME/(.*?)\..*/$1_submit/}}" method="${2:get}" accept-charset="utf-8">
|
||||||
$0
|
$0
|
||||||
|
@ -2,5 +2,6 @@
|
|||||||
# key: h1
|
# key: h1
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Heading
|
# name: Heading
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<h1 id="${1/[[:alpha:]]+|( )/(?1:_:\L$0)/g}">${1:`yas/selected-text`}</h1>
|
<h1 id="${1/[[:alpha:]]+|( )/(?1:_:\L$0)/g}">${1:`yas/selected-text`}</h1>
|
@ -2,6 +2,7 @@
|
|||||||
# key: head
|
# key: head
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Head
|
# name: Head
|
||||||
|
## condition: "text.html - text.html source"
|
||||||
# --
|
# --
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8"${TM_XHTML}>
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8"${TM_XHTML}>
|
||||||
|
@ -2,5 +2,6 @@
|
|||||||
# key: link
|
# key: link
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Link
|
# name: Link
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<link rel="${1:stylesheet}" href="${2:/css/master.css}" type="text/css" media="${3:screen}" title="${4:no title}" charset="${5:utf-8}"${TM_XHTML}>
|
<link rel="${1:stylesheet}" href="${2:/css/master.css}" type="text/css" media="${3:screen}" title="${4:no title}" charset="${5:utf-8}"${TM_XHTML}>
|
@ -2,5 +2,6 @@
|
|||||||
# key: meta
|
# key: meta
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Meta
|
# name: Meta
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<meta name="${1:name}" content="${2:content}"${TM_XHTML}>
|
<meta name="${1:name}" content="${2:content}"${TM_XHTML}>
|
@ -2,5 +2,6 @@
|
|||||||
# key: scriptsrc
|
# key: scriptsrc
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Script With External Source
|
# name: Script With External Source
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<script src="$1" type="text/javascript" charset="${3:utf-8}"></script>
|
<script src="$1" type="text/javascript" charset="${3:utf-8}"></script>
|
@ -2,6 +2,7 @@
|
|||||||
# key: script
|
# key: script
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Script
|
# name: Script
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
$0
|
$0
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# key: style
|
# key: style
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Style
|
# name: Style
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<style type="text/css" media="screen">
|
<style type="text/css" media="screen">
|
||||||
$0
|
$0
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# key: table
|
# key: table
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Table
|
# name: Table
|
||||||
|
## condition: "text.html"
|
||||||
# --
|
# --
|
||||||
<table border="${1:0}"${2: cellspacing="${3:5}" cellpadding="${4:5}"}>
|
<table border="${1:0}"${2: cellspacing="${3:5}" cellpadding="${4:5}"}>
|
||||||
<tr><th>${5:Header}</th></tr>
|
<tr><th>${5:Header}</th></tr>
|
||||||
|
@ -2,5 +2,6 @@
|
|||||||
# key: title
|
# key: title
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Title
|
# name: Title
|
||||||
|
## condition: "text.html - text.blog"
|
||||||
# --
|
# --
|
||||||
<title>${1:${TM_FILENAME/((.+)\..*)?/(?2:$2:Page Title)/}}</title>
|
<title>${1:${TM_FILENAME/((.+)\..*)?/(?2:$2:Page Title)/}}</title>
|
@ -1,7 +1,8 @@
|
|||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Special: Return Inside Empty Open/Close Tags
|
# name: Special: Return Inside Empty Open/Close Tags
|
||||||
# binding: "
"
|
## binding: "
"
|
||||||
|
## condition: "meta.scope.between-tag-pair"
|
||||||
# --
|
# --
|
||||||
|
|
||||||
$0
|
$0
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Wrap Selection in Open/Close Tag
|
# name: Wrap Selection in Open/Close Tag
|
||||||
# binding: "^W"
|
## binding: "^W"
|
||||||
|
## condition: "text.html,"
|
||||||
# --
|
# --
|
||||||
<${1:p}>`yas/selected-text`</${1/\s.*//}>
|
<${1:p}>`yas/selected-text`</${1/\s.*//}>
|
@ -1,5 +1,6 @@
|
|||||||
# -*- mode: snippet -*-
|
# -*- mode: snippet -*-
|
||||||
# contributor: Translated from TextMate Snippet
|
# contributor: Translated from TextMate Snippet
|
||||||
# name: Wrap in <?= … ?>
|
# name: Wrap in <?= … ?>
|
||||||
|
## condition: "text.html string"
|
||||||
# --
|
# --
|
||||||
<?= `yas/selected-text` ?>
|
<?= `yas/selected-text` ?>
|
Loading…
x
Reference in New Issue
Block a user