CS 497C – Introduction to UNIX Lecture 18: - The GNU emacs Editor Chin-Chih Chang

Slides:



Advertisements
Similar presentations
CS 497C – Introduction to UNIX Lecture 8: The vi/vim Editor Chin-Chih Chang
Advertisements

A Guide to Unix Using Linux Fourth Edition
Introduction to the gedit editor. gedit: the Gnome editor Gnome: Gnome is a freely available (i.e., no cost) desktop environment for the UNIX system The.
Editing with vi Or more fun than you thought you’d have without a mouse Prof. Chris GauthierDickey.
CIS 240 Introduction to UNIX Instructor: Sue Sampson.
CS 497C – Introduction to UNIX Lecture 31: - Filters Using Regular Expressions – grep and sed Chin-Chih Chang
CS 497C – Introduction to UNIX Lecture 17: - The GNU emacs Editor Chin-Chih Chang
Vi Editor TA for ITIS3100: Xu Fei
Chapter 5 Editing Text Files
CS 497C – Introduction to UNIX Lecture 36: - Customizing the Environment Chin-Chih Chang
CS 497C – Introduction to UNIX Lecture 10: The vi/vim Editor Chin-Chih Chang
1 Using Editors Editors let you create and edit ASCII files UNIX normally includes two editors: vi and Emacs Vi and Emacs are screen editors: they display.
CS 497C – Introduction to UNIX Lecture 23: - Simple Filters Chin-Chih Chang
CS 497C – Introduction to UNIX Lecture 9: The vi/vim Editor Chin-Chih Chang
Starting Vi Opening an existing file vi filename Creating a new file vi filename In your workshop directory, create a new file called mysong vi mysong.
CS 497C – Introduction to UNIX Lecture 1: Getting Started Chin-Chih Chang
CS465 - UNIX The vi Editor. Creating Files Most human-readable files on Unix are created with a text editor Unix has many, many different editors ed a.
CS 497C – Introduction to UNIX Lecture 19: - The GNU emacs Editor Chin-Chih Chang
CSCI 330 T HE UNIX S YSTEM Editing files. E DITOR C ONCEPTS Editing a file is to modify the content of a file Text editor: Enter and modify text in a.
Using Linux Text Editors. Use Non-Graphical Linux Text Editors Graphical Text Editor.
1 Unix Editors (ee, ed, ex, vi, vim) and Compilers (g77, gcc) Speaker: Li-Wen Chen Date:
1 Unix Text Editors Creating files on the Unix system.
Chapter 3 Mastering Editors
Chapter Three The UNIX Editors. 2 Lesson A The vi Editor.
Microsoft Word 2000 Presentation 2 Microsoft Word Topics  Tools –Spelling/Grammar Check –Thesaurus –AutoCorrect –Word Count –Change Case –Background.
Introduction to Vim Robbie CSCI2100 Data Structures Tutorial 3.
© 2010 South-Western / Cengage Learning Century 21 Keyboarding  Cycle 1  Office Features 1.
Microsoft Office Illustrated Introductory, Second Edition Documents Editing.
Intro. To Unix commands For those who’ve never used Unix before Quick tutorial to let you move around your Unix Accounts No discussion of inner workings.
1 © 2014 John Urrutia. All rights reserved. Chapter 7 The “ Emacs “ Editor.
Introduction to Unix – CS 21 Lecture 8. Lecture Overview More detail on emacs and vi Regular expression matching in emacs and vi.
4 Editing files and Emacs Editing files The Emacs editor.
Text editors Why should I use an editor ? It is very important to able to use at least one text mode editor a text mode editor is so useful on remote machines.
Unix Editors. u Editors in Unix come in two general flavours: –modal editors have "modes" v generally input mode and command mode –input mode allows entry.
Tony Kombol.  Why text edit?  Many programs and features require configuration ▪ Configuration is kept in files ▪ Usually in the /etc directory  Changes.
Unix Session IV.
Text Editing February 2 nd, 2004 Class Meeting 3.
1 of 47 Chapter 4: The vi Editor – First Look Copyright ©2008 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
Chapter Three Text Editing1 System Programming Text Editing.
VI EDITOR University of Mississippi. Vi Editor What is Vi ? ▫Vi is a screen based editor. ▫The screen of your terminal will act as a window into the file.
Introduction to Unix (CA263) File Editing By Tariq Ibn Aziz.
Lesson 4-Mastering the Visual Editor. Overview Introducing the visual editor. Working in an existing file with vi. Understanding the visual editor. Navigating.
Chapter Three The UNIX Editors.
Isecur1ty training center Presented by : Eng. Mohammad Khreesha.
PacNOG 6: Nadi, Fiji Editing, vi & Configuration Files Hervey Allen Network Startup Resource Center.
Microsoft Word Level 1 Michael Carco. Word Level 1 Agenda  Word Basics  Navigating in a Document  Inserting and Modifying Text  Creating and Modifying.
Text editing and more basic commands CS 2204 Class meeting 3 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
Agenda Using vi Editor Starting vi Session Command / Input Modes Entering Text Editing Text Saving Edited File Aborting Editing Session.
Agenda Using vi Editor Starting vi Session Command / Input Modes
1 Lecture 3 More on editors: emacs and vi COP 3344 Introduction to UNIX.
October 24,  Creating and Opening Files  Save and Exit  Navigation  Shortcuts  Copying, Cutting and Pasting  Searching and Replacing  More.
Guide to Parallel Operating Systems with Microsoft Windows XP and Linux Chapter 6 Text Editors.
ITX2000 Remote hosts and web servers Prof. Xiaohong (Sharon) Gao Room: T125 Ext: Week 14 – UNIX vi text editor.
Basic VI Tran, Van Hoai Faculty of Computer Science and Engineering HCMC Uni. of Technology
By Justin Higgins. What is a text editor? If you’ve ever used Microsoft word you know what a text editor is (albeit a bloated one). When you write a program.
CS:414 introduction to Unix and Linux
Presentation By:- Komal Sadhwani
Vim basics Vi IMproved.
Guide To UNIX Using Linux Third Edition
Vi Introduction Tony Kombol.
Linux 104 Training Module File Editing.
Lecture 3 More on editors: emacs and vi COP 3344 Introduction to UNIX.
IT244 - Introduction to Linux / Unix Instructor: Bo Sheng
Text Editors Vim (Chapter 6) Emacs (Chapter 7)
Emacs CSC 135.
The Emacs Editor Read: Forouzan, Appendix C
CSCI The UNIX System Editing files
In the last class… The vi basics command, input and ex mode
Day 5 Emacs Editor David A. Gaitros Department of Computer Science
Presentation transcript:

CS 497C – Introduction to UNIX Lecture 18: - The GNU emacs Editor Chin-Chih Chang

Deleting, Moving and Copying Text To delete a character, use [Ctrl-d]. To delete a word, use [Alt-d]. To delete text from the current cursor position to the end of line, use [Ctrl-k]. To delete the entire line, first use [Ctrl-a] and then [Ctrl-k][Ctrl-k]. To delete text in a region, first mark the region and then use [Ctrl-w].

Deleting, Moving and Copying Text [Ctrl-y] is universally used to restore text from the deletion. While [Ctrl-w] deletes text in a region, the command to copy text is [Alt-w]. You can transpose two adjacent characters by using [Ctrl-t].

Changing Case of Text To convert an entire word to uppercase, move to the beginning of the word and then press [Alt-u]. You use [Alt-u] for converting a word to lowercase. To capitalize a single character, position the cursor under it and then use [Alt-c].

Changing Case of Text and Command Completion For transforming case in large blocks of text, use a region. The commands to convert text in a region are: [Ctrl-x][Ctrl-u] and [Ctrl-x][Ctrl-l]. The command completion feature can reduce some of the typing work. The guiding principle here is this: Enter as much of the command text as you want and then press the [Tab] key.

Undoing and Redoing Editing To undo the change, there are three ways: [Ctrl-x]u, [Ctrl-_], [Ctrl--]. If you continue to press [Ctrl--], you’ll undo the changes made before the last save. If you keep pressing [Ctrl--], emacs starts redoing everything that you have undone.

String Search The incremental and non-incremental search techniques are used in string search in emacs. Incremental search is invoked with [Ctrl-s] followed by the search string. After entering [Ctrl-s] emacs prompts for the search string in the minibuffer. Suppose you’re looking for mail. After m is entered, the search starts immediately.

String Search The cursor relocates itself at the first instance of m – maybe on the word moon. After mail is entered, press [Enter]. There are a number of advantages of using incremental search: –The search is faster. –emacs tells you instantly whether the string exists in the file. –If there is a typo, backspacing erases the error.

String Search At the end of a file, use [Ctrl-r] instead of [Ctrl-s]. To repeat a search, you’ll have to use the same command – [Ctrl-s] or [Ctrl-r]. In non-incremental search just press [Enter] and then type the string. Like vi, emacs uses a pattern comprising some special characters to look for similar strings. This pattern is called a regular expression.