Ctrl+N
Browse / gedit Editor Cheatsheet
gedit Editor Cheatsheet
A quick reference guide for the gedit text editor, covering essential commands, shortcuts, navigation, and features to boost your productivity.
Basics & File Handling
File Operations
|
Create a new empty document. |
Ctrl+O |
Open an existing document. Opens a file dialog. |
Ctrl+S |
Save the current document. |
Ctrl+Shift+S |
Save the current document with a new name or location (Save As). |
Ctrl+W |
Close the current document tab. |
Ctrl+Q |
Quit gedit. Prompts to save unsaved documents. |
Ctrl+R |
Revert the current document to the last saved version. |
F9 |
Toggle the side pane (file browser, etc.). |
Basic Editing
Ctrl+C |
Copy selected text. |
Ctrl+X |
Cut selected text. |
Ctrl+V |
Paste text from the clipboard. |
Ctrl+Z |
Undo the last action. |
Ctrl+Y |
Redo the last undone action. |
Ctrl+A |
Select all text in the current document. |
Del |
Delete character after cursor. |
Backspace |
Delete character before cursor. |
Navigation
Home |
Move cursor to the beginning of the line. |
End |
Move cursor to the end of the line. |
Ctrl+Home |
Move cursor to the beginning of the document. |
Ctrl+End |
Move cursor to the end of the document. |
Ctrl+G |
Go to a specific line number. |
Page Up |
Scroll up one page. |
Page Down |
Scroll down one page. |
Ctrl+Arrow Keys |
Move cursor word by word. |
Shift+Arrow Keys |
Select text character by character. |
Search and Replace
Ctrl+F |
Open the search bar at the bottom. |
Ctrl+B |
Find previous occurrence (after searching). |
Ctrl+K |
Find next occurrence (after searching). |
Ctrl+H |
Open the replace bar at the bottom. |
F3 |
Find next occurrence of the selected text or text in the search bar. |
Shift+F3 |
Find previous occurrence. |
Alt+Enter |
Find all occurrences (after search). |
Search Bar Options |
Case Sensitive, Whole Words Only, Regular Expressions. |
Tabs, Views & Settings
Tab Management
Ctrl+T |
Open a new tab. |
Ctrl+Page Up |
Switch to the previous tab. |
Ctrl+Page Down |
Switch to the next tab. |
Ctrl+Alt+Page Up |
Move the current tab left. |
Ctrl+Alt+Page Down |
Move the current tab right. |
Ctrl+W |
Close the current tab. |
Middle Click Tab |
Close a tab by middle-clicking on it. |
View Options
F11 |
Toggle Fullscreen mode. |
Ctrl+M |
Toggle the bottom pane (messages, terminal, etc.). Requires plugins. |
Ctrl+I |
Toggle highlight mode (Syntax Highlighting). |
Ctrl+L |
Toggle line numbers display. |
Ctrl+. |
Toggle right margin display. |
View Menu |
Options for wrapping text, highlighting current line, highlighting matching brackets, etc. |
Tools Menu |
Access spell checking, sort lines, and other tool-related functions. |
Document Statistics |
Accessed via the Tools menu. Shows word count, line count, etc. |
Preferences (Ctrl+,)
View Tab: Set options for line numbers, text wrapping, right margin, current line highlight, matching brackets, and caret blinking. |
Editor Tab: Configure tab width, indentation, auto-indentation, file saving options (backup copies, trailing spaces), and line ending type. |
Fonts & Colors Tab: Choose the editor font and size, and select a color scheme (syntax highlighting theme). |
Plugins Tab: Enable, disable, and configure installed plugins. Essential for adding features like file browser, terminal, code snippets, etc. |
Shortcuts Tab: View and customize keyboard shortcuts for various actions. You can set your own keybindings here. |
External Tools Tab: Configure external commands or scripts to run from the editor (requires plugin). |
Useful Shortcuts (Misc)
Ctrl+D |
Delete the current line. |
Ctrl+E |
Clear recent documents list (under File menu). |
Alt+X |
Execute command (if External Tools plugin is enabled). |
Ctrl+Space |
Show code completion suggestions (requires plugin & language support). |
F5 |
Reload the document if it has been changed externally. |
Ctrl+Mouse Wheel |
Zoom in/out text size. |
Alt+Number (1-9) |
Switch to the tab number. E.g., Alt+1 for the first tab. |
Esc |
Close search/replace bar or other transient elements. |
Ctrl+P |
Print the current document. |
Advanced Features & Tips
Plugins & Extensions
Enabling Plugins: Go to |
Common Plugins:
|
Installing More Plugins: Some plugins are available in your distribution’s package manager (e.g., |
Configuring Plugins: Some plugins have configuration options available by selecting the plugin in the Preferences window and clicking ‘Configure’. |
Customizing UI with Plugins: Plugins can add new menu items, toolbars, side panes, or bottom panes. |
Troubleshooting: If a plugin doesn’t show up, check if it’s installed correctly and if it’s compatible with your gedit version. |
Performance: Be mindful that enabling many complex plugins might slightly impact startup time or performance on older systems. |
Split View (Requires Plugin)
Enable the ‘Split View’ plugin in |
Once enabled, a ‘Split View’ option will appear in the ‘View’ menu. |
|
This allows you to see different parts of the same document, or different documents side-by-side within the same tab. |
Use |
Navigation and editing in one pane affects the same document in the other pane (if it’s the same document). |
Dragging a tab header into an existing split view can place a different document there. |
Snippets (Requires Plugin)
Enable the ‘Snippets’ plugin in |
Snippets allow you to insert predefined text chunks quickly by typing a trigger word and pressing Tab. |
You can manage snippets via |
Snippets are defined for specific programming languages (modes). |
Example (Python snippet): Type |
Snippet structure can include placeholders (e.g., |
Create custom snippets for repetitive code patterns or text. |
Tips & Best Practices
Syntax Highlighting: Ensure the correct highlighting mode is selected (bottom right corner) for better readability, especially for code. |
Auto Save: Configure |
Trailing Spaces: Use |
Encoding: Pay attention to the document encoding displayed in the status bar, especially when dealing with non-ASCII characters or files created on different operating systems. |
External Tools: Set up external commands (like linters, formatters, or compilers) for your programming workflow if the plugin is suitable. |
Shortcuts Customization: Explore |
Session Management: gedit remembers open tabs by default, which helps resume your work quickly after closing and reopening the editor. |