-
Notifications
You must be signed in to change notification settings - Fork 44
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
Navigating above the first cell in vim mode loses focus, if the first cell is a Markdown cell #52
Comments
I wonder if this is actually an issue in jupyterlab (or perhaps intended behavior). We rely on the Notebook function Line 386 in 3f1315b
So unless there is some other API for this that may require an upstream change. I see also that this is different than the arrow key behavior so this is definitely a bug.
There is currently no remapping of the jupyter vim bindings (although there really ought to be) but for the vim editing bindings you may also want to check out https://github.com/ianhi/jupyterlab-vimrc#jupyterlab-vimrc so you can add some of the keybinds from the past 30 years :)
I've also found this to be unintuitive but at this point it's probably not something we should change as so many people have learned these. But it definitely should be configurable (see above comment) |
Interestingly the jupyterlab api seems to be a no-op if the first cell is selected, so I'm not sure why it is in fact doing things 🤔 |
oh actually I think I see why. It's because these are conflicting goals:
|
This seems to be caused by rendering of the Markdown cell when the user attempts to navigate away from the cell and the fact that this plugin can currently only navigate inputs. The action therefore causes the active input to be de-focused, while the selection has nowhere to go. |
@firai you should be able to rename issues now, let me know if this is not the case. |
I've the same issue, very annoying, once you lose focus you've to select a cell by mouse manually. One work around so far is the shortcut to selec the first or last cell to get the focus back at least. |
Description
Navigating up through cells using 'k', you scroll through code cells line by line and as you pass through markdown cells they're displayed as markdown and then rendered again upon exit. Continuing upwards "above" the first cell loses keyboard focus for the notebook, forcing you to click back on the notebook area with the mouse.
Reproduce
Expected behavior
The 'j' key should continue to work as before, so although 'k' has nowhere further to go, you're at "the top" of the file and 'j' should still work to go back down.
Context
I don't think anything else is relevant. It's a fresh install from anaconda to jupyterlab_vim version 0.14.5 with Python 3.8.11.
But I would like to add that I think this extension will allow me to migrate from jupyter notebook to jupyter lab.
The keymap summary in the GitHub README is super helpful - thank you.
Of course there are new keymaps to use, and half the point of using a vim keymapping is to use 30 years of muscle memory(!) but the basic navigation seems to make sense and it's definitely something I'll be trying to get familiar with. There are definitely behaviours of it that I'm liking, and that I struggled to find how to do using the jupyter notebook vim keymap.
(I find the ctrl-[1, 2, 3] a little unintuitive, but easy enough to toggle through by trial and error).
The text was updated successfully, but these errors were encountered: