Skip to content

Commit f499a1a

Browse files
committed
Merge pull request #250 from ajzafar/zero_tabstop
Modify snippets to support zero tabstop
2 parents 2ab7f91 + 7f9c4f5 commit f499a1a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2624
-2624
lines changed

snippets/_.snippets

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# (c) holds no legal value ;)
44
snippet c)
5-
Copyright `&enc[:2] == "utf" ? "©" : "(c)"` `strftime("%Y")` ${1:`g:snips_author`}. All Rights Reserved.${2}
5+
Copyright `&enc[:2] == "utf" ? "©" : "(c)"` `strftime("%Y")` ${1:`g:snips_author`}. All Rights Reserved.
66
snippet date
77
`strftime("%Y-%m-%d")`
88
snippet ddate
@@ -30,7 +30,7 @@ snippet GPL2
3030
You should have received a copy of the GNU General Public License
3131
along with this program; if not, see <http://www.gnu.org/licenses/>.
3232

33-
${3}
33+
${0}
3434
snippet LGPL2
3535
${1:One line to give the program's name and a brief description.}
3636
Copyright (C) `strftime("%Y")` ${2:copyright holder}
@@ -48,7 +48,7 @@ snippet LGPL2
4848
You should have received a copy of the GNU Lesser General Public License
4949
along with this library; if not, see <http://www.gnu.org/licenses/>.
5050

51-
${3}
51+
${0}
5252
snippet GPL3
5353
${1:one line to give the program's name and a brief description.}
5454
Copyright (C) `strftime("%Y")` ${2:copyright holder}
@@ -66,7 +66,7 @@ snippet GPL3
6666
You should have received a copy of the GNU General Public License
6767
along with this program. If not, see <http://www.gnu.org/licenses/>.
6868

69-
${3}
69+
${0}
7070
snippet LGPL3
7171
${1:One line to give the program's name and a brief description.}
7272
Copyright (C) `strftime("%Y")` ${2:copyright holder}
@@ -84,7 +84,7 @@ snippet LGPL3
8484
You should have received a copy of the GNU Lesser General Public License
8585
along with this library; if not, see <http://www.gnu.org/licenses/>.
8686

87-
${3}
87+
${0}
8888
snippet BSD2
8989
${1:one line to give the program's name and a brief description}
9090
Copyright (C) `strftime("%Y")` ${2:copyright holder}
@@ -114,7 +114,7 @@ snippet BSD2
114114
are those of the authors and should not be interpreted as representing
115115
official policies, either expressedor implied, of $2.
116116

117-
${4}
117+
${0}
118118
snippet BSD3
119119
${1:one line to give the program's name and a brief description}
120120
Copyright (C) `strftime("%Y")` ${2:copyright holder}
@@ -142,7 +142,7 @@ snippet BSD3
142142
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
143143
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
144144

145-
${4}
145+
${0}
146146
snippet BSD4
147147
${1:one line to give the program's name and a brief description}
148148
Copyright (C) `strftime("%Y")` ${2:copyright holder}
@@ -173,7 +173,7 @@ snippet BSD4
173173
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
174174
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
175175

176-
${4}
176+
${0}
177177
snippet MIT
178178
${1:one line to give the program's name and a brief description}
179179
Copyright (C) `strftime("%Y")` ${2:copyright holder}
@@ -196,7 +196,7 @@ snippet MIT
196196
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
197197
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
198198

199-
${3}
199+
${0}
200200
snippet APACHE
201201
${1:one line to give the program's name and a brief description}
202202
Copyright `strftime("%Y")` ${2:copyright holder}
@@ -213,7 +213,7 @@ snippet APACHE
213213
See the License for the specific language governing permissions and
214214
limitations under the License.
215215

216-
${3}
216+
${0}
217217
snippet BEERWARE
218218
${2:one line to give the program's name and a brief description}
219219
Copyright `strftime("%Y")` ${3:copyright holder}
@@ -223,13 +223,13 @@ snippet BEERWARE
223223
can do whatever you want with this stuff. If we meet some day, and you think
224224
this stuff is worth it, you can buy me a beer or coffee in return
225225

226-
${4}
226+
${0}
227227

228228
snippet WTFPL
229229
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
230230
Version 2, December 2004
231231

232-
Copyright `strftime("%Y")` ${1:copyright holder}
232+
Copyright `strftime("%Y")` ${0:copyright holder}
233233

234234
Everyone is permitted to copy and distribute verbatim or modified
235235
copies of this license document, and changing it is allowed as long

snippets/actionscript.snippets

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ snippet main
2020

2121
}
2222
snippet class
23-
${1:public|internal} class ${2:name} ${3:extends } {
23+
${1:public|internal} class ${2:name} ${0:extends } {
2424
public function $2 ( ) {
2525
("start");
2626
}
2727
}
2828
snippet all
2929
package name {
3030

31-
${1:public|internal|final} class ${2:name} ${3:extends } {
31+
${1:public|internal|final} class ${2:name} ${0:extends } {
3232
private|public| static const FOO = "abc";
3333
private|public| static var BAR = "abc";
3434

@@ -55,83 +55,83 @@ snippet all
5555
snippet switch
5656
switch(${1}){
5757
case ${2}:
58-
${3}
58+
${0}
5959
break;
6060
default:
6161
}
6262
snippet case
6363
case ${1}:
64-
${2}
64+
${0}
6565
break;
6666
snippet package
6767
package ${1:package}{
68-
${2}
68+
${0}
6969
}
7070
snippet wh
7171
while ${1:cond}{
72-
${2}
72+
${0}
7373
}
7474
snippet do
7575
do {
76-
${2}
76+
${0}
7777
} while (${1:cond})
7878
snippet wh
7979
while ${1:cond}{
80-
${2}
80+
${0}
8181
}
8282
snippet for enumerate names
8383
for (${1:var} in ${2:object}){
84-
${3}
84+
${0}
8585
}
8686
snippet for enumerate values
8787
for each (${1:var} in ${2:object}){
88-
${3}
88+
${0}
8989
}
9090
snippet get_set
9191
function get ${1:name} {
9292
return ${2}
9393
}
9494
function set $1 (newValue) {
95-
${3}
95+
${0}
9696
}
9797
snippet interface
9898
interface name {
99-
function method(${1}):${2:returntype};
99+
function method(${1}):${0:returntype};
100100
}
101101
snippet try
102102
try {
103103
${1}
104104
} catch (error:ErrorType) {
105105
${2}
106106
} finally {
107-
${3}
107+
${0}
108108
}
109109
# For Loop (same as c.snippet)
110110
snippet for for (..) {..}
111111
for (${2:i} = 0; $2 < ${1:count}; $2${3:++}) {
112-
${4}
112+
${0}
113113
}
114114
# Custom For Loop
115115
snippet forr
116116
for (${1:i} = ${2:0}; ${3:$1 < 10}; $1${4:++}) {
117-
${5}
117+
${0}
118118
}
119119
# If Condition
120120
snippet if
121121
if (${1:/* condition */}) {
122-
${2}
122+
${0}
123123
}
124124
snippet el
125125
else {
126-
${1}
126+
${0}
127127
}
128128
# Ternary conditional
129129
snippet t
130-
${1:/* condition */} ? ${2:a} : ${3:b}
130+
${1:/* condition */} ? ${2:a} : ${0:b}
131131
snippet fun
132132
function ${1:function_name}(${2})${3}
133133
{
134-
${4}
134+
${0}
135135
}
136136
# FlxSprite (usefull when using the flixel library)
137137
snippet FlxSprite
@@ -150,7 +150,7 @@ snippet FlxSprite
150150
override public function update():void
151151
{
152152
super.update();
153-
${5}
153+
${0}
154154
}
155155
}
156156
}

snippets/apache.snippets

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,34 @@
22
# <Directory>
33
snippet dir
44
<Directory ${1:/}>
5-
DirectoryIndex ${2:index.html}
5+
DirectoryIndex ${0:index.html}
66
Order Deny,Allow
77
Deny from All
88
</Directory>
99
# <FilesMatch>
1010
snippet filesmatch
1111
<FilesMatch "${1:regex}">
12-
${2}
12+
${0}
1313
</FilesMatch>
1414
# <IfModule>
1515
snippet ifmodule
1616
<IfModule ${1:mod_example.c}>
17-
${2}
17+
${0}
1818
</IfModule>
1919
# <LimitExcept>
2020
snippet limitexcept
2121
<LimitExcept ${1:POST GET}>
22-
${2}
22+
${0}
2323
</LimitExcept>
2424
# <Proxy>
2525
snippet proxy
2626
<Proxy ${1:*}>
27-
${2}
27+
${0}
2828
</Proxy>
2929
# <VirtualHost>
3030
snippet virtualhost
3131
<VirtualHost ${1:*}:${2:80}>
3232
ServerAdmin ${3:[email protected]}
3333
DocumentRoot ${4:/www/example.com}
34-
ServerName ${5:www.example.com}
34+
ServerName ${0:www.example.com}
3535
</VirtualHost>

snippets/autoit.snippets

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
snippet if
22
If ${1:condition} Then
3-
${2:; True code}
3+
${0:; True code}
44
EndIf
55
snippet el
66
Else
7-
${1}
7+
${0}
88
snippet eif
99
ElseIf ${1:condition} Then
10-
${2:; True code}
10+
${0:; True code}
1111
# If/Else block
1212
snippet ife
1313
If ${1:condition} Then
1414
${2:; True code}
1515
Else
16-
${3:; Else code}
16+
${0:; Else code}
1717
EndIf
1818
# If/ElseIf/Else block - because there is eif this is not really neccessary
1919
snippet ifelif
@@ -22,45 +22,45 @@ snippet ifelif
2222
ElseIf ${3:condition 2} Then
2323
${4:; True code}
2424
Else
25-
${5:; Else code}
25+
${0:; Else code}
2626
EndIf
2727
# Switch block
2828
snippet switch
2929
Switch (${1:condition})
30-
Case {$2:case1}:
31-
{$3:; Case 1 code}
30+
Case ${2:case1}:
31+
${3:; Case 1 code}
3232
Case Else:
33-
{$4:; Else code}
33+
${0:; Else code}
3434
EndSwitch
3535
# Select block
3636
snippet select
3737
Select (${1:condition})
38-
Case {$2:case1}:
39-
{$3:; Case 1 code}
38+
Case ${2:case1}:
39+
${3:; Case 1 code}
4040
Case Else:
41-
{$4:; Else code}
41+
${0:; Else code}
4242
EndSelect
4343
# While loop
4444
snippet wh
4545
While (${1:condition})
46-
${2:; code...}
46+
${0:; code...}
4747
WEnd
4848
# For loop
4949
snippet for
5050
For ${1:n} = ${3:1} to ${2:count}
51-
${4:; code...}
51+
${0:; code...}
5252
Next
5353
# New Function
5454
snippet func
5555
Func ${1:fname}(${2:`indent('.') ? 'self' : ''`}):
56-
${4:Return}
56+
${0:Return}
5757
EndFunc
5858
# Message box
5959
snippet msg
60-
MsgBox(${3:MsgType}, ${1:"Title"}, ${2:"Message Text"})
60+
MsgBox(${0:MsgType}, ${1:"Title"}, ${2:"Message Text"})
6161
# Debug Message
6262
snippet debug
63-
MsgBox(0, "Debug", ${1:"Debug Message"})
63+
MsgBox(0, "Debug", ${0:"Debug Message"})
6464
# Show Variable Debug Message
6565
snippet showvar
66-
MsgBox(0, "${1:VarName}", $1)
66+
MsgBox(0, "${0:VarName}", $1)

0 commit comments

Comments
 (0)