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
23 # special keys to be used in other snippets, cannot be used "standalone"
24 # can be used by %key%, e.g. %brace_open%
25 # nesting of special keys is not supported (e.g. brace_open=\n{\n%brace_close% won't work)
26 # key "wordchars" is very special, it defines the word delimiting characters when looking for
27 # a word to auto complete, leave commented to use the default wordchars
31 block=\n{\n\t%cursor%\n}
32 block_cursor=\n{\n\t%cursor%\n}
33 #wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
35 # Optional keybindings to insert snippets
36 # Note: these can be overridden by Geany's configurable keybindings
41 if=if (%cursor%)%block_cursor%
42 else=else%block_cursor%
43 for=for (i = 0; i < %cursor%; i++)%block_cursor%
44 while=while (%cursor%)%block_cursor%
45 do=do\n{\n\t%cursor%\n} while (%cursor%)\n
46 switch=switch (%cursor%)%brace_open%case %cursor%:\n\t\t%cursor%\n\t\tbreak;\n\tdefault:\n\t\t%cursor%\n%brace_close%
49 if=if (%cursor%)%block_cursor%
50 else=else%block_cursor%
51 for=for (int i = 0; i < %cursor%; i++)%brace_open%\n%brace_close%
52 while=while (%cursor%)%block_cursor%
53 do=do\n{\n\t%cursor%\n} while (%cursor%)\n
54 switch=switch (%cursor%)%brace_open%case %cursor%:\n\t\t%cursor%\n\t\tbreak;\n\tdefault:\n\t\t%cursor%\n%brace_close%
55 try=try%block%\ncatch (%cursor%)%block_cursor%
58 if=if (%cursor%)%block_cursor%
59 else=else%block_cursor%
60 for=for (int i = 0; i < %cursor%; i++)%brace_open%\n%brace_close%
61 while=while (%cursor%)%block_cursor%
62 do=do\n{\n\t%cursor%\n} while (%cursor%)\n
63 switch=switch (%cursor%)%brace_open%case %cursor%:\n\t\t%cursor%\n\t\tbreak;\n\tdefault:\n\t\t%cursor%\n%brace_close%
64 try=try%block%\ncatch (%cursor%)%block_cursor%
67 if=if (%cursor%)%block_cursor%
68 else=else%block_cursor%
69 for=for ($i = 0; $i < %cursor%; $i++)%brace_open%\n%brace_close%
70 while=while (%cursor%)%block_cursor%
71 do=do\n{\n\t%cursor%\n} while (%cursor%)\n
72 switch=switch (%cursor%)%brace_open%case %cursor%:\n\t\t%cursor%\n\t\tbreak;\n\tdefault:\n\t\t%cursor%\n%brace_close%
73 try=try%block%\ncatch (%cursor%)%block_cursor%
76 if=if (%cursor%)%block_cursor%
77 else=else%block_cursor%
78 for=for (i = 0; i < %cursor%; i++)%block_cursor%
79 while=while (%cursor%)%block_cursor%
80 do=do\n{\n\t%cursor%\n} while (%cursor%)\n
81 switch=switch (%cursor%)%brace_open%case %cursor%:\n\t\t%cursor%\n\t\tbreak;\n\tdefault:\n\t\t%cursor%\n%brace_close%
82 try=try%block%\ncatch (%cursor%)%block_cursor%
85 if=if (%cursor%)%block_cursor%
86 else=else%block_cursor%
87 for=for (i = 0; i < %cursor%; i++)%block_cursor%
88 while=while (%cursor%)%block_cursor%
89 do=do\n{\n\t%cursor%\n} while (%cursor%)\n
90 switch=switch (%cursor%)%brace_open%case %cursor%:\n\t\t%cursor%\n\t\tbreak;\n\tdefault:\n\t\t%cursor%\n%brace_close%
91 try=try%block%\ncatch (%cursor%)%block_cursor%
94 if=if (%cursor%)%block_cursor%
95 else=else%block_cursor%
96 for=for (i = 0; i < %cursor%; i++)%block_cursor%
97 while=while (%cursor%)%block_cursor%
98 do=do\n{\n\t%cursor%\n} while (%cursor%)\n
99 switch=switch (%cursor%)%brace_open%case %cursor%:\n\t\t%cursor%\n\t\tbreak;\n\tdefault:\n\t\t%cursor%\n%brace_close%
100 try=try%block%\ncatch (%cursor%)%block_cursor%
103 if=if (%cursor%)%block_cursor%
104 else=else%block_cursor%
105 for=for (i = 0; i < %cursor%; i++)%block_cursor%
106 while=while (%cursor%)%block_cursor%
107 do=do\n{\n\t%cursor%\n} while (%cursor%)\n
108 switch=switch (%cursor%)%brace_open%case %cursor%:\n\t\t%cursor%\n\t\tbreak;\n\tdefault:\n\t\t%cursor%\n%brace_close%
109 try=try%block%\ncatch (%cursor%)%block_cursor%
112 for=for i in xrange(%cursor%):\n\t
114 elif=elif %cursor%:\n\t
116 while=while %cursor%:\n\t
117 try=try:\n\t%cursor%\nexcept Exception, ex:\n\t
118 with=with %cursor%:\n\t
119 def=def %cursor% (%cursor%):\n\t""" Function doc """\n\t
120 class=class %cursor%:\n\t""" Class doc """\n\t\n\tdef __init__ (self):\n\t\t""" Class initialiser """\n\t\tpass
125 table=<table>\n\t<tr>\n\t\t<td>%cursor%</td>\n\t</tr>\n</table>
128 case=case %cursor% of\n\t%cursor% -> %cursor%\nend
129 if=if\n\t%cursor% -> %cursor%\nend
130 begin=begin\n\t%cursor%\nend
131 fun=fun(%cursor%) ->\n\t%cursor%\nend
132 try=try %cursor% of\n\t%cursor% ->\n\t%cursor%\ncatch\n\t%cursor% ->\n\t%cursor%\nend
133 module=-module(%cursor%).
134 export=-export(%cursor%).
135 compile=-compile(%cursor%).
136 include=-include(%cursor%).