goerz / jupytext.vim

Vim plugin for editing Jupyter ipynb files via jupytext

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create a blank ipynb notebook from vim-templates

Infinage opened this issue · comments

Trying to load a blank ipynb notebook throws an error since it is not of a valid JSON format. Trying to load a template on 'BufNewFile' gets overwritten by jupytext.

" Create .ipynb with skeleton
autocmd BufNewFile *.ipynb 0r ~/.vim/skeletons/skeleton.ipynb

One alternate way that I tried to explore is to disable the auto conversion of ipynb to allow vim templates to load, saving and reloading with jupytext. Disabling auto conversion can be done by unsetting let g:jupytext_enable = 1 but being someone relatively new to vim, I am not sure on how to manually call the jupytext extension to do its thing.

Any help would be appreciated. Thanks in advance!

Opening a blank notebook is not something I'd support. This plugin is for viewing / editing existing notebooks in vim. It's not for creating new notebooks file from scratch (which I'm guessing is the underlying motivation).

Yup, thanks for the awesome plugin - the viewing works great but I would like to know of alternatives that I could explore to create new notebook files. Could you point me in a direction that would work?