Git Product home page Git Product logo

vim-qmdown's Introduction

qmdown (Quick Markdown)

In one sentence: Quickly render, view and sync up markdown from vim.

I like using markdown when writing. And I do that in Vim. I wanted a way to quickly see the html results of my markdown. I also wanted to publish them to my remote server for sharing. This simple vim plugin implements that.

The conversion is done by a python script, you need python for this to work and markdown2 has to be installed:

$ pip install markdown2

This plugin fires up a shell command that runs the current markdown against the python script that converts to html. The command would be run using Dispatch if available otherwise execute will be used (synchronously).

TODO:

  • detect system and open accordingly

Install

Assuming you are using pathoghen and vundle add this to your .vimrc:

Bundle 'drio/vim-qmdown

Usage

Map some keys to fire up the different entry points to the plugin:

To generate html:

nnoremap <leader>mh :call QMD_main('compile')<CR>

To generate html and open in the current browser (osx):

nnoremap <leader>mo :call QMD_main('open')<CR>

To transfer the generated html to a remote server:

nnoremap <leader>mr :call QMD_main('rsync', 'apu:public_html/markdown')<CR>

For this last one, the second parameter is an ssh url that contains the name of the hosts and the remote directory.

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.