Skip to content

AsciiDoc/AsciiDoctor syntax highlighting plugin for Kate editor/KatePart

Notifications You must be signed in to change notification settings

dohliam/asciidoc-kate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

asciidoc-kate - An AsciiDoc/AsciiDoctor plugin for Kate editor/KatePart

Important note

Recent versions of Kate and Kwrite have added built-in support for AsciiDoc highlighting, so there is no longer any need to install the file in this repo separately. You can now activate AsciiDoc support for any document by selecting AsciiDoc in the syntax highlighting menu, or by opening a file with the .adoc extension.

This repository and the information below will be left up for archival purposes and in case they are of use to anyone as a reference.


The XML file in this repository (asciidoc.xml) contains rules for highlighting the syntax of AsciiDoc and AsciiDoctor markup files in Kate, the default text editor for KDE.

Once installed, opening any file with the .adoc extension should automatically highlight AsciiDoc syntax as in the example below:

AsciiDoc syntax highlighting screenshot

This highlighter works fine with Kate or Kwrite (which are both based on KatePart), and should also work with most of the common features of both AsciiDoc and AsciiDoctor.

Installation

Steps to install the AsciiDoc syntax highlighting file:

  1. Download the file asciidoc.xml or clone this repository
  2. Find the folder ~/.kde/share/apps/katepart/syntax/ on your system (create it if it does not already exist)
  3. Move asciidoc.xml into ~/.kde/share/apps/katepart/syntax/
  4. Open or restart Kate to use the syntax highlighter.

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 ~/.local/share/katepart5/syntax/.

Usage

Files with the extension .ad, .adoc or .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:

  • Tools > Highlighting > Markup > AsciiDoc

Issues

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!

License

Based on kate-markdown by Claes Holmerson.

Dual-Licensed under both GPL and BSD licenses.

About

AsciiDoc/AsciiDoctor syntax highlighting plugin for Kate editor/KatePart

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published