In the editor, you can add code through different modals: the code modals (Variation CSS, Variation JavaScript, Element JavaScript).
For these modals, we use Code Mirror, a code editor library. This library contains a large range of shortcuts available on both PC and MAC.
If you want to, please go to the exhaustive list, if you're interested in the ones implemented on AB Tasty, here is the list: defaultTab, delCharAfter, delCharBefore, deleteLine, delGroupAfter, delGroupBefore, delLineLeft, delWordAfter, delWordBefore, delWrappedLineLeft, delWrappedLineRight, find, findNext, findPrev, goCharLeft, goCharRight, goDocEnd, goDocStart, goGroupLeft, goGroupRight, goLineDown, goLineEnd, goLineLeft, goLineRight, goLineStart, goLineUp, goPageDown, goPageUp, goWordLeft, goWordRight, indentAuto, indentLess, indentMore, insert, insertSoft, killLine, newlineAndIndent, redo, redoSelection, replace, replaceAll, selectAll, transposeChars, undo, undoSelection...
selectAll
Select the whole content of the editor.
Ctrl-A (PC), Cmd-A (Mac)
newlineAndIndent
Insert a newline and auto-indent the new line.
Enter
find
Ctrl-F (PC), Cmd-F (Mac)
findNext
Ctrl-G (PC), Cmd-G (Mac)
findPrev
Shift-Ctrl-G (PC), Shift-Cmd-G (Mac)
replace
Shift-Ctrl-F (PC), Cmd-Alt-F (Mac)
replaceAll
Shift-Ctrl-R (PC), Shift-Cmd-Alt-F (Mac)
undo
Undo the last change. Note that, because browsers still don't make it possible for scripts to react to or customize the context menu, selecting undo (or redo) from the context menu in a CodeMirror instance does not work.
Ctrl-Z (PC), Cmd-Z (Mac)
redo
Redo the last undone change.
Ctrl-Y (PC), Shift-Cmd-Z (Mac), Cmd-Y (Mac)
undoSelection
Undo the last change to the selection, or if there are no selection-only changes at the top of the history, undo the last change.
Ctrl-U (PC), Cmd-U (Mac)
redoSelection
Redo the last change to the selection, or the last text change if no selection changes remain.
Alt-U (PC), Shift-Cmd-U (Mac)
killLine
Emacs-style line killing. Deletes the part of the line after the cursor. If that consists only of whitespace, the newline at the end of the line is also deleted.
Ctrl-K (Mac)
deleteLine
Deletes the whole line under the cursor, including newline at the end.
Ctrl-D (PC), Cmd-D (Mac)
delLineLeft
Delete the part of the line before the cursor.
Ctrl-D (PC), Cmd-D (Mac)
delWrappedLineLeft
Delete the part of the line from the left side of the visual line the cursor is on to the cursor.
Cmd-Backspace (Mac)
delWrappedLineRight
Delete the part of the line from the cursor to the right side of the visual line the cursor is on.
Cmd-Delete (Mac)
goDocStart
Move the cursor to the start of the document.
Ctrl-Home (PC), Cmd-Up (Mac), Cmd-Home (Mac)
goDocEnd
Move the cursor to the end of the document.
Ctrl-End (PC), Cmd-End (Mac), Cmd-Down (Mac)
goLineStart
Move the cursor to the start of the line.
Alt-Left (PC), Ctrl-A (Mac)
goLineEnd
Move the cursor to the end of the line.
Alt-Right (PC), Ctrl-E (Mac)
goLineRight
Move the cursor to the right side of the visual line it is on.
Cmd-Right (Mac)
goLineLeft
Move the cursor to the left side of the visual line it is on. If this line is wrapped, that may not be the start of the line.
Cmd-Left (Mac)
goLineUp
Move the cursor up one line.
Up, Ctrl-P (Mac)
goLineDown
Move down one line.
Down, Ctrl-N (Mac)
goPageUp
Move the cursor up one screen, and scroll up by the same distance.
PageUp, Shift-Ctrl-V (Mac)
goPageDown
Move the cursor down one screen, and scroll down by the same distance.
PageDown, Ctrl-V (Mac)
goCharLeft
Move the cursor one character left, going to the previous line when hitting the start of line.
Left, Ctrl-B (Mac)
goCharRight
Move the cursor one character right, going to the next line when hitting the end of line.
Right, Ctrl-F (Mac)
goWordLeft
Move the cursor to the start of the previous word.
Alt-B (Mac)
goWordRight
Move the cursor to the end of the next word.
Alt-F (Mac)
goGroupLeft
Move to the left of the group before the cursor. A group is a stretch of word characters, a stretch of punctuation characters, a newline, or a stretch of more than one whitespace character.
Ctrl-Left (PC), Alt-Left (Mac)
goGroupRight
Move to the right of the group after the cursor (see above).
Ctrl-Right (PC), Alt-Right (Mac)
delCharBefore
Delete the character before the cursor.
Shift-Backspace, Ctrl-H (Mac)
delCharAfter
Delete the character after the cursor.
Delete, Ctrl-D (Mac)
delWordBefore
Delete up to the start of the word before the cursor.
Alt-Backspace (Mac)
delWordAfter
Delete up to the end of the word after the cursor.
Alt-D (Mac)
delGroupBefore
Delete to the left of the group before the cursor.
Ctrl-Backspace (PC), Alt-Backspace (Mac)
delGroupAfter
Delete to the start of the group after the cursor.
Ctrl-Delete (PC), Ctrl-Alt-Backspace (Mac), Alt-Delete (Mac)
indentAuto
Auto-indent the current line or selection.
Shift-Tab
indentMore
Indent the current line or selection by one indent unit.
Ctrl-] (PC), Cmd-] (Mac)
indentLess
Dedent the current line or selection by one indent unit.
Ctrl-[ (PC), Cmd-[ (Mac)
insert
Insert a tab character at the cursor.
Tab
insertSoft
Insert the amount of spaces that match the width a tab at the cursor position would have.
Tab
defaultTab
If something is selected, indent it by one indent unit. If nothing is selected, insert a tab character.
Tab
transposeChars
Swap the characters before and after the cursor.
Ctrl-T (Mac)
Comments
0 comments
Article is closed for comments.