Skip to content

Commit 48ffeae

Browse files
committed
Improve ruby snippet
1 parent 3f51aac commit 48ffeae

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

neosnippets/ruby.snip

+13-12
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@ abbr { ... }
3939

4040
snippet blockvar
4141
abbr {|var| ... }
42-
{|${1:#:var}|
42+
{ |${1:#:var}|
4343
${2:TARGET}
4444
}
4545

4646
snippet fileopen
47+
alias open
4748
abbr File.open(filename) do ... end
4849
File.open(${1:#:filename}, '${2:#:mode}') do |${3:io}|
4950
${0:TARGET}
@@ -65,7 +66,7 @@ alias enc
6566

6667
snippet each
6768
options word
68-
each {|${1:#:variable}| ${2} }
69+
each { |${1:#:variable}| ${2} }
6970

7071
snippet each_do
7172
options word
@@ -75,47 +76,47 @@ options word
7576

7677
snippet each_byte
7778
options word
78-
each_byte {|${1:#:variable}| ${2} }
79+
each_byte { |${1:#:variable}| ${2} }
7980

8081
snippet each_char
8182
options word
82-
each_char {|${1:#:variable}| ${2} }
83+
each_char { |${1:#:variable}| ${2} }
8384

8485
snippet each_index
8586
options word
86-
each_index {|${1:#:variable}| ${2} }
87+
each_index { |${1:#:variable}| ${2} }
8788

8889
snippet each_key
8990
options word
90-
each_key {|${1:#:variable}| ${2} }
91+
each_key { |${1:#:variable}| ${2} }
9192

9293
snippet each_line
9394
options word
94-
each_line {|${1:#:variable}| ${2} }
95+
each_line { |${1:#:variable}| ${2} }
9596

9697
snippet each_with_index
9798
options word
98-
each_with_index {|${1:#:variable}| ${2} }
99+
each_with_index { |${1:#:variable}| ${2} }
99100

100101
snippet map
101102
options word
102-
map {|${1:#:variable}| ${2} }
103+
map { |${1:#:variable}| ${2} }
103104

104105
snippet sort
105106
options word
106-
sort {|${1:#:variable}| ${2} }
107+
sort { |${1:#:variable}| ${2} }
107108

108109
snippet sort_by
109110
options word
110-
sort_by {|${1:#:variable}| ${2} }
111+
sort_by { |${1:#:variable}| ${2} }
111112

112113
snippet lambda
113114
options word
114115
-> (${1:#:args}) { ${2} }
115116

116117
snippet lambda-keyword
117118
options word
118-
lambda {|${1:#:args}| ${2} }
119+
lambda { |${1:#:args}| ${2} }
119120

120121
snippet main
121122
options head

0 commit comments

Comments
 (0)