Gedit Keyboard Shortcuts
Shortcut keys enable you to perform tasks more quickly than if you use a mouse. The following tables list all of Gedit's shortcut keys. These are in the Gedit user manual as of version 2.18.
Tabs
Shortcut Key |
Command |
Ctrl + Alt + PageUp |
Switches to the next tab to the left. |
Ctrl + Alt + PageDown |
Switches to the next tab to the right. |
Ctrl + W |
Close tab. |
Ctrl + Shift + L |
Save all tabs. |
Ctrl + Shift + W |
Close all tabs. |
Alt + n |
Jump to nth tab. |
Files
Shortcut Key |
Command |
Ctrl + N |
Create a new document. |
Ctrl + O |
Open a document. |
Ctrl + L |
Open a location. |
Ctrl + S |
Save the current document to disk. |
Ctrl + Shift + S |
Save the current document with a new filename. |
Ctrl + P |
Print the current document. |
Ctrl + Shift + P |
Print preview. |
Ctrl + W |
Close the current document. |
Ctrl + Q |
Quit Gedit. |
Edit
Shortcut Key |
Command |
Ctrl + Z |
Undo the last action. |
Ctrl + Shift + Z |
Redo the last undone action . |
Ctrl + X |
Cut the selected text or region and place it on the clipboard. |
Ctrl + C |
Copy the selected text or region onto the clipboard. |
Ctrl + V |
Paste the contents of the clipboard. |
Ctrl + A |
Select all. |
Edit (from GTKTextView)
Shortcut Key |
Command |
Ctrl + D |
Delete the line. |
Ctrl + Left |
Move the cursor to the beginning of the word or previous word if it's already in the beginning of the current one. |
Ctrl + Right |
Move the cursor to the end of the word or next word if it's already in the end of the current one. |
Panes
Shortcut Key |
Command |
F9 |
Show/hide the side pane. |
Ctrl + F9 |
Show/hide the bottom pane. |
Search
Shortcut Key |
Command |
Ctrl + F |
Find a string. |
Ctrl + G |
Find the next instance of the string. |
Ctrl + Shift + G |
Find the previous instance of the string. |
Ctrl + K |
Interactive search. |
Ctrl + H |
Search and replace. |
Ctrl + Shift + K |
Clear highlight. |
Ctrl + I |
Goto line. |
Tools
Shortcut Key |
Command |
F7 |
Check spelling (with plugin). |
Alt + F12 |
Remove trailing spaces (with plugin). |
Ctrl + T |
Indent (with plugin). |
Ctrl + Shift + T |
Remove Indent (with plugin). |
F8 |
Run "make" in current directory (with plugin). |
Ctrl + Shift + D |
Directory listing (with plugin). |
Help
Shortcut Key |
Command |
F1 |
Load Gedit's online help document. |
- Does this document list ALL Shortcuts? Are there any undocumented shortcuts?
PaoloBorelli: no, this only documents shortcuts provided by gedit itself, IMHO the list should also include all the shortcuts internal to gtktextview which are even less discoverable (Ctrl+rightarrow = move cursor to next word, etc)
Is it possible to modify these shortcuts? Specifically, I would like Next tab to be Ctrl-PgUp, which is the shortcut for other GNOME applications like gnome-terminal and epiphany (aswell as firefox)? RoryMcCann It is now possible to use a plug-in to get this functionality. See below. (EranMes)
- As far as I can tell, it is not currently possible to modify these shortcuts without going into the source file: /gedit/gedit-ui.h. They seem to be hard coded there, though I could be wrong.
- Found out accidentally, but if you highlight an item in the menu and press the shortcut combo you want, it gets assigned to the menu item. Backspace clears the shortcut.
- Where do you find that?
- It is part of the GNOME interface, used in some of the major applications. This behavior is controllable through the "Appearance Preferences" dialog, under the "Interface" tab, it is called "Editable menu shortcut keys".
You still can't disable the strange Ctrl+PgUp/PgDown mappings this way.
- It is part of the GNOME interface, used in some of the major applications. This behavior is controllable through the "Appearance Preferences" dialog, under the "Interface" tab, it is called "Editable menu shortcut keys".
- Where do you find that?
- Ctrl+Tab and Ctrl+Shift+Tab should switch between tabs, like other applications.
Hi, as I see it I guess the reason why you can't overwrite ctrl+tab shortcuts is that those are used to navigate the UI so are high priority in order to adhere to accessibility standards. Still I'm too used to these shortcuts to switch between documents, so I've created a simple plugin that does just that, can be downloaded from here: http://live.gnome.org/Gedit/Plugins?action=AttachFile&do=get&target=tabswitch.tar.gz
Thanks to EliaSarti , it was trivial creating another plugin that switches documents using Ctr + PgUp / PgDown. Get it here: http://live.gnome.org/Gedit/Plugins?action=AttachFile&do=get&target=tabpgupdown.tar.gz (EranMes)
The following EditShortcuts plugin will allow you to modify the keyboard shortcuts: http://empty.23inch.de/pmwiki.php/Main/EditShortcuts (JohnPeach)