Keyboard Shortcuts
There are several keyboard shortcuts available in the Anvil Editor. If you are using a Mac, you can use Cmd instead of Ctrl everywhere if you prefer, but you’ll need to use Option instead of Alt.
In the Form Editor
The following shortcuts are available in both Design and Code view.
Ctrl-Shift-F— Search all code in the appCtrl-Enter— Save and run the appCtrl-S— Save the app. Note that this also happens automatically, you don’t need to save manually unless you want to specify a custom commit messageCtrl-Z— Undo the latest changeCtrl-YorCtrl-Shift-Z— Redo the latest reverted changeCtrl-C— Copy the currently selected component(s) or codeCtrl-X— Cut the currently selected component(s) or codeCtrl-V— Paste the cut/copied components or code into the selected container or at the cursorCtrl-B— Open or close the App Browser panelAlt-Shift-Z— Maximize the current window and enter Zen modeCmd-P— Open the quick switcher to easily jump between tabs
Design View Only
DeleteorBackspace— Delete the currently selected component(s)Ctrl-Drag— Fine-grained control over column resizing
Code View Only
Ctrl-F— Search the current file. Hit enter repeatedly to find subsequent matchesCtrl-G— Find next. Repeats previous search.Ctrl-Shift-G— Find previous. Repeats previous search backwards.Ctrl-H— Replace occurrences of a particular string in the current file one by oneCtrl-Shift-H— Replace all occurrences of a particular string in the current fileCtrl-I— Reindent the code to match your tabsize preferenceCtrl+Q— Expand/collapse currently selected block of code.Ctrl-/— Comment/uncomment a line or block of codeCtrl-Click-Function— Click on a function to jump to its definition.Ctrl-Click-Variable— Click on a variable to jump to its definition.Alt-Shift-F— Auto-format your code using the Ruff formater
In Data Tables
DeleteorBackspace— Delete the currently selected row(s) or column(s), or set the currently selected cell value toNoneUp,Down,Left,Right— Move between cellsEnter— Edit the currently selected cell, or move to the cell below if already editingTab— Move to the cell on the rightEscape— Clear the current selection
Do you still have questions?
Our Community Forum is full of helpful information and Anvil experts.
