P5 library - Using the editor

When something goes wrong

Shortcut Action
Ctrl - ZUndo the last action (can be used multiple times)
Ctrl - YRedo the last undone action (can be used multiple times)
Esc...
F5...

Auto-completion

When you start typing a keyword, a function or a variable name, the editor will suggest completions. You can press Enter to accept the suggestion, use and to navigate through the suggestions, or press Esc or continue typing to close the suggestions.

Commenting and uncommenting

Shortcut Action
Ctrl + /Comment/uncomment the current line or the selection (toggle)

Indenting and dedenting

Shortcut Action
TabIndent the current line or the selection (= push it to the right)
Shift + TabDedent the current line or the selection (= push it to the left)

Finding and replacing text

Shortcut Action
Ctrl - FOpen the find/replace dialog box
EscClose the find/replace dialog box

Clipboard and modifying text

Shortcut Action
Ctrl - XCut the selected text into the clipboard
Ctrl - CCopy the selected text into the clipboard
Ctrl - VPaste the clipboard content
Shift - DeleteCut the current line (no need to select it first)
BackspaceDelete the previous character
DeleteDelete the next character

Moving the caret (= insertion point)

Shortcut Action
LeftMove one character to the left
RightMove one character to the right
Ctrl + LeftMove one word to the left
Ctrl + RightMove one word to the right
UpMove one line up
DownMove one line down
HomeMove to the start of the line (toggle)
EndMove to the end of the line
PgUpMove one page up
PgDnMove one page down
Ctrl + HomeMove to the top of the file
Ctrl + EndMove to the bottom of the file

Selecting text

In general, pressing Shift at the same time as one of the keyboard shortcuts to move the cursor will select text.

Shortcut Action
EscUnselect
Ctrl + ASelect the whole content of the file
Shift + LeftSelect the previous character
Shift + RightSelect the next character
Ctrl + Shift + LeftSelect the previous word
Ctrl + Shift + RightSelect the next word
Ctrl + Shift + HomeSelect until the top of the file
Ctrl + Shift + EndSelect until the bottom of the file

Using the mouse

Shortcut Action
ClickMove the caret
Double - clickSelect one word (or more if you continue dragging the mouse)
Triple - clickSelect one line (or more if you continue dragging the mouse)
DragMove the selection
Ctrl + dragCopy the selection