aboutsummaryrefslogtreecommitdiff
path: root/vim/bundle/vim-snippets/snippets/haml.snippets
blob: 09217c6c460617978a7bd0c742842b1ae2c4bed6 (plain)
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
snippet t
	%table
		%tr
			%th
				${1:headers}
		%tr
			%td
				${0:headers}
snippet ul
	%ul
		%li
			${0:item}
		%li
snippet rp
	= render :partial => "${0:item}"
snippet rpc
	= render :partial => "${1:item}", :collection => ${0:@$1s}
snippet rpl
	= render :partial => "${1:item}", :locals => { :${2:$1} => ${0:@$1}
snippet rpo
	= render :partial => "${1:item}", :object => ${0:@$1}
snippet lt
	= link_to ${1:name}, ${2:dest}
snippet mt
	= mail_to ${1:email_address}, ${2:name}
snippet mts
	= mail_to ${1:email_address}, ${2:name}, :subject => ${3}, :body => ${4}
snippet ife
	- if ${1:condition}
		${2}
	- else
		${0}
snippet ifp
	- if ${1:condition}.presence?
		${0}
snippet ntc
	= number_to_currency(${1})