Minimal marked based unix terminal document viewer/pager with many features like markdown to terminal translation, file change watching and more.
JavaScript
Switch branches/tags
Clone or download
Latest commit 168fdd3 Jul 26, 2017
Permalink
Failed to load latest commit information.
bin [1.0.0] forgotten commit Oct 26, 2016
lib save newline slices Nov 15, 2016
misc Add files via upload Oct 25, 2016
tests more unicorns Oct 22, 2016
.eslintrc.json doc Oct 21, 2016
.gitignore Initial commit Oct 20, 2016
.npmingnore ---- Oct 23, 2016
.travis.yml lest try 6th Oct 21, 2016
LICENSE Initial commit Oct 20, 2016
README.md Update README.md Jul 26, 2017
dot-lessmd-sample.js README Oct 23, 2016
package.json 1.2.0 changelog Nov 15, 2016

README.md

Lessmd

Donate npm version Build Status CircleCI Dependency Status Coverage Status dependencies Status devDependencies Status

asciicast

Lessmd - unix terminal document viewer/pager with markdown and piping support.

Why ?

  • It is JavaScript
  • Minimal and fast
  • Unix like pager with navigation
  • Displaying markdown with colors
  • Can translate markdown into colored output
  • Configurable user interface
  • Support files and pipes
  • With livereload (watching the file)
  • Markdown color theming support

Usage

Pager mode:

  lessmd README.md

Shortcuts:

  • q or ctrl+c exit

Piping with another programs:

  lessmd < README.md

Saving output into file for some prompt , motd, issue file.

 echo "# welcome\n * do not touch anything \n * just press Ctrl+D" \
 | lessmd | tee /etc/motd

pipe example

Installation

  npm install -g lessmd

Configuration

Lessmd looks for user settings inside of the home directory .lessmd.js.

Example of the .lessmd.js:

module.exports = {
  colors : {    /// markdown theming colors
    text : ,    
    lang : ,
    heading : ,
    code : ,
    quote : ,
    em : ,
    codespan : ,
    strong : ,
    html : ,
    del : ,
    link : ,
    hr : ,
    listitem :,
  },
  theme : {
    draw : false       // disable any ui (header and footer bars)
    text : '',         // text style
    strong : ''        // bold text style 
  },
  headerfn : function() { return 'header'; }, // custom header fn,
  footerfn : function() { return 'footer'; }  // custom footer fn
};

ChangeLog

1.2.0

  • Bug with long slices

1.1.0 - 2016-11-15

  • Html options for marked (sanityze, smartypants)
  • h,j,k,l bindings
  • Smaller chunks colorization for view mode

1.0.1 - 2016-11-03

  • Added original less keybindings

License

MIT (c) Svetlana Linuxenko