vim
command within that X terminal, or generally your preferred editor. Assume that the filename of this script is wiki.edit.vim
, and that you put the script in the directory /home_dir/bin/
so that the path of the script would be
/home_dir/bin/wiki.edit.vim
Put the above path in the Preferences box (instead of /usr/bin/gvim
) of It's All Text. It should work. Note that /home_dir/
is the complete path to your home directory from the root (/
) directory; don't use ~/
(tilde) instead of /home_dir/
; it won't work.
The listing of the script wiki.edit.vim
is given below:
Don't forget to make the file executable with $chmod +x wiki.edit.vim
=====Using Vim on Mac OS X=====
To get It's All Text to work nicely with Vim on the Mac, you need to install [http://code.google.com/p/macvim/ Macvim]. When MacVim is installed, a script called mvim is also added. You need to tell It's All Text to use this script and not the MacVim.app file. A good place to keep it is in the same folder your MacVim.app file is (Applications by default).
===External editor feature ===
Starting with MediaWiki Version 1.5, the software allows you to edit any resource using any external tool. See [[mw:Manual:External editors|Manual:External editors]] for details.
===Text browsers===
==== elinks ====
The text-only browser [[elinks]] also provides a function to edit text areas. The key combination {{key press|Ctrl|T}} calls an external editor, e.g. [[Vim (text editor)|Vim]]. This allows also to use syntax highlighting, edit functions, spelling corrections and saving local copies.
==== w3m ====
[[w3m]] opens an external editor for textareas by default.
==== Lynx ====
[[Lynx (web browser)|Lynx]] allows editing a text area with an external editor by typing {{key press|Ctrl|X}} and {{key press|E}} or {{key press|Ctrl|E}} and {{key press|E}} when the cursor is in the text area. In addition, it accepts a user-definable key-binding (normally not bound) to invoke the external editor. Some packagers may assign the user-definable binding in Lynx's configuration file.
;Do not wrap
After saving the file in an external editor and quitting it, answer "no" (by typing the {{key press|N}} key) to the Lynx question "Wrap lines to fit displayed area? (n)"; answering "yes" will otherwise have Lynx wrap lines with normal carriage returns, which will break the document structure. Using article preview is strongly encouraged.
;Line and paragraph breakage
Lynx is prone to breaking lines longer than 1023 characters: When this happens, a large paragraph with lots of reference data may easily become broken and articles saved like that may take a slightly inconsistent appearance at best; at worst, complex articles might lose their structure.
The character length limit is dependent on maximum buffer length set for a line, the size of which is 1023 characters; the behaviour can be observed when moving the cursor to a text area line exceeding the limit, whereby Lynx will issue an alert: "Form field value exceeds buffer length! Trim the tail."
Even if a paragraph of article text on its face is not very long, it may still contain multiple references along with extensive amounts of related code and data for them, which makes an actual paragraph in article code much longer and in some cases well beyond the length of a 1023-character limit. When a line of text exceeds that limit and a text file is sent back to the Lynx textarea, Lynx will yield an error message: "Alert! Very long lines have been wrapped!". In such a case it's best not to save article content before such issues have been mitigated.
Therefore, article editors should be careful to follow the character length of longer lines, and where (usually) possible, insert strategic linebreaks with carriage returns (not HTML <BR>
tags): Advanced text editors, like vi or VIM, do typically show cursor position within a line in their status areas and thus allow to gauge line length when the cursor is at the end of a line.
In a longer paragraph of article code containing references, single linebreaks can be inserted within reference code, so long as parameter values themselves are not broken.
*Some editors hold the practice of entering a linebreak before every reference parameter (as can be seen in examples of [[Wikipedia:Citation templates|Citation templates]]; Whether this is a good practice within text, is subject to debate);
*Others choose not to interfere with a paragraph's visual consistency and enter a linebreak before a very long URL, one that is longer than the visual line in a terminal window, which is usually the length of 80 characters. If the situation in text necessitates, a linebreak can also be inserted before other parameters.
Because URLs are typically long, placing these on a new line is handy for comparing article editions, as some textually non-breaking code prepended and/or appended to a URL may lie outside a comparison iframe's viewport and this may hinder in discovery of changes made to an article.
If a paragraph line is near the limit or exceeds it by just a few characters, then article editors can choose to optimize code or text:
*By removing superfluous spaces:
**the best practice with extensive template data (such as references) is to only separate the last character of a previous parameter value and the marker pipe of next parameter's name;
**In plain text after a sentence-ending period, some article writers add two spaces instead of one, but browsers ignore this.
*By refactoring template data into a shorter format: date=26 February 2011
can be replaced with date=2011-02-26
— Users with their own date preferences should then see dates in their favoured format when logged in;
*By rewording a line without affecting the nature of the text within.
*The above applies even if a paragraph line does not contain breakable code.
If a line paragraph still exceeds the 1023-character limit, but does not contain any reference code (or any other wikicode that would work with linebreaks), then users should consider logically breaking that paragraph into two for better legibility.
;Encoding
If accented and international characters fail to show properly, use a terminal program that has support for Unicode (such as [[xterm|uxterm]]) and set the assumed and display character sets to UTF-8 or greater in Lynx options.
Nevertheless, article content with any special characters — including non-standard Latin, Cyrillic, or other non-Latin languages — are seen in Lynx textareas in the UTF-8 &#xXX;
format, which in that form are sent to text editors and then back.
Beware that these UTF-8 glyph representations are not treated as one character, but six (ö = ö
), and these add to the 1023-character line limit.
Such behaviour is a hindrance to editing non-Latin texts, and even Latin texts that are written in languages that may feature extensive amounts of accented characters.
See [[#Dealing with special characters]] for more.
=====Lynx in Windows=====
In addition to above instructions, there are intricacies specific to Windows.
If you want to use Wikimedia's secure servers, get a version of Lynx that supports SSL. To find out if yours already does, go to Options and see if the User-Agent header contains OpenSSL
.
The assumed character set should be utf-8
, as this is also the default charset used by Wikipedia. The display character set can be different, such as cp850
, but editable text will always be in utf-8
.
;Lynx configuration files
Configuration files for Lynx are simple text files and can be edited from any text editor that supports Unix linebreaks. In Windows 9x, the built-in text editor for this is [[WordPad]], because [[Windows Notepad|Notepad]] does not support the Unix Line Feed.
'''lynx.cfg
''' is the config file for Lynx; the global config file in Windows is always located in the same folder as the Lynx executable, wherever it has been installed to. A typical location is C:\Program Files\Lynx
. If Lynx is installed in that folder, then Windows Vista and newer usually require administrator access to edit the file (via User Account Control).
'''lynx.rc
''' is a per-user Lynx User Defaults File saved from the Options page. Settings in it take priority over the global config file. In Windows Vista the per-user User Defaults file can be in C:\Users\''Username''\AppData\Local\temp\lynx.rc
. If the file is in the temp
directory, care is advised when using automated cleanup tools, such as Disk Cleanup.
Option syntax is different between global (lynx.cfg) and per-user (lynx.rc) configuration files.
lynx.cfg
is extensive; very often almost all options are placed into it, along with explanatory comments for each option. If it's not so, there's an official online version at [http://lynx.isc.org/lynx2.8.7/lynx2-8-7/lynx.cfg lynx.isc.org/lynx2.8.7/lynx2-8-7/lynx.cfg] — Keep in mind that if your Lynx version is different, change the numbers in the URL accordingly, as some options may be version-specific.
The best way to find an option is by using the text editor's find feature.
When not in active use, an option is commented out with a hash #
and its default setting is on; To use an option, delete the hash character before it. It may occasionally happen that the config file does not contain a specific option, but it can be added by the user.
;Defaults to reconsider
The following options are often found as defaults in Lynx binaries compiled for Windows and might not meet formatting conventions used in Wikipedia. These options can be edited from lynx.cfg
and are usually not specified in the Options page. Before making changes, make a backup copy of the file, renaming it to lynx.cfg.old
, for example.
'''Collapsed
tags'''
The COLLAPSE_BR_TAGS:
option should be set to FALSE
, as in the example below:
COLLAPSE_BR_TAGS:FALSE
The reason is that some editors intentionally use more than one
tag, especially in locations where conventional paragraph breaks are not allowed.
'''Justified text'''
Graphical browsers do not show this, since justification is not used. For this, set
JUSTIFY:FALSE
'''Numbered links'''
As Wikipedia articles very often feature linked content in tables, the numbers in brackets before or next to links may be distracting. Set these following options:
DEFAULT_KEYPAD_MODE:LINKS_ARE_NOT_NUMBERED
NUMBER_LINKS_ON_LEFT:FALSE
;Editing
The typical key combination to invoke an out-of-Lynx editor in Windows is Ctrl+x+e and not Ctrl+E+e like in Unices and elsewhere; this can be changed in the config file. Both an internal and external editor can be used, according to taste and preferences. Avoid Windows Notepad for reasons in above paragraphs. And only starting with Windows XP does WordPad have full Unicode support (with some reservations).
An example with Vim, configured to use the mediawiki syntax:
SYSTEM_EDITOR:C:\Progra~1\Vim\vim73\vim.exe -c "setf mediawiki"
Note double quotes ^
;Colour issues
When using an in-window editor like Vim and after exiting back into Lynx, any colour theme Lynx uses is rendered inoperable (links and buttons not highlighted anymore), so the best practice is to never show colors in Options (in section Appearance), and save the settings.
===Command line tools===
There are also [[command line interface|command line]] tools that allow you to download articles, edit them using your favorite text editor, and upload the edited articles back into Wikipedia (or into any MediaWiki server). This bypasses the need for a web browser. These are (at least):
* [http://search.cpan.org/~markj/WWW-Mediawiki-Client/bin/mvs mvs], a [[Perl]] program available from [[CPAN]]. There's more information at [[Meta:WWW::Mediawiki::Client]]. Unfortunately, mvs uses the name of the local file as the title of the page for the wiki remote server. If you need title pages in UTF-8 for Russian, Japanese or Arabic for example, you won't be able to upload such files. It seems that Mediawiki::Client as well as Perl libraries are not enough advanced in the management of UTF-8 characters to be fully operational, even if your terminal and shell are correctly set for UTF-8. But see [http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=libwww-mediawiki-client-perl Debian bug reports].
* [[Meta:pywikipedia]] is an extensive library and set of utilities for doing innumerable things with Wikipedia. It can also do something as simple as editing Wikipedia pages. It has some ways to avoid the wrong transmission of titles in UTF-8, for example it allows to incorporate the name of the title ''within'' the file itself and to use another command line tool. The local filename could then be written in simple ASCII. Here is an example of a file, named locally 'foo.wiki', using pagefromfile.py (from [[Meta:pywikipedia]]):
{{-start-}}'''Демография'', или наука о народонаселении, изучает численность, состав, размещение и движение населения.
{{-stop-}}
{{-start-}}'''人口学'''はヒトの人口の科学的研究をいい、主としてその大きさ、構造、そしてその成長発展を研究対象とする。
{{-stop-}}
{{-start-}}'''Demography''' is the scientific study of human populations primarily with respect to their size, their structure and their development.
{{-stop-}}
{{-start-}}'''الديمغرافية''': علم يتناول دراسة المجتمعات البشرية من حيث حجومها و بناها و تطورها و خصائصها العامة و لا سيما من النواحي الكمية.
{{-stop-}}
In the above example, the command line to upload the four pages in one submission (the 'start' and 'stop' markups drive successively the four different pages Демография, 人口学, Demography and الديمغرافية) is:
python pagefromfile.py -file:foo.wiki
==How to set up specific editors for Wikipedia editing==
===Eclipse plug-in===
The Wikipedia Editor plugin [http://eclipsewiki.sourceforge.net/ Eclipse Wikipedia Editor] is available for [[Eclipse (computing)|Eclipse]] (cross-platform) with an automatically updating outline of the article. It has many features which are very helpful for editing Wikipedia. It also downloads articles directly from Wikipedia and has highlighting.
===GNU Emacs===
There are a few [[Emacs]] ''major mode'' implementations available for editing MediaWiki syntax:
* [[Meta:Mediawiki.el|Mediawiki.el]], available from [https://launchpad.net/mediawiki-el launchpad], “… adds the ability to edit sites hosted on Mediawiki (including Wikipedia, of course).”
* [[Wikipedia:wikipedia-mode.el|wikipedia-mode.el]] (obsolete) is a simple major mode that mostly provides [[syntax highlighting]] for MediaWiki [[mark-up]].
* [http://www.gna.org/projects/wikipedia-el/ wikipedia.el] (obsolete) is a much more advanced major mode which provides [[WYSIWYG]] editing of Wikipedia articles. Note, however, that it is developed using the current [[Concurrent Versions System|CVS]] version of GNU Emacs, may not be compatible with older versions, and has been effectively discontinued because it's not being actively maintained. Also, the mode was in the [[Software release life cycle#Alpha|alpha stage of development]] when it was orphaned, so use it at your own risk.
====Line Formatting====
longlines.el
is now part of the default GNU Emacs distribution. The following information is retained for reference.
Wikipedia articles [[Wikipedia:don't use line breaks|don't use line breaks]]. Because of this, you may want to install one of the following:
* [http://www.emacswiki.org/elisp/longlines.el longlines.el] — implements “word wrap” functionality for Emacs (longlines.el
is now part of GNU Emacs). [[Wikipedia:Wikipedia-mode.el#Installing longlines-mode|Installation instructions for longlines.el
]].
* [http://homepage1.nifty.com/bmonkey/emacs/elisp/screen-lines.el screen-lines.el] — redefines movement commands to operate in terms of screen lines as opposed to logical lines
====Access Methods====
[http://www.emacswiki.org/emacs/WikipediaFs wikipediafs.el] can be used along with one of the aforementioned major modes, when using the virtual [http://wikipediafs.sourceforge.net/ Wikipedia filesystem].
===jEdit===
For [[jEdit]] (Java-supporting OSes) there is a plugin available at http://www.djini.de/software/mwjed/ . Apart from providing syntax highlighting for Wikipedia markup, it can communicate directly with the Wikipedia website using the HttpClient component from the [[Jakarta Project]]. ''(Unavailable as of 2012-03-20.)''
===Kate/KWrite===
For [[Kate (text editor)|Kate]] (for GNU/Linux KDE desktop), rules for syntax highlighting are provided by the [[XML]] file on [[commons:User:Andreas_Plank/kate-highlighting|Wikimedia Commons kate-highlighting]]. It recognizes HTML tags and entities, wiki control characters, templates, variables, keywords, links, section titles, tables and sections.
To install this template, copy it to your home directory of KDE ~/.kde/share/apps/katepart/syntax/
for per user settings or a global settings:
* Mostly, put it on $(PREFIX)/share/apps/katepart/syntax/
.
* on [[Ubuntu (operating system)|Ubuntu]] Linux, use /usr/share/kde4/apps/katepart/syntax/
.
* on [[OpenSUSE]]-Linux for instance PREFIX=/opt/kde3/
.
There's also an import tool : Settings → Configure Kate → Highlighting → Download
.
In recent editions of Kate, MediaWiki syntax highlighting is included by default. This can be configured by choosing Settings → Configure Kate → Fonts & Colors → Highlighting Text Styles
and select "Markup/MediaWiki" in the drop-down menu.
As checked on version 3.8.5 (KDE 4.8.5), Kate will automatically wrap lines when they are longer than a specified number of characters (default 1024
). This auto-wrap functionality can be disabled by setting the "Line Length Limit:" to zero ('''0'''
) in Settings → Configure Kate → Open/Save.
===gedit===
[[gedit]] is a cross-platform, free software text editor that comes bundled with [[Ubuntu (operating system)|Ubuntu]] Linux by default. There is a [[GPL]]-licensed MediaWiki syntax highlight mode provided [http://www.jpfleury.net/logiciels/gedit-mediawiki.php here] (French). You can download, unzip, and copy the language file to the correct folder, or you can run the following in a GNU/Linux shell:
* For gedit 2.x:
* For gedit 3.x:
===NoteTab===
A [http://www.notetab.com/clipbooks/wiki.zip Clip Library plugin] for the [[NoteTab]] (Windows) text editor contains some functions to automate Wiki markup.
===SubEthaEdit===
A [http://www.codingmonkeys.de/subethaedit/modes.html#Wikipedia.mode syntax highlighting mode] is available for [[SubEthaEdit]] (Mac OS X) as well. After downloading the mode bundle, drop it in /Library/Application Support/SubEthaEdit/Modes/
(system-wide) or ~/Library/Application Support/SubEthaEdit/Modes/
(user-specific). You may need to create the final two directories by hand. The mode will be automatically selected for files with a .wiki or .Wikipedia extension.
===TextMate===
A "MediaWiki" bundle is available in the [[TextMate]] bundle subversion repository. To learn how to load this bundle, see the [http://macromates.com/textmate/manual/bundles#getting_more_bundles TextMate manual page] about installing more bundles, or view this [[shell script]] that downloads and installs it. [http://netcetera.org/cgi-bin/tmbundles.cgi?bundle=%4D%65%64%69%61%77%69%6B%69]. The bundle does syntax highlighting, code completion, and other actions.
For [[Sublime Text]] 2 users, note that you may enable this bundle as well, since Sublime Text 2 supports TextMate bundles.
===Vedit===
[http://koti.mbnet.fi/pkl/vedit/wiki/wiki_tools.htm Wiki Tools] for [[VEDIT]] contains syntax highlighting, keyboard configuration, User and Tools menus and several macros for inserting and editing wiki tags and for some more complex operations such as add/delete/copy/paste columns in a wiki table.
Installation instructions included, as well as instructions for configuring ''It's All Text!'' for Vedit.
===Vim===
Please feel free to contribute improvements to the below scripts, or check the [http://news.gmane.org/gmane.editors.vim.devel vim-devel list] if anyone has requested the upload of mediawiki.vim Syntax & FileType plugin. If not, request it and/or post the reasons why they are not here. (As of [[16 November]] [[2011]], it is not in [http://code.google.com/p/vim/source/browse/#hg%2Fruntime%2Fsyntax the Vim source control tree's "syntax/" directory].)
The below scripts are also posted in the [http://www.vim.org/scripts/script.php?script_id=1787 vim.org script collection], where they are occasionally updated (but not since 2011-11-17) with newer versions taken from community contributions on this site. Feel free to remind [[User:Mvc|mvc]] to upload a newer copy periodically if those become stale, since they were uploaded from his vim.org account.
====$HOME/.vim/syntax/mediawiki.vim====
To make [[Vim (text editor)|Vim]] support the MediaWiki markup used on Wikipedia (basically syntax highlighting), save the following lines to "~/.vim/syntax/mediawiki.vim" or "vimfiles\syntax\mediawiki.vim". If any of the directories above don't exist you may create them (the Unix/Linux command is [[mkdir]]).
When using Vim in Windows, it's preferable to create and save mediawiki.vim in Vim itself, otherwise the file may become broken.
{{File title| $HOME/.vim/syntax/mediawiki.vim}}
" mediawiki.vim (formerly named Wikipedia.vim)
"
" Vim syntax file
" Language: MediaWiki, http://www.mediawiki.org/
" Maintainer: This syntax file needs a maintainer in order to ship
" with Vim. Please contact [[User:Unforgettableid]] if you want
" to volunteer.
" Home: http://en.wikipedia.org/wiki/Wikipedia:Text_editor_support#Vim
" Last Change: 2011 Sep 19
" Credits: [[User:Aepd87]], [[User:Danny373]], [[User:Ingo Karkat]], et al.
"
" Published on Wikipedia in 2003-04 and declared authorless.
"
" Based on the HTML syntax file. Probably too closely based, in fact.
" There may well be name collisions everywhere, but ignorance is bliss,
" so they say.
"
" To do: plug-in support for downloading and uploading to the server.
if !exists("main_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
let main_syntax = "html"
endif
syntax case ignore
if v:version >= 700
syntax spell toplevel
endif
" Mark illegal characters
sy match htmlError "[<>&]"
" Tags
sy region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,@htmlPreproc
sy region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,@htmlPreproc
sy match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=@htmlPreproc
sy region htmlEndTag start=++ end=+>+ contains=htmlTagN,htmlTagError
sy region htmlTag start=+<[^/]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster
sy match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
sy match htmlTagN contained +\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
sy match htmlTagError contained "[^>]<"ms=s+1
" Allowed HTML tag names
sy keyword htmlTagName contained big blockquote br caption center cite code
sy keyword htmlTagName contained dd del div dl dt font hr ins li
sy keyword htmlTagName contained ol p pre rb rp rt ruby s small span strike sub
sy keyword htmlTagName contained sup table td th tr tt ul var
sy match htmlTagName contained "\<\(b\|i\|u\|h[1-6]\|em\|strong\)\>"
" Allowed Wiki tag names
sy keyword htmlTagName contained math nowiki references source syntaxhighlight
" Allowed arg names
sy keyword htmlArg contained align lang dir width height nowrap bgcolor clear
sy keyword htmlArg contained noshade cite datetime size face color type start
sy keyword htmlArg contained value compact summary border frame rules
sy keyword htmlArg contained cellspacing cellpadding valign char charoff
sy keyword htmlArg contained colgroup col span abbr axis headers scope rowspan
sy keyword htmlArg contained colspan id class name style title
" Special characters
sy match htmlSpecialChar "\=[0-9A-Za-z]\{1,8};"
" Comments
sy region htmlComment start=++ contains=htmlCommentPart,htmlCommentError
sy match htmlCommentError contained "[^>+
if !exists("html_no_rendering")
sy cluster htmlTop contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,@htmlPreproc
sy region htmlBold start="" end=""me=e-4 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic
sy region htmlBold start="" end=""me=e-9 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic
sy region htmlBoldUnderline contained start="" end=""me=e-4 contains=@htmlTop,htmlBoldUnderlineItalic
sy region htmlBoldItalic contained start="" end=""me=e-4 contains=@htmlTop,htmlBoldItalicUnderline
sy region htmlBoldItalic contained start="" end=""me=e-5 contains=@htmlTop,htmlBoldItalicUnderline
sy region htmlBoldUnderlineItalic contained start="" end=""me=e-4 contains=@htmlTop
sy region htmlBoldUnderlineItalic contained start="" end=""me=e-5 contains=@htmlTop
sy region htmlBoldItalicUnderline contained start="" end=""me=e-4 contains=@htmlTop,htmlBoldUnderlineItalic
sy region htmlUnderline start="" end=""me=e-4 contains=@htmlTop,htmlUnderlineBold,htmlUnderlineItalic
sy region htmlUnderlineBold contained start="" end=""me=e-4 contains=@htmlTop,htmlUnderlineBoldItalic
sy region htmlUnderlineBold contained start="" end=""me=e-9 contains=@htmlTop,htmlUnderlineBoldItalic
sy region htmlUnderlineItalic contained start="" end=""me=e-4 contains=@htmlTop,htmlUnderlineItalicBold
sy region htmlUnderlineItalic contained start="" end=""me=e-5 contains=@htmlTop,htmlUnderlineItalicBold
sy region htmlUnderlineItalicBold contained start="" end=""me=e-4 contains=@htmlTop
sy region htmlUnderlineItalicBold contained start="" end=""me=e-9 contains=@htmlTop
sy region htmlUnderlineBoldItalic contained start="" end=""me=e-4 contains=@htmlTop
sy region htmlUnderlineBoldItalic contained start="" end=""me=e-5 contains=@htmlTop
sy region htmlItalic start="" end=""me=e-4 contains=@htmlTop,htmlItalicBold,htmlItalicUnderline
sy region htmlItalic start="" end=""me=e-5 contains=@htmlTop
sy region htmlItalicBold contained start="" end=""me=e-4 contains=@htmlTop,htmlItalicBoldUnderline
sy region htmlItalicBold contained start="" end=""me=e-9 contains=@htmlTop,htmlItalicBoldUnderline
sy region htmlItalicBoldUnderline contained start="" end=""me=e-4 contains=@htmlTop
sy region htmlItalicUnderline contained start="" end=""me=e-4 contains=@htmlTop,htmlItalicUnderlineBold
sy region htmlItalicUnderlineBold contained start="" end=""me=e-4 contains=@htmlTop
sy region htmlItalicUnderlineBold contained start="" end=""me=e-9 contains=@htmlTop
sy region htmlH1 start="" end="
"me=e-5 contains=@htmlTop
sy region htmlH2 start="" end="
"me=e-5 contains=@htmlTop
sy region htmlH3 start="" end="
"me=e-5 contains=@htmlTop
sy region htmlH4 start="" end="
"me=e-5 contains=@htmlTop
sy region htmlH5 start="" end="
"me=e-5 contains=@htmlTop
sy region htmlH6 start="" end="
"me=e-5 contains=@htmlTop
endif
" No htmlTop and wikiPre inside HTML preformatted areas, because
" MediaWiki renders everything in there literally (HTML tags and
" entities, too): tags work as the combination of and
" the standard HTML tag: the content will preformatted, and it
" will not be parsed, but shown as in the wikitext source.
"
" With wikiPre, indented lines would be rendered differently from
" unindented lines.
sy match htmlPreTag // contains=htmlTag
sy match htmlPreEndTag /<\/pre>/ contains=htmlEndTag
sy match wikiNowikiTag // contains=htmlTag
sy match wikiNowikiEndTag /<\/nowiki>/ contains=htmlEndTag
sy match wikiSourceTag /