-
-
Notifications
You must be signed in to change notification settings - Fork 285
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃摑 Add Ctr+M shortcut for toggling Markdown mode #390
Conversation
Woa it even keeps the cursor position! Fantastic! |
About the keyboard shortcut - VS Code has a semi-undocumented notebook mode, and I want Pluto to use the same default keyboard shortcuts wherever possible. Do they have one? Otherwise |
Thanks! The keyboard shortcut in VS Code is just "M" when you're selecting the cell in command mode. |
Awesome, thanks Eric! It will be released in today's update :) What do you want to work on next? I'm always happy to have a video call if you want to discuss open issues/different approaches/future ideas/the weather: fonsvdplas@gmail.com |
Amazing! In terms of low-hanging fruit, I wish there was a way to copy/paste cells, and I also wish there was a simpler way to run Pluto from the terminal, like a Anyway, great stuff! It was super easy to set up the dev environment, will definitely send another PR if I find something in the future... (using Pluto for a course this semester because I hate Mathematica 馃槄). |
Good to hear! Look forward to hear more from you! The Pluto CLI exists 馃槉 - https://github.com/fonsp/PlutoUtils.jl |
Copying + pasting cells would be great! I hope you discovered the cell selection feature? I assume you did, coming from Mathematica :) It needs to work among different notebooks! And if possible, different notebooks from different sessions (e.g. one on binder, one running locally). Maybe you could think about the contents of the clipboard? Some options:
Another thing: for this you would want to place a superbig text cursor after a cell or between two cells, before you hit Ctrl+V. I think this could be really cool, if you also allow text input to create a new cell. |
Let me make that a new issue |
Thanks for adding this nice feature. I'll note that on a Mac, Cmd+M by default minimizes the current window. To get your feature to work, I had to reassign the Minimize action to a different key (see https://apple.stackexchange.com/questions/115562/how-do-i-disable-the-minimize-command-m-shortcut-in-mavericks). Reassigning is fine with me, as I sometimes hit Cmd+M by mistake ... the minimizing window can be somewhat jarring. Now that's no longer a problem and I can use your feature! |
@lyon-fnal As a mac user, can you suggest a solution? |
Yes - I did in my previous post - sorry that wasn't clear. One can reassign the Minimize function to a different key (e.g. not Cmd+M). See https://apple.stackexchange.com/questions/115562/how-do-i-disable-the-minimize-command-m-shortcut-in-mavericks (works for Catalina) for instructions. |
@lyon-fnal I also use a Macbook Pro and haven't experienced this being an issue when I was developing. What browser are you using? Cmd+M does indeed map to "minimize" for me, but it's not doing that when my cursor is in the CodeMirror editor. |
It does that for me too on Safari. |
Okay, I don't have a good fix for this unfortunately due to some limitations of CodeMirror's API. The best solution I could find is to add a hack when I'll send in a PR anyway, since it seems like Ctrl-M on an empty cell is a fairly common case... |
Hey there, thanks for making this awesome project! This notebook server has been really useful to me.
One thing I noticed is that it gets repetitive to keep typing
md"
every time I want to start a Markdown block. This PR aims to try to make this easier by adding a keyboard shortcut to do the same. Right now I picked Ctrl+M/Cmd+M, but feel free to change this if you prefer.Hope this aligns with the direction you're taking the project!
Changes
GIF Demo