mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-12-15 18:04:18 +00:00
Last commit before tagging and releasing
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: rb
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: #!/usr/bin/env ruby -wKU
|
||||
# --
|
||||
#!/usr/bin/env ruby${TM_RUBY_SWITCHES: -wKU}
|
||||
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: ife
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: if … else … end
|
||||
# --
|
||||
if ${1:condition}
|
||||
$2
|
||||
else
|
||||
$3
|
||||
end
|
||||
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: if
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: if … end
|
||||
# --
|
||||
if ${1:condition}
|
||||
$0
|
||||
end
|
||||
@@ -0,0 +1,9 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: case
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: case … end
|
||||
# --
|
||||
case ${1:object}
|
||||
when ${2:condition}
|
||||
$0
|
||||
end
|
||||
@@ -0,0 +1,11 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: begin
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: begin … rescue … end
|
||||
# binding: "^W"
|
||||
# --
|
||||
${TM_SELECTED_TEXT/([\t ]*).*/$1/m}begin
|
||||
${3:${TM_SELECTED_TEXT/(\A.*)|(.+)|\n\z/(?1:$0:(?2:\t$0))/g}}
|
||||
${TM_SELECTED_TEXT/([\t ]*).*/$1/m}rescue ${1:Exception}${2/.+/ => /}${2:e}
|
||||
${TM_SELECTED_TEXT/([\t ]*).*/$1/m} $0
|
||||
${TM_SELECTED_TEXT/([\t ]*).*/$1/m}end
|
||||
6
extras/imported/ruby-mode/Declarations/__END__.yasnippet
Normal file
6
extras/imported/ruby-mode/Declarations/__END__.yasnippet
Normal file
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: end
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: __END__
|
||||
# --
|
||||
__END__
|
||||
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: app
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: application { .. }
|
||||
# --
|
||||
if __FILE__ == \$PROGRAM_NAME
|
||||
$0
|
||||
end
|
||||
8
extras/imported/ruby-mode/Declarations/def end.yasnippet
Normal file
8
extras/imported/ruby-mode/Declarations/def end.yasnippet
Normal file
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: def
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: def … end
|
||||
# --
|
||||
def ${1:method_name}
|
||||
$0
|
||||
end
|
||||
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: elsif
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: elsif ...
|
||||
# --
|
||||
elsif ${1:condition}
|
||||
$0
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: req
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: require ".."
|
||||
# --
|
||||
require "$0"
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: reqg-
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: require_gem ".."
|
||||
# --
|
||||
require "$0"
|
||||
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: unless
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: unless … end
|
||||
# --
|
||||
unless ${1:condition}
|
||||
$0
|
||||
end
|
||||
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: until
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: until ... end
|
||||
# --
|
||||
until ${1:condition}
|
||||
$0
|
||||
end
|
||||
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: usai
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: usage_if()
|
||||
# --
|
||||
if ARGV.$1
|
||||
abort "Usage: #{\$PROGRAM_NAME} ${2:ARGS_GO_HERE}"
|
||||
end
|
||||
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: usau
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: usage_unless()
|
||||
# --
|
||||
unless ARGV.$1
|
||||
abort "Usage: #{\$PROGRAM_NAME} ${2:ARGS_GO_HERE}"
|
||||
end
|
||||
7
extras/imported/ruby-mode/Declarations/when.yasnippet
Normal file
7
extras/imported/ruby-mode/Declarations/when.yasnippet
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: when
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: when …
|
||||
# --
|
||||
when ${1:condition}
|
||||
$0
|
||||
@@ -0,0 +1,8 @@
|
||||
# -*- mode: snippet -*-
|
||||
# key: while
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: while ... end
|
||||
# --
|
||||
while ${1:condition}
|
||||
$0
|
||||
end
|
||||
Reference in New Issue
Block a user