Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide makeprg by default? #62

Open
anntzer opened this issue Mar 22, 2021 · 0 comments
Open

Provide makeprg by default? #62

anntzer opened this issue Mar 22, 2021 · 0 comments

Comments

@anntzer
Copy link
Contributor

anntzer commented Mar 22, 2021

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...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant