-
Notifications
You must be signed in to change notification settings - Fork 391
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
Side-by-side editing of notebook and markdown in JupyterLab #172
Comments
Is this the same as #86 ? |
Hello @gnestor , thanks for your feedback. Well I just started learning Javascript (the language used for coding JupyterLab extensions), so I think it would not be reasonable for me to plan offering a complex extension anytime soon. Yet... I think what you ask for is already available! Once the two documents are open, edit one of them, save it (Ctrl+S) and simply refresh Jupyter (Ctrl+R). I was surprised to see that even the positions in the documents are preserved in the operation... |
Ok, when I get some time I will give this a shot. I'm imagining the UX being very similar to the Markdown Preview extension: right-click a notebook, open as Markdown (or Python, R, etc.), and as the notebook or markdown file changes, it will use jupytext to update the other (without requiring the page to be refreshed). In order to use jupytext, I believe that the notebook will need to be paired, so the extension can take care of that. |
Great! I'll be happy to follow. Actually, maybe there could be a simple implementation for this - when we observe that one document is saved, we automatically refresh the views on the other paired files. In the long term, we could consider implementing Jupytext in javascript and use that to maintain the two documents up-to-date with each other, without even needing to save them. Such a javascript implementation would also be useful in other contexts like Hydrogen for Atom, or VScode (#143) |
this would be awesome <3 |
Like others, I wanted this exact same thing. My goal workflow was:
I found that this goal can be 95% achieved with existing Atom packages and a |
Well done! Thanks @nathancarter for sharing this. Recently I've been thinking if and how Jupytext should execute the notebook. Your use case is interesting... Maybe you would you like Jupytext to watch the |
Actually, the fact that it was just a 95% solution bothered me, so here's a better one: I'll also take a look at #231. |
Hi @nathancarter , that's great, thanks again for sharing! I am not aware of any other alternative for Markdown notebooks (other than RStudio - did you gave a try to Rmd notebooks in Python?). Still there are a series of IDE that have adopted the idea of notebooks as scripts. Have you seen them? Are there any idea there that you would like to consider for your plugin?
|
I did know that knitr supports many languages besides just R, including Python and Julia. So in some sense, if your needs are limited to those three, then the mature and excellent RStudio solution is almost certainly the best option. The other solutions that you mentioned, however, are of a different ilk. They all treat the notebook file ( I really like the fact that writing a These are all the reasons I like things like |
Hi! Great work on jupytext! I'm wondering if it's possible or how difficult it would be to implement the following for JupyterLab:
I'm imagining something similar to JupyterLab's Markdown Preview extension, but instead of rendering markdown we're using jupytext to update the notebook when the markdown changes or update the markdown when the notebook changes.
The text was updated successfully, but these errors were encountered: