Javatpoint Logo
Javatpoint Logo

Linux Text Editors

A text editor is a kind of computer program that can edit plain text. Sometimes, such programs are called "notepad" software. Text editors are offered software development and operating system packages and can be utilized to modify, including programming language source code, documentation files, and configuration files.

Linux text editors can be used for editing text files, writing codes, updating user instruction files, and more. A Linux system supports multiple text editors. There are two types of text editors in Linux, which are given below:

  • Command-line text editors such as Vi, nano, pico, and more.
  • GUI text editors such as gedit (for Gnome), Kwrite, and more.

A text editor plays an important role while coding. So, it is important to select the best text editor. A text editor should not only be simple but also functional and should be good to work with.

A text editor with IDE features is considered as a good text editor.

What is Rich text and plain text?

There are essential differences between rich text (like that made by desktop publishing and word processor software) and plain text (made and edited by many text editors).

Exclusively, plain text is composed of character representation. All characters are represented by one, two, or four bytes fixed-length sequence or as one-four bytes variable-length sequence, in accordance with particular character encoding conventions, including UTF-16, UTF-8, Shift-JIS, ISO/IEC 2022, or ASCII. These conventions specify several printable characters but non-printing characters that manage the text flow, including page breaks, line breaks, and spaces. Plain text includes no other text information, not only the character encoding convention applied.

  • Plain text is saved in text files; however, text files don't exclusively save plain text.
  • Generally, plain text was shown with a monospace font like columnar formatting and horizontal alignment was done with whitespace characters sometimes since the initial computer days.
  • On the other hand, rich text may include metadata, paragraph formatting (e.g., space, word and letter distribution, alignment, and indentation between lines and paragraphs), character formatting data (e.g., style, weight, size, and typespace), and page specification data (e.g., reading direction, margin, and size). Rich text can be complicated.
  • Text editors are created to open and store text files having plain text or anything else that can be considered as plain text, such as rich text markup or something else markup (e.g., SVG).

Brief History of Text Editors

Computer text was inserted into cards using keypunch devices before text editors were available. Then, physical boxes of thin cardboard cards were embedded into the card reader. Dick card images, drums, and magnetic files made from these types of cards beautify generally had no line-separation characters and supposed 80- or 90- fixed-length character records. Punched tape was a replacement for cards. It could be made by a few teleprinters, which used unique characters to represent record ends.

A few early OSes contained batch text editors, developed with language processors or as different utility programs; an example was the feature to edit source files, i.e., SQUOZE, for SCAT in SHARE OS.

  • The first collective text editors were famous as "line editors" logical to typewriter- or teleprinter-style terminals with no displays.
  • Commands (generally one keystroke) affected file edits at a fictional insertion point known as the "cursor".
  • These edits were documented by typing any command for printing a small file section and by printing the whole file periodically.
  • The cursor can be moved via commands in a few line editors that describe the line number inside the file, regular expressions eventually, and text strings for which to find.
  • A few line editors can be utilized via keypunch; changing commands can be taken from a card deck and applied to a described file.
  • Some basic line editors backed a "verify" mode where modify commands showed the altered lines.
  • Screen-based text editors became common when computer terminals along with video screens were available.

O26 was one of the original full-screen editors, which was specified for the CDC 6000 series system's operator console in 1967. vi was another initial full-screen editor, which was specified in the 1970s; it's still a classic editor on Linux and Unix operating systems. Also, UCSD Pascal Screen Oriented Editor was written in the 1970s and was developed for both general text and sectioned source code.

One of the initial open-source and free software projects, Emacs, is another previous real-time and full-screen editor that was ported to various systems. The speed and ease of use of a full-screen editor motivated several early video terminal purchases.

In a text editor, the core data structure is the one that handles the string or list of records that indicates the current file state being edited. The ambition for text editors that can more quickly undo/redo early edits, insert text, and remote text led to the advancement of more complicated data structures while the departed can be stored in one long consecutive character array. A classic text editor utilizes a gap buffer, a rope, a piece table, or a line's linked list, as its data structure.

Text Editor Types

A few text editors are simple and small, and others provide complex and broad functions. For instance, Unix-like and Unix operating systems contain the pico editor but several also contain the Emacs and vi editors. Microsoft systems provide the simple Notepad so that various people use other editors with additional features, especially programmers.

  • Under the classic Mac OS of Apple Macintosh, there was the TeachText later substituted in 1994 by SimpleText, which was substituted in Mac OS X via TextEdit, which consists of text editor features with those common for a word processor, like two or more font selection, margins, and rulers.
  • These features are simultaneously unavailable but must be changed by user command, or by the program deciding the file type automatically.
  • Almost every word processor can write and read files in the plain text style, permitting them to launch files stored by text editors. However, saving these types of files through a word processor needs to ensure that the file is specified in plain text format and that any BOM or text encoding settings would not complicate the file for its expected use.
  • Many non-WYSIWYG word processors, including WordStar, are conveniently pressed as text editors into service and were used as such at the time of the 1980s.

The file format (default) of these word processors generally features a markup language, along with the common format being visual formatting and plain text achieved with non-printing escape sequences or control characters. Later word processors, such as Microsoft Word, store the files in binary format and are mostly never utilized to alter plain text files.

Typical Features of Text Editors

  • Find & replace: Text editors offer extensive facilities to search and replace text strings, either set of files or individually in a selected folder or opened tabs.
  • Cut, copy, & paste: Almost every text editor offers methods to copy and shift text between files or in the files.
  • Text formatting: Often, text editors facilitate visual formatting aspects, such as bullet list auto-indentation, and line wrap formatting with ASCII characters, syntax highlighting, comment formatting, and so on.
  • Undo & redo: Text Editors offer to undo and redo the final edit as with processors. Especially with previous text editors, only one edit history level is often remembered, and issuing undo will only successively "toggle" the final change.
  • Ability to move to a described line number.
  • Ability to manage UTF-8 encoded text.

Advanced Features of Text Editors

  • Procedure and macro definition to describe new features and commands as a mix of prior commands and macros, probably with passed parameters or macro nesting.
  • Profile macros along with names described in, e.g., profile, environment, automatically executed when launching a new file or at the start of an edit session.
  • Profiles to keep options fixed by the user in the middle of the editing session.
  • Multi-file editing: The features to edit two or more files at the time of an edit session, probably remembering all lines' current-line cursor to insert duplicate text into all files, move or copy text between files, side-by-side compare files, etc.
  • Multi-view editors: The feature to show two or more views of a similar file, with separate cursor tracking, adjusting modifications between the windows but offering the same features as are present for independent files.
  • Column-based editing: The feature to insert and alter data at a specific column, or to move data to particular columns.
  • Expand/collapse, also known as folding: The features to exclude text sections from view temporarily. It may be based on some syntactic components or a variety of line numbers, e.g., excepting everything between the BEGIN; and the same END;.
  • Data transformation: Reading and combining another text file's contents into the currently edited file. A few text editors offer a way to add the result of a command delivered to the shell of the operating system. A case-shifting aspect could also be converted to uppercase or lowercase.
  • Filtering: A few advanced text editors permit the editor to transfer sections or each of the files being altered to another service and read the output back into the file in the position of the lines that are being "filtered". For instance, it is useful to sort a line series numerically or alphabetically, indenting source code, doing mathematical calculations, and so on.
  • Extensibility: A text editor designed for use by several programmers must offer some plugin tool, or be scriptable; hence, a programmer can personalize the editor with aspects required to handle software projects, conform to particular coding styles, or customize key bindings or functionalities for specific version control systems or programming languages.
  • Syntax highlighting: Highlight config files, markup language, source code, and other text contextually that is represented in a predictable or organized format. Generally, editors permit users to personalize the styles or colors used for all language elements. Also, some editors permit users to load and use themes to modify the feel and look of the whole user interface of the editor.
  • Syntax-oriented editors: A few text editors have syntax support of one or multiple languages, and permit operations in the context of syntactical units. For example, inserting a WHEN clause inside a SELECT statement.
  • Command line: A few editors, such as XEDIT and ISPF, have an embedded field on a screen to enter commands in contrast to text. The user might have to utilize cursor keys to change between the text and command fields or the editor might interpret as requests to change depending on the editor.
    Cursor navigation may differ around text editors. For instance, clicking End might navigate to the wrapped line's end after one click navigated to an on-screen row's end of text. Typically, block-oriented terminals have embedded keys for cursor movement, as do keyboards over PCs.
  • Line commands: Line commands are also called sequence commands or prefix commands. A few editors consider a file as a text file array with corresponding sequence numbers or line numbers and have a different line number field for all text fields.

The line command can also be described as a string that a user enters into the line number field and the editor identifies as a command working on that particular line or line's block. For example, LC to convert a line into lowercase. Regardless of the prefix command name, some editors permit the sequence field to occur after a text field.

In this section, we are going to discuss the top 20 text editors for Linux. Further, we will talk about the latest text editors and will compare them with the traditional text editors such as Vi and nano. This will help you with selecting the editor of your choice.

  1. Vi/VIM editor
  2. Nano editor
  3. Gedit editor
  4. Sublime text editor
  5. VSCode
  6. GNU emacs
  7. Atom editor
  8. Brackets editor
  9. Pico editor
  10. Bluefish
  11. Kate/Kwrite
  12. Notepad ++
  13. Eclipse
  14. gVIM editor
  15. Jed editor
  16. Geany editor
  17. Leaf Pad
  18. Light Table
  19. Medit text editor
  20. CodeLite

1.Vi/VIM editor

Vim editor is one of the most used and powerful command-line based editor of the Linux system. By default, it is supported by most Linux distros. It has enhanced functionalities of the old Unix Vi editor. It is a user-friendly editor and provides the same environment for all the Linux distros. It is also termed as programmer's editor because most programmers prefer Vi editor.

Vi editor has some special features such as Vi modes and syntax highlighting that makes it powerful than other text editors. Generally, it has two modes:

Command Mode: The command mode allows us to perform actions on files. By default, it starts in command mode. In this mode, all types of words are considered as commands. We can execute commands in this mode.

Insert Mode: The insert mode allows to insert text on files. To switch from command mode to insert mode, press the Esc key to exit from active mode and 'i' key.

To learn more about Vi editor, visit the Vi editor with commands.

To invoke the vi editor, execute the vi command with the file name as follows:

It will look like below image:

Linux Text Editors

2. Nano editor

Nano is a straight forward editor. It is designed for both beginners and advanced users. It has many customization features.

Some advanced features of a nano text editor are as following:

  • It has highly customizable key bindings
  • It supports syntax highlighting
  • It has undo and redo options
  • It provides full line display on the standard output
  • It has pager support to read from standard input

To open file with nano editor, execute the command as follows:

The nano editor looks like:

Linux Text Editors

In the nano editor, the useful options are given at the bottom, use the CTRL+ option to perform an operation. For example, to exit from the editor, use CTRL +X keys. To learn more about nano editor, Visit Linux Nano Editor.


3. Gedit editor

Gedit editor is the default editor for the GNOME desktop environment. When we open a file, it will open with the Gedit editor. It provides straightforward functionalities like any basic text editor. It is a lightweight editor with a straight forward user interface. It was publicly released in the year 2000 with a GNOME desktop environment. It is developed using the C programming language and supports all font family.

Some key features of the gedit text editor are as following:

  • It provides syntax highlighting.
  • It supports internationalized text.
  • It supports several programming languages.

To invoke the gedit editor from the terminal, execute the below command:

It looks like:

Linux Text Editors

4. Sublime Text

The sublime text editor is also one of the most popular IDE-based text editors. It is used as a development environment tool more than a text editor. It has several features to support many programming and mark-up languages. Further, it supports numerous plugins to make it more than a text editor.

Some key features of a sublime text editor are as following:

  • It has an excellent Command Palette.
  • It is a python-based plugin API.
  • It supports parallel editing of code.
  • It provides project-specific preferences.

Execute the following commands to install the sublime text editor:

To learn more about installation, visit Install sublime text editor on ubuntu.

We can open the sublime editor by browsing applications. Also, we can open it from the terminal. To access the sublime editor from the terminal, execute the below command:

It will look like below image:

Linux Text Editors

5. VSCode Editor

VSCode editor is a modern and widely used text editor. It is built by Microsoft and has support for Linux, Mac and Windows OS. It facilitates with many powerful features to support many programming languages and markup language.

To install the VSCode, download the binary package from Here. And, execute the below command for Debian and Ubuntu-based systems:

Some key features of VSCode editor are as following:

  • It has full support for debugging with an interactive console, breakpoints, call stacks and more.
  • It has built-in support for Git and Git commands.
  • It facilitates with IntelliSense.
  • It provides many customization options.
  • It has massive support for languages.
  • It supports togglable layouts.
  • It provides a built-in terminal.

The VSCode editor looks like the below image:

Linux Text Editors

6.GNU Emacs

GNU Emacs is the oldest and simplest text editor for the Linux system. It is a part of the GNU project. It is still a popular text editor used by thousands of users because of its simplicity. It is written in C and LISP programming languages.

Some key features of GNU Emacs are as following:

  • It has mail and News options.
  • It provides a debugger interface extension.
  • It has extensive documentation and support.

Execute the following commands to install GNU Emacs:

To access it from the terminal, execute the below command:

It will look like below image:

Linux Text Editors

7. Atom Editor

Atom is a free and open-source code editor developed by GitHub Inc. It is cross-platform and supports several programming languages. It is also referred to as a "hackable text editor for the 21st century". It was developed for the development purpose. It is completely customizable using web technologies such as JavaScript and HTML. It facilitates with Node.js-based plugins and Git control.

Some key features of Atom Editor are as follows:

  • It is open source.
  • It has a modern, customizable layout.
  • It facilitates with attractive themes.
  • It provides embedded Git support.
  • It provides real-time collaboration with Telesync.
  • It has smart auto-complete and IntelliSense.
  • It has a built-in package manager.

To install Atom, download the binary package from the official site of Atom, and execute the below command:

To know more about installation, Visit Here.

It will look like below image:

Linux Text Editors

8. Brackets Editor

Brackets editor is a free and open-source text editor developed by Adobe. It primarily focuses on web development. It provides a rich code editing experience with several free extensions. It is written in HTML, CSS, and JS.

Some key features of Brackets editor are as following:

  • It provides an attractive User Interface.
  • It has pre-processor support for SCSS and LESS.
  • It facilitates with inline editors.
  • It provides a live preview.
  • It has support for multiple tabbed editing.
  • It has PHP support.
  • It supports Language Server Protocol.
  • It supports plugin extensions.

To install Brackets editor, execute the following commands:

It will look like:

Linux Text Editors

9. Pico Editor

The Pico editor is a terminal-based Linux text editor. It has built-in support for pine news and email client. It is very straight forward to use and facilitates with some useful features such as justification, cut/paste, spell checker, and more. However, it is just a simple text editor, so it does not offer many features like other Linux text editors.

It is not purely free text editor, so most Linux distributions do not provide pico as a text editor.

It does not support working with multiple files simultaneously. Also, it cannot perform find and replace operation across multiple files.

To open a file with a pico text editor, execute the command as follows:

It will look like below command:

Linux Text Editors

10. Bluefish

Bluefish is a free and open-source text editor for the Linux system. It is an advanced text editor having plenty of tools for programming. It is good for developing dynamic websites. It supports several languages and tools such as PHP, C, C++, JavaScript, Java, Google Go, and many more.

Some key features of Bluefish text editor are as following:

  • It is lightweight and fast.
  • It allows integration with external Linux programs such as make, sed, awk, lint, weblint, and many more.
  • It facilitates with the spell checker.
  • It allows us to work on multiple projects.
  • It has remote file editing.
  • It provides a find and replace feature.
  • It has undo and redo option.
  • It provides auto-recovery of modified files.

To install Bluefish, execute the following commands:

To know more about installation, visit Install Bluefish editor on Ubuntu.

To open file with bluefish, execute the below command:

it will look like:

Linux Text Editors

11. Kate/Kwrite

kate is an advanced and multi-document editor. It is part of KDE, since release version 2.2. The Kubuntu desktop environment ships it as a default editor. If you are familiar with the Kubuntu environment, then you must have known about kate editor. It provides working with multiple files simultaneously. It is considered as an IDE as it carries powerful features like an IDE. It is good for editing configuration files, viewing HTML sources from Konqueror, creating new applications, and many more tasks.

Some key features of Kate editor are as following:

Some of the unique features of Kate includes:

  • It is a powerful IDE.
  • It provides support for many languages.
  • It has an auto language detect feature.
  • It sets indentation for documents automatically.

To install the kate editor, execute the below command:

To open a file with kate editor, execute the below command:

It will look like below image:

Linux Text Editors

12. Notepad++

Notepad++ is a basic text editor having many customization options. It primarily focuses on speed and minimal program size. It is mostly used by Windows users. It supports several plugins to increase its functionality.

Some key features of Notepad++ are as following:

  • It supports tabbed editing.
  • It provides code folding.
  • It has bookmark support.
  • It has a document map.
  • It provides support for Perl Compatible Regular Expression.

To install notepad ++, execute the following commands:

To know more about the installation process, visit How to install notepad++ on Ubuntu.

To open a file with notepad++, execute the below command:

It will look like the below image:

Linux Text Editors

13. Eclipse

Eclipse is one of the most used IDE (integrated development environment) for development. It is a preferred choice of the Java developers as it is developed in Java and provides several features to develop advance java applications. It provides supports for other programming languages as well, and we need to install extra plugins to write code in other programming languages such as PHP, Python, C, C++, Ruby on Rails, COBOL, and more.

Some key features of the eclipse are as following:

  • It is a free and open-source code editor.
  • It provides Java Development tools for Java developers.
  • It has massive plugin support.
  • It provides an eclipse marketplace to download additional tools.

To install Eclipse, execute the following commands:

To know more about the installation process, visit How to install Eclipse on Ubuntu.

It will look like the below image:

Linux Text Editors

14. gVim Editor

The gVim editor is the GUI version of the popular Vim editor. It has similar functionality and modes as the command line editor Vim. It can be easily downloaded from the software store. To install it from the terminal, execute the following commands:

To open a file with gVim from the terminal, execute the below command:

It will look like the below image:

Linux Text Editors

15. Jed Editor

The Jed is a command-line editor that supports extensive use of the S-Lang library. Jed supports its all flavors for different operating systems such as Linux and Windows. It is a lightweight editor, which makes it an ideal editor for the low configuration systems.

Some key features of Jed editor are as following:

  • It provides color syntax highlighting on color terminals.
  • It has code folding support.
  • It provides drop-down menus on the terminal.
  • It has the support of emulates editors such as Emacs, EDT, WordStar, Borland, Brief, etc.
  • It is extensible in the C-like language S-Lang to make it highly customizable.
  • It supports a variety of programming modes for multiple programming languages.

To install the Jed editor, execute the following commands:

It will look like the below image:

Linux Text Editors

16. Geany Editor

Geany is a powerful, lightweight editor for the Linux systems. It is stable and supports tons of features to make it useful. It has built-in support for several programming languages. It is supported by other operating systems such as Windows and Mac as well.

Some key features of Geany editor are as following:

  • It provides syntax highlighting feature.
  • It provides a pluggable interface.
  • It supports many file types.
  • It provides code folding and code navigation options.
  • It provides an auto-completion option.
  • It supports the auto-closing of HTML and XML tags.

To install Geany editor, execute the following commands:

It will look like the below command:

Linux Text Editors

17. Leafpad

Leafpad is a straight forward GTK based text editor. It is a popular text editor among Linux users due to its simplicity and lightness.

The key features of Leafpad are as following:

  • It provides a codeset option.
  • It provides auto codeset detection (UTF-8 and some codesets).
  • It facilitates unlimited Undo/Redo operations.
  • It provides Auto/Multi-line Indent.
  • It displays the current line number.
  • It provides drag and drop feature.
  • It allows print files.

To install Leafpad, execute the following commands:

It will look like the below command:

Linux Text Editors

18. Light Table

A light table is a modern open-source IDE based text editor. It is one of the best text editors of the Linux system.

Some key features of Light table are as following:

  • It is free and open-source.
  • It is cross-platform and lightweight.
  • It provides modern, smart UI with a minimalist interface.
  • It provides auto-completion while coding.
  • It supports inline evaluation.
  • It has many customization options with themes and plugins.
  • It provides split views and instant feedback.
  • It has a command palette.
  • It facilitates with fuzzy finder.
  • It supports auto-updates.

We can simply download the light table from its official site. To install it from the terminal, execute the following commands:

It will look like the below image:

Linux Text Editors

19. Medit text editor

The medit text editor is a lightweight open-source text editor. It is available for all major operating systems such as Linux, Mac, and Windows. It was started with a simple built-in component of CGAP, but it is now upgraded as a stand-alone text editor.

Some key features of Medit are as following:

  • It provides syntax highlighting.
  • It facilitates many plugins for several programming languages.
  • It supports regular expressions.
  • It facilitates with configurable keyboard accelerators.

To install medit, execute the following commands:

It will look like the below image:

Linux Text Editors

20. CodeLite

CodeLite is an open-source IDE that supports cross-platform. It supports several most used programming languages like C, C++, PHP, and JavaScript. It supports all major platforms such as Linux, Mac, and Windows.

To install CodeLite, execute the following commands:

It will look like the below image:

Linux Text Editors

Some specialized editors

Editors contain extra functions and special features, for example,

  • Source code editors are some text editors with extra functionality to offer source code production. Often, these feature user-programmable code navigation, syntax highlighting functions, and keyboard macros or coding tools the same as the HTML editor.
  • Integrated development environments are developed to handle and streamline bigger programming projects. Usually, they are only utilized for programming because they include several features unnecessary for basic text editing.
  • Folding editors contain "orthodox editors" that are Xedit derivatives. Editors that work folding without programming-specific aspects are generally known as outliners.
  • The authors of the World Wide Web are provided with a range of HTML editors applied to the task of building web pages. They contain E Text Editor, KompoZer, and Dreamweaver. Several provide the option of seeing the work in progress on a standard web browser or in-built HTML rendering engine.
  • Almost every web development is implemented in a dynamic programming language like PHP or Ruby with an IDE or source code editor. The HTML is provided by each, but the underlying static websites are stored as separate template files that are collected by the software managing the site and don't compose the entire HTML document.
  • Outliners are also known as tree-based editors as they incorporate hierarchical outline trees using a text editor. Folding can be treated as a specialized outlining form.
  • Computer scientists, physicists, and mathematicians often generate books and articles with LaTeX and TeX in plain text files. Often, such documents are generated by a standard text editor, although a few people utilize specialized TeX editors.
  • Collaborative editors permit two or more users to simultaneously work on a similar document on a network from remote locations. The modifications made by specific users are automatically followed and combined into the document to remove the possibility of incompatible edits.
  • Distraction-free editors offer a minimalistic interface along with the goal of separating the writer from the remaining operating system and application, so they are able to concentrate on the writing with no distractions through interface components, such as notification or toolbar area.

Next TopicVi Editor





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA