Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Emacs editing environment, Part 2: Learn the essential modes and editing features of Emacs

Get going with this famous open source editor

Michael Stutz, Author, Consultant
Photo of Michael Stutz
Michael Stutz is author of The Linux Cookbook, which he also designed and typeset using only open source software. His research interests include digital publishing and the future of the book. He has used various UNIX operating systems for 20 years.

Summary:  One of the powerhouses of UNIX® computing, the open source Emacs editor is a large, complex application that does everything from edit text to function as a complete development environment. This tutorial, the second in a series, introduces you to some of the essential concept of modes, shows you some of the powerful text manipulation functions available, and teaches you how to use the built-in search, replace, and spellcheck facilities of Emacs.

View more content in this series

Date:  10 Apr 2007
Level:  Introductory

Activity:  20074 views
Comments:  

Before you start

Learn what to expect from this tutorial, and how to get the most out of it.

About this series

The Emacs editing environment is a favorite of UNIX® developers. It's known around the world as the king of editors, but many users find it has a bit of a learning curve. The Emacs environment doesn't seem intuitive at first glance, and it doesn't work like other editors and word processors. But learning Emacs doesn't have to be difficult. Once you get going, you'll see how intuitive it is and become more comfortable with it after each use. This tutorial series shows you the way, taking you from the basics of Emacs, such as its features, philosophy, key-command layout, and methods for editing text, through many of its powerful editing features.

After completing this series, you'll be able to comfortably use Emacs for everyday editing, be well on your way to Emacs proficiency, and have a good feel for many of the advanced capabilities of Emacs.

About this tutorial

This tutorial, the second in a series, demonstrates how to use some of the vital features for text editing and introduces the concept of modes, showing you what to use them for, how to invoke them, and which popular modes you're liable to use in your normal editing. It also describes a special mode for defining abbreviations as useful shorthand and explains how to use some of the text-editing features that work regardless of mode -- including important text manipulation commands, the search and replace facility, and the built-in spell checker.

Objectives

The primary objective of this tutorial is to take users who are already familiar with the basics of the Emacs editor, such as its manner of keyboard input and the paradigm of buffers, and illustrate some of its essential but more intermediate features, including editing modes, incremental search, and other important Emacs text manipulation commands and facilities.

After completing this tutorial, you will have a firm knowledge of the editing modes of Emacs and how to utilize these various text-manipulation features in Emacs.

Prerequisites

The only prerequisite for this tutorial is that you already have a basic understanding of Emacs, which you can gain by taking the first tutorial in this series.

Although this tutorial is written for all levels of UNIX expertise, it's helpful if you have at least a rudimentary understanding of the UNIX filesystem:

  • Files
  • Directories
  • Permissions
  • Filesystem hierarchy

System requirements

This tutorial requires a user account on any UNIX-based system that has a recent copy of Emacs installed.

There are several varieties of Emacs; the original and most popular is GNU Emacs, which is published online by the GNU Project (see Resources).

You should have a recent copy of GNU Emacs -- one that is at version 20 or greater. Versions 20 and 21 are the most commonly available, and development snapshots of version 22 are also available. This tutorial works with any of these versions for Emacs. If your system is running something older, it's time to upgrade.

To know what version of Emacs you have running, use the GNU-style --version flag:

$ emacs --version
GNU Emacs 22.0.91.1
Copyright (C) 2006 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
$ 

1 of 9 | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=AIX and UNIX, Open source
ArticleID=208259
TutorialTitle=Emacs editing environment, Part 2: Learn the essential modes and editing features of Emacs
publish-date=04102007
author1-email=stutz@dsl.org
author1-email-cc=mmccrary@us.ibm.com