while -> wh, see #230 and README.md
This commit is contained in:
parent
c0cddc9f86
commit
8024cfcecd
@ -61,6 +61,7 @@ if : if without else
|
|||||||
ife: if $1 else $2
|
ife: if $1 else $2
|
||||||
eif : else if ($1) { .. }
|
eif : else if ($1) { .. }
|
||||||
el : else ..
|
el : else ..
|
||||||
|
wh : while (cond) ...
|
||||||
```
|
```
|
||||||
|
|
||||||
If you're not satisfied with these defaults, open a ticket that we implement
|
If you're not satisfied with these defaults, open a ticket that we implement
|
||||||
@ -89,7 +90,7 @@ Thus for conditions (while, if ..) and block bodies just use ${N} - Thanks
|
|||||||
|
|
||||||
Open questions:
|
Open questions:
|
||||||
What about one line if ee then .. else .. vs if \n .. then \n ... \n else \n .. ?
|
What about one line if ee then .. else .. vs if \n .. then \n ... \n else \n .. ?
|
||||||
What about wh(ile), which trigger?
|
Which additional policies to add?
|
||||||
Discuss at: https://github.com/honza/vim-snippets/issues/230
|
Discuss at: https://github.com/honza/vim-snippets/issues/230
|
||||||
|
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ if ${1} then
|
|||||||
${2}
|
${2}
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet while "while"
|
snippet wh "while"
|
||||||
while ${1} do
|
while ${1} do
|
||||||
${2}
|
${2}
|
||||||
done
|
done
|
||||||
|
@ -117,7 +117,7 @@ unless ($1) {
|
|||||||
|
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet while "while"
|
snippet wh "while"
|
||||||
while ($1) {
|
while ($1) {
|
||||||
${2:# body...}
|
${2:# body...}
|
||||||
}
|
}
|
||||||
|
@ -455,7 +455,7 @@ endsnippet
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
snippet while "while <expression> ... end"
|
snippet wh "while <expression> ... end"
|
||||||
while ${1:expression}
|
while ${1:expression}
|
||||||
${0}
|
${0}
|
||||||
end
|
end
|
||||||
|
@ -79,7 +79,7 @@ until ${2:[[ ${1:condition} ]]}; do
|
|||||||
done
|
done
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet while "while ... (done)"
|
snippet wh "while ... (done)"
|
||||||
while ${2:[[ ${1:condition} ]]}; do
|
while ${2:[[ ${1:condition} ]]}; do
|
||||||
${0:#statements}
|
${0:#statements}
|
||||||
done
|
done
|
||||||
|
@ -40,7 +40,7 @@ switch ${1:-exact} -- ${2:\$var} {
|
|||||||
|
|
||||||
endsnippet
|
endsnippet
|
||||||
|
|
||||||
snippet while "while... (while)" b
|
snippet wh "while... (while)" b
|
||||||
while {${1}} {
|
while {${1}} {
|
||||||
${2}
|
${2}
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ snippet do
|
|||||||
do {
|
do {
|
||||||
${2}
|
${2}
|
||||||
} while (${1:cond})
|
} while (${1:cond})
|
||||||
snippet while
|
snippet wh
|
||||||
while ${1:cond}{
|
while ${1:cond}{
|
||||||
${2}
|
${2}
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ snippet select
|
|||||||
{$4:; Else code}
|
{$4:; Else code}
|
||||||
EndSelect
|
EndSelect
|
||||||
# While loop
|
# While loop
|
||||||
snippet while
|
snippet wh
|
||||||
While (${1:condition})
|
While (${1:condition})
|
||||||
${2:; code...}
|
${2:; code...}
|
||||||
WEnd
|
WEnd
|
||||||
|
@ -65,7 +65,7 @@ snippet forto
|
|||||||
end
|
end
|
||||||
|
|
||||||
# While Loop
|
# While Loop
|
||||||
snippet while
|
snippet wh
|
||||||
while ${1:conidition}
|
while ${1:conidition}
|
||||||
${2}
|
${2}
|
||||||
end
|
end
|
||||||
|
@ -49,7 +49,7 @@ snippet try
|
|||||||
{% finallly %}
|
{% finallly %}
|
||||||
${3}
|
${3}
|
||||||
{% end %}
|
{% end %}
|
||||||
snippet while
|
snippet wh
|
||||||
{% while ${1:condition} %}
|
{% while ${1:condition} %}
|
||||||
${2}
|
${2}
|
||||||
{% end %}
|
{% end %}
|
||||||
|
@ -63,7 +63,7 @@ snippet for
|
|||||||
${4:$1[$2]}
|
${4:$1[$2]}
|
||||||
};
|
};
|
||||||
#loop while
|
#loop while
|
||||||
snippet while
|
snippet wh
|
||||||
while (${1:/* condition */}) {
|
while (${1:/* condition */}) {
|
||||||
${2}
|
${2}
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ snippet unless
|
|||||||
unless ${1:condition}
|
unless ${1:condition}
|
||||||
${2}
|
${2}
|
||||||
end
|
end
|
||||||
snippet while
|
snippet wh
|
||||||
while ${1:condition}
|
while ${1:condition}
|
||||||
${2}
|
${2}
|
||||||
end
|
end
|
||||||
|
@ -33,7 +33,7 @@ snippet eif
|
|||||||
${4}
|
${4}
|
||||||
}
|
}
|
||||||
#while loop
|
#while loop
|
||||||
snippet while
|
snippet wh
|
||||||
while (${1:obj}) {
|
while (${1:obj}) {
|
||||||
${2}
|
${2}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user