File: html_minimal.snippets

package info (click to toggle)
vim-snippets 1.0.0-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 900 kB
  • sloc: python: 9; makefile: 2
file content (72 lines) | stat: -rw-r--r-- 1,390 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# 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>
		<meta charset="utf-8">
		<title>$2</title>
		$3
	</head>
	<body>
	$4
	</body>
	</html>

# ==== TAGS
# you always need these:
snippet .
	class="${1}"
snippet n
	name="${1}"
snippet r
	rel="${1}"
snippet t
	title="${1}"

# not using # because id is faster to type
snippet id
	id="${1}"
snippet idn
	id="${1}" name="${0:$1}"

snippet label_and_input
	<label for="${0:$1}">${1}</label>
	<input type="${3:text}" name="${4:$2}" id="${5:$2}" value="${6}">


# FORMS
# use idn . or n to add id
snippet input
	<input type="${1:text}" value="${2}" ${3}>
snippet submit
	<input type="submit" value="${2}" ${3}>
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}">
snippet css_block
	<style type='text/css'>
	</style>
snippet script_block
	<script type="text/javascript" charset="utf-8">
	</script>
snippet script_file
	<script src="${1}" type="text/javascript"></script>