Multiple cursors: Hold down Option (Mac) or Alt (Windows), then click your mouse and drag up or down. Hit Shift+ Tab three more times to open the docstring in a new pane. Shift+ Tab: View the docstring for a function. You can apply this to multiple lines at once by first selecting those lines. It works even if you have done other work since the deletions!Ĭmd+ / (Mac), Ctrl+ / (Windows): Toggle between commented and uncommented code. You can undo multiple deletions, and each cell will go back to its original position. Instead, open the command palette and search for “Collapse Selected Outputs.” JupyterLab: This shortcut is not available. This is useful when the output is taking up too much of your screen. O: Toggle between hiding and showing the output for selected code cells. JupyterLab: Cmd+Shift+c (Mac), Ctrl+Shift+c (Windows) You can scroll or search through commands, then select an action and hit Enter to run it. These shortcuts are not as well-known, but will help you to become a true power user: Command Mode: Shift+ Enter: Run the selected cell and move to the cell below.Cmd+ Enter (Mac), Ctrl+ Enter (Windows): Run the selected cell.You can also use standard text editor keyboard shortcuts for cut, copy, and paste. Tab: Code completion (when writing code) or indent (at the start of a line).Cmd+ z (Mac), Ctrl+ z (Windows): Undo text edits or deletions.Ctrl+ Shift+ -: Split the current cell at the cursor.You can use dd (meaning d twice) to delete cells, but I just use x instead. JupyterLab: Cmd+s (Mac), Ctrl+s (Windows).x / c / v: Cut ( x), copy ( c), or paste ( v) cells.Shift+ up or Shift+ down: Select multiple cells.m / y: Change the cell type to Markdown ( m) or code ( y).a / b: Create a cell above ( a) or below ( b) the current cell.Here are the keyboard shortcuts you should learn first, because you’ll use these the most: Command Mode: Note: JupyterLab uses a blue border for Edit Mode. In Command Mode, there’s a gray border with a blue bar, whereas in Edit Mode, there’s a blinking cursor and a green border: I’m focusing on Jupyter Notebook in this post, but I’ve made a note of any differences for JupyterLab.īefore we begin, it’s critical that you’re aware of the difference between Command Mode and Edit Mode, since different shortcuts work for each mode. Unlike most applications, Jupyter’s keyboard shortcuts are easy to remember since they often only require a single key.īelow, I’ll cover the 25 most useful keyboard shortcuts (including some hidden gems ) so that you can speed up your workflow today! If you spend a lot of time in Jupyter Notebook, the easiest way to increase your productivity is by using the built-in keyboard shortcuts. I thought it might be of interest to some of you on the forum, so I copied the post below.įly through Jupyter with keyboard shortcuts I focused on Jupyter Notebook in the post, but I noted any differences for JupyterLab. Hi all! I wrote about blog post about Jupyter’s most useful keyboard shortcuts.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |