Code Monkey home page Code Monkey logo

qarkdown's Introduction

qarkdown

A markdown editor sporting a nice instant preview and syntax highlighting.

It is written in Qt. It can handle UTF-8 encoded texts, so nice box drawings like theses are possible:

┌────────┐    has    ┌────────────────┐
│ Person │──────────>│ Role           │
└────────┘      1..n ├────────────────┤
    │                │+Expire : Date  │
has │                └────────────────┘
    │1..m                     │
    v                         │
┌────────────────┐            │
│ Subscription   │ 1..l       │ implies
├────────────────┤ <──────────┘
│+Expire : Date  │
└────────────────┘

Features

Edit text in an editor on the left side of the app and see a preview of the rendered markdown/html output on the right. The app is kept decidedly simple. You can load and save files. The window title displays the currently opened file.

Markdown text is syntax highlighted using Ali Rantakari's nice PEG Markdown Highlighter.

Keyboard shortcuts

  • CTRL-U displays a source view.
  • CTRL-O opens a file
  • CTRL-S saves the file
  • CTRL-E exports the file as HTML (replacing a md[k] suffix by html)
  • CTRL-N start a fresh file (pressing CTRL-S asks for file name)
  • CTRL-D opens a directory view on the left, which shows the contents of the parent folder of the currently opened file.
  • Pressing TAB on selected Text indents it by 4 characters (handy for code listings).

Details

The rendered markdown content is wrapped in a HTML-Document, which includes a custom bootstrap.css style sheet. The only thing i added to the style sheet is horizontal columnization, so the rendered content grows columnwise to the right. I modified/customized QWebView to scroll horizontally on mouse wheel events (see my struggles here).

On changing the currently opened file using the directory view (which happens by using a single left click) the current file is saved without further enquiries. This might be unexpected for you...

Dependencies

  • Qt 5.9.1 (no longer tested with older versions)

Building

The usual

qmake
make

should do it.

Invoking

qarkdown [<file>]

If <file> is given it is opened and displayd when it exists. Otherwise it is created.

Feature Ideas

  • Customizable UI - Configurable editor position and size, e.g. fixed column size
  • Versioning - maybe based on git
  • Some kind of journal support - Ability to add a new entry/file/whatever tagged by the current date and time just by hitting a single key combo (CTRL-N)

Authors

qarkdown's People

Contributors

sschober avatar pasnox 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.