more snippets and a bug fix: strange (= nil nil) will cause error in elisp.

This commit is contained in:
Zhang Chiyuan
2008-03-06 14:33:13 +00:00
parent 8ef771a696
commit c45eff49e2
11 changed files with 45 additions and 3 deletions

3
snippets/ruby-mode/# Normal file
View File

@@ -0,0 +1,3 @@
#name : # =>
# --
# =>

3
snippets/ruby-mode/am Normal file
View File

@@ -0,0 +1,3 @@
#name : alias_method new, old
# --
alias_method :${new_name}, :${old_name}

6
snippets/ruby-mode/case Normal file
View File

@@ -0,0 +1,6 @@
#name : case ... end
# --
case ${1:object}
when ${2:condition}
$0
end

5
snippets/ruby-mode/forin Normal file
View File

@@ -0,0 +1,5 @@
#name : for ... in ...; ... end
# --
for ${1:element} in ${2:collection}
$0
end

5
snippets/ruby-mode/if Normal file
View File

@@ -0,0 +1,5 @@
#name : if ... end
# --
if ${1:condition}
$0
end

7
snippets/ruby-mode/ife Normal file
View File

@@ -0,0 +1,7 @@
#name : if ... else ... end
# --
if ${1:condition}
$2
else
$3
end

View File

@@ -0,0 +1,3 @@
#name : inject(...) { |...| ... }
# --
inject(${1:0}) { |${2:injection}, ${3:element}| $0 }

3
snippets/ruby-mode/rb Normal file
View File

@@ -0,0 +1,3 @@
#name : /usr/bin/ruby -wKU
# --
#!/usr/bin/ruby -wKU

View File

@@ -0,0 +1,3 @@
#name : reject { |...| ... }
# --
reject { |${1:element}| $0 }

View File

@@ -0,0 +1,3 @@
#name : select { |...| ... }
# --
select { |${1:element}| $0 }