mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-12-15 18:04:18 +00:00
* Small change to textmate_import.rb to import (commented) "scope" directive
* Reimported the HTML and Ruby bundle with the previous fix * Applied Rob Christie's patches of issues 109 and 110 0001-Deleted-because-this-is-supported-via-dwim-with-rcod.patch 0002-Updated-snippets.patch 0003-Added-setup.el-file-that-must-be-loaded-prior-to-loa.patch 0004-ruby-mode-class-and-module-snippets-updated.patch 0005-changes-to-counting-snippets-and-some-declaration-sn.patch patching some things manually. Thanks a lot Rob!
This commit is contained in:
@@ -2,5 +2,6 @@
|
||||
# key: rb
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: #!/usr/bin/env ruby -wKU
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
#!/usr/bin/env ruby${TM_RUBY_SWITCHES: -wKU}
|
||||
#!/usr/bin/env ruby -wKU
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# key: ife
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: if … else … end
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
if ${1:condition}
|
||||
$2
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# key: if
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: if … end
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
if ${1:condition}
|
||||
$0
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# key: case
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: case … end
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
case ${1:object}
|
||||
when ${2:condition}
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
# key: begin
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: begin … rescue … end
|
||||
# binding: "^W"
|
||||
## binding: "^W"
|
||||
## condition: "source.ruby - comment"
|
||||
# --
|
||||
${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
|
||||
begin
|
||||
`(or yas/selected-text (car kill-ring))`$3
|
||||
rescue ${1:Exception}${2:$(if (string= yas/text "") "" " => ")}${2:e}
|
||||
$0
|
||||
end
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
# key: end
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: __END__
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
__END__
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# key: app
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: application { .. }
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
if __FILE__ == \$PROGRAM_NAME
|
||||
$0
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# key: def
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: def … end
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
def ${1:method_name}
|
||||
$0
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# key: elsif
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: elsif ...
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
elsif ${1:condition}
|
||||
$0
|
||||
@@ -2,5 +2,6 @@
|
||||
# key: req
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: require ".."
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
require "$0"
|
||||
@@ -2,5 +2,6 @@
|
||||
# key: reqg-
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: require_gem ".."
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
require "$0"
|
||||
@@ -2,6 +2,7 @@
|
||||
# key: unless
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: unless … end
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
unless ${1:condition}
|
||||
$0
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# key: until
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: until ... end
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
until ${1:condition}
|
||||
$0
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# key: usai
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: usage_if()
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
if ARGV.$1
|
||||
abort "Usage: #{\$PROGRAM_NAME} ${2:ARGS_GO_HERE}"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# key: usau
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: usage_unless()
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
unless ARGV.$1
|
||||
abort "Usage: #{\$PROGRAM_NAME} ${2:ARGS_GO_HERE}"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# key: when
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: when …
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
when ${1:condition}
|
||||
$0
|
||||
@@ -2,6 +2,7 @@
|
||||
# key: while
|
||||
# contributor: Translated from TextMate Snippet
|
||||
# name: while ... end
|
||||
## condition: "source.ruby"
|
||||
# --
|
||||
while ${1:condition}
|
||||
$0
|
||||
|
||||
Reference in New Issue
Block a user