节点与集成

Keyboard shortcuts

The Code node editing environment supports a range of keyboard shortcuts to speed up and enhance your experience. Select the appropriate tab to see the relevant shortcuts for your operating system.

Cursor Movement

Windows

<table><thead><tr><th width="349">Action</th><th>Shortcut</th></tr></thead><tbody><tr><td>Move cursor left</td><td>← Left</td></tr><tr><td>Move cursor right</td><td>→ Right</td></tr><tr><td>Move cursor up</td><td>↑ Up</td></tr><tr><td>Move cursor down</td><td>↓ Down</td></tr><tr><td>Move cursor by word left</td><td>^ Ctrl + ← Left</td></tr><tr><td>Move cursor by word right</td><td>^ Ctrl + → Right</td></tr><tr><td>Move to line start</td><td>⤒ Home or ^ Ctrl + ← Left</td></tr><tr><td>Move to line end</td><td>⤓ End or ^ Ctrl + → Right</td></tr><tr><td>Move to document start</td><td>^ Ctrl or ⤒ Home</td></tr><tr><td>Move to document end</td><td>^ Ctrl or ⤓ End</td></tr><tr><td>Move page up</td><td>⇞ Page Up</td></tr><tr><td>Move page down</td><td>⇟ Page Down</td></tr></tbody></table>

macOS

Action Shortcut
Move cursor left ← Left or ^ Ctrl + B
Move cursor right → Right or ^ Ctrl + F
Move cursor up ↑ Up or ^ Ctrl + P
Move cursor down ↓ Down or ^ Ctrl + N
Move cursor by word left ⌥ Option + ← Left
Move cursor by word right ⌥ Option + → Right
Move to line start ⌘ Cmd + ← Left or ^ Ctrl + A
Move to line end ⌘ Cmd + → Right or ^ Ctrl + E
Move to document start ⌘ Cmd + ↑ Up
Move to document end ⌘ Cmd + ↓ Down
Move page up ⇞ Page Up
Move page down ⇟ Page Down

| |

Linux

<table><thead><tr><th width="349">Action</th><th>Shortcut</th></tr></thead><tbody><tr><td>Move cursor left</td><td>← Left</td></tr><tr><td>Move cursor right</td><td>→ Right</td></tr><tr><td>Move cursor up</td><td>↑ Up</td></tr><tr><td>Move cursor down</td><td>↓ Down</td></tr><tr><td>Move cursor by word left</td><td>^ Ctrl + ← Left</td></tr><tr><td>Move cursor by word right</td><td>^ Ctrl + → Right</td></tr><tr><td>Move to line start</td><td>⤒ Home or ^ Ctrl + ← Left</td></tr><tr><td>Move to line end</td><td>⤓ End or ^ Ctrl + → Right</td></tr><tr><td>Move to document start</td><td>^ Ctrl or ⤒ Home</td></tr><tr><td>Move to document end</td><td>^ Ctrl or ⤓ End</td></tr><tr><td>Move page up</td><td>⇞ Page Up</td></tr><tr><td>Move page down</td><td>⇟ Page Down</td></tr></tbody></table>

Selection

Windows

Action Shortcut
Selection with any movement key ⇧ Shift + \[Movement Key]
Select all ^ Ctrl + A
Select line ^ Ctrl + L
Select next occurrence ^ Ctrl + D
Select all occurrences ⇧ Shift + ^ Ctrl + L
Go to matching bracket ⇧ Shift + ^ Ctrl + \\

| |

macOS

Action Shortcut
Selection with any movement key ⇧ Shift + \[Movement Key]
Select all ⌘ Cmd + A
Select line ⌘ Cmd + L
Select next occurrence ⌘ Cmd + D
Go to matching bracket ⇧ Shift + ⌘ Cmd + \\

| |

Linux

Action Shortcut
Selection with any movement key ⇧ Shift + \[Movement Key]
Select all ^ Ctrl + A
Select line ^ Ctrl + L
Select next occurrence ^ Ctrl + D
Select all occurrences ⇧ Shift + ^ Ctrl + L
Go to matching bracket ⇧ Shift + ^ Ctrl + \\

| | | | |

Basic Operations

Windows

Action Shortcut
New line with indentation Enter ⏎
Undo ^ Ctrl + Z
Redo ^ Ctrl + Y or ^ Ctrl + ⇧ Shift + V
Undo selection ^ Ctrl + U
Copy ^ Ctrl + C
Cut ^ Ctrl + X
Paste ^ Ctrl + V

| |

macOS

Action Shortcut
New line with indentation Enter ⏎
Undo ⌘ Cmd + Z
Redo ⌘ Cmd + Y or ⌘ Cmd + ⇧ Shift + Y
Undo selection ⌘ Cmd + U
Copy ⌘ Cmd + C
Cut ⌘ Cmd + X
Paste ⌘ Cmd + V

| |

Linux

Action Shortcut
New line with indentation Enter ⏎
Undo ^ Ctrl + Z
Redo ^ Ctrl + Y or ^ Ctrl + ⇧ Shift + V
Undo selection ^ Ctrl + U
Copy ^ Ctrl + C
Cut ^ Ctrl + X
Paste ^ Ctrl + V

| | | | |

Delete Operations

Windows

Action Shortcut
Delete character left ⌫ Backspace
Delete character right ⌦ Del
Delete word left ^ Ctrl + ⌫ Backspace
Delete word right ^ Ctrl + ⌦ Del
Delete line ⇧ Shift + ^ Ctrl + K

| |

macOS

Action Shortcut
Delete character left ⌫ Backspace
Delete character right ⌦ Del
Delete word left ⌥ Option + ⌫ Backspace or ^ Ctrl + ⌘ Cmd + H
Delete word right ⌥ Option + ⌦ Del or Fn + ⌥ Option + ⌦ Del
Delete line ⇧ Shift + ⌘ Cmd + K
Delete to line start ⌘ Cmd + ⌫ Backspace
Delete to line end ⌘ Cmd + ⌦ Del or ^ Ctrl + K

| |

Linux

Action Shortcut
Delete character left ⌫ Backspace
Delete character right ⌦ Del
Delete word left ^ Ctrl + ⌫ Backspace
Delete word right ^ Ctrl + ⌦ Del
Delete line ⇧ Shift + ^ Ctrl + K

| | | | |

Line Operations

Windows

Action Shortcut
Move line up ⎇ Alt + ↑ Up
Move line down ⎇ Alt + ↓ Down
Copy line up ⇧ Shift + ⎇ Alt + ↑ Up
Copy line down ⇧ Shift + ⎇ Alt + ↓ Down
Toggle line comment ^ Ctrl + /
Add line comment ^ Ctrl + K then ^ Ctrl + C
Remove line comment ^ Ctrl + K then ^ Ctrl + U
Toggle block comment ⇧ Shift + ⎇ Alt + A

| |

macOS

Action Shortcut
Move line up ⌥ Option + ↑ Up
Move line down ⌥ Option + ↓ Down
Copy line up ⇧ Shift + ⌥ Option + ↑ Up
Copy line down ⇧ Shift + ⌥ Option + ↓ Down
Toggle line comment ⌘ Cmd + /
Add line comment ⌘ Cmd + K then ⌘ Cmd + C
Remove line comment ⌘ Cmd + K then ⌘ Cmd + U
Toggle block comment ⇧ Shift + ⌥ Option + A
Split line ^ Ctrl + O
Transpose characters ^ Ctrl + T

| |

Linux

Action Shortcut
Move line up ⎇ Alt + ↑ Up
Move line down ⎇ Alt + ↓ Down
Copy line up ⇧ Shift + ⎇ Alt + ↑ Up
Copy line down ⇧ Shift + ⎇ Alt + ↓ Down
Toggle line comment ^ Ctrl + /
Add line comment ^ Ctrl + K then ^ Ctrl + C
Remove line comment ^ Ctrl + K then ^ Ctrl + U
Toggle block comment ⇧ Shift + ⎇ Alt + A

| | | | |

Autocomplete

Windows

Action Shortcut
Start completion ^ Ctrl + Space
Accept completion Enter ⏎ or Tab ⇥
Close completion ⎋ Esc
Navigate completion options ↑ Up or ↓ Down

| |

macOS

Action Shortcut
Start completion ^ Ctrl + Space
Accept completion Enter ⏎ or Tab ⇥
Close completion ⎋ Esc
Navigate completion options ↑ Up or ↓ Down

| |

Linux

Action Shortcut
Start completion ^ Ctrl + Space
Accept completion Enter ⏎ or Tab ⇥
Close completion ⎋ Esc
Navigate completion options ↑ Up or ↓ Down

| | | | |

Indentation

Windows

Action Shortcut
Indent more Tab ⇥ or ^ Ctrl + ]
Indent less ⇧ Shift + Tab ⇥ or ^ Ctrl + \[

| |

macOS

Action Shortcut
Indent more ⌘ Cmd + ]
Indent less ⌘ Cmd + \[

| |

Linux

Action Shortcut
Indent more Tab ⇥ or ^ Ctrl + ]
Indent less ⇧ Shift + Tab ⇥ or ^ Ctrl + \[

| | | | |

Code Folding

Windows

Action Shortcut
Fold code ^ Ctrl + ⇧ Shift + \[
Unfold code ^ Ctrl + ⇧ Shift + ]
Fold all ^ Ctrl + K then ^ Ctrl + 0
Unfold all ^ Ctrl + K then ^ Ctrl + J

| |

macOS

Action Shortcut
Fold code ⌘ Cmd + ⌥ Option + \[
Unfold code ⌘ Cmd + ⌥ Option + ]
Fold all ⌘ Cmd + K then ⌘ Cmd + 0
Unfold all ⌘ Cmd + K then ⌘ Cmd + J

| |

Linux

Action Shortcut
Fold code ^ Ctrl + ⇧ Shift + \[
Unfold code ^ Ctrl + ⇧ Shift + ]
Fold all ^ Ctrl + K then ^ Ctrl + 0
Unfold all ^ Ctrl + K then ^ Ctrl + J

| | | | |

Multi-cursor

Windows

Action Shortcut
Add cursor at click position ⎇ Alt + Left Button
Add cursor above ^ Ctrl + ⎇ Alt + ↑ Up
Add cursor below ^ Ctrl + ⎇ Alt + ↓ Down
Add cursors to line ends ⇧ Shift + ⎇ Alt + I
Clear multiple cursors ⎋ Esc

| |

macOS

Action Shortcut
Add cursor at click position ⌥ Option + Left Button
Add cursor above ^ Ctrl + ⌥ Option + ↑ Up
Add cursor below ^ Ctrl + ⌥ Option + ↓ Down
Add cursors to line ends ⇧ Shift + ⌥ Option + I
Clear multiple cursors ⎋ Esc

| |

Linux

Action Shortcut
Add cursor at click position ⎇ Alt + Left Button
Add cursor above ^ Ctrl + ⎇ Alt + ↑ Up
Add cursor below ^ Ctrl + ⎇ Alt + ↓ Down
Add cursors to line ends ⇧ Shift + ⎇ Alt + I
Clear multiple cursors ⎋ Esc

| | | | |

Formatting

Windows

Action Shortcut
Format document ⇧ Shift + ⎇ Alt + F

| |

macOS

Action Shortcut
Format document ⇧ Shift + ⌘ Cmd + F

| |

Linux

Action Shortcut
Format document ^ Ctrl + ⇧ Shift + I

| | | | |

Search & Navigation

官方原文和授权

本页来自 N8N 英文官方网站固定快照,并转换成 xueai 静态页面。内容以 N8N 持续更新的官方页面为准。

来源、授权与修改

本站保留许可证、固定提交号、社区作者和修改说明,不代表 n8n 对本站背书。

查看许可证查看来源和修改说明