Code editing shortcuts
Shortcuts that can be used to make your life easier when using the code editor in WebPal.
Search & Replace
- Ctrl-F, Cmd-F - Start searching
- Ctrl-G, Cmd-G - Find next
- Shift-Ctrl-G, Shift-Cmd-G - Find previous
- Shift-Ctrl-F, Cmd-Option-F - Replace
- Shift-Ctrl-R, Shift-Cmd-Option-F - Replace all
- Ctrl-H - replace
- Ctrl-F3 - find the next occurrence of the selected text or the current word
- Shift-Ctrl-F3 - find the previous occurrence of the selected text or the current word
- Ctrl-D - select the next occurrence of the current word and creates a new cursor
* use /re/ syntax for regular expression search or search and replace in any of the above
Bookmarks & Marks
- Ctrl-F2 - set / unset a bookmark
- F2 - go to the next bookmark
- Shift-F2 - go to the previous bookmark
- Shift-Ctrl-F2 - unset all bookmarks
- Alt-F2 - create multiple cursors at each bookmark
- Ctrl-K-Space - set a 'sublime' mark
- Ctrl-K-A - select text from the current cursor position to the 'sublime' mark
- Ctrl-K-W - delete all text from the current cursor position to the 'sublime' mark
- Ctrl-K-X - move the cursor to the 'sublime' mark
- Ctrl-K-G - clear all 'sublime' marks
Navigation & Lines & Selection
- Shift-Tab - auto indent selection
- Ctrl-Left, Alt-Left - go left by one word
- Ctrl-Right, Alt-Right - go right by one word
- Ctrl-Up - scroll up by one line
- Ctrl-Down - scroll down by one line
- Shift-Ctrl-L - create a new cursor instance at the beginning of each selected line
- Ctrl-L - select the current line
- Shift-Ctrl-K - delete the current line
- Ctrl-Enter - insert a line under the current line and sets the cursor to the new line
- Shift-Ctrl-Enter - insert a line above the current line and sets the cursor to the new line
- Shift-Ctrl-Space - select all the text inside the current scope
- Shift-Ctrl-M - select all the text between brackets
- Ctrl-M - toggle enclosing brackets
- Shift-Ctrl-Up - swap selected line(s) with the line above the selection
- Shift-Ctrl-Down - swap selected line(s) with the line under the selection
- Ctrl-/ - toggle comments around the selected line(s)
- Ctrl-J - join multiple lines into one line
- Shift-Ctrl-D - duplicate the current line
- Ctrl-T - transpose the character left of the cursor
- F9 - sort lines alphabetically
- Ctrl-F9 - sort lines alphabetically, ignoring case
- Ctrl-K-Backspace - delete everything left of the cursor until the beginning of the line
- Ctrl-K-K - delete everything right of the cursor until the end of the line
- Ctrl-K-U - make every letter in the current word UPPERCASE
- Ctrl-K-L - make every letter in the current word lowercase
- Shift-Alt-Up - create another cursor instance on the line above
- Shift-Alt-Down - create another cursos instance on the line below
- Esc - reduce all multiple cursors to one cursor
- Ctrl-K-C - scroll the page so that the current line is in the middle of the window
Folding
- Shift-Ctrl-[ - fold code
- Shift-Ctrl-] - unfold code
- Ctrl-K-J - unfold all code
- Ctrl-K-0 - unfold all code