Introduction
As we all know, every programming IDE contains the shortcuts to make programming easy and reduce the execution timings. Jupyter Notebook also has some shortcuts and interesting facts that would be helpful for Python Programming.
Jupyter
This is made with a total of three language combinations -- Ju Julia, Pyt Python, and R is R programming language.
IPyhton=Pyhton 3
The kernel is used while we are working with Python in Jupyter Notebook.
Both images are for a better understanding of kernel in Jupyter Console.
Here, we will discuss the Jupyter version 6.0.1
Basically, there are two Keyboard Input Modes in Jupyter notebook,
Command Mode
Edit Mode
Command Mode (press Esc to enable)
- F: find and replace
- Ctrl-Shift-F: open the command palette
- Ctrl-Shift-P: open the command palette
- Enter: enter edit mode
- P: open the command palette
- Shift-Enter: run cell, select below
- Ctrl-Enter: run selected cells
- Alt-Enter: run the cell and insert belowY: change the cell to code
- M: change the cell to markdownR: change the cell to raw
- 1: change the cell to heading 1
- 2: change the cell to heading 2
- 3: change the cell to heading 3
- 4: change the cell to heading 45: change the cell to heading 5
- 6: change the cell to heading 6
- K: select cell above
- Up: select cell above
- Down: select cell belowJ: select cell below
- Shift-K: extend selected cells above
- Shift-Up: extend selected cells above
- Shift-Down: extend selected cells below
- Shift-J: extend selected cells below
- A: insert cell above
- B: insert cell below
- X: cut selected cells
- C: copy selected cells
- Shift-V: paste cells above
- V: paste cells below
- Z: undo cell deletion
- D, D: delete selected cells
- Shift-M: merge selected cells, or current cell with cell below if only one cell is selected
- Ctrl-S: Save and Checkpoint
- S: Save and Checkpoint
- L: toggle line numbers
- O: toggle output of selected cells
- Shift-O: toggle output scrolling of selected cells
- H: show keyboard shortcuts
- I, I: interrupt the kernel
- 0,0: restart the kernel (with dialog)
- Esc: Close the pager
- Q: close the pager
- Shift-L: toggles line numbers in all cells, and persist the setting
- Shift-Space: scroll notebook up
- Space: scroll notebook down
Edit Mode (press Enter to enable)
- Tab: code completion or indent
- Shift-Tab: tooltip
- Ctrl-]: indent
- Ctrl-[: dedent
- Ctrl-A: select all
- Ctrl-Z: undo
- Ctrl-/: comment
- Ctrl-D: delete the whole line
- Ctrl-U: undo selection
- Insert: toggle overwrite flag
- Ctrl-Home: go to cell start
- Ctrl-Up: go to cell start
- Ctrl-End: go to cell end
- Ctrl-Down: go to cell end
- Ctrl-Left: go one word left
- Ctrl-Right: go one word right
- Ctrl-Backspace: delete word before
- Ctrl-Delete: delete word after
- Ctrl-Y: redo
- Alt-U: redo selection
- Ctrl-M: enter command mode
- Ctrl-Shift-F: open the command palette
- Ctrl-Shift-P: open the command palette
- Esc: enter command mode
- Shift-Enter: run cell, select below
- Ctrl-Enter: run selected cells
- Alt-Enter: run the cell and insert below
- Ctrl-Shift-Minus: split cell at cursor
- Ctrl-S: Save and Checkpoint
- Down: Move cursor down
- Up: move the cursor up
Moreover, With the help of this image user have the complete list of the shortcut commands in Jupyter Notebook,
Or You can go with H command in Command Mode.
To have a look at the command palette,
Use Ctrl + Shift + P
In this command palette, you can easily search the appropriate programming actions to apply to the code snippets.
There are many other features can be taken as the tricks of the Jupyter Notebook/Console,
- Plotting in Notebook
- Link to Documentation
- Display the variables
- IPython Commands: set environment, execute code, insert code from external scripts, pass variables, List variables of Global Scope, Timing, debugging
- Shell commands
- LaTeX formulas
- Multicursors Support
- Use different languages
- Use different Kernels
- Big Data Analysis
- Sharing Notebooks
Reference Link
- https://www.dataquest.io/blog/jupyter-notebook-tips-tricks-shortcuts/
In this article, we learned about the tricks and short-cuts of the Jupyter Console in details. Using different libraries and frameworks we will implement these features in one other way. It will give us a better knowledge of the IDE and its use for the end-user applications.