Skip to content
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

Vim keymaps to take precedence navigating entire notebook document #53

Open
gtmaskall opened this issue Sep 16, 2021 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@gtmaskall
Copy link

Is your feature request related to a problem? Please describe.

I'm always frustrated with vim keymappings in more integrated environments (e.g. jupyter notebook/lab) that the navigation feels like a clunky hybrid between vim and the environment's mappings.

Describe the solution you'd like

Perhaps "Treat jupyter notebook as a single document for vim" is a better title of this proposal? For example, hitting * on a word in a cell selects that word for searching/highlighting, n then moves to subsequent occurrences of . In vim command mode in a cell 1G moves to the first line in the cell and G to the last (and nG to line n), but after :q to quit vim mode in a cell (which I think I quite like but emphasizes a notebook as a bunch of separate "code files") that behaviour doesn't apply to navigating the document as a whole and you fall back on the "close" relatives 'gg' and 'G' for first and last cell (and their more uncanny valley friends that keep seeing me hiding code cells).

I think what I'm basically proposing is that the vim keymap takes priority(?), except for maybe if you explicitly target the "jupyter notebook cell layer" (e.g. via the left gutter?) for executing jupyter key shortcuts.

Describe alternatives you've considered

I'm not aware of equivalents. I'm sure this is a harder problem than I can imagine, which is why no one else does it. The vim keymap in jupyter notebooks didn't, vscode's vim keymap doesn't do it... But we seem to keep being limited to "being in vim mode" in isolated little puddles of code cells. It would be nice to have a smoother vim experience where I can zip about my notebook faster using more vim commands.

Additional context

I'm totally up for an education on why this is such a hard problem! ;-)
Thanks for reading this and this extension is definitely something I'm going to make an effort to get used to.

@gtmaskall gtmaskall added the enhancement New feature or request label Sep 16, 2021
@ianhi ianhi mentioned this issue Jan 25, 2022
@Shahin-rmz
Copy link

Good idea, actually it is also my suggestion as well,
The problem is the same, but the approach of solution are different. Please take a look at #56 .
Do you have any updates regarding this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants