-
-
Notifications
You must be signed in to change notification settings - Fork 294
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
Keyboard only use #65
Comments
Same shortcuts as VS Code wherever possible. |
One of the nice things about Jupyter imho is the ability to switch between command and cell mode by doing Esc/Enter, and then simple shortcuts for creating/deleting cells, moving cells etc in command mode. Would it be an option to have this in Pluto? |
Hey! I am very reluctant to add a second editor mode 😬. Part of Pluto's UI design is having all primary functionality (edit, run, add, delete, move and hide) directly available, at the position on your screen where it takes effect. |
Now if I read this correctly I currently can't move between cells using the keyboard (but that will be added as per the list above) and I can't add a new cell without re-running an existing cell or re-order cells with a keyboard shortcut? |
No worries! I added the last one to the TODO list. 👍 |
Rereading the list above I think the only thing missing is the ability to create a new cell without running anything (although maybe that's actually pointless as |
Added |
Also - can someone with a Mac keyboard explain when shortcuts should use Command and when they should use Control? Should any existing shortcuts be different? |
It would be really cool to support Jupyter-like single-letter keybindings (inspired by Vim), like @fonsp on a Mac, it's preferred to use CTRL shortcuts for nested apps since CMD shortcuts are usually system or application specific (in this case the application is the browser). Otherwise you need to find the subset of available keys for all kinds of browsers, which might be difficult. Another reason why modal editing would be nice. It's usually done by two trigger keys (ESC to enter command mode and Edit: oh, I just read that you don't like modal editors. 😞 I read https://dl.acm.org/doi/pdf/10.1145/2212877.2212896 but I completely disagree. It's a matter of taste, I only use modal editing including my window manager, browser, mail, jupyter etc. 😉 nevertheless, I might invest time to make a PR in future if you consider to merge such a feature implemented by others? |
Thanks for the clarification about CMD! I won't implement a modal editor right now (even if it is from a PR), but you can move your comment to #56. Once there is the possibility to customise shortcuts, we can also work on implementing an optional vim mode. |
Pluto seems awesome. Most exciting development since Hydrogen / VScode Python Interactive. Some humble suggestions on keyboard shortcuts. keymaps that are out of spec
unintuitive
suggested higher-priority keymaps from VScodeVScode has hundreds of default keybindings, so IMHO still worth suggesting which ones to prioritize. Although maybe better to prioritize integration with VScode. Just user suggestions from my armchair over here, seems like you all already have great intuition of what is most impactful to work on :).
|
@tbenst I've moved some of my comments to the first post to make them harder to miss - #65 (comment). Could you consider editing your comment? |
thx for the comment. revised! I hope it's more helpful now |
Thanks. About page up and page down - I appreciate your concern, but have you tried it out? It still works for scrolling the page, but when the focus is inside a cell editor, it switches between cells. I like that you mention preserving the original action of that key, I also think that this is important. Normally (on the web), when you focus on a textbox (like the one i am typing in), page up/down are limited to within that box, and don't scroll the page. Because Pluto cells are often quite small, this function is of little use, so I thought that it is fine to hijack these keys and assign them to something more useful. The new behavior of the page keys is actually closer to the static page semantic: you use it to scroll up and down the page in jumps. |
Oh I didn't realize that! I had thought that since there was no modal editing that shortcuts would always act the same way. Some visual accent might be nice (eg how jupyter turns edited cell blue) might be nice UX to highlight that key may act differently but don't want to diverge from this Issue too much. The current pgup/pgdow behavior makes sense in that case. |
For keyboard-only use, it would be nice if, when deleting a cell, the focus automatically shifted to the next/previous cell, so you didn't have to click it. |
No delete key on Mac; shift-backspace doesn't work to delete a cell. What does |
I also don't have PgUp and PgDown and don't seem to be able to move between cells without clicking? |
What about a shortcut for showing / hiding the cell's input block? |
|
just want to say Jupyter after so many years never have tier 1 support Vim-like key binding, this is a huge deal for people who forgot how to use mouse. We probably don't need full vim experience, as long as the movement and basic remap (map |
While we're wishing, a keyboard shortcut to toggle the state of Live docs would be nice |
+100 for Keyboard-only use of Pluto. But instead of posting my personal favourite keyboard combinations I really think that apart from figuring out reasonable defaults, it is much more important to be able to customise keyboard combinations (#56). People very much have different preferences and find different things "natural", often depending on their favourite IDE, their OS, and whatnot. Pluto is not going to change this and good defaults only take you so far. (BTW, I'm on Mac and disagree with the general statement that "on a Mac, it's preferred to use CTRL shortcuts for nested apps". I use CMD+... in Jupyter all the time for in-cell operations like drop the line etc. Things like CMD+Q are a problem, obviously, but CMD+D or CMD+K etc. are not.) |
I fully agree with customisations and I think this also holds for modal editing, which of course cannot be solved by just allowing full customisation but requires a mode toggle which totally changes the behaviour. Regarding the CTRL-thing under macOS, at least this is what I observed and I occasionally have clashes with keyboard shortcuts which are defined e.g. globally (mostly involving CMD). Anyways, I use modal editing wherever I can (also in Jupyter) so I cannot tell how well these things work. I had problem several years ago but never switched back when modality was introduced 😆 |
Would it be possible to add the following shortcuts? a) split a cell at point (Ctrl-Shift + "-" in Jupyter) |
b), c) and d) would require "modal editing" which is not accepted even if it's from a PR, at least this is the last comment about it (from a year ago) from the main author: #65 (comment) |
Hi! Pluto is awesome, 100% agree with @crstnbr, keybinding modification is very important, I have about 30 I use in VS Code with Jupyter and it increases my productivity dramatically, things like splitting cells and merging are all on custom keybinds. A json style keybind preference that I can version control would be amazing. Note that I can do this by modifying keybinds with something like Tridactyl which I might explore, can't make the switch to a non modal environment unfortunately. |
I love Pluto, but I feel like a limb is missing when I don't have vim keybindings. I don't think this sentiment is uncommon. I feel like there is a way to use neovim backend (like with nvim plugin in VSCode), but allows you to move seamlessly between cells (pressing j on the bottom of cell 1 should move you to top of cell 2). Nobody uses enter and shift enter in normal mode, so you could keep those bindings, too. If you wanted to, you could go the spacemacs route and add a whole load of bindings with leader key (space) there, too. |
Is there a toggle for "begin end" in multiline cells? |
I'd suggest a shortcut to toggle Show/hide code |
Can we wrap a highlighted text in quotes? |
Using Safari on MacOS (Monterey) the combination Cmd+/ (for comment/uncomment) cell has no effect at all. |
|
Same problem here on macOS/Safari. Outside a cell Option+Up and Option+Down has no effect at all. Inside a cell it moves the current line up or down. |
I second LinusSch. I'd like to automatically hide my markdown cell when I hit |
Cmd+Q closes the browser instead of interrupting the notebook. Maybe it should be Ctrl+Q. I know that it's something that has been said above but it happens to me from time to time. I want to stop the notebook and instead I close the browser. |
EDIT: Is there a way to cut only a selected text? the only way I found to do it is using right-click mouse and select Cut, then Ctrl+V to paste. |
Hi @pablosaa, sorry, what are you trying to do exactly? Ctrl+C looks to copy the selected text in the cell, while Ctrl+X cuts, on my end at least |
Hi, not sure if it conflicts with your general policy regarding shortcuts but as an R user I would really appreciate a shortcut for the pipe operator (e.g. ctrl + shift + m as in R) |
Hi, I'm a bit confused, why do these two default shortcuts are designed to behave in the opposite way as in In |
I'd suggest a short-cuts to hide or unhide code for all Markdown cells. That would be useful when proofreading notebooks. |
Is there a shortcut for adding a cell above or below a given cell? |
I use RISE with Julia for teaching and make heavy use of some bindings/features that appear to be lacking in Pluto. This comment extends beyond simply keybindings, but having so little bound was surprising when experimenting with Pluto.
|
@jedbrown @fieldofnodes @RichardScharf Besides this, I've added a (very) basic tool for creating or redefining custom keyboard shortcuts. This is a short tutorial for how to implement these features into your own Pluto notebooks. Feedback is appreciated. |
@lucio-cornejo awesome work! thanks!! I like the idea of having Pluto save/load the file and editing where we feel comfortable. Which got me to thinking.. If I were to do something like this and edit the notebook in Neovim where I am most comfortable, how would I go about adding a new cell? Would be a neat thing if the Pluto API had something we could ping to tell it to create a new cell and it could either take in a line number to insert the cell OR it would just return the static cell ID so that we could paste into our file. I dunno just a thought I had watching the video.. |
I've just added such a feature via pressing |
Why after shift+enter focus not go to the next cell? |
Has anyone managed to show/hide a cell with keyboard only with a German keyboard layout?
The information from the help menu (
|
F1
orCtrl+Shift+?
Shift+Enter
Ctrl+Enter
Ctrl+S
Tab
Backspace
orDelete
PageUp
/Fn+Up
andPageDown
/Fn+Down
Ctrl+Q
Ctrl+P
Ctrl+Z
but it's trickyCtrl+K
Alt+Up
andAlt+Down
Ctrl/Cmd+A
, thenAlt+Up
andAlt+Down
Ctrl+Shift+S
Ctrl+/
orCmd+/
begin ... end
let ... end
Ctrl/Cmd+C
andCtrl/Cmd+V
Ctrl
+primary clickI'm interested to hear suggestions on which Actions still need a shortcut (I will add them to the list), and which keys to use in case we have not yet decided upon one. If a key has already been decided, you will have to wait for #56 until you can use your alternative keybinding - it's not productive to post them here.
We will use the same shortcuts as the VS Code default keybindings wherever possible - please consider this in your suggestion.
The text was updated successfully, but these errors were encountered: