464a45d6b4
Complete rewrite of auto completion to make it user-definable and much more flexible. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1628 ea778897-0a13-0410-b9d1-a72fbfd435f5
46 lines
1.9 KiB
Plaintext
46 lines
1.9 KiB
Plaintext
# Geany's auto completion 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 ot %ws% for an indentation step, if using only spaces for indentation only spaces will be used
|
|
# use \s to force whitespace at beginning or end of a value ('key= value' won't work, use 'key=\svalue')
|
|
# use %cursor% to define where the cursor should be placed after completion
|
|
# use %key% for all keys defined in the [Special] section
|
|
# 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
|
|
|
|
# filetype names:
|
|
# C, C++, D, Java, Pascal, ASM, Fortran, CAML, Haskell, VHDL, Perl, PHP, Javascript, Python, Ruby,
|
|
# Tcl, Lua, Ferite, Sh, Make, O-Matrix, XML, Docbook, HTML, CSS, SQL, LaTeX, Diff, Conf, None
|
|
|
|
# Default is used for all filetypes and keys can be overwritten by [filetype] sections
|
|
[Default]
|
|
if=if (%cursor%)%brace_open%\n%brace_close%
|
|
else=else%brace_open%\n%brace_close%
|
|
for=for (i = 0; i < %cursor%; i++)%brace_open%\n%brace_close%
|
|
while=while (%cursor%)%brace_open%\n%brace_close%
|
|
do=do%brace_open%%cursor%\n%brace_close%while ()
|
|
switch=switch (%cursor%)%brace_open%case : break;\n%ws%default: \n%brace_close%
|
|
try=try%block_cursor%catch ()%block%
|
|
|
|
# special keys to be used in other completions, 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)
|
|
[Special]
|
|
brace_open=\n{\n\t
|
|
brace_close=}\n
|
|
block=\n{\n\t\n}\n
|
|
block_cursor=\n{\n\t%cursor%\n}\n
|
|
|
|
[C++]
|
|
for=for (int i = 0; i < %cursor%; i++)%brace_open%\n%brace_close%
|
|
|
|
[Java]
|
|
for=for (int i = 0; i < %cursor%; i++)%brace_open%\n%brace_close%
|
|
|
|
[PHP]
|
|
for=for ($i = 0; $i < %cursor%; $i++)%brace_open%\n%brace_close%
|
|
|
|
[Ferite]
|
|
iferr=iferr%block_cursor%fix%block%
|
|
monitor=monitor%block_cursor%handle%block%
|
|
|