JuPyteR🐍 Notebook/Console Tricks🎲 & Short-Cuts🗝️

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.
 
JuPyteR🐍 Notebook/Console Tricks🎲 & Short-Cuts🗝️ 
JuPyteR🐍 Notebook/Console Tricks🎲 & Short-Cuts🗝️
 
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
 
JuPyteR🐍 Notebook/Console Tricks🎲 & Short-Cuts🗝️
 
Edit Mode 
 
JuPyteR🐍 Notebook/Console Tricks🎲 & Short-Cuts🗝️
 

Command Mode (press Esc to enable)

  1. F: find and replace
  2. Ctrl-Shift-F: open the command palette
  3. Ctrl-Shift-P: open the command palette
  4. Enter: enter edit mode
  5. P: open the command palette
  6. Shift-Enter: run cell, select below
  7. Ctrl-Enter: run selected cells
  8. Alt-Enter: run the cell and insert belowY: change the cell to code
  9. M: change the cell to markdownR: change the cell to raw
  10. 1: change the cell to heading 1
  11. 2: change the cell to heading 2
  12. 3: change the cell to heading 3
  13. 4: change the cell to heading 45: change the cell to heading 5
  14. 6: change the cell to heading 6
  15. K: select cell above
  16. Up: select cell above
  17. Down: select cell belowJ: select cell below
  18. Shift-K: extend selected cells above
  19. Shift-Up: extend selected cells above
  20. Shift-Down: extend selected cells below
  21. Shift-J: extend selected cells below
  22. A: insert cell above
  23. B: insert cell below
  24. X: cut selected cells
  25. C: copy selected cells
  26. Shift-V: paste cells above
  27. V: paste cells below
  28. Z: undo cell deletion
  29. D, D: delete selected cells
  30. Shift-M: merge selected cells, or current cell with cell below if only one cell is selected
  31. Ctrl-S: Save and Checkpoint
  32. S: Save and Checkpoint
  33. L: toggle line numbers
  34. O: toggle output of selected cells
  35. Shift-O: toggle output scrolling of selected cells
  36. H: show keyboard shortcuts
  37. I, I: interrupt the kernel
  38. 0,0: restart the kernel (with dialog)
  39. Esc: Close the pager
  40. Q: close the pager
  41. Shift-L: toggles line numbers in all cells, and persist the setting
  42. Shift-Space: scroll notebook up
  43. Space: scroll notebook down

Edit Mode (press Enter to enable)

  1. Tab: code completion or indent
  2. Shift-Tab: tooltip
  3. Ctrl-]: indent
  4. Ctrl-[: dedent
  5. Ctrl-A: select all
  6. Ctrl-Z: undo
  7. Ctrl-/: comment
  8. Ctrl-D: delete the whole line
  9. Ctrl-U: undo selection
  10. Insert: toggle overwrite flag
  11. Ctrl-Home: go to cell start
  12. Ctrl-Up: go to cell start
  13. Ctrl-End: go to cell end
  14. Ctrl-Down: go to cell end
  15. Ctrl-Left: go one word left
  16. Ctrl-Right: go one word right
  17. Ctrl-Backspace: delete word before
  18. Ctrl-Delete: delete word after
  19. Ctrl-Y: redo
  20. Alt-U: redo selection
  21. Ctrl-M: enter command mode
  22. Ctrl-Shift-F: open the command palette
  23. Ctrl-Shift-P: open the command palette
  24. Esc: enter command mode
  25. Shift-Enter: run cell, select below
  26. Ctrl-Enter: run selected cells
  27. Alt-Enter: run the cell and insert below
  28. Ctrl-Shift-Minus: split cell at cursor
  29. Ctrl-S: Save and Checkpoint
  30. Down: Move cursor down
  31. Up: move the cursor up
Moreover, With the help of this image user have the complete list of the shortcut commands in Jupyter Notebook,
 
JuPyteR🐍 Notebook/Console Tricks🎲 & Short-Cuts🗝️
 
Or You can go with H command in Command Mode.
 
To have a look at the command palette,
 
Use Ctrl + Shift + P
 
JuPyteR🐍 Notebook/Console Tricks🎲 & Short-Cuts🗝️
 
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/

Summary

 
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. 


Similar Articles