Created
August 30, 2010 06:36
-
-
Save tcha-tcho/557098 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get path do ... end | |
snippet get | |
get '/${1:path}'${2:, options} do | |
${3:# ...} | |
end | |
# post path do ... end | |
snippet post | |
post '/${1:path}'${2:, options} do | |
${3:# ...} | |
end | |
# put path do ... end | |
snippet put | |
put '/${1:path}'${2:, options} do | |
${3:# ...} | |
end | |
# delete path do ... end | |
snippet del | |
delete '/${1:path}'${2:, options} do | |
${3:# ...} | |
end | |
# head ... end | |
snippet head | |
head '/${1:path}'${2:, options} do | |
${3:# ...} | |
end | |
snippet rest | |
get '/${1:path}' do | |
${2} | |
end | |
post '/${1}' do | |
${3} | |
end | |
put '/${1}' do | |
${4} | |
end | |
delete '/${1}' do | |
${5} | |
end | |
snippet gp | |
get '/${1:path}' do | |
${2} | |
end | |
post '/${1}' do | |
${3} | |
end | |
snippet err | |
error ${1:ErrorName} do | |
stop ${2:number}, ${3:'<h1>Error!</h1>'} | |
end | |
snippet be | |
before do | |
${1} | |
end | |
snippet conf | |
configure :${1:stage} do | |
${2} | |
end | |
snippet lay | |
__END__ | |
@@ ${1:layout} | |
${2:= yield} | |
${3} | |
snippet @ | |
@@ ${1:page} | |
snippet erb | |
erb :${1:name_of_view} | |
snippet haml | |
haml :${1:name_of_view} | |
snippet nf | |
not_found do | |
${1:'<h1>Four Oh Four!</h1>'} | |
end | |
snippet sass | |
haml :${1:name_of_stylesheet} | |
# helpers inclass | |
snippet helc | |
helpers ${1:inclass} | |
# helpers do def helper end ... end | |
snippet held | |
helpers do | |
${1:helper} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Muito bom ... vou incluir esse Snippet no Vim-Ruby/Sinatra ... obrigado!