gedit is a general-purpose text editor for plain-text notes and documents as well as source code. It grew up alongside the GNOME desktop project and fits closely into that environment on Linux. It is also available for macOS and Windows. gedit is free and open-source software.
Tabs, tab groups and the side panel
Every file open in gedit gets its own tab. You can open several files in one step. To view documents side by side, right-click a tab title and choose Move to New Tab Group. The window splits into resizable panes, each with its own row of tabs. You can drag tabs from one group to another.
The side panel, toggled with F9, helps when many files are open. Its Documents view lists every open file. In its File Browser view, buttons at the top of the panel let you move through folders. You can open files from there instead of the open dialog.
Syntax highlighting and code editing
gedit tries to recognize a file’s language when it opens it and colors keywords, strings, comments and other elements to match. Supported languages include Python, shell, C, C++, HTML, CSS, JavaScript, XML and Markdown. If detection fails, you can choose the highlight mode from the View menu or by clicking the language name in the status bar.
Line numbers, a right-margin guide, current-line and matching-bracket highlighting, automatic indentation, text wrapping and undo/redo complete the editing basics. The Code Comment plugin comments or uncomments the selected lines with Ctrl+M and Ctrl+Shift+M, inserting the comment characters that belong to the current language. It therefore does nothing in a plain-text document.
Files carrying Emacs, Kate or Vim modelines can bring their own settings into gedit. With the Modelines plugin enabled, the editor scans the first lines of the file. For Kate and Vim, it also scans the last lines (how many depends on the format). It applies tab width, indent width, spaces instead of tabs, wrapping and right-margin width from those comments. These settings override the general preferences for that file only.
Finding and replacing text
gedit offers a quick Find bar and a separate Find and Replace dialog. Both can match case and match whole words only, so that “and” does not match “sand”. They can also wrap around to the other end of the document. gedit supports regular expressions. Escape sequences such as \n for a new line and \t for a tab let a search span line breaks or target tab characters. Matches stay highlighted until Clear Highlight is chosen.
Spelling and word completion
The Spell Checker plugin underlines misspelled words in red and lists corrections in the right-click menu. It works through the gspell and Enchant libraries. The available languages therefore depend on the dictionaries installed on the system, with Hunspell dictionaries preferred. gedit remembers the spell-check language and highlighting state for each file and restores them when you reopen it.
Word Completion shows a pop-up list of words from the current document that begin with the letters already typed. You can insert a suggestion by double-clicking it or pressing Alt with the number shown beside it.
Plugins for everyday text tasks
Much of gedit’s extra functionality comes as plugins. You can switch them on one by one under Preferences, Plugins. Besides those described above, the default set includes:
- Bookmarks: marks lines with Ctrl+Alt+B and jumps forward and back between them with Ctrl+B and Ctrl+Shift+B.
- Document Statistics: counts words, lines, characters, non-space characters and bytes, for the document and a selection.
- Sort: sorts the selected lines, with options to reverse the order, remove duplicate lines, ignore case and begin comparing from a chosen column.
- Draw Spaces: shows spaces and tabs as visible marks.
- Insert Date/Time: places the current date or time at the cursor.
Further plugins, such as Quick Highlight for marking every occurrence of the selected text, come in the separate gedit-plugins collection or from third parties. They appear in the same Preferences list.
Remote files and protected system files
Besides local files, gedit opens files over HTTP, FTP and the other locations handled by GNOME’s GVfs layer. The server address goes into Other Locations in the open dialog. Files reached over HTTP or FTP are treated as read-only, so edits to them are saved to another location.
On Linux, a system file that requires administrator rights can be opened by passing its path with the admin:/// prefix on the command line. gedit then asks for the administrator password, while the editor itself keeps running as a normal user.
Color schemes and printing
Fonts and color schemes are set under Preferences, Font & Colors. gedit stores two scheme choices: one used with a light application theme and one with a dark theme. It marks as unsupported any scheme that would leave text unreadable under the other variant. Schemes made by others or written by the user can be added and chosen in the same place.
Printing (Ctrl+P) includes a preview, and the Text Editor tab of the Print dialog controls line numbers, text wrapping, fonts and page headers. Output can go to a printer or to a file.





