Pluto.jl icon indicating copy to clipboard operation
Pluto.jl copied to clipboard

Set keyboard shortcuts for adding a cell below or above selected cell

Open dgsob opened this issue 3 years ago • 5 comments

The default keys for this in Jupyter's command mode are "A" and "B" for cells above and below. Here I set it to be Alt+A and Alt+B (as in #65 the shortcut is not specified).

btw before/after - above/below is a little unfortunate

dgsob avatar Sep 16 '22 15:09 dgsob

Try this Pull Request!

Open Julia and type:

julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/damiansobecki/Pluto.jl", rev="main")
julia> using Pluto

github-actions[bot] avatar Sep 16 '22 15:09 github-actions[bot]

What are the keyboard shortcuts for VS Code? We try to match the VS Code shortcuts, not necessarily Jupyter.

fonsp avatar Sep 20 '22 11:09 fonsp

We try to match the VS Code shortcuts, not necessarily Jupyter.

I know but adding cells seems to be notebook specific action, I'm not aware of any VS Code notebooks. Do you mean this? https://code.visualstudio.com/docs/datascience/jupyter-notebooks If so, the shortcuts are the same as in Jupyter's notebook. If this is not what you meant, sorry, I'm not familiar with VS Code.

dgsob avatar Sep 21 '22 12:09 dgsob

Exactly! VS Code has a notebook UI, the shortcuts are different.

fonsp avatar Sep 21 '22 12:09 fonsp

OK, nice. I meant this two specific shortcuts: "When a code cell is in command mode, the A key can be used to add a cell above and the B can be used to add a cell below the selected cell." That's from their doc I linked.

dgsob avatar Sep 21 '22 12:09 dgsob

From a previous jupyterlab user this is the first thing you would notice when switching to Pluto. Is there anything blocking this?

xgdgsc avatar Nov 07 '22 03:11 xgdgsc

VSCode uses ctrl+; A and ctrl+; B. I guess they use ctrl+; as a "enter command mode" thingy.

dralletje avatar Nov 15 '22 11:11 dralletje

Right, and we don't want to have a "command mode" or "cell mode" for Pluto shortcuts. @dralletje is working on a way to create new cells with keyboard interactions only, by treating 3 newlines as a cell break. I think we should go with that instead!

fonsp avatar Nov 15 '22 11:11 fonsp