Extension:SyntaxHighlight vim
From MediaWiki.org
SyntaxHighlight_vim Release status: beta |
|
---|---|
Implementation | Tag |
Description | Syntax highlighting of text within <syntax> tags, with the use of vim |
Author(s) | Ævar Arnfjörð Bjarmasontalk |
MediaWiki | 1.6 |
License | No license specified |
Download | |
Translate the SyntaxHighlight vim extension if it is available at translatewiki.net |
|
Check usage and version matrix; code metrics |
What can this extension do?[edit | edit source]
This extension adds the `syntax' tag to present formatted source code.
Usage[edit | edit source]
On the wiki page, you can now use `syntax' elements:
<syntax> <?php v = "string"; // sample initialization ?> html text <? echo v; // end of php code ?> </syntax>
Download instructions[edit | edit source]
Download the extension from the Subversion repository and save it into the extensions\SyntaxHighlight_vim of your wiki. If you have shell access to your server, you may do the following to download the extension:
cd extensions svn co http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SyntaxHighlight_vim
Installation[edit | edit source]
- Add this line to your LocalSettings.php right before $wgSitename:
require_once("extensions/SyntaxHighlight_vim/SyntaxHook.php");
- Open file extensions/SyntaxHighlight_vim/SyntaxHook.php and add below line at the beginning
require_once("Syntax.php");
- Make sure that your server has vim binary available. For example on CentOS do
yum install vim-common yum install vim-enhanced