gedit
Edit text files with a graphical interface
TLDR
Open a text file
Open multiple text files
Open a text file with a specific encoding
Display a list of supported encodings
SYNOPSIS
gedit [OPTIONS] [FILE...]
PARAMETERS
--new-window
Opens a new, empty window for editing.
--new-document
Creates a new, untitled document within an existing or new window.
--encoding=ENCODING
Sets the character encoding for the specified files. Use --list-encodings for options.
--list-encodings
Displays a list of all supported character encodings.
--standalone
Runs gedit as a separate, independent process, not attaching to an existing instance.
--fullscreen
Starts gedit in full-screen mode, hiding window decorations.
--print
Prints the specified files using the default printer.
--version
Shows the gedit version information and exits.
--help
Displays available command-line options and exits.
DESCRIPTION
gedit is the official text editor of the GNOME desktop environment, designed to be simple and easy-to-use. It provides a clean, minimalistic interface while offering essential features for general-purpose text editing and basic programming. Key capabilities include syntax highlighting for various programming languages, customizable fonts and colors, a tabbed interface for managing multiple documents, undo/redo functionality, and a powerful search and replace feature.
Unlike command-line editors such as Vim or Nano, gedit is a graphical application, making it accessible and intuitive for users accustomed to GUI environments. It's often used for editing configuration files, writing simple scripts, taking notes, or developing small programs. While not an IDE, its plugin system allows extending functionality for specific tasks, making it a versatile tool for both everyday users and developers looking for a lightweight editor.
CAVEATS
gedit is a lightweight editor and may not be suitable for very large files (hundreds of MBs) as performance can degrade significantly. It also lacks advanced features found in full-fledged Integrated Development Environments (IDEs) or more powerful text editors like VS Code or Emacs, such as integrated debugging, sophisticated code completion, or complex project management. It strictly requires a graphical user interface and cannot be used directly from a terminal without a display server.
PLUGIN EXTENSIBILITY
gedit supports a rich set of official and third-party plugins that can significantly extend its functionality. These plugins can add features like a file browser pane, snippet management, external tool execution, document statistics, and more, allowing users to tailor the editor to their specific needs without cluttering the core interface.
SYNTAX HIGHLIGHTING
A core feature of gedit is its extensive support for syntax highlighting, which automatically color-codes text based on the language's syntax. This makes code and configuration files significantly more readable and helps in identifying syntax errors, supporting dozens of programming languages and markup formats out-of-the-box.
HISTORY
gedit was first released in 1999 as part of the GNOME 2 desktop environment. It was developed to provide a simple, easy-to-use default text editor that seamlessly integrates with the GNOME user experience, adhering to its Human Interface Guidelines. Written in C and built upon the GTK+ toolkit, it aimed to offer an intuitive alternative to the more complex command-line editors prevalent at the time, like Vim and Emacs. Its development has consistently focused on user-friendliness, accessibility, and robust basic text editing capabilities, evolving with the GNOME project itself.