HOW TO USE LINUX TEXT EDITORS

Reading Time: 6 minutes

Hello Readers… In this blog, we are going to learn how to use Linux text editors. You can use the Linux text editor to edit text files, write code, update user guide files, and more. Linux systems support several text editors. There are two types of text editors on Linux, listed below.

command-line text editors such as Vi, nano, pico. GUI text editors such as gedit (for Gnome) and Kwrite. Text editors play an important role in coding. Therefore, it is important to choose the best text editor. The text editor should not only be simple but also functional and easy to use.

A text editor with IDE features is considered a good text editor. This section describes the top 12 text editors for Linux
.It also describes the latest text editors and compares them to traditional text editors such as Vi and Nano. This will help you select the editor of your choice.

  • Vi/VIM editor
  • Nano editor
  • Gedit editor
  • Sublime text editor
  • VSCode
  • GNU Emacs
  • Atom editor
  • Brackets editor
  • Pico editor
  • Bluefish
  • Kate/Kwrite
  • Notepad ++

Vi/VIM EDITOR

The Vim editor is one of the most widely used and most powerful command-line-based editors on Linux systems. It has advanced features of the old Unix Vi editor. It’s an easy-to-use editor that provides the same environment for all Linux distributions. Most programmers prefer the Vi editor, so it’s also called the programming editor.

The Vi editor has some special features that are more powerful than other text editors, such as Vi mode and syntax highlighting. Generally, there are two modes:

  • Command Mode
  • Insert Mode

Command mode: In command mode, you can perform actions on files. By default, it boots in command mode. In this mode, all parts of speech are treated as commands. In this mode, you can execute commands.
Insert Mode: Insert mode allows you to insert text into a file. To switch from command mode to insert mode, press Esc to exit active mode and press the “i” key.

Command:

vi <file_name>
vi months.txt

NANO EDITOR

Nano is a simple editor. It is designed for beginners and advanced users also it has many customization features.
Some advanced features of a nano text editor are as follows:

  • has highly customizable keyboard shortcuts
  • supports syntax highlighting
  • has undo and redo options
  • provides full online display on standard output
  • has pager support to read from standard input

Command:

nano <file_name>
nano months.txt

GEDIT EDITOR

The Gedit editor is the default editor for the GNOME desktop environment. When we open a file, it opens with Gedit editor. It provides the same simple functionality as any basic text editor and also it is a lightweight editor with a simple user interface.

Command:

gedit <file_name>
gedit <months.txt>

SUBLIME TEXT EDITOR

Sublime Text Editor is also one of the most popular IDE text editors. It is used more as a development environment tool than a text editor. It has several features to support multiple programming and markup languages. Moreover, it supports many plugins to make it more than just a text editor.
Some key features of a sublime text editor are as follows:

  • has a great control panel.
  • is a python based plugin API.
  • supports parallel code editing.
  • provides project specific options.

Command:

subl

VSCODE EDITOR

VSCode Editor is a modern and widely used text editor. It is built by Microsoft and supports Linux, Mac and Windows operating systems. It facilitates with many powerful features to support many programming languages ​​and markup languages.

Command:

code .

The VsCode EDitor looks like :

GNU EMACS EDITOR

GNU Emacs is the oldest and simplest text editor for Linux systems. It is part of the GNU project. GNU remains a popular text editor used by thousands of users because of its simplicity. It is written in the C programming language and LISP.
Some of the main features of GNU Emacs are as follows:

  • has Mail and News options.
  • provides a debugger interface extension.
  • has comprehensive documentation and support.

Run the following commands to install GNU Emacs:

sudo apt-get update  
sudo apt-get install emacs  

Command:

emacs <file_name>
emacs months.txt

ATOM EDITOR

Atom is a free and open source editor developed by GitHub Inc. It is cross-platform and supports many programming languages. Above all, it is also known as the “hackable text editor for the 21st century” and developed for development purposes, is fully customizable using web technologies like JavaScript and HTML. It supports with Node.js based plugins and Git control.

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

sudo dpkg -i Downloads/atom-amd64.deb   

BRACKETS EDITOR

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

To install Brackets editor, execute the following commands:

sudo add-apt-repository ppa:webupd8team/brackets  
sudo apt-get update  
sudo apt-get install brackets  

It would look like:

PICO EDITOR

Pico Editor is a Linux terminal-based text editor. It has built-in support for pin news and email clients. It is very simple to use and facilitates with some useful features like justification, cut/paste, spell check, etc. However, this is just a simple text editor, so it doesn’t offer as many features as other Linux text editors.
This is not a completely 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 on multiple files.

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

pico <file_name>
pico months.txt

BLUEFISH EDITOR

Bluefish is a free and open source text editor for Linux systems. It is an advanced text editor with many programming tools. Above all it is good for developing dynamic websites and supports many languages ​​and engines like PHP, C, C++, JavaScript, Java, Google Go and many more.

To install Bluefish, execute the following commands:

sudo add-apt-repository ppa:klaus-vormweg/bluefish  
sudo add-apt-repository ppa:klaus-vormweg/bluefish-gtk2  
sudo apt-get update  
sudo apt-get install bluefish  

To open file with bluefish, execute the below command:

bluefish <file name>  
bluefish months.txt

KATE/KWRITE EDITOR

Kate is an advanced multi-document editor. This is part of KDE from release version 2.2. The KUbuntu desktop environment is provided as a standard editor. If you are familiar with the KUbuntu environment, you need to know the Kate editor. This allows you to work with multiple files at the same time. It is considered an IDE because it contains powerful features like an IDE. Great for editing configuration files, viewing HTML sources from Conqueror, creating new applications, and many other tasks.

To install the kate editor, execute the below command:

sudo apt-get install kate

Command:

kate <file_name>
kate months.txt

It will look like below image:

NOTEPAD++

Notepad++ is a basic text editor with lots of customisation options. It mainly focuses on the speed and minimal size of the program. Furthermore is mainly used by Windows users and supports many plugins to increase its functionality.
Some key features of Notepad++ are as follows:

  • supports tabbed editing. It provides code folding.
  • has a bookmark holder. He has a document card.
  • supports Perl compatible regular expressions.

To install notepad++, run the following commands:

sudo apt-get install snapd snapd-xdg-open  
sudo snap install notepad-plus-plus  

Command:

notepad-plus-plus <file name>  
notepad-plus-plus months.txt

The Notepad++ looks like:

ECLIPSE EDITOR

Eclipse is one of the most widely used IDEs (Integrated Development Environments) for development. It is the recommended choice for Java developers as it is developed in Java and has multiple features for developing advanced Java applications. It also supports other programming languages, and you will need to install additional plugins to write your code in other programming languages ​​such as PHP, Python, C, C ++, Ruby on Rails, and COBOL.

Some key features of the eclipse are as following:

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

To install Eclipse, execute the following commands:

sudo apt update  
sudo apt install eclipse  

It will look like the below image:

We have learned about 13 linux text editor in this module that are going to be very useful for us .

Keep Learning

REFERENCE

https://phoenixnap.com/kb/best-linux-text-editors-for-coding

Written by 

Deeksha Tripathi is a Software Intern at Knoldus Inc Software. She has a keen interest toward learning new technologies. Her practice area is Devops. When not working, she will be busy in listening music , and spending time with her family .

Leave a Reply