You do not have permission to edit this page, for the following reason:
Free text:
{{#set:feature description = syntax highlighting is available for dozens of languages through the [[mw:Extension:SyntaxHighlight_GeSHi]] and the underlying [[Python]] [http://pygments.org/ Pygments] library }} {{#set:feature notes = }} {{#set:feature tests = }} {{#set:feature examples = [[Apache]] shows config file highlighting; [[Library]] shows JavaScript; etc. }} == Syntax Highlighting in Quanta == Quanta has syntax defintion files which are called 'DTEP' files. See the quanta dev list, website, or help:/quanta (Quanta Manual in konqueror). These files are stored in <syntaxhighlight lang="bash"> # application directory /usr/share/apps/quanta/dtep/ # local user directory ~/.kde/share/apps/quanta/dtep/ </syntaxhighlight> placing a new directory, which includes all tag definitions, in one of those locations will provide all the info Quanta needs to understand the syntax. On the Quanta site there is a DTEP for TaskJuggler syntax. == Syntax Highlighing in VIM == To add syntax highlighting for a particular language or syntax, you need to have a syntax definition file, and then you need to 'turn it on' by setting it up in your local configuration file. For example, there is a syntax file for TaskJuggler, which can be turned on thusly: <syntaxhighlight lang="bash"> sudo cp /usr/local/src/taskjuggler-2.2.0/Contrib/vim/tjp.vim /usr/share/vim/vimcurrent/syntax/ sudo chmod o+r /usr/share/vim/vimcurrent/syntax/tjp.vim echo 'if has("autocmd") augroup taskjuggler au! BufNewFile,BufRead *.tj{p,i} set ft=tjp augroup END endif' >> ~/.vimrc </syntaxhighlight> == Syntax Highlighting in Konsole == == Syntax Highlighting in Websvn == The current syntax highlighting in websvn is handled via GNU enscript == Syntax Highlighting in MediaWiki == (Note that there is also a [[MediaWiki/Syntax highlighting]] article) Writing good code, especially in open source context, requires illustrating best practices and tutorials. Those tutorials are made ever more useful with syntax highlighting. MediaWiki is able to incorporate a nice 3rd-party project called [http://qbnz.com/highlighter/faq.php Generic Syntax Highlighter] or GeSHi for short. Fortunately GeSHi is now packaged with debian for easy installation on Debian or Debian-based systems. There is a [[mw:Extension:SyntaxHighlight_GeSHi]] extension which provides a tie-in between MediaWiki and GeSHi. (note that there are a few different GeSHi extensions for mediawiki, and we use the one in use on mediawiki.org http://www.mediawiki.org/wiki/Special:Version). To install the actual GeSHi software package (it installs in /usr/share) <syntaxhighlight lang="bash"> sudo apt-get install php-geshi ls /usr/share/php-geshi/ contrib geshi geshi.php </syntaxhighlight> Incorporating GeSHi into Mediawiki is just a matter of adding the extension to the source tree and including it in LocalSettings. === Usage === See the [[mw:Extension:SyntaxHighlight_GeSHi#Examples]] <nowiki> <syntaxhighlight lang="php"> $v = array_pop($foo); // just a comment </syntaxhighlight> </nowiki> === Supported Languages === [[mw:Extension:SyntaxHighlight_GeSHi#Supported_languages]] === Documentation === See http://qbnz.com/highlighter/geshi-doc.html for the extensive documentation. GeSHi is used in a number of other software projects like * Dokuwiki - An advanced wiki engine * gtk.php.net - Their manual uses GeSHi for syntax highlighting * WordPress - A powerful blogging system* * PHP-Fusion - A constantly evovling CMS * SQL Manager - A Postgres DBAL * Mambo - A popular open source CMS * MediaWiki - A leader in Wikis* * TikiWiki - A megapowerful Wiki/CMS * TikiPro - Another powerful Wiki based on Tikiwiki * RWeb - A site-building tool [[Category:Howto]] [[Category:Help]] [[Category:Best Practices]] [[Category:Development]] [[Category:Wiki]] [[Category:Collaboration]] [[Category:Documentation]]
Save page Show preview Show changes Cancel