This is an old revision of the document!
Keyboard shortcuts
Each of Geany's drop-down menus ('File', 'Edit','Search. 'View', … )
offers some keyboard shortcuts ('File/New' = Ctrl+N, …; 'Edit/Undo' = Ctrl+Z, ..).
The following tables list all the built-in shortcuts.
Customizable shortcuts are marked as (C).
You can make more! For how to do this, see
“Configurable keybindings” in the Geany on-line manual
http://www.geany.org/manual/#configurable-keybindings.
Built-in shortcuts
MOVING AROUND IN THE DOCUMENT
Shortcut keys | Action | Description |
Home | Go to Start of Line | Move the caret to the start of the line. Behaves differently if smart_home_key is set. |
End | Go to End of Line | Move the caret to the end of the line. |
Alt-Home | Go to Start of Display Line | Move the caret to the start of the display line. This is useful when you use line wrapping and want to jump to the start of the wrapped, virtual line, not the real start of the whole line. If the line is not wrapped, it behaves like Go to Start of Line. |
Alt-End | Go to End of Display Line | Move the caret to the end of the display line. If the line is not wrapped, it behaves like Go to End of Line. |
Alt-Up | Scroll up by one line | Scrolls the view. |
Alt-Down | Scroll down by one line | Scrolls the view. |
Ctrl-Shift-L | Scroll to current line | Scrolls the current line into the centre of the view. The cursor position and or an existing selection will not be changed. |
Ctrl-L | Go to line | Focuses the Go to Line entry (if visible) or shows the Go to line dialog. |
Ctrl-B | 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. |
Ctrl-M | Toggle marker | Set a marker on the current line, or clear the marker if there already is one. |
Ctrl-, | Goto previous marker | Goto the previous marker in the current document. |
Ctrl-. | Goto next marker | Goto the next marker in the current document. |
Ctrl-/ | Go to Previous Word Part | Goto the previous part of the current word. |
Ctrl-\ | Go to Next Word Part | Goto the next part of the current word. |
Alt-Right (C) | Navigate forward a location | Switches to the next location in the navigation history. See the section called Code Navigation History. |
Alt-Left (C) | Navigate back a location | Switches to the previous location in the navigation history. See the section called Code navigation history. |
F1 (C) | Help | Opens the manual. |
MOVING THE DOCUMENT
Shortcut keys | Action | Description |
Ctrl-Shift-PageDown | Move document right | Changes the current document with the right hand one. |
Ctrl-Shift-PageUp | Move document left | Changes the current document with the left hand one. |
Ctrl-PageDown (C) | Switch to right document | Switches to the next open document. |
Ctrl-PageUp (C) | Switch to left document | Switches to the previous open document. |
Ctrl-+ (C) | Zoom In | Zooms in the text. |
Ctrl-- (C) | Zoom Out | Zooms out the text. |
Ctrl-0 | Zoom Reset | Reset any previous zoom on the text. |
F11 (C) | Fullscreen | Switches to fullscreen mode. |
F1 (C) | Help | Opens the manual. |
FINDING TEXT, SELECTING TEXT
Shortcut keys | Action | Description |
Ctrl-F (C) | Find | Opens the Find dialog. |
Ctrl-G | Find Next | Finds next result. |
Ctrl-Shift-G | Find Previous | Finds previous result. |
Ctrl-Shift-F | Find in files | Opens the Find in files dialog. |
F7 | Switch to Search Bar | Switches to the search bar in the toolbar (if visible). |
Ctrl-Shift-E | Find Usage | Finds all occurrences of the current word (near the keyboard cursor) or selection in all open documents and displays them in the messages window. |
Ctrl-Shift-D | Find Document Usage | Finds all occurrences of the current word (near the keyboard cursor) or selection in the current document and displays them in the messages window. |
Alt-Shift-W | Select current word | Selects the current word under the cursor. |
Alt-Shift-L | Select current line(s) | Selects the current line under the cursor (and any partially selected lines). |
Alt-Shift-P | Select current paragraph | Selects the current paragraph under the cursor which is defined by two empty lines around it. |
Ctrl-A (C) | Select all | Makes a selection of all text in the current document. |
Control + Shift | Column mode editing (rectangular selections) | edits of the text within this selection will be done for every line in the selection. |
Control + Alt | Column mode editing (rectangular selections) | edits of the text within this selection will be done for every line in the selection. |
Ctrl-Shift-M | Mark All | Highlight all matches of the current word/selection in the current document with a colored box. If there's nothing to find, or the cursor is next to an existing match, the highlighted matches will be cleared. |
Ctrl-M | Toggle marker | Set a marker on the current line, or clear the marker if there already is one. |
Ctrl-, | Goto previous marker | Goto the previous marker in the current document. |
Ctrl-. | Goto next marker | Goto the next marker in the current document. |
F1 (C) | Help | Opens the manual. |
CUT & PASTE
Shortcut keys | Action | Description |
Ctrl-X (C) | Cut | Cut the current selection to the clipboard. |
Ctrl-Shift-X | Cut current line(s) | Cuts the current line (and any lines with a selection) to the clipboard. |
Ctrl-C (C) | Copy | Copy the current selection to the clipboard. |
Ctrl-Shift-C | Copy current line(s) | Copies the current line (and any lines with a selection) to the clipboard. |
Ctrl-V (C) | Paste | Paste the clipboard text into the current document. |
Ctrl-D | Duplicate line or selection | Duplicates the current line or selection. |
Ctrl-Shift-Delete | Delete to line end | Deletes from the current caret position to the end of the current line. |
Ctrl-K | Delete current line(s) | Deletes the current line (and any lines with a selection). |
F1 (C) | Help | Opens the manual. |
EDITING
Shortcut keys | Action | Description |
Shift-Alt-D | Insert date | Inserts a customisable date. |
Ctrl-E | Toggle line commentation | Comments a line if it is not commented or removes a comment if the line is commented. |
Ctrl-Alt-U | Toggle case of selection | Changes the case of the selection. A lowercase selection will be changed into uppercase and vice versa. If the selection contains lower- and uppercase characters, all will be converted to lowercase. |
Tab | Word part completion | When the autocompletion list is visible, complete the currently selected item up to the next word part. |
Tab | Complete snippet | If you type a construct like if or for and press this key, it will be completed with a matching template. |
Ctrl-I | Increase indent | Indents the current line or selection by one tab or by spaces in the amount of the tab width setting. |
Ctrl-U | Decrease indent | Removes one tab or the amount of spaces of the tab width setting from the indentation of the current line or selection. |
Alt-PageUp | Move line(s) up | Move the current line or selected lines up by one line. |
Alt-PageDown | Move line(s) down | Move the current line or selected lines down by one line. |
Ctrl-Space | Complete word | Shows the autocompletion list. If already showing tag completion, it shows document word completion instead, even if it is not enabled for automatic completion. Likewise if no tag suggestions are available, it shows document word completion. |
Ctrl-Shift-T | Go to tag declaration | Jump to the declaration of the current word or selection. See Go to tag declaration. |
Ctrl-T | Go to tag definition | Jump to the definition of the current word or selection. See Go to tag definition. |
Ctrl-Z (C) | Undo | Un-does the last action. |
Ctrl-Y | Redo | Re-does the last action. |
Ctrl-H (C) | Replace | Opens the Replace dialog. |
Ctrl-1 (2,3) | Send to Custom Command 1 (2,3) | Passes the current selection to a configured external command (available for the first three configured commands, see Sending text through custom commands for details). |
Ctrl-Shift-Space | Show calltip | Shows a calltip for the current function or method. |
F1 (C) | Help | Opens the manual. |
FILES
Shortcut keys | Action | Description |
Ctrl-N (C) | New | Creates a new file. |
Ctrl-O (C) | Open | Opens a file. |
Ctrl-Shift-O | Open selected file | Opens the selected filename. |
Ctrl-R (C) | Reload file | Reloads the current file. All unsaved changes will be lost. |
Ctrl-Tab | Switch to last used document | Switches to the previously shown document (if it's still open). Holding Ctrl (or another modifier if the keybinding has been changed) will show a dialog, then repeated presses of the keybinding will switch to the 2nd-last used document, 3rd-last, etc. Also known as Most-Recently-Used documents switching. |
Shift+F10 | Opens a dialog | Opens a dialog (it is same dialog when right-clicking on a tab-title). With arrow-up/down-key of the keyboard there is the possibility to chose an entry. Then press enter to execute. Else press the Esc-key to let disappear the dialog. |
Ctrl-S (C) | Save | Saves the current file. |
Ctrl-Shift-S | Save all | Saves all open files. |
Ctrl-W (C) | Close | Closes the current file. |
Ctrl-Shift-W | Close all | Closes all open files. |
Ctrl-P (C) | Print | Prints the current file. |
Ctrl-Q (C) | Quit | Quits Geany. |
F1 (C) | Help | Opens the manual. |
BUILD, MAKE, & COMPILE
Shortcut keys | Action | Description |
Ctrl-Alt-P | Preferences | Opens preferences dialog. |
F9 | Build | Builds (compiles if necessary and links) the current file. |
Shift-F8 | Make object | Compiles the current file with the Make tool. |
Shift-F9 | Make all | Builds the current file with the Make tool. |
F8 | Compile | Compiles the current file. |
F5 | Run | Executes the current file in a terminal emulation. |
Ctrl-Return | Show macro list | Shows a list of available macros and variables in the workspace. |
Ctrl-Shift-F9 | Make custom target | Builds the current file with the Make tool and a given target. |
Ctrl-Shift-R | Reload symbol list | Reloads the tag/symbol list. |
F1 (C) | Help | Opens the manual. |
ALSO
Shortcut keys | Action | Description |
F2 | Switch to Editor | Switches to editor widget. Also reshows the document statistics line (after a short timeout). |
F4 | Switch to VTE | Switches to VTE widget. |
F6 | Switch to Scribble | Switches to scribble widget. |
F1 (C) | Help | Opens the manual. |