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.

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 keysActionDescription
HomeGo to Start of LineMove the caret to the start of the line. Behaves differently if smart_home_key is set.
EndGo to End of LineMove the caret to the end of the line.
Alt-HomeGo to Start of Display LineMove 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-EndGo to End of Display LineMove the caret to the end of the display line. If the line is not wrapped, it behaves like Go to End of Line.
Alt-UpScroll up by one lineScrolls the view.
Alt-DownScroll down by one lineScrolls the view.
Ctrl-Shift-LScroll to current lineScrolls the current line into the centre of the view. The cursor position and or an existing selection will not be changed.
Ctrl-LGo to lineFocuses the Go to Line entry (if visible) or shows the Go to line dialog.
Ctrl-BGoto matching braceIf 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-MToggle markerSet a marker on the current line, or clear the marker if there already is one.
Ctrl-,Goto previous markerGoto the previous marker in the current document.
Ctrl-.Goto next markerGoto the next marker in the current document.
Ctrl-/Go to Previous Word PartGoto the previous part of the current word.
Ctrl-\Go to Next Word PartGoto the next part of the current word.
Alt-Right (C)Navigate forward a locationSwitches to the next location in the navigation history. See the section called Code Navigation History.
Alt-Left (C)Navigate back a locationSwitches to the previous location in the navigation history. See the section called Code navigation history.
F1 (C)HelpOpens the manual.

MOVING THE DOCUMENT

Shortcut keysActionDescription
Ctrl-Shift-PageDownMove document rightChanges the current document with the right hand one.
Ctrl-Shift-PageUpMove document leftChanges the current document with the left hand one.
Ctrl-PageDown (C)Switch to right documentSwitches to the next open document.
Ctrl-PageUp (C)Switch to left documentSwitches to the previous open document.
Ctrl-+ (C)Zoom InZooms in the text.
Ctrl– (C)Zoom OutZooms out the text.
Ctrl-0Zoom ResetReset any previous zoom on the text.
F11 (C)FullscreenSwitches to fullscreen mode.
F1 (C)HelpOpens the manual.

FINDING TEXT, SELECTING TEXT

Shortcut keysActionDescription
Ctrl-F (C)FindOpens the Find dialog.
Ctrl-GFind NextFinds next result.
Ctrl-Shift-GFind PreviousFinds previous result.
Ctrl-Shift-FFind in filesOpens the Find in files dialog.
F7Switch to Search BarSwitches to the search bar in the toolbar (if visible).
Ctrl-Shift-EFind UsageFinds 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-DFind Document UsageFinds 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-WSelect current wordSelects the current word under the cursor.
Alt-Shift-LSelect current line(s)Selects the current line under the cursor (and any partially selected lines).
Alt-Shift-PSelect current paragraphSelects the current paragraph under the cursor which is defined by two empty lines around it.
Ctrl-A (C)Select allMakes a selection of all text in the current document.
Control + ShiftColumn mode editing (rectangular selections)edits of the text within this selection will be done for every line in the selection.
Control + AltColumn mode editing (rectangular selections)edits of the text within this selection will be done for every line in the selection.
Ctrl-Shift-MMark AllHighlight 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-MToggle markerSet a marker on the current line, or clear the marker if there already is one.
Ctrl-,Goto previous markerGoto the previous marker in the current document.
Ctrl-.Goto next markerGoto the next marker in the current document.
F1 (C)HelpOpens the manual.

CUT & PASTE

Shortcut keysActionDescription
Ctrl-X (C)CutCut the current selection to the clipboard.
Ctrl-Shift-XCut current line(s)Cuts the current line (and any lines with a selection) to the clipboard.
Ctrl-C (C)CopyCopy the current selection to the clipboard.
Ctrl-Shift-CCopy current line(s)Copies the current line (and any lines with a selection) to the clipboard.
Ctrl-V (C)PastePaste the clipboard text into the current document.
Ctrl-DDuplicate line or selectionDuplicates the current line or selection.
Ctrl-Shift-DeleteDelete to line endDeletes from the current caret position to the end of the current line.
Ctrl-KDelete current line(s)Deletes the current line (and any lines with a selection).
F1 (C)HelpOpens the manual.

EDITTING

Shortcut keysActionDescription
Shift-Alt-DInsert dateInserts a customisable date.
Ctrl-EToggle line commentationComments a line if it is not commented or removes a comment if the line is commented.
Ctrl-Alt-UToggle case of selectionChanges 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.
TabWord part completionWhen the autocompletion list is visible, complete the currently selected item up to the next word part.
TabComplete snippetIf you type a construct like if or for and press this key, it will be completed with a matching template.
Ctrl-IIncrease indentIndents the current line or selection by one tab or by spaces in the amount of the tab width setting.
Ctrl-UDecrease indentRemoves one tab or the amount of spaces of the tab width setting from the indentation of the current line or selection.
Alt-PageUpMove line(s) upMove the current line or selected lines up by one line.
Alt-PageDownMove line(s) downMove the current line or selected lines down by one line.
Ctrl-SpaceComplete wordShows 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-TGo to tag declarationJump to the declaration of the current word or selection. See Go to tag declaration.
Ctrl-TGo to tag definitionJump to the definition of the current word or selection. See Go to tag definition.
Ctrl-Z (C)UndoUn-does the last action.
Ctrl-YRedoRe-does the last action.
Ctrl-H (C)ReplaceOpens 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-SpaceShow calltipShows a calltip for the current function or method.
F1 (C)HelpOpens the manual.

FILES

Shortcut keysActionDescription
Ctrl-N (C)NewCreates a new file.
Ctrl-O (C)OpenOpens a file.
Ctrl-Shift-OOpen selected fileOpens the selected filename.
Ctrl-R (C)Reload fileReloads the current file. All unsaved changes will be lost.
Ctrl-TabSwitch to last used documentSwitches 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.
Ctrl-S (C)SaveSaves the current file.
Ctrl-Shift-SSave allSaves all open files.
Ctrl-W (C)CloseCloses the current file.
Ctrl-Shift-WClose allCloses all open files.
Ctrl-P (C)PrintPrints the current file.
Ctrl-Q (C)QuitQuits Geany.
F1 (C)HelpOpens the manual.

BUILD, MAKE, & COMPILE

Shortcut keysActionDescription
Ctrl-Alt-PPreferencesOpens preferences dialog.
F9BuildBuilds (compiles if necessary and links) the current file.
Shift-F8Make objectCompiles the current file with the Make tool.
Shift-F9Make allBuilds the current file with the Make tool.
F8CompileCompiles the current file.
F5RunExecutes the current file in a terminal emulation.
Ctrl-ReturnShow macro listShows a list of available macros and variables in the workspace.
Ctrl-Shift-F9Make custom targetBuilds the current file with the Make tool and a given target.
Ctrl-Shift-RReload symbol listReloads the tag/symbol list.
F1 (C)HelpOpens the manual.

ALSO

Shortcut keysActionDescription
F2Switch to EditorSwitches to editor widget. Also reshows the document statistics line (after a short timeout).
F4Switch to VTESwitches to VTE widget.
F6Switch to ScribbleSwitches to scribble widget.
F1 (C)HelpOpens the manual.
Print/export