Once installed, opening any file with the
.adoc extension should automatically highlight AsciiDoc syntax as in the example below:
Steps to install the AsciiDoc syntax highlighting file:
asciidoc.xmlor clone this repository
~/.kde/share/apps/katepart/syntax/on your system (create it if it does not already exist)
Default syntax highlighting files for Kate are usually stored in the folder
/usr/share/kde4/apps/katepart/syntax/. However, custom syntax highlighters should probably be saved in the local syntax highlighting folder (
~/.kde/share/apps/katepart/syntax/) in the user's home directory so that they don't get accidentally overwritten during an update.
NOTE: The above applies to KDE 4. If you are using Plasma 5, the local folder for Kate syntax files has changed to
Files with the extension
.asciidoc will automatically be highlighted using the rules in
asciidoc.xml. Plain text or other files can be forced to use AsciiDoc highlighting rules by selecting AsciiDoc from the Highlighting menu:
Although most basic formatting is working and should be fine for normal use, there are still many advanced features from the AsciiDoc / AsciiDoctor spec that are not supported yet. Some (like includes and complex attributes) can't feasibly be supported in Kate due to limitations of the editor itself (an editor like Atom with an actual HTML preview feature for AsciiDoc files would probably be better if you need these features).
However, it would be great to support as many features as possible within Kate/Kwrite. If you have a fix for something (or an idea for a new feature), feel free to submit a PR!
Dual-Licensed under both GPL and BSD licenses.