• Stars
    star
    1,181
  • Rank 39,604 (Top 0.8 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 10 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸ™ preview markdown files

vmd

NPM version build status Downloads Codacy Badge

Preview markdown files in a separate window. Markdown is formatted exactly the same as on GitHub.

Features | Installation | Usage | Examples | Command-line options | Configuration

screenshot

Features

  • GitHub style: The markdown content is rendered as close to the way it's rendered on GitHub as possible.

  • File watching: Local files opened in vmd are watched for changes and the viewer will automatically update when a file has been changed. This makes it ideal for writing documents in your favorite text editor and get a live preview.

  • Standard input: View any markdown text from other programs by piping another program's output in to vmd. Check out the examples for cool use cases.

  • Drag & Drop: Drag files from your file browser or desktop on to a vmd window and render it. Hold the Shift key while dropping to open the file in a new window.

  • Navigation: Navigate within linked sections in a document, open relative links to other documents in the same window or in a new one (shift-click), and always be able to go back in the history. And open links to directories in your file manager and external links in your default browser.

  • Clipboard: Copy links and local file paths to the clipboard, and even copy images in binary format to paste them in to your image editing software.

  • Emoji: :bowtie: Displays emoji, such as :sweat_drops:. Take a look at the Emoji Cheat Sheet for a list of available emoji.

  • Checklists: Renders GitHub-style checklists.

     - [ ] List item 1
     - [x] List item 2
    
    • List item 1
    • List item 2
  • Search in page: Search within your markdown file and scroll to the results. Select "Edit -> Find" from the menu or hit Ctrl+F (or Cmd+F on OS X).

  • Customization: Select different themes and provide your own styles to make vmd look the way you want. Take a look at the Options for an overview of available customization options.

  • Front Matter: Renders Front Matter in YAML and, if enabled, in TOML and JSON so you can preview your Jekyll and Hugo content in vmd. See some examples.

Installation

$ npm install -g vmd

Usage

vmd [FILE] [OPTIONS]

If no FILE is provided it will try to read from standard input, or automatically look for "README.md" if in a TTY.

Examples

Read a file from disk:

$ vmd DOCUMENT.md

When no path to a document is supplied, "README.md" will be opened by default:

$ vmd

When a path to a directory is supplied, "directory/README.md" will be opened by default:

$ vmd node_modules/electron # opens node_modules/electron/README.md

It reads from stdin so you can pipe markdown text in to it:

$ cat README.md | vmd

For example, you can see the readme for browserify like so:

$ npm view browserify readme | vmd

Or from a GitHub project:

$ gh-rtfm substack/node-browserify | vmd

Options

  • -v, --version: Display the version number.

  • --versions: Display version numbers of different internal components such as Electron.

  • -h, --help: Display usage instructions.

  • -d, --devtools: Open with the developer tools open.

  • -z, --zoom=NUM: Set a zoom factor to make the content larger or smaller. For example --zoom=1.25

  • --document=FILENAME: vmd will look for "README.md" by default if no file path has been specified. This can be changed to something else.

  • --list-highlight-themes: Display a list of available syntax highlighting themes.

  • --styles-main=FILE: Provide a custom CSS file to display the content.

  • --styles-extra=FILE: Provide a custom CSS file to do additional styling. For example to override some CSS properties fr the default style.

  • --highlight-theme=NAME: Use a different syntax highlighting theme for code blocks. Run vmd --list-highlight-themes to get a list of available themes.

  • --highlight-stylesheet=FILE: Provide a custom CSS file for syntax highlighting in code blocks.

  • --window-preservestate=false: By default vmd preserves the window state for the next session, set this option to false to disable this.

  • --window-autohidemenubar=true: By default vmd always shows the menu bar. To hide it set this flag to true. The menu visibility can be toggled using the Alt key. Linux and Windows only.

  • --frontmatter-formats=FORMATS: A comma-separated list of Front Matter formats. By default only the YAML format is enabled. Supported formats are YAML, TOML and JSON.

  • --frontmatter-renderer=RENDERER: Specify how to render Front Matter. Can be β€œtable”, β€œcode” or β€œnone”. If β€œnone” is specified the Front Matter will not be rendered at all. Default is β€œtable”.

Configuration

All Options that contain a value can be persisted in configuration file in INI, YAML or JSON format. The configuration file can be in any of the following locations: $HOME/.vmdrc, $HOME/.vmd/config, $HOME/.config/vmd, $HOME/.config/vmd/config, /etc/vmdrc, or a custom location provided using the --config=FILE option.

If you wish to change some of the default settings create a config file called .vmdrc in your home directory or in ~/.config/vmd.

Here's a sample config file:

zoom = 1.2
highlight.theme = monokai
styles.extra = /my/custom/vmd/style-fixes.css

Options provided as command-line arguments will always have precedence over the values in the configuration file. So --zoom=1.5 will set the zoom factor to 1.5 regardless of what's in the config file.

Authors

Max Kueng, Yoshua Wuyts and contributors.

License

MIT

More Repositories

1

rust-for-js-peeps

Know JS, want to try Rust, but not sure where to start? This is for you!
1,262
star
2

notes

notes on things
839
star
3

tiny-guide-to-non-fancy-node

A tiny guide to non fancy, high-value Node.js things
735
star
4

futures-concurrency

Structured concurrency operations for async Rust
Rust
403
star
5

github-standard-labels

Create a standard set of issue labels for a GitHub project
JavaScript
241
star
6

sheet-router

fast, modular client-side router
JavaScript
223
star
7

pretty-hot-ranking-algorithm

Algorithm that measures how relevant a given data set is, kinda like Reddit
JavaScript
204
star
8

markdown-to-medium

Publish markdown to medium
JavaScript
198
star
9

html

Type-safe HTML support for Rust
HTML
186
star
10

barracks

🚞 action dispatcher for unidirectional data flows
JavaScript
177
star
11

virtual-html

🌴 HTML β†’ virtual-dom
JavaScript
174
star
12

es2020

Because in hindsight we don't need most of ES6
JavaScript
126
star
13

dotfiles-linux-2019

Linux desktop config
Shell
126
star
14

miow

A zero-overhead Windows I/O library, focusing on IOCP
Rust
111
star
15

fsm-event

🎰 stateful finite state machine
JavaScript
91
star
16

changelog

Changelog generator
Rust
85
star
17

vel

minimal virtual-dom library
JavaScript
84
star
18

fd-lock

Advisory cross-platform file locks using file descriptors
Rust
69
star
19

exponential-backoff

Exponential backoff generator with jitter.
Rust
66
star
20

memdb

Thread-safe in-memory key-value store.
Rust
64
star
21

previewify

Preview tool for applications
JavaScript
62
star
22

server-router

Server router
JavaScript
61
star
23

speaking

Slides, proposals and more for talks I give
JavaScript
57
star
24

electron-collection

Set of helper modules to build Electron applications
JavaScript
57
star
25

cache-element

Cache an HTML element that's used in DOM diffing algorithms
JavaScript
56
star
26

mdjson

πŸ“– Transform markdown to an object where headings are keys
JavaScript
55
star
27

context-attribute

Set the error context using doc comments
Rust
53
star
28

copy-template-dir

High throughput template dir writes
JavaScript
52
star
29

newspeak

πŸ’¬ natural language localization
JavaScript
51
star
30

assert-snapshot

Snapshot UI testing for tape tests
JavaScript
50
star
31

polite-element

Politely waits to render an element until the browser has spare time
JavaScript
45
star
32

choo-persist

Synchronize choo state with indexedDB
JavaScript
44
star
33

power-warn

Warn on low power level.
Rust
42
star
34

base-elements

A selection of configurable native DOM UI elements
JavaScript
41
star
35

nanostack

Small middleware stack library
JavaScript
40
star
36

millennial-js

πŸ’
CSS
39
star
37

on-intersect

Call back when an element intersects with another
JavaScript
35
star
38

github-templates

Generate .github templates
Rust
35
star
39

microcomponent

Smol event based component library
JavaScript
35
star
40

observe-resize

Trigger a callback when an element is resized
JavaScript
33
star
41

hypertorrent

Stream a torrent into a hyperdrive
JavaScript
31
star
42

npm-install-package

Install an npm package
JavaScript
30
star
43

async-iterator

An async version of iterator
Rust
30
star
44

rust-lib-template

Rust lib template repository
Rust
29
star
45

heckcheck

A heckin small test generator
Rust
29
star
46

maxstache

Minimalist mustache template replacement
JavaScript
28
star
47

normcore

No-config distributed streams using hypercore
JavaScript
28
star
48

winstall

Install all dependencies required by a project
JavaScript
27
star
49

chic

Pretty parser error reporting.
Rust
27
star
50

validate-formdata

Data structure for validating form data
JavaScript
25
star
51

playground-tide-mongodb

Example using tide + mongodb
Rust
24
star
52

playground-nanoframework

Building tiny frameworks yo
JavaScript
24
star
53

hyperlapse

Distributed process manager
JavaScript
23
star
54

promise-each

Call a function for each value in an array and return a Promise
JavaScript
23
star
55

omnom

Streaming parser extensions for BufRead
Rust
23
star
56

virtual-widget

Create a virtual-dom widget
JavaScript
22
star
57

tasky

fluent async task spawning experiments
Rust
22
star
58

debug-to-json

πŸ”§ Convert debug logs to JSON
JavaScript
22
star
59

http-sse

Create server-sent-events
JavaScript
21
star
60

initialize

Generate a fresh package
JavaScript
21
star
61

kv-log-macro

Log macro for logs kv-unstable backend
Rust
21
star
62

github-changelist

Generate a list of merged PRs since the last release
Rust
21
star
63

assert-html

Assert two HTML strings are equal
JavaScript
21
star
64

cargo-task-wasm

A sandboxed local task runner for Rust
Rust
21
star
65

workshop-distributed-patterns

Learn how to create robust multi-server applications in Node
HTML
20
star
66

crossgen

Cross compilation template generator
Rust
20
star
67

electron-crash-report-service

Aggregate crash reports for Electron apps
JavaScript
19
star
68

pid-lite

A small PID controller library
Rust
19
star
69

playground-virtual-app

playground with some virtual-* tech
JavaScript
19
star
70

virtual-raf

Create a RAF loop for virtual-dom
JavaScript
19
star
71

promise-map

Map over an array and return a Promise.
JavaScript
19
star
72

how

how(1) - learn how to do anything
Rust
18
star
73

secure-password

Safe password hashing.
Rust
18
star
74

futures-time

async time combinators
Rust
18
star
75

microanalytics

Capture analytics events in the browser
JavaScript
18
star
76

noop2

No operation as a moduleβ„’
Makefile
18
star
77

github-to-hypercore

Stream a github event feed into a hypercore
JavaScript
17
star
78

hyperreduce

Distributed reduce on top of hypercore
JavaScript
17
star
79

microframe

Smol requestAnimationFrame package
JavaScript
17
star
80

github_auth

Authenticate with GitHub from the command line.
Rust
17
star
81

virtual-streamgraph

Create a virtual-dom streamgraph
JavaScript
16
star
82

rust-cli

rust(1) cli prototype
Rust
16
star
83

extract-html-class

Extract all classes from html
JavaScript
16
star
84

templates

Template files used to generate things
Shell
16
star
85

from2-string

Create a stream from a string. Sugary wrapper around from2
JavaScript
16
star
86

fin

Simple finance visualizations
JavaScript
16
star
87

async-collection

Collection of async functions
JavaScript
15
star
88

document-ready

Document ready listener for browsers
Rust
15
star
89

buffer-graph

Resolve a dependency graph for buffer creation
JavaScript
15
star
90

choo-pull

Wrap handlers to use pull-stream in a choo plugin
JavaScript
15
star
91

json-stream-to-object

Parse a JSON stream into an object
JavaScript
15
star
92

promise-reduce

Reduce an array and return a Promise
JavaScript
14
star
93

formdata-to-object

Convert a formData object or form DOM node to a KV object
JavaScript
14
star
94

ergonomic-viewport

Get the current ergonomic viewport
JavaScript
14
star
95

choo-model

Experimental state management lib for choo
JavaScript
14
star
96

shared-component

Share a component instance inside a window context
JavaScript
13
star
97

multipart-read-stream

Read a multipart stream over HTTP
JavaScript
13
star
98

nanopubsub

Tiny message bus
JavaScript
13
star
99

server-render

HTML server rendering middleware
JavaScript
13
star
100

const-combinations

Experiment to get k-combinations working as a const fn
Rust
13
star