1 # Geany's snippets configuration file
3 # use \n or %newline% for a new line (it will be replaced by the used EOL char(s) - LF, CR/LF, CR).
4 # use \t or %ws% for an indentation step, it will be replaced according to the current document's indent mode.
5 # use \s to force whitespace at beginning or end of a value ('key= value' won't work, use 'key=\svalue').
6 # use %key% for all keys defined in the [Special] section.
7 # use %cursor% to define where the cursor should be placed after completion. You can define multiple
8 # %cursor% wildcards and use the "Move cursor in snippet" to jump to the next defined cursor
9 # position in the completed snippet.
10 # You can define a section for each supported filetype to overwrite default settings, the section
11 # name must match exactly the internal filetype name, run 'geany --ft-names' for a full list.
13 # Additionally, you can use most of the template wildcards like {developer}, {command:...},
14 # or {date} in the snippets.
15 # See the documentation for details.
17 # For a list of available filetype names, execute:
20 # Default is used for all filetypes and keys can be overwritten by [filetype] sections
22 if=if (%cursor%)%block_cursor%
23 else=else%block_cursor%
24 for=for (i = 0; i < %cursor%; i++)%block_cursor%
25 while=while (%cursor%)%block_cursor%
26 do=do\n{\n\t%cursor%\n} while (%cursor%)\n%cursor%
27 switch=switch (%cursor%)%brace_open%case %cursor%:\n\t\t%cursor%\n\t\tbreak;\n\tdefault:\n\t\t%cursor%\n%brace_close%%cursor%
28 try=try%block%\ncatch (%cursor%)%block_cursor%
30 # special keys to be used in other snippets, cannot be used "standalone"
31 # can be used by %key%, e.g. %brace_open%
32 # nesting of special keys is not supported (e.g. brace_open=\n{\n%brace_close% won't work)
33 # key "wordchars" is very special, it defines the word delimiting characters when looking for
34 # a word to auto complete, leave commented to use the default wordchars
38 block=\n{\n\t%cursor%\n}
39 block_cursor=\n{\n\t%cursor%\n}\n%cursor%
40 #wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
43 for=for (int i = 0; i < %cursor%; i++)%brace_open%\n%brace_close%
46 for=for (int i = 0; i < %cursor%; i++)%brace_open%\n%brace_close%
49 for=for ($i = 0; $i < %cursor%; $i++)%brace_open%\n%brace_close%
52 for=for i in xrange(%cursor%):\n\t
54 elif=elif %cursor%:\n\t
56 while=while %cursor%:\n\t
57 try=try:\n\t%cursor%\nexcept Exception, ex:\n\t
58 with=with %cursor%:\n\t
59 def=def %cursor% (%cursor%):\n\t""" Function doc """\n\t
60 class=class %cursor%:\n\t""" Class doc """\n\t\n\tdef __init__ (self):\n\t\t""" Class initialiser """\n\t\tpass
63 iferr=iferr%block_cursor%fix%block%
64 monitor=monitor%block_cursor%handle%block%