luk400 / vim-jukit

Jupyter-Notebook inspired Neovim/Vim Plugin
MIT License
587 stars 23 forks source link

FileNotFound Error when starting an output split #80

Closed ericfm20 closed 1 year ago

ericfm20 commented 1 year ago

After attempting to start an output split, I get a FileNotFound error, stating that the .jukit file cannot be found. The filepath of my document contains a space in a directory name and I noticed that an extra '\' is inserted in the filepath, so the path looks like /.../directory\\ name/.../.jukit.

This issue seems to be caused by the escape() function on line 259 of vim-jukit/autoload/jukit/splits.vim:

let pyfile_ws_sub = substitute(escape(expand('%:p'), ' \'), ' ', '<JUKIT_WS_PH>', 'g')

Removing the function solves the problem:

let pyfile_ws_sub = substitute(expand('%:p'), ' ', '<JUKIT_WS_PH>', 'g')

but I am not sure this is the right solution.

I am on macOS with nvim 0.8.1.

luk400 commented 1 year ago

Thank you for pointing this out! This should now hopefully be fixed, please reinstall the plugin and try again