Git Product home page Git Product logo

console-syntax's Introduction

Console Syntax Highlighting

While writing a Pandoc Markdown-based guide about creating a Linux Home Server I spent some time understanding issues and finding solutions. I then added another guide on getting started with Markdown-based technical guides.

One of the issues I have dealt with on both occasions is console input/output and syntax-highlighting. When you are helping others understand command line options it is very useful to highlight command line console sessions.

Pandoc uses the Haskell skylighting library for syntax highlighting. The highlighting descriptions are written in XML, using syntax descriptions designed for KDE's Kate syntax highlighting.

By adding custom Kate syntax highlighting I was able to present console sessions as fenced code blocks with more interesting syntax highlighting in Pandoc-generated Markdown-based documents.

By adding custom Vim syntax highlighting for my favourite editor, Gvim (Graphical Vim), then I was able to edit Markdown files with embedded console sessions with the same syntax highlighting as in the final document.

When the appropriate configuration files are in place then any text file named with a .console filename extension written in console-consistent format will be syntax-highlighted with these editors:

  • a Vim-based editor
  • the KDE Kate editor

This repository contains the needed configuration files.

See the document using-console-syntax.md for installation and configuration details.

console-syntax's People

Contributors

deatrich avatar

Watchers

 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.