Skip to content

Commit f4b95fd

Browse files
author
ujihisa
committed
Refactoring: consistency, bugfix, and readability
1 parent d4350e0 commit f4b95fd

File tree

2 files changed

+16
-19
lines changed

2 files changed

+16
-19
lines changed

neosnippets/neosnippet.snip

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
snippet snippet
22
abbr snippet abbr options <snippet code>
3-
alias snip, sn
3+
alias snip
44
options head
55
snippet ${1:#:trigger}
66
abbr ${2:#:abbr}
@@ -118,8 +118,9 @@ abbr ${5:#optional}
118118
options word
119119
\${5:#${0:optional}}
120120

121-
snippet T
121+
snippet TARGET
122122
abbr ${*:TARGET}
123+
alias T
123124
options word
124125
${${0:0}:TARGET}
125126

neosnippets/ruby.snip

+13-17
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ abbr { ... }
5252

5353
snippet blockvar
5454
abbr {|var| ... }
55-
{ |${1:#:var}|
55+
{|${1:#:var}|
5656
${2:TARGET}
5757
}
5858

@@ -78,68 +78,64 @@ alias enc
7878
${0}
7979

8080
snippet each
81-
options word
82-
each { |${1:#:variable}| ${2} }
83-
84-
snippet each_do
8581
options word
8682
each do |${1:#:variable}|
8783
${2}
8884
end
8985

9086
snippet each_byte
9187
options word
92-
each_byte { |${1:#:variable}| ${2} }
88+
each_byte {|${1:#:variable}| ${2} }
9389

9490
snippet each_char
9591
options word
96-
each_char { |${1:#:variable}| ${2} }
92+
each_char {|${1:#:variable}| ${2} }
9793

9894
snippet each_index
9995
options word
100-
each_index { |${1:#:variable}| ${2} }
96+
each_index {|${1:#:variable}| ${2} }
10197

10298
snippet each_key
10399
options word
104-
each_key { |${1:#:variable}| ${2} }
100+
each_key {|${1:#:variable}| ${2} }
105101

106102
snippet each_line
107103
options word
108-
each_line { |${1:#:variable}| ${2} }
104+
each_line {|${1:#:variable}| ${2} }
109105

110106
snippet each_with_index
111107
options word
112-
each_with_index { |${1:#:variable}| ${2} }
108+
each_with_index {|${1:#:variable}| ${2} }
113109

114110
snippet each_pair
115111
options word
116-
each_pair{ |${1:#:key},${2:value}| ${3} }
112+
each_pair {|${1:#:key}, ${2:value}| ${3} }
117113

118114
snippet each_pair_do
119115
options word
120-
each_pair do |${1:key},${2:value}|
116+
each_pair do |${1:key}, ${2:value}|
121117
${3}
122118
end
123119

124120
snippet map
125121
options word
126-
map { |${1:#:variable}| ${2} }
122+
map {|${1:#:variable}| ${2} }
127123

128124
snippet sort
129125
options word
130-
sort { |${1:#:variable}| ${2} }
126+
sort {|${1:x}, ${2:y}| ${2} }
131127

132128
snippet sort_by
133129
options word
134-
sort_by { |${1:#:variable}| ${2} }
130+
sort_by {|${1:#:variable}| ${2} }
135131

136132
snippet lambda
137133
options word
138134
-> (${1:#:args}) { ${2} }
139135

140136
snippet lambda-keyword
141137
options word
142-
lambda { |${1:#:args}| ${2} }
138+
lambda {|${1:#:args}| ${2} }
143139

144140
snippet main
145141
options head

0 commit comments

Comments
 (0)