adding alternative html-minimal snippets illustrating a somewhat minimal setup which is useful to me
This commit is contained in:
parent
2e0807add6
commit
c8783fd02f
31
UltiSnips/html_minimal.snippets
Normal file
31
UltiSnips/html_minimal.snippets
Normal file
@ -0,0 +1,31 @@
|
||||
# more can be found in snippets/html_minimal.snippets
|
||||
# these UltiSnips override snippets because nested placeholders are being used
|
||||
|
||||
snippet id
|
||||
id="${1}"${2}
|
||||
endsnippet
|
||||
|
||||
snippet idn
|
||||
id="${1}" name="${2:$1}"
|
||||
endsnippet
|
||||
|
||||
snippet label_and_input
|
||||
<label for="${2:$1}">${1}</label>
|
||||
<input type="${3:text}" name="${4:$2}"${5: id="${6:$2}"} value="${7}" />${8}
|
||||
endsnippet
|
||||
|
||||
snippet input
|
||||
<input type="${1:text}" value="${2}" name="${3}"${4: id="${5:$3}}/>${7}
|
||||
endsnippet
|
||||
|
||||
snippet submit
|
||||
<input type="submit" value="${2}" ${3}/>${7}
|
||||
endsnippet
|
||||
|
||||
snippet textarea
|
||||
<textarea name="$2"${3: id="$4"}>$5</textarea>
|
||||
endsnippet
|
||||
|
||||
snippet img
|
||||
<img src="$1"${2: alt="$3"}/>
|
||||
endsnippet
|
74
snippets/html_minimal.snippets
Normal file
74
snippets/html_minimal.snippets
Normal file
@ -0,0 +1,74 @@
|
||||
# file containing most useful mappings only
|
||||
# when editing this file please be aware that there is ZenCoding and sparkup
|
||||
|
||||
# html 5 is recommended from now on
|
||||
snippet html5
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>$2</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
$3
|
||||
</head>
|
||||
<body>
|
||||
$4
|
||||
</body>
|
||||
</html>
|
||||
|
||||
# ==== TAGS
|
||||
# you always need these:
|
||||
snippet .
|
||||
class="${1}"${2}
|
||||
snippet n
|
||||
name="${1}"${2}
|
||||
snippet r
|
||||
rel="${1}"${2}
|
||||
snippet t
|
||||
title="${1}"${2}
|
||||
|
||||
# not using # because id is faster to type
|
||||
snippet id
|
||||
id="${1}"${2}
|
||||
snippet idn
|
||||
id="${1}" name="${2:$1}"
|
||||
|
||||
snippet label_and_input
|
||||
<label for="${2:$1}">${1}</label>
|
||||
<input type="${3:text}" name="${4:$2}" id="${5:$2}" value="${6}" />${7}
|
||||
|
||||
|
||||
# FORMS
|
||||
# use idn . or n to add id
|
||||
snippet input
|
||||
<input type="${1:text}" value="${2}" ${3}/>${7}
|
||||
snippet submit
|
||||
<input type="submit" value="${2}" ${3}/>${7}
|
||||
snippet textarea
|
||||
<textarea $1>$2</textarea>
|
||||
|
||||
# if you need id or class use snippets above
|
||||
snippet form
|
||||
<form method="${1:post/get}" action="$2">
|
||||
$3
|
||||
</form>
|
||||
|
||||
# other tags
|
||||
snippet br
|
||||
<br/>
|
||||
snippet a
|
||||
<a href="#" $2>$3</a>
|
||||
snippet img
|
||||
<img src="$1" alt="$2"/>
|
||||
# JS/CSS
|
||||
snippet css_file
|
||||
<link rel="stylesheet" href="${1:style.css}" type="text/css" media="${2:all}" />${3}
|
||||
snippet css_block
|
||||
<link rel="stylesheet" href="${1:style.css}" type="text/css" media="${2:all}">
|
||||
</link>
|
||||
|
||||
snippet script_block
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
</script>
|
||||
snippet script_file
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user