O'Reilly logo

Linux® Command Line and Shell Scripting Bible, Second Edition by Christine Bresnahan, Richard Blum

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9

Working with Editors

In This Chapter

  • Working with the vim editor
  • Understanding emacs
  • Getting comfortable with KDE
  • Using the GNOME editor

Before you can start your shell scripting career, you'll need to know how to use at least one text editor in Linux. The more you know about how to use these fancy features such as searching, cutting, and pasting, the quicker you'll be able to develop your shell scripts. This chapter discusses the main text editors you'll see in the Linux world.

The vim Editor

If you're working in command line mode, you may want to become familiar with at least one text editor that operates in the Linux console. The vi editor is the original editor used on Unix systems. It uses the console graphics mode to emulate a text-editing window, allowing you to see the lines of your file, move around within the file, and insert, edit, and replace text.

While it is quite possibly the most complicated editor in the world (at least in the opinion of those who hate it), it provides many features that have made it a staple for Unix administrators for decades.

When the GNU Project ported the vi editor to the open source world, they chose to make some improvements to it. Because it no longer resembled the original vi editor found in the Unix world, the developers also renamed it, to vi improved, or vim.

To make life easier, almost all Linux distributions create an alias named (see Chapter 5) vi that points to the vim program:

$ alias vi

alias vi=‘vim’

$

This section ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required