Browse files

Add haml snippets (translation from eruby-rails)

Signed-off-by: Martin Grenfell <martin_grenfell@msn.com>
  • Loading branch information...
1 parent 78a4cf6 commit ccf100d78a04fd1fc7d8c0c6479ce8a96fa5073f @zuf zuf committed with scrooloose Jul 22, 2009
View
1 Rakefile
@@ -7,6 +7,7 @@ task :deploy_local do
run "cp -r c ~/.vim/snippets/"
run "cp -r eruby ~/.vim/snippets/"
run "cp -r eruby-rails ~/.vim/snippets/"
+ run "cp -r haml ~/.vim/snippets/"
run "cp -r html ~/.vim/snippets/"
run "cp -r java ~/.vim/snippets/"
run "cp -r javascript ~/.vim/snippets/"
View
3 haml/conf.snippet
@@ -0,0 +1,3 @@
+-content_for :${1:yield_label_in_layout} do
+ ${2}
+
View
1 haml/cs.snippet
@@ -0,0 +1 @@
+=collection_select <+object+>, <+method+>, <+collection+>, <+value_method+>, <+text_method+><+, <+[options]+>, <+[html_options]+>+>
View
2 haml/ff.snippet
@@ -0,0 +1,2 @@
+-form_for @${1:model} do |f|
+ ${2}
View
1 haml/ffcb.snippet
@@ -0,0 +1 @@
+= f.check_box :${1:attribute}
View
4 haml/ffe.snippet
@@ -0,0 +1,4 @@
+=error_messages_for :${1:model}
+
+-form_for @${2:model} do |f|
+ ${3}
View
1 haml/ffff.snippet
@@ -0,0 +1 @@
+= f.file_field :${1:attribute}
View
1 haml/ffhf.snippet
@@ -0,0 +1 @@
+= f.hidden_field :${1:attribute}
View
1 haml/ffl.snippet
@@ -0,0 +1 @@
+= f.label :<+attribute+><+, '<+attribute+>'+>
View
1 haml/ffpf.snippet
@@ -0,0 +1 @@
+= f.password_field :${1:attribute}
View
1 haml/ffrb.snippet
@@ -0,0 +1 @@
+= f.radio_button :${1:attribute}, :${2:tag_value}
View
1 haml/ffs.snippet
@@ -0,0 +1 @@
+= f.submit "<+Submit+>"<+, :disable_with => '<+Submitting+>'+>
View
1 haml/ffta.snippet
@@ -0,0 +1 @@
+= f.text_area :${1:attribute}
View
1 haml/fftf.snippet
@@ -0,0 +1 @@
+= f.text_field :${1:attribute}
View
2 haml/fields.snippet
@@ -0,0 +1,2 @@
+-fields_for :${1:model}, @$1 do |${2:f}|
+ ${3}
View
6 haml/for.snippet
@@ -0,0 +1,6 @@
+-if !${1:list}.blank?
+ -for ${2:item} in $1
+ ${3}
+-else
+ ${4}
+
View
2 haml/ft.snippet
@@ -0,0 +1,2 @@
+-form_tag(<+:action => "<+update+>"+><+, {:<+class+> => "<+form+>"}+>) do
+ <++>
View
1 haml/it.snippet
@@ -0,0 +1 @@
+= image_tag "${1}"
View
1 haml/jit.snippet
@@ -0,0 +1 @@
+= javascript_include_tag <+:all+><+, :cache => <+true+>+>
View
1 haml/jsit.snippet
@@ -0,0 +1 @@
+= javascript_include_tag "${1}"
View
1 haml/lia.snippet
@@ -0,0 +1 @@
+= link_to "${1:link text}", :action => "${2:index}"
View
1 haml/liai.snippet
@@ -0,0 +1 @@
+= link_to "<+link text+>", :action => "<+edit+>", :id => <+@<+item+>+>
View
1 haml/lic.snippet
@@ -0,0 +1 @@
+= link_to "${1:link text}", :controller => "${2:items}"
View
1 haml/lica.snippet
@@ -0,0 +1 @@
+= link_to "${1:link text}", :controller => "${2:items}", :action => "${3:index}"
View
1 haml/licai.snippet
@@ -0,0 +1 @@
+= link_to "<+link text+>", :controller => "<+items+>", :action => "<+edit+>", :id => <+@<+item+>+>
View
1 haml/lim.snippet
@@ -0,0 +1 @@
+= link_to <+model+>.<+name+>, <+<+model+>_path(<+model+>)+>
View
1 haml/linp.snippet
@@ -0,0 +1 @@
+= link_to <+"<+link text+>"+>, <+<+parent+>_<+child+>_path(<+@+><+parent+>, <+@+><+child+>)+>
View
1 haml/linpp.snippet
@@ -0,0 +1 @@
+= link_to <+"<+link text+>"+>, <+<+parent+>_<+child+>_path(<+@+><+parent+>)+>
View
1 haml/lip.snippet
@@ -0,0 +1 @@
+= link_to <+"<+link text+>"+>, <+<+model+>_path(<+@+><+instance+>)+>
View
1 haml/lipp.snippet
@@ -0,0 +1 @@
+= link_to <+"<+link text+>"+>, <+<+model+>s_path+>
View
1 haml/lt.snippet
@@ -0,0 +1 @@
+= link_to "${1}", ${2:dest}
View
1 haml/ofcfs.snippet
@@ -0,0 +1 @@
+= options_from_collection_for_select <+collection+>, <+value_method+>, <+text_method+><+, <+[selected_value]+>+>
View
1 haml/rf.snippet
@@ -0,0 +1 @@
+= render :file => "${1:file}"${2}
View
1 haml/rp.snippet
@@ -0,0 +1 @@
+= render :partial => "${1:file}"${2}
View
1 haml/rt.snippet
@@ -0,0 +1 @@
+= render :template => "${1:file}"${2}
View
1 haml/slt.snippet
@@ -0,0 +1 @@
+= stylesheet_link_tag <+:all+><+, :cache => <+true+>+>
View
1 haml/sslt.snippet
@@ -0,0 +1 @@
+= stylesheet_link_tag "${1}"
View
1 haml/st.snippet
@@ -0,0 +1 @@
+= submit_tag "<+Save changes+>"<+, :id => "<+submit+>"+><+, :name => "<+submit+>"+><+, :class => "<+form_name+>"+><+, :disabled => <+false+>+><+, :disable_with => "<+Please wait+>"+>

0 comments on commit ccf100d

Please sign in to comment.