jupytext.vim
jupytext.vim copied to clipboard
Added support to specify output format for plain text conversion.
A new variable g:jupytext_style can be used to specify the format for the notebook to plain text conversion. For example:
let g:jupytext_style='hydrogen'
to always use the hydrogen format when generating scripts.
If left unspecified it is up to jupytext to decide on the default, in line with the current behaviour.
This is for the benefit of users of other plugins and tools that depend on a specific output format other than the default.
I don't think this is necessary: you can just set jupytext_fmt to something like py:hydrogen, no?
Setting jupytext_fmt to py:hydrogen results in the following error:
Error detected while processing function <SNR>41_read_from_ipynb:
line 5:
Invalid jupytext_fmt: py:hydrogen
This happens because py:hydrogen is not in s:jupytext_extension_map.
Would you be open to a small refactor that decouples the notebook language from the output format?
I’ll think a bit about what I think is the best solution for this. I may very well still merge your original PR.
@goerz what's your current view regarding the PR?