Jump back feature

In some IDE’s I’m able to tilt the mouse wheel left or right to navigate backwards or forward through a history of cursor positions. In Jupyter Lab we can jump to a definition, or jump to a section using the table of contents. I haven’t been able to find a keyboard shortcut to jump back (to where I was before, i.e. before jumping to a definition or section). Does this exist and I missed it?

If you are willing to install GitHub - jupyter-lsp/jupyterlab-lsp: Coding assistance for JupyterLab (code navigation + hover suggestions + linters + autocompletion + rename) using Language Server Protocol it is Ctrl + B

2 Likes

Hi @krassowski, thanks for your response. But Ctrl-B seems to be for jumping to definition. What I’m looking for is jumping back.

I ended up finding this section in the “keyboard Shortcuts” section:

        {
            "command": "lsp:jump-back",
            "selector": ".jp-Notebook .jp-CodeCell",
            "keys": [
                "Ctrl Shift B"
            ]
        },
        {
            "command": "lsp:jump-back",
            "selector": ".jp-FileEditor",
            "keys": [
                "Ctrl Shift B"
            ]
        },

It works for the FileEditor, but does nothing in a notebook. This is starting to look like a bug or a feature that was never implemented. Anything else I should try?

Thanks again!

1 Like

Another problem is that even in the editor, jumping back after following a TOC item does not work. It only seems to work after jumping to definition and then back.

1 Like