# Geany's snippets configuration file
#
# use \n or %newline% for a new line (it will be replaced by the used EOL char(s) - LF, CR/LF, CR).
# use \t or %ws% for an indentation step, it will be replaced according to the current document's indent mode.
# use \s to force whitespace at beginning or end of a value ('key= value' won't work, use 'key=\svalue').
# use %key% for all keys defined in the [Special] section.
# use %cursor% to define where the cursor should be placed after completion. You can define multiple
#     %cursor% wildcards and use the "Move cursor in snippet" to jump to the next defined cursor
#     position in the completed snippet.
# You can define a section for each supported filetype to overwrite default settings, the section
# name must match exactly the internal filetype name, run 'geany --ft-names' for a full list.
#
# Additionally, you can use most of the template wildcards like {developer}, {command:...},
# or {date} in the snippets.
# See the documentation for details.

# For a list of available filetype names, execute:
# geany --ft-names

# Default is used for all filetypes and keys can be overwritten by [filetype] sections
[Default]

# special keys to be used in other snippets, cannot be used "standalone"
# can be used by %key%, e.g. %brace_open%
# nesting of special keys is not supported (e.g. brace_open=\n{\n%brace_close% won't work)
# key "wordchars" is very special, it defines the word delimiting characters when looking for
# a word to auto complete, leave commented to use the default wordchars
[Special]
brace_open=\n{\n\t
brace_close=}\n
block=\n{\n\t%cursor%\n}
block_cursor=\n{\n\t%cursor%\n}\n%cursor%
emeral_block_start=\n\t
emerald_block_end=end
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789

# Optional keybindings to insert snippets
# Note: these can be overridden by Geany's configurable keybindings
[Keybindings]
#for=<Ctrl>7

[C]
if=if (%cursor%)%block_cursor%
else=else%block_cursor%
for=for (i = 0; i < %cursor%; i++)%block_cursor%
while=while (%cursor%)%block_cursor%
do=do\n{\n\t%cursor%\n} while (%cursor%)\n%cursor%
switch=switch (%cursor%)%brace_open%case %cursor%:\n\t\t%cursor%\n\t\tbreak;\n\tdefault:\n\t\t%cursor%\n%brace_close%%cursor%

[C++]
if=if (%cursor%)%block_cursor%
else=else%block_cursor%
for=for (int i = 0; i < %cursor%; i++)%brace_open%\n%brace_close%
while=while (%cursor%)%block_cursor%
do=do\n{\n\t%cursor%\n} while (%cursor%)\n%cursor%
switch=switch (%cursor%)%brace_open%case %cursor%:\n\t\t%cursor%\n\t\tbreak;\n\tdefault:\n\t\t%cursor%\n%brace_close%%cursor%
try=try%block%\ncatch (%cursor%)%block_cursor%

[Java]
if=if (%cursor%)%block_cursor%
else=else%block_cursor%
for=for (int i = 0; i < %cursor%; i++)%brace_open%\n%brace_close%
while=while (%cursor%)%block_cursor%
do=do\n{\n\t%cursor%\n} while (%cursor%)\n%cursor%
switch=switch (%cursor%)%brace_open%case %cursor%:\n\t\t%cursor%\n\t\tbreak;\n\tdefault:\n\t\t%cursor%\n%brace_close%%cursor%
try=try%block%\ncatch (%cursor%)%block_cursor%


[Pascal]
for=for i : Integer <- 0 while %cursor% by i <- i + 1%emeral_block_start%\n%emerald_block_end% for\n
loop=loop%emeral_block_start%%cursor%\n\texit when\n%emerald_block_end% loop\n

fun=function %cursor% [] -> []%emeral_block_start%\n%emerald_block_end%\n
efun=export function %cursor% [] -> []%emeral_block_start%\n%emerald_block_end%\n
tfun=function %cursor%[]->[]
op=operation %cursor% [] -> []%emeral_block_start%\n%emerald_block_end%\n
eop=export operation %cursor% [] -> []%emeral_block_start%\n%emerald_block_end%\n
top=export operation %cursor%[]->[]

type=const %cursor% <- typeobject %cursor%%emeral_block_start%\n%emerald_block_end%\n
itype=const %cursor% <- immutable typeobject %cursor%%emeral_block_start%\n%emerald_block_end%\n
object=const %cursor% <- object %cursor%%emeral_block_start%\n%emerald_block_end%\n
iobject=const %cursor% <- immutable object %cursor%%emeral_block_start%\n%emerald_block_end%\n
monitor=const %cursor% <- monitor object %cursor%%emeral_block_start%\n%emerald_block_end%\n
imonitor=const %cursor% <- immutable monitor object %cursor%%emeral_block_start%\n%emerald_block_end%\n

init=initially%emeral_block_start%%cursor%\n%emerald_block_end% initially\n
pro=process%emeral_block_start%%cursor%\n%emerald_block_end% process\n
rec=recovery%emeral_block_start%%cursor%\n%emerald_block_end% recovery\n

failure=failure%emeral_block_start%%cursor%\n%emerald_block_end% failure\n
una=unavailable []%emeral_block_start%%cursor%\n%emerald_block_end% unavailable\n

arr=Array.of[%cursor%]
array=Array.of[%cursor%] <- Array.of[%cursor%].create[0]

a=attached
v=var : %cursor%
c=const : %cursor%

print=(locate self)$stdout.putString["%cursor%"]  (locate self)$stdout.flush
delay=(locate self).delay[Time.create[0,0]]

home=const home <- locate self
there=var there : Node
all=var all : NodeList <- home.getActiveNodes
time=(locate self).getTimeOfDay

int=var %cursor% : Integer
inta=var %cursor% : Integer <-
fint=field %cursor% : Integer
finta=field %cursor% : Integer <-
cfint=const field %cursor% : Integer <-
cint=const %cursor% : Integer <-

string=var %cursor% : String
stringa=var %cursor% : String <-
fstring=field %cursor% : String
fstringa=field %cursor% : String <-
cfstring=const %cursor% : String <-
cstring=const %cursor% : String <-

bool=var %cursor% : Boolean
boola=var %cursor% : Boolean <-
fbool=field %cursor% : Boolean
fboola=field %cursor% : Boolean <-
cfbool=const %cursor% : Boolean <-
cbool=const %cursor% : Boolean <-

real=var %cursor% : Real
reala=var %cursor% : Real <-
freal=field %cursor% : Real
freala=field %cursor% : Real <-
cfreal=const %cursor% : Real <-
creal=const %cursor% : Real <-

char=var %cursor% : Character
chara=var %cursor% : Character <-
fchar=field %cursor% : Character
fchara=field %cursor% : Character <-
cfchar=const %cursor% : Character <-
cchar=const %cursor% : Character <-

[PHP]
if=if (%cursor%)%block_cursor%
else=else%block_cursor%
for=for ($i = 0; $i < %cursor%; $i++)%brace_open%\n%brace_close%
while=while (%cursor%)%block_cursor%
do=do\n{\n\t%cursor%\n} while (%cursor%)\n%cursor%
switch=switch (%cursor%)%brace_open%case %cursor%:\n\t\t%cursor%\n\t\tbreak;\n\tdefault:\n\t\t%cursor%\n%brace_close%%cursor%
try=try%block%\ncatch (%cursor%)%block_cursor%

[Javascript]
if=if (%cursor%)%block_cursor%
else=else%block_cursor%
for=for (i = 0; i < %cursor%; i++)%block_cursor%
while=while (%cursor%)%block_cursor%
do=do\n{\n\t%cursor%\n} while (%cursor%)\n%cursor%
switch=switch (%cursor%)%brace_open%case %cursor%:\n\t\t%cursor%\n\t\tbreak;\n\tdefault:\n\t\t%cursor%\n%brace_close%%cursor%
try=try%block%\ncatch (%cursor%)%block_cursor%

[C#]
if=if (%cursor%)%block_cursor%
else=else%block_cursor%
for=for (i = 0; i < %cursor%; i++)%block_cursor%
while=while (%cursor%)%block_cursor%
do=do\n{\n\t%cursor%\n} while (%cursor%)\n%cursor%
switch=switch (%cursor%)%brace_open%case %cursor%:\n\t\t%cursor%\n\t\tbreak;\n\tdefault:\n\t\t%cursor%\n%brace_close%%cursor%
try=try%block%\ncatch (%cursor%)%block_cursor%

[Vala]
if=if (%cursor%)%block_cursor%
else=else%block_cursor%
for=for (i = 0; i < %cursor%; i++)%block_cursor%
while=while (%cursor%)%block_cursor%
do=do\n{\n\t%cursor%\n} while (%cursor%)\n%cursor%
switch=switch (%cursor%)%brace_open%case %cursor%:\n\t\t%cursor%\n\t\tbreak;\n\tdefault:\n\t\t%cursor%\n%brace_close%%cursor%
try=try%block%\ncatch (%cursor%)%block_cursor%

[ActionScript]
if=if (%cursor%)%block_cursor%
else=else%block_cursor%
for=for (i = 0; i < %cursor%; i++)%block_cursor%
while=while (%cursor%)%block_cursor%
do=do\n{\n\t%cursor%\n} while (%cursor%)\n%cursor%
switch=switch (%cursor%)%brace_open%case %cursor%:\n\t\t%cursor%\n\t\tbreak;\n\tdefault:\n\t\t%cursor%\n%brace_close%%cursor%
try=try%block%\ncatch (%cursor%)%block_cursor%

[Python]
for=for i in xrange(%cursor%):\n\t
if=if %cursor%:\n\t
elif=elif %cursor%:\n\t
else=else:\n\t
while=while %cursor%:\n\t
try=try:\n\t%cursor%\nexcept Exception, ex:\n\t
with=with %cursor%:\n\t
def=def %cursor% (%cursor%):\n\t""" Function doc """\n\t
class=class %cursor%:\n\t""" Class doc """\n\t\n\tdef __init__ (self):\n\t\t""" Class initialiser """\n\t\tpass

[Ferite]
iferr=iferr%block_cursor%fix%block%
monitor=monitor%block_cursor%handle%block%

[Haskell]

[HTML]
table=<table>\n\t<tr>\n\t\t<td>%cursor%</td>\n\t</tr>\n</table>

[Erlang]
case=case %cursor% of\n\t%cursor% -> %cursor%\nend
if=if\n\t%cursor% -> %cursor%\nend
begin=begin\n\t%cursor%\nend
fun=fun(%cursor%) ->\n\t%cursor%\nend
try=try %cursor% of\n\t%cursor% ->\n\t%cursor%\ncatch\n\t%cursor% ->\n\t%cursor%\nend
module=-module(%cursor%).
export=-export(%cursor%).
compile=-compile(%cursor%).
include=-include(%cursor%).
