neopyter icon indicating copy to clipboard operation
neopyter copied to clipboard

Neovim hangs when inserting text into a synced file

Open aaronmlevy opened this issue 1 year ago • 3 comments
trafficstars

The response on the browser is nearly instant when scrolling in normal mode on neovim. Also, in normal mode, neovim responds nearly instantly.

But when adding text, i.e., in insert mode, neovim hangs. This is true when I use neopyter both in direct mode and in proxy mode.

Perhaps I'm doing something wrong. This plugin would be ideal if I could manage to fix this problem.

aaronmlevy avatar Jul 12 '24 14:07 aaronmlevy

It looks like the issue occurs when I have .ju.py file that contains content before I open neovim.

If the pattern is supposed to be that you edit one file

file.ju.py,

which syncs with another

file.ipynb,

then I find that neovim hangs.

aaronmlevy avatar Jul 12 '24 18:07 aaronmlevy

I have a couple of questions related to syncing:

1). If I have a file a.py that I would like to sync to b.ipynb, is there a way to do it manually without forcing every other .ju.py file to sync? For context, such a command would constitute a workaround to the above issue. Ideally, though, I would like to be able to open a file a.ju.py with content and have it sync to another file, possibly with different content a.ipynb, without hanging Neovim.

2). Assume a.ju.py is synced with a.ipynb. Sometimes, if I accidentally delete something or modify content in Jupyter Lab, a.ipynb no longer reflects the contents of a.ju.py. Is there a way to refresh the sync without breaking things?

Thank you. This is a very cool package.

aaronmlevy avatar Jul 12 '24 22:07 aaronmlevy

Explaination

In normal status, when you open a a.ju.py file, neopyter try to sync with a.ipynb, If a.ipynb which don't exists, it do nothing.

Some tooltips

  • You can run :Neopyter status to check current sync status, e.g. which local .ju.py associated with which one remote .ipynb
  • You can run :Neopyter sync current to force associate current buffer to current openeed ipynb`, but which status will be losted when last open neovim. And which full sync all content with remote notebook

AbaoFromCUG avatar Jul 17 '24 11:07 AbaoFromCUG