# 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 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%%cursor%\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] brace_open=\n{\n\t brace_close=}\n block=\n{\n\t\n}\n block_cursor=\n{\n\t%cursor%\n}\n wordchars=._abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 [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% [Javascript] jready=$(document).ready(function(){\n\t%cursor%\n}); jfunc=$(function() {\n\t%cursor%\n}); log=console.log('%cursor%'); [PHP] # Little php snippets written by Atanas Beloborodov # Some php5 object`s usefull snippets class=class %cursor% \n{\n\tpublic function __construct()\n\t{\t\n\n\t}\n\n\tpublic function __destruct()\n\t{\t\n\n\t}\n} interface=interface %cursor% %block% static=public static function %cursor%() %block% public=public function %cursor%()%block% protected=protected function %cursor%()%block% private=private function %cursor%()%block% #Control structures : for=for ($i = 0; $i < %cursor%; $i++ %block% while=while (%cursor%) %block% if=if (%cursor%) %block% switch=switch (%cursor%) {\n\tcase '';\n\n\tbreak;\n\n\tdefault :\n\n\tbreak;\n}\n else=if (%cursor%) %block%else %block% elseif=if (%cursor%) {\n\t\n}\nelseif () {\n\t\n}\nelse {\n\t\n}\n do=do %block%while (%cursor%); foreach=foreach (%cursor%) %block% # Include methods # Note : require and include is not functions ! Not required braces () req=require "%cursor%"; reqo=require_once "%cursor%"; inc=include "%cursor%"; inco=include_once "%cursor%"; # Others : function=function %cursor%() %block% def=define ('%cursor%',''); throw=throw new Exception ('%cursor%');e% [Python] utf8=#-*- coding: utf-8 -*- for=for i in xrange(%cursor%):\n\t doc=""" %cursor% """\n elif=elif %cursor%:\n\t else=else:\n\t%cursor% if=if %cursor%:\n\t from=from %cursor% import %cursor%\n main=if __name__ == '__main__':\n\t%cursor% class=class %cursor%(object):\n\t""" %cursor% """\n\t\n\tdef __init__ (self):\n\t\t""" Class initialiser """\n\t\tpass def=def %cursor%(self):\n\t""" Function doc\n\n\t@param PARAM: DESCRIPTION\n\t@return RETURN: DESCRIPTION\n\t"""\n\t get=def get%cursor%(self): return self._var\n set=def set%cursor%(self): self._var = var\n .=self.%cursor% try=try:\n\t%cursor%\nexcept Exception, e:\n\t py=#!/usr/bin/env python\n#-*- coding:utf-8 -*-\n\n%cursor% while=while %cursor%:\n\t with=with %cursor%:\n\t head="""\n\t%cursor%PROJECT - MODULE\n\n\tDESCRIPTION\n\n\t@copyright: {year} by {developer} <{mail}>\n\t@license: GNU GPL, see COPYING for details.\n"""\n p=print "%cursor%" pr=print %cursor% # Django models # by Tomasz Karbownicki mclass=class %cursor%(models.Model):\n\t'''%cursor%'''\n\n\tdef __unicode__(self):\n\t\treturn self.XXXXX\n\n\tdef get_absolute_url(self):\n\t\treturn "/XXXXX/%s/" % self.slug\n\n\tclass Meta:\n\t\tverbose_name = "%cursor%"\n\t\tverbose_name_plural = "%cursor%" mchar=%cursor% = models.CharField(max_length=50, verbose_name=u'%cursor%') mint=%cursor% = models.IntegerField(verbose_name=u'%cursor%') mtext=%cursor% = models.TextField(verbose_name=u'%cursor%') mkey=%cursor% = models.ForeignKey(%cursor%, verbose_name=u'%cursor%') mimage=%cursor% = models.ImageField(upload_to='', verbose_name=u'%cursor%') mbool=%cursor% = models.BooleanField(verbose_name=u'%cursor%') mdate=%cursor% = models.DateField(verbose_name=u'%cursor%', help_text='Format daty: 2009-04-28') memail=%cursor% = models.EmailField(verbose_name=u'%cursor%') murl=%cursor% = models.URLField(verbose_name=u'%cursor%') mslug=%cursor% = models.SlugField(verbose_name=u'%cursor%', unique=True) [Ferite] iferr=iferr%block_cursor%fix%block% monitor=monitor%block_cursor%handle%block% [HTML] # by Tomasz Karbownicki # top html5=\n\n\n\t\n\t%cursor%\n\n\n\t%cursor%\n\n html=\n\t%cursor%\n head=\n\t%cursor%\n js= js2= css= css2= rss= title=%cursor% utf= ie7= refresh= body=\n\t%cursor%\n # table table=\n\t\n\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\t\n\t\t\n\t\n
%cursor%
%cursor%
td=%cursor% tr=%cursor% th=%cursor% caption=%cursor% # form form=
\n\n\t\n
formp=
\n\n\t

{{ form.as_p }}

\n

\n
label= input= pass= textarea= select= radio= checkbox= button= fieldset=
\n\t%cursor%\n
# list ul=
    \n\t
  • %cursor%
  • \n
ol=
    \n\t
  1. %cursor%
  2. \n
li=
  • %cursor%
  • dl=
    \n\t
    %cursor%
    \n\t
    %cursor%
    \n
    dt=
    %cursor%
    dd=
    %cursor%
    # inline a=%cursor% i=%cursor% span=%cursor% em=%cursor% small=%cursor% big=%cursor% cite=%cursor% strong=%cursor% img=%cursor% thumb=%cursor% # block div=
    %cursor%
    h1=

    %cursor%

    h2=

    %cursor%

    h3=

    %cursor%

    h4=

    %cursor%

    h5=
    %cursor%
    h6=
    %cursor%
    p=

    %cursor%

    pre=
    \n%cursor%\n
    code=%cursor% prec=
    %cursor%
    quote=
    \n\t

    \n\t\t%cursor%\n\t

    \n
    # other cl=class="%cursor%" id=id="%cursor%" cmt= cmt2= br=
    hr=
    1s=  3s=    7s=        dummyimage= dummyimage2= widget=
    \n\t
    \n\t\t\n\t\t

    %cursor%

    \n\t
    \n\t
    \n\t
    \n
    # Django templates if={% if %cursor% %}\n\t\n{% endif %} for={% for sth in %cursor% %}\n\t%cursor%\n{% endfor %} dv={{ %cursor% }} db={% %cursor% %} dbl={% block %cursor% %}\n\t%cursor%\n{% endblock %} trans={% trans "%cursor%" %} # jQuery jquery= jqueryui= jready=$(document).ready(function(){\n\t%cursor%\n}); jfunc=$(function(){\n\t%cursor%\n}); log=console.log('%cursor%'); [CSS] # by Tomasz Karbownicki bc=background-color: %cursor%; bp=background-position: %cursor%; bct=background-color: transparent; ba=background: url(%cursor%) %cursor%; ma=margin: %cursor%; pa=padding: %cursor%; bo=border: %cursor%; co=color: %cursor%; cu=cursor: %cursor%; he=height: %cursor%; wi=width: %cursor%; di=display: %cursor%; fs=font-size: %cursor%; ff=font-family: %cursor%; fw=font-weight: %cursor%; ta=text-align: %cursor%; ts=text-shadow: %cursor%; td=text-decoration: %cursor%; fl=float: %cursor%; lh=line-height: %cursor%; im=!important po=position: %cursor%; ov=overflow: %cursor%; op=opacity: 0.5; ra=-moz-border-radius: %cursor%px; -webkit-border-radius: %cursor%px; border-radius: %cursor%px; sh=border-shadow: %cursor%px %cursor%px #%cursor% %cursor%px; cmt=/* ######### %cursor% ######### */ hide=text-indent: 9999em; line-height: 9999em; overflow: hidden; [Javascript] jready=$(document).ready(function(){\n\t%cursor%\n}); jfunc=$(function(){\n\t%cursor%\n}); log=console.log('%cursor%'); [LaTeX] # by Frank Lanitz frame=\\begin{frame}\n%ws%\\frametitle{%cursor%}\n%ws%%cursor%\n\\end{frame} block=\\begin{block}{%cursor%}\n%ws%%cursor%\n\\end{block} itemize=\\begin{itemize}\n%ws%\\item %cursor%\n\\end{itemize} enumerate=\\begin{enumerate}\n%ws%\\item %cursor%\n\\end{enumerate} description=\\begin{description}\n%ws%\\item %cursor%\n\\end{description} [Tcl] # by Witek Mozga proc=proc %cursor% { } {\n\t\n} ; # end proc namespace=namespace eval %cursor% {\n\t\n}; # end namespace expr=expr { %cursor% } oo=oo::class create %cursor% {\n\t\n}; # end class for=for {set i 0} {$i < %cursor%} {incr i} {\n\t\n} ; # end for while=while { $%cursor% } {\n\t\n} ; # end while foreach=foreach x $%cursor% {\n\t\n} ; # end foreach if=if { $%cursor% } {\n\t\n} ; # end if else=else {\n\t\n} ; # end else elseif=elseif { $%cursor% } {\n\t\n} ; # end elseif switch=switch %cursor% {\n\t\n\tdefault { }\n} ; # end switch set=set %cursor% { }