Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

convert from nerdsnippets format to snipmate

Snippets that have nested tabstops have been left in the nerdsnippets
format
  • Loading branch information...
commit 4690ff98d34d2750b1d8bd1648a17a53a5b1651c 1 parent a547422
Martin Grenfell authored
Showing with 73 additions and 74 deletions.
  1. +1 −1  ruby-rails/crw.snippet
  2. +6 −6 ruby-rails/defcreate.snippet
  3. +4 −4 ruby-rails/defdestroy.snippet
  4. +1 −1  ruby-rails/defedit.snippet
  5. +3 −3 ruby-rails/defindex.snippet
  6. +3 −3 ruby-rails/defnew.snippet
  7. +3 −3 ruby-rails/defshow.snippet
  8. +6 −6 ruby-rails/defupdate.snippet
  9. +1 −1  ruby-rails/habtm.snippet
  10. +1 −1  ruby-rails/ho.snippet
  11. +1 −1  ruby-rails/mac.snippet
  12. +1 −1  ruby-rails/mapc.snippet
  13. +1 −1  ruby-rails/mapca.snippet
  14. +1 −1  ruby-rails/mapr.snippet
  15. +1 −1  ruby-rails/maprs.snippet
  16. +2 −2 ruby-rails/mccc.snippet
  17. +1 −1  ruby-rails/mcol.snippet
  18. +2 −2 ruby-rails/mct.snippet
  19. +2 −3 ruby-rails/migration.snippet
  20. +1 −1  ruby-rails/mp.snippet
  21. +1 −1  ruby-rails/mrnc.snippet
  22. +1 −1  ruby-rails/mrw.snippet
  23. +1 −1  ruby-rails/ra.snippet
  24. +1 −1  ruby-rails/ral.snippet
  25. +1 −1  ruby-rails/rf.snippet
  26. +1 −1  ruby-rails/rfu.snippet
  27. +1 −1  ruby-rails/ril.snippet
  28. +1 −1  ruby-rails/rit.snippet
  29. +1 −1  ruby-rails/rl.snippet
  30. +1 −1  ruby-rails/rn.snippet
  31. +1 −1  ruby-rails/rns.snippet
  32. +1 −1  ruby-rails/rp.snippet
  33. +1 −1  ruby-rails/rps.snippet
  34. +1 −1  ruby-rails/rt.snippet
  35. +1 −1  ruby-rails/rtl.snippet
  36. +1 −1  ruby-rails/rtlt.snippet
  37. +1 −1  ruby-rails/rts.snippet
  38. +7 −7 ruby-rails/sweeper.snippet
  39. +2 −2 ruby-rails/tct.snippet
  40. +2 −2 ruby-rails/tcti.snippet
  41. +2 −2 ruby-rails/tcts.snippet
  42. +1 −1  ruby-rails/tctss.snippet
2  ruby-rails/crw.snippet
View
@@ -1 +1 @@
-cattr_accessor :<+attr_names+>
+cattr_accessor :${1:attr_names}
12 ruby-rails/defcreate.snippet
View
@@ -1,14 +1,14 @@
def create
- @\<c-r>=NS_underscore(NS_prompt("snippet_classname", "Model ClassName", ""))\<cr> = \<c-r>=snippet_classname\<cr>.new(params[:\<c-r>=NS_underscore(snippet_classname)\<cr>])
+ @${1:model_class_name} = ${2:ModelClassName}.new(params[:$1])
respond_to do |wants|
- if @\<c-r>=NS_underscore(snippet_classname)\<cr>.save
+ if @$1.save
flash[:notice] = '\<c-r>=snippet_classname\<cr> was successfully created.'
- wants.html { redirect_to(@\<c-r>=NS_underscore(snippet_classname)\<cr>) }
- wants.xml { render :xml => @\<c-r>=NS_underscore(snippet_classname)\<cr>, :status => :created, :location => @\<c-r>=NS_underscore(snippet_classname)\<cr> }
+ wants.html { redirect_to(@$1) }
+ wants.xml { render :xml => @$1, :status => :created, :location => @$1 }
else
wants.html { render :action => "new" }
- wants.xml { render :xml => @\<c-r>=NS_underscore(snippet_classname)\<cr>.errors, :status => :unprocessable_entity }
+ wants.xml { render :xml => @$1.errors, :status => :unprocessable_entity }
end
end
-end
+end${3}
8 ruby-rails/defdestroy.snippet
View
@@ -1,9 +1,9 @@
def destroy
- @\<c-r>=NS_underscore(NS_prompt("snippet_classname", "Model ClassName", ""))\<cr> = \<c-r>=snippet_classname\<cr>.find(params[:id])
- @\<c-r>=NS_underscore(snippet_classname)\<cr>.destroy
+ @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])
+ @$1.destroy
respond_to do |wants|
- wants.html { redirect_to(\<c-r>=NS_underscore(snippet_classname)\<cr>s_url) }
+ wants.html { redirect_to($1s_url) }
wants.xml { head :ok }
end
-end
+end${3}
2  ruby-rails/defedit.snippet
View
@@ -1,3 +1,3 @@
def edit
- @\<c-r>=NS_underscore(NS_prompt("snippet_classname", "Model ClassName", ""))\<cr> = \<c-r>=snippet_classname\<cr>.find(params[:id])
+ @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])
end
6 ruby-rails/defindex.snippet
View
@@ -1,8 +1,8 @@
def index
- @\<c-r>=NS_underscore(NS_prompt("snippet_classname", "Model ClassName", ""))\<cr> = \<c-r>=snippet_classname\<cr>.all
+ @${1:model_class_name} = ${2:ModelClassName}.all
respond_to do |wants|
wants.html # index.html.erb
- wants.xml { render :xml => @\<c-r>=NS_underscore(snippet_classname)\<cr>s }
+ wants.xml { render :xml => @$1s }
end
-end
+end${3}
6 ruby-rails/defnew.snippet
View
@@ -1,8 +1,8 @@
def new
- @\<c-r>=NS_underscore(NS_prompt("snippet_classname", "Model ClassName", ""))\<cr> = \<c-r>=snippet_classname\<cr>.new
+ @${1:model_class_name} = ${2:ModelClassName}.new
respond_to do |wants|
wants.html # new.html.erb
- wants.xml { render :xml => @\<c-r>=NS_underscore(snippet_classname)\<cr> }
+ wants.xml { render :xml => @$1 }
end
-end
+end${3}
6 ruby-rails/defshow.snippet
View
@@ -1,8 +1,8 @@
def show
- @\<c-r>=NS_underscore(NS_prompt("snippet_classname", "Model ClassName", ""))\<cr> = \<c-r>=snippet_classname\<cr>.find(params[:id])
+ @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])
respond_to do |wants|
wants.html # show.html.erb
- wants.xml { render :xml => @\<c-r>=NS_underscore(snippet_classname)\<cr> }
+ wants.xml { render :xml => @$1 }
end
-end
+end${3}
12 ruby-rails/defupdate.snippet
View
@@ -1,14 +1,14 @@
def update
- @\<c-r>=NS_underscore(NS_prompt("snippet_classname", "Model ClassName", ""))\<cr> = \<c-r>=snippet_classname\<cr>.find(params[:id])
+ @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])
respond_to do |wants|
- if @\<c-r>=NS_underscore(snippet_classname)\<cr>.update_attributes(params[:\<c-r>=NS_underscore(snippet_classname)\<cr>])
- flash[:notice] = '\<c-r>=snippet_classname\<cr> was successfully updated.'
- wants.html { redirect_to(@\<c-r>=NS_underscore(snippet_classname)\<cr>) }
+ if @$1.update_attributes(params[:$1])
+ flash[:notice] = '$2 was successfully updated.'
+ wants.html { redirect_to(@$1) }
wants.xml { head :ok }
else
wants.html { render :action => "edit" }
- wants.xml { render :xml => @\<c-r>=NS_underscore(snippet_classname)\<cr>.errors, :status => :unprocessable_entity }
+ wants.xml { render :xml => @$1.errors, :status => :unprocessable_entity }
end
end
-end
+end${3}
2  ruby-rails/habtm.snippet
View
@@ -1 +1 @@
-has_and_belongs_to_many :<+object+><+, :join_table => "<+table_name+>", :foreign_key => "<+<++>_id+>"+>
+has_and_belongs_to_many :${1:object}, :join_table => "${2:table_name}", :foreign_key => "${3}_id"${4}
2  ruby-rails/ho.snippet
View
@@ -1 +1 @@
-has_one :<+object+><+, :class_name => "<+Class+>", :foreign_key => "<+<++>_id+>"+>
+has_one :${1:object}, :class_name => "${2:Class}", :foreign_key => "${3:class}_id"
2  ruby-rails/mac.snippet
View
@@ -1 +1 @@
-add_column :<+table+>, :<+column+>, :<+type+>
+add_column :${1:table}, :${2:column}, :${3:type}
2  ruby-rails/mapc.snippet
View
@@ -1 +1 @@
-<+map+>.<+connect+> '<+controller/:action/:id+>'
+${1:map}.${2:connect} '${3:controller/:action/:id}'
2  ruby-rails/mapca.snippet
View
@@ -1 +1 @@
-<+map+>.catch_all "*<+anything+>", :controller => "<+default+>", :action => "<+error+>"
+${1:map}.catch_all "*${2:anything}", :controller => "${3:default}", :action => "${4:error}"${5}
2  ruby-rails/mapr.snippet
View
@@ -1 +1 @@
-<+map+>.resource :<+resource+>
+${1:map}.resource :${2:resource}
2  ruby-rails/maprs.snippet
View
@@ -1 +1 @@
-<+map+>.resources :<+resource+>
+${1:map}.resources :${2:resource}
4 ruby-rails/mccc.snippet
View
@@ -1,2 +1,2 @@
-t.column :<+title+>, :<+string+>
-mccc<++>
+t.column :${1:title}, :${2:string}
+mccc${3}
2  ruby-rails/mcol.snippet
View
@@ -1 +1 @@
-remove_column :<+table+>, :<+column+>
+remove_column :${1:table}, :${2:column}
4 ruby-rails/mct.snippet
View
@@ -1,3 +1,3 @@
-create_table :<+table_name+> do |t|
- t.column :<+name+>, :<+type+>
+create_table :${1:table_name} do |t|
+ t.column :${2:name}, :${3:type}
end
5 ruby-rails/migration.snippet
View
@@ -1,9 +1,8 @@
-class \<c-r>=Snippet_MigrationNameFromFilename()\<cr> < ActiveRecord::Migration
+class ${1:`Snippet_MigrationNameFromFilename()`} < ActiveRecord::Migration
def self.up
- <++>
+ ${2}
end
def self.down
- <++>
end
end
2  ruby-rails/mp.snippet
View
@@ -1 +1 @@
-map(&:<+id+>)
+map(&:${1:id})
2  ruby-rails/mrnc.snippet
View
@@ -1 +1 @@
-rename_column :<+table+>, :<+old+>, :<+new+>
+rename_column :${1:table}, :${2:old}, :${3:new}
2  ruby-rails/mrw.snippet
View
@@ -1 +1 @@
-mattr_accessor :<+attr_names+>
+mattr_accessor :${1:attr_names}
2  ruby-rails/ra.snippet
View
@@ -1 +1 @@
-render :action => "<+action+>"
+render :action => "${1:action}"
2  ruby-rails/ral.snippet
View
@@ -1 +1 @@
-render :action => "<+action+>", :layout => "<+layoutname+>"
+render :action => "${1:action}", :layout => "${2:layoutname}"
2  ruby-rails/rf.snippet
View
@@ -1 +1 @@
-render :file => "<+filepath+>"
+render :file => "${1:filepath}"
2  ruby-rails/rfu.snippet
View
@@ -1 +1 @@
-render :file => "<+filepath+>", :use_full_path => <+false+>
+render :file => "${1:filepath}", :use_full_path => ${2:false}
2  ruby-rails/ril.snippet
View
@@ -1 +1 @@
-render :inline => "<+<%= 'hello' %>+>", :locals => { <+:name+> => "<+value+>"<++> }
+render :inline => "${1:<%= 'hello' %>}", :locals => { ${2::name} => "${3:value}"${4} }
2  ruby-rails/rit.snippet
View
@@ -1 +1 @@
-render :inline => "<+<%= 'hello' %>+>", :type => <+:rxml+>
+render :inline => "${1:<%= 'hello' %>}", :type => ${2::rxml}
2  ruby-rails/rl.snippet
View
@@ -1 +1 @@
-render :layout => "<+layoutname+>"
+render :layout => "${1:layoutname}"
2  ruby-rails/rn.snippet
View
@@ -1 +1 @@
-render :nothing => <+true+>
+render :nothing => ${1:true}
2  ruby-rails/rns.snippet
View
@@ -1 +1 @@
-render :nothing => <+true+>, :status => <+401+>
+render :nothing => ${1:true}, :status => ${2:401}
2  ruby-rails/rp.snippet
View
@@ -1 +1 @@
-render :partial => "<+item+>"
+render :partial => "${1:item}"
2  ruby-rails/rps.snippet
View
@@ -1 +1 @@
-render :partial => "<+item+>", :status => <+500+>
+render :partial => "${1:item}", :status => ${2:500}
2  ruby-rails/rt.snippet
View
@@ -1 +1 @@
-render :text => "<+text to render+>"
+render :text => "${1:text to render}"
2  ruby-rails/rtl.snippet
View
@@ -1 +1 @@
-render :text => "<+text to render+>", :layout => "<+layoutname+>"
+render :text => "${1:text to render}", :layout => "${2:layoutname}"
2  ruby-rails/rtlt.snippet
View
@@ -1 +1 @@
-render :text => "<+text to render+>", :layout => <+true+>
+render :text => "${1:text to render}", :layout => ${2:true}
2  ruby-rails/rts.snippet
View
@@ -1 +1 @@
-render :text => "<+text to render+>", :status => <+401+>
+render :text => "${1:text to render}", :status => ${2:401}
14 ruby-rails/sweeper.snippet
View
@@ -1,15 +1,15 @@
-class \<c-r>=NS_prompt("snip_classname", "Model classname", "")\<cr>Sweeper < ActionController::Caching::Sweeper
- observe \<c-r>=snip_classname\<cr>
+class ${1:ModelClassName}Sweeper < ActionController::Caching::Sweeper
+ observe $1
- def after_save(\<c-r>=NS_underscore(snip_classname)\<cr>)
- expire_cache(\<c-r>=NS_underscore(snip_classname)\<cr>)
+ def after_save(${2:model_class_name})
+ expire_cache($2)
end
- def after_destroy(\<c-r>=NS_underscore(snip_classname)\<cr>)
- expire_cache(\<c-r>=NS_underscore(snip_classname)\<cr>)
+ def after_destroy($2)
+ expire_cache($2)
end
- def expire_cache(\<c-r>=NS_underscore(snip_classname)\<cr>)
+ def expire_cache($2)
expire_page
end
end
4 ruby-rails/tct.snippet
View
@@ -1,2 +1,2 @@
-t.text :<+title+>
-<++>
+t.text :${1:title}
+${2}
4 ruby-rails/tcti.snippet
View
@@ -1,2 +1,2 @@
-t.time :<+title+>
-<++>
+t.time :${1:title}
+${2}
4 ruby-rails/tcts.snippet
View
@@ -1,2 +1,2 @@
-t.timestamp :<+title+>
-<++>
+t.timestamp :${1:title}
+${2}
2  ruby-rails/tctss.snippet
View
@@ -1,2 +1,2 @@
t.timestamps
-<++>
+${1}
Please sign in to comment.
Something went wrong with that request. Please try again.