Skip to content

Provide makeprg by default? #62

@anntzer

Description

@anntzer

Something like

setlocal makeprg=python\ -c\"import\ sys,subprocess,tempfile,webbrowser;tmp=tempfile.TemporaryDirectory();output=tmp.name+'/'+sys.argv[2]+'.html';subprocess.run(['rst2html5.py',sys.argv[1],output]);webbrowser.open(output,2)\"\ %\ %:t:r

allows one to type :make and get the rendered HTML output in a webbrowser. I think the default errorformat even works for syntax errors :)
(The lack of spaces in the python script is a bit ugly, but escaping each and every space with a backslash doesn't really improve things...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions