Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howtos:geany_and_django [2013/10/19 14:30] – Add section "Live Preview in Geany" enricohowtos:geany_and_django [2014/02/02 10:49] (current) – Add an example for fne tuned styling enrico
Line 21: Line 21:
 http://www.drhevans.com/blog/posts/261-enabling-django-template-syntax-highlighting-in-geany/)) http://www.drhevans.com/blog/posts/261-enabling-django-template-syntax-highlighting-in-geany/))
  
-<code ini>+<file ini ~/.config/geany/filedefs/filetypes.html>
 [lexer_properties] [lexer_properties]
 lexer.html.django=1 lexer.html.django=1
-</code>+</file>
  
 More information about this file, its format and the path, e.g. on Windows, More information about this file, its format and the path, e.g. on Windows,
Line 46: Line 46:
 will be styled with //python_identifier// and the spaces between with will be styled with //python_identifier// and the spaces between with
 //python_default//. //python_default//.
 +
 +Example:
 +
 +<file ini ~/.config/geany/filedefs/filetypes.html>
 +[styling]
 +# foreground;background;bold;italic or named_style,bold,italic
 +html_asp=#ff0000
 +python_identifier=keyword_1,italic
 +python_default=default
 +</file>
 +
 +The example above makes ''{%'' and ''%}'' styled in red (#ff0000) and the words in between will be styled with the named-style //keyword_1// (which is by default dark blue) and renders it in italic.
 +
  
 For more information about configuring styles, please check the manual [[http://www.geany.org/manual/current/index.html#filetype-configuration|Geany manual, section Filetype configuration]]. For more information about configuring styles, please check the manual [[http://www.geany.org/manual/current/index.html#filetype-configuration|Geany manual, section Filetype configuration]].
Line 122: Line 135:
 ===== Twig/Symfony2 Support ===== ===== Twig/Symfony2 Support =====
  
-If you want to add detction/highlighting of [[http://en.wikipedia.org/wiki/Twig_%28template_engine%29|Twig/Symfony2]] files (based on Django's templates) when opening in Geany, add ''*.html.twig'' to the ''HTML'' key in the ''filetype_extensions.conf'' file. For more information on ''filetype_extensions.conf'', see the [[http://www.geany.org/manual/dev/index.html#filetype-extensions|Filetype extensions section]] of the [[http://www.geany.org/manual/current/index.html|Geany User Manual]].+If you want to add detection/highlighting of [[http://en.wikipedia.org/wiki/Twig_%28template_engine%29|Twig/Symfony2]] files (based on Django's templates) when opening in Geany, add ''*.html.twig'' to the ''HTML'' key in the ''filetype_extensions.conf'' file. For more information on ''filetype_extensions.conf'', see the [[http://www.geany.org/manual/dev/index.html#filetype-extensions|Filetype extensions section]] of the [[http://www.geany.org/manual/current/index.html|Geany User Manual]].
  
 {{tag>howto python django twig symfony2 snippets}} {{tag>howto python django twig symfony2 snippets}}
Print/export