Some tips on Jupyter Notebook in Vscode [Reprint]

Jupyter Notebook shortcuts currently supported by Cell command mode

  • Enter : Enter editing mode
  • Shift-Enter : Run this unit, select or insert (at the last Cell) the next unit
  • Ctrl-Enter : Run this unit
  • Alt-Enter: Run this unit and insert a new unit below it
  • Y: Unit transitions to code state
  • M: The unit switches to markdown state (R native state is not supported yet)
  • Up: Select the upper unit
  • K: Select the upper unit
  • Down: Select the lower unit
  • J: Select the unit below
  • A : Insert new unit above
  • B : Insert new unit below
  • D,D: Delete the selected unit
  • L: convert line number
  • Shift-Space : Scroll up
  • Space: scroll down

Vscode shortcut keys supported in Cell editing mode (only those shortcut keys related to editing are described)

  • Ctrl + X: cut/cut line (empty selection)
  • Ctrl + C : Copy/Copy rows (empty selection)
  • Ctrl + Delete / Backspace: Delete the words on the right and left
  • Alt + ↑ / ↓ : Move rows up/down
  • Shift + Alt + ↓ / ↑ : Copy lines up/down
  • Ctrl + Shift + K : Delete rows
  • Ctrl + Shift + \ : jump to matching brackets
  • Ctrl + ] / [ : Indent/highlight lines
  • Ctrl + ← / → : cursor to the beginning/end of the word
  • Ctrl + / : Toggle line comments
  • Shift + Alt + A : Toggle block comments
  • Ctrl + H : Find/Replace

Vscode’s search shortcut key Ctrl + F is currently unavailable in Cell, but the replacement shortcut key can be used, so it can replace the original search function
------ 1.13 Update

The January 13th version has begun to support Ctrl + F search, and it is full-text search, but the current function is still relatively simple.


  • Ctrl + D: Select one/multiple (same) words
  • Alt + click: insert multiple cursors
  • Ctrl + Alt + ↑ / ↓ : Insert cursor up/down
  • Ctrl + U: Undo the last cursor operation
  • Shift + Alt + I : Insert the cursor at the end of each selected line
  • Ctrl + L: Select the current line
  • Ctrl + Shift + L : Select all occurrences of the current word
  • Ctrl + F2: Select all occurrences of the current word
  • Shift + Alt + → / Shift + Alt + ←: Expand/reduce selection
  • Shift + Alt + (drag the mouse): Rectangular block selection
  • Ctrl + K Ctrl + X : Trim trailing spaces

Reprinted from: https://zhuanlan.zhihu.com/p/101646637

Supongo que te gusta

Origin blog.csdn.net/summertime1234/article/details/129580641
Recomendado
Clasificación