Try to fix Gtk warning when using Tools->Reload Configuration.
[geany-mirror.git] / data / snippets.conf
blobe00030661a50091fe5d30f04b494226be53c4ade
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} or {date} in the snippets.
14 # See the documentation for details.
16 # filetype names:
17 # ASM, C, C++, C#, CAML, D, Fortran, FreeBasic, Haskell, Haxe, Java, Pascal, VHDL, Ferite, Javascript,
18 # Lua, Make, O-Matrix, Perl, PHP, Python, Ruby, Sh, Tcl, CSS, Docbook, HTML, XML, Conf, Diff, LaTeX,
19 # reStructuredText, SQL, None
21 # Default is used for all filetypes and keys can be overwritten by [filetype] sections
22 [Default]
23 if=if (%cursor%)%block_cursor%
24 else=else%block_cursor%
25 for=for (i = 0; i < %cursor%; i++)%block_cursor%
26 while=while (%cursor%)%block_cursor%
27 do=do\n{\n\t%cursor%\n} while(%cursor%)\n%cursor%
28 switch=switch (%cursor%)%brace_open%case %cursor%:\n\t\t%cursor%\n\t\tbreak;\n\tdefault:\n\t\t%cursor%\n%brace_close%%cursor%
29 try=try%block%\ncatch (%cursor%)%block_cursor%
31 # special keys to be used in other snippets, cannot be used "standalone"
32 # can be used by %key%, e.g. %brace_open%
33 # nesting of special keys is not supported (e.g. brace_open=\n{\n%brace_close% won't work)
34 # key "wordchars" is very special, it defines the word delimiting characters when looking for
35 # a word to auto complete, leave commented to use the default wordchars
36 [Special]
37 brace_open=\n{\n\t
38 brace_close=}\n
39 block=\n{\n\t%cursor%\n}
40 block_cursor=\n{\n\t%cursor%\n}\n%cursor%
41 #wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
43 [C++]
44 for=for (int i = 0; i < %cursor%; i++)%brace_open%\n%brace_close%
46 [Java]
47 for=for (int i = 0; i < %cursor%; i++)%brace_open%\n%brace_close%
49 [PHP]
50 for=for ($i = 0; $i < %cursor%; $i++)%brace_open%\n%brace_close%
52 [Python]
53 for=for i in xrange(%cursor%):\n\t
54 if=if %cursor%:\n\t
55 elif=elif %cursor%:\n\t
56 else=else:\n\t
57 while=while %cursor%:\n\t
58 try=try:\n\t%cursor%\nexcept Exception, ex:\n\t
59 with=with %cursor%:\n\t
60 def=def %cursor% (%cursor%):\n\t""" Function doc """\n\t
61 class=class %cursor%:\n\t""" Class doc """\n\t\n\tdef __init__ (self):\n\t\t""" Class initialiser """\n\t\tpass
63 [Ferite]
64 iferr=iferr%block_cursor%fix%block%
65 monitor=monitor%block_cursor%handle%block%