Giter Club home page Giter Club logo

asciidoc-kate's Introduction

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

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.

asciidoc-kate's People

Contributors

dohliam avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.