Geany supports the default keyboard shortcuts for the Scintilla editing widget. For a list of these commands, see Appendix B, Scintilla keyboard commands. The Scintilla keyboard shortcuts will be overridden by any custom keybindings with the same keyboard shortcut.
For all actions listed below you can define your own keybindings. Open the Preferences dialog, select the desired action and click on change. In the opening dialog you can press any key combination you want and it will be saved when you press OK. You can define only one key combination for one action.
Some of the default key combinations cannot be changed, e.g. menu_new or menu_open. These are set by GTK and should be kept, but you can still add other key combinations for these actions. For example to execute menu_open by default Ctrl-O is set, but you can also define Alt-O, so that the file open dialog is shown by pressing either Ctrl-O or Alt-O.
The following table lists all customizable keyboard shortcuts.
Table 3.3. Keybindings action table
Action | Description |
---|---|
Menu items | |
New | Creates a new file. |
Open | Opens a file. |
Save | Saves the current file. |
Save As | Saves the current file under a new name. |
Save all | Saves all open files. |
Close all | Closes all open files. |
Close | Closes the current file. |
Reload file | Reloads the current file. All unsaved changes will be lost. |
Prints the current file. | |
Undo | Undoes the last action. |
Redo | Redoes the last action. |
Select all | Makes a selection of all text in the current document. |
Insert date | Inserts a customisable date. |
Preferences | Opens preferences dialog. |
Find Next | Finds next result. |
Find Previous | Finds previous result. |
Replace | Opens the Replace dialog. |
Find in files | Opens the Find in files dialog. |
Next message | Jumps to the line with the next message from the last call to Find usage. |
Go to line | Opens the Go to line dialog. |
Show Colour Chooser | Opens the Colour Chooser dialog. |
Fullscreen | Switches to fullscreen mode. |
Toggle Messages Window | Toggles the message window (status and compiler messages) on and off. |
Toggle Sidebar | Shows or hides the sidebar. |
Toggle all additional widgets | Hide and show all additional widgets like the notebook tabs, the toolbar, the messages window and the statusbar. |
Zoom In | Zooms in the text |
Zoom Out | Zooms out the text |
Replace tabs by space | Replaces all tabs with the right amount of spaces. |
Fold all | Folds all contractible code blocks. |
Unfold all | Unfolds all contracted code blocks. |
Build options | |
Compile | Compiles the current file. |
Build | Builds (compiles if necessary and links) the current file. |
Make all | Builds the current file with the Make tool. |
Make custom target | Builds the current file with the Make tool and a given target. |
Make object | Compiles the current file with the Make tool. |
Next error | Jumps to the line with the next error from the last build process. |
Run | Executes the current file in a terminal emulation. |
Run (alternative command) | Executes the current file in a terminal emulation. |
Build options | Opens the build options dialog. |
Miscellaneous | |
Reload symbol list | Reloads the tag/symbol list. |
Switch to Editor | Switches to editor widget. |
Switch to Scribble | Switches to scribble widget. |
Switch to VTE | Switches to VTE widget. |
Switch to Search Bar | Switches to the search bar in the toolbar (if visible). |
Switch to left document | Switches to the previous open document. |
Switch to right document | Switches to the next open document. |
Switch to last used document | Switches to the previously selected open document. |
Editing operations | |
Convert selection to lower case | Converts the current selection to lower case. |
Convert selection to upper case | Converts the current selection to upper case. |
Duplicate line or selection | Duplicates the current line or selection. |
Comment line | Comments current line or selection. |
Uncomment line | Uncomments current line or selection. |
Toggle line commentation | Comments a line if it is not commented or removes a comment if the line is commented. |
Increase indent | Indents the current line or selection by one tabulator. |
Decrease indent | Removes one tabulator from the indentation of the current line or selection. |
Goto matching brace | If the cursor is ahead or behind a brace, then it is moved to the brace which belongs to the current one. If this keyboard shortcut is pressed again, the cursor is moved back to the first brace. |
Toggle marker | Set a marker on the current line, or clear the marker if there already is one. |
Goto next marker | Goto the next marker in the current document. |
Goto previous marker | Goto the previous marker in the current document. |
Complete word | Shows auto completion list. |
Show calltip | Shows call tips for the current function or method. |
Show macro list | Shows a list of available macros and variables in the workspace. |
Complete construct | If you type a construct like if or
for and press this key, it
will be completed with a matching template.
|
Suppress construct completion | If you type a construct like if or
for and press this key, it
will not be completed, and a space or tab will be inserted,
depending on what the construct completion keybinding is set to.
For example, if you have set the
construct completion keybinding to space ,
then setting this to Shift+space will
prevent construct completion and insert a space.
|
Select current word | Selects the current word under the cursor. |
Insert alternative whitespace | Inserts a tabulator character when spaces should be used for indentation and inserts space characters of the amount of a tabulator width when tabulators should be used for indentation. |
Find Usage | Finds all occurrences of the current word (near the keyboard cursor) or selection and displays them in the messages window. |
Go to tag definition | Jump to the definition of the current word (near the keyboard cursor). If the definition cannot be found (e.g. the relevant file is not open) Geany will beep and do nothing. See the section called “Go to tag definition”. |
Go to tag declaration | Jump to the declaration of the current word (near the keyboard cursor). If the declaration cannot be found (e.g. the relevant file is not open) Geany will beep and do nothing. See the section called “Go to tag definition”. |
Context Action | Executes a command and passes the current word (near the cursor postion) or selection as an argument. See the section called “Context actions”. |