EMACS To quote the Emacs Manual: Emacs is the extensible, customizable, self- documenting real-time display editor. Emacs is an editor for plain-text,

Slides:



Advertisements
Similar presentations
Whats New in Office 2010?. Major Changes in Office 2010 The Office Ribbon, which first made its appearance in Office 2007, now appears in all Office 2010.
Advertisements

Computer Basics Hit List of Items to Talk About ● What and when to use left, right, middle, double and triple click? What and when to use left, right,
 Use the Left and Right arrow keys or the Page Up and Page Down keys to move between the pages. You can also click on the pages to move forward.  To.
A Guide to Unix Using Linux Fourth Edition
Editing with vi Or more fun than you thought you’d have without a mouse Prof. Chris GauthierDickey.
Linux+ Guide to Linux Certification, Second Edition
Chapter 5 Editing Text Files
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.
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.
Basic Editing Lesson 2- Part 2. Navigating and Searching Through a Document Find command options, the mouse, scroll bars, and various keystroke and keyboard.
Editing Java programs with the BlueJ IDE. Working environments to develop (= write) programs There are 2 ways to develop (write) computer programs: 1.Using.
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.
Lesson 1 – Microsoft Excel The goal of this lesson is for students to successfully explore and describe the Excel window and to create a new worksheet.
謝耀偉編著 國立高雄大學應用數學系 Living in Emacs DeveloperWorks, IBM.
Key Applications Module Lesson 19 — PowerPoint Essentials
Chapter 3 Mastering Editors
Microsoft Office 2003 Illustrated Brief Document Creating a.
CHAPTER 9 Introducing Microsoft Office Learning Objectives Start Office programs and explore common elements Use the Ribbon Work with files Use.
Objectives Understand what MATLAB is and why it is widely used in engineering and science Start the MATLAB program and solve simple problems in the command.
CHAPTER 9 Introducing Microsoft Office Learning Objectives Start Office programs and explore common elements Use the Ribbon Work with files Use.
Chapter Three The UNIX Editors. 2 Lesson A The vi Editor.
Word Lesson 2 Basic Editing
1 The EDIT Program The Edit program is a full screen text editor that allows you to: Create text files Create text files Edit an existing text files Edit.
Productivity Programs Common Features and Commands.
XP 1 Microsoft Access 2003 Introduction To Microsoft Access 2003.
Microsoft Office Illustrated Introductory, Second Edition Documents Editing.
Lesson 11: Looking at Files and Folders what a file or folder is on the computer how to recognize a file or folder on the desktop how to recognize the.
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.
IC 3 BASICS, Internet and Computing Core Certification Key Applications Lesson 11 Organizing the Worksheet.
1 Lesson 13 Editing and Formatting documents Computer Literacy BASICS: A Comprehensive Guide to IC 3, 4 th Edition Morrison / Wells.
Basic Editing Lesson 2.
XP New Perspectives on Windows 2000 Professional Windows 2000 Tutorial 2 1 Microsoft Windows 2000 Professional Tutorial 2 – Working With Files.
GISMO/GEBndPlan Overview Geographic Information System Mapping Object.
4 Editing files and Emacs Editing files The Emacs editor.
Lesson 2: Manipulating Text Courseware #: 3240
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.
Introduction to Unix – CS 21 Lecture 7. Lecture Overview Regular expressions revisited emacs versus vi Basic emacs and vi usage.
Basic Editing Lesson 2.
1 © 2012 John Urrutia. All rights reserved. Chapter 6 The vi Editor.
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.
Editing Basics Lesson 8. Skills Matrix SKILL #MATRIX SKILL 2.2.1Cut, copy, and paste text 2.2.2Find and replace text 4.1.1Insert building blocks in documents.
Chapter 3 Automating Your Work. It is frustrating when you have to type the same passage of text repeatedly. For example your name and address. Word includes.
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
Introduction to Word Processing.  Learn uses of word-processing software  Differentiate between typewriter and word- processing software  Explore various.
1. Chapter 1 Creating, Printing, and Editing Documents.
Vi editor Pronounced: `vee eye‘’. Agenda Describe the background of vi Editor Use vi editor to: create text files edit text files Our Goal is to create.
Key Applications Module Lesson 22 — Managing and Reporting Database Information Computer Literacy BASICS.
Linux+ Guide to Linux Certification, Second Edition Chapter 4 Exploring Linux Filesystems.
Amir Afzal UNIX Unbounded, 5th Edition Copyright ©2008 Chapter 6: The vi Editor – Last Look 1 of 55 Copyright ©2008 by Pearson Education, Inc. Upper Saddle.
>>0 >>1 >> 2 >> 3 >> 4 >>
1. Using word you can create the document and edit them later, as and when required,by adding more text, modifying the existing text, deleting/moving.
© 2004 The McGraw-Hill Companies, Inc. All rights reserved. The Advantage Series Microsoft Office Word 2003 CHAPTER 2 Modifying a Document.
Chapter 8. Copyright 2003, Paradigm Publishing Inc. CHAPTER 8 BACKNEXTEND 8-2 LINKS TO OBJECTIVES Delete, Move, Copy, and Paste Text Delete, Move, Copy,
1 Word Lesson 2 Basic Editing Microsoft Office 2010 Introductory Pasewark & Pasewark.
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.
Being Productive With Emacs Part 2
Guide To UNIX Using Linux Third Edition
Vi Editor.
Lecture 3 More on editors: emacs and vi COP 3344 Introduction to UNIX.
Text Editors Vim (Chapter 6) Emacs (Chapter 7)
Emacs CSC 135.
Linux Operations and Administration
The Emacs Editor Read: Forouzan, Appendix C
CSCI The UNIX System Editing files
Welcome To Microsoft Word 2016
Presentation transcript:

EMACS To quote the Emacs Manual: Emacs is the extensible, customizable, self- documenting real-time display editor. Emacs is an editor for plain-text, programming or markup languages, and anything else that someone has created a module for. Emacs also has tools for compiling, running and testing programs.

Emacs Commands * All of the basic editing commands (and there are lots of them) are available no matter what you're trying to do (there are no command “modes” like in vi to worry about) * All the tools Emacs provides for opening, saving, searching, and processing text (and more) are available to you no matter what you're in the middle of doing.

Extensibility If Emacs doesn't work the way you'd like, you can use the Emacs Lisp (Elisp) language to customize Emacs, automate common tasks, or add new features. Elisp is very easy to get started with and yet remarkably powerful: you can use it to alter and extend almost any feature of Emacs. As an example, there are addons to emacs which allow you to read news, mail, and RSS feeds, manage your files, or even play Tetris! (good old M-x tetris)

Movement Commands C – means to press the C key and a key M – means to press the Meta key and a key If your terminal does not support a meta key, you can press ESC, release ESC, and then press the key to enter the meta command. C-fForward one character C-bBack one character C-nNext line C-pPrevious line C-aBeginning of line C-eEnd of line M-fForward one word M-bBack one word M-aPrevious sentence M-eNext sentence M-vPrevious screen C-vNext screen M- End of buffer Getting fancy: C-u 3 C-pBack 3 lines C-u 10 C-fForward 10 characters M-1 M-0 C-f Forward 10 characters C-u C-nForward 4 lines C-u C-u C-nForward 16 lines C-u C-u C-u C-nForward 64 lines M-g gJump to specified line

More advanced movement C-sIncremental search forward C-rIncremental search backward Emacs remembers something called the mark, which is a previous cursor position. You can set mark to indicate a particular place in your buffer so you can return to it easily. C-x C-x at a later time will return point to mark. Actually, that command also moves mark to where point formerly was; therefore, a second C-x C-x returns point to its original position. C-SPCSet mark to the current location C-x C-xSwap point and mark Emacs tries to be helpful: many commands that have the potential to take you long distances set mark so that a simple C-x C-x takes you back to where you were. Emacs makes it difficult to lose your place in a buffer: even if you take a detour, you don't need to scroll around to get back to where you were. Emacs saves many previous values of the mark for you. You can cycle through the mark ring, which contains the last 16 marks you've set in the current buffer: C-u C-SPCCycle through mark ring

Menu Bar Emacs features a menu bar at the top of the screen which allows easy access to command commands. On a graphical display, you can use your mouse to click on these toolbars as normal for GUI apps. On a terminal display, you can press F10 to move to the first bar, and then navigate via arrow keys. Return selects, ESC cancels navigation. Right arrows on the menu means that the item leads to another menu,... on the menu means that the item will execute a command which will require input from the bottom of the window.

Scrolling C-l Clears the screen and redraws it, centering on the cursor. C-v scroll forward (pagedown also works) M-v scroll backwards (pageup works)

Windows! (Not the OS) Emacs has support for displaying multiple viewing windows at the same time. C-x 2 Split the current window into 2, one above the other C-x 3 Split the current window into 2, one next to the other C-x o Switch focus to another window C-x 0 delete the currently selected window C-x 1 make the currently selected window the only window (delete / close others) C-x ^ makes the current window taller C-x } makes the current window wider

Killing / Cutting Text C-k kills the portion of the current line after point (or deletes the newline following point if point is at the end of line). The prefix argument for C-k can be used to kill multiple lines: C-kKill line C-u 10 C-kKill 10 lines The following commands operate on the region, and are the closest analogs to "cut" and "copy" in Emacs: C-wKill region ("cut") M-wSave region to kill ring without deleting ("copy") These commands are also handy: M-dKill next word M-kKill to end of sentence All of the above commands kill the text being deleted, which means that Emacs removes the text and squirrels it away for later retrieval ("yanking"). Most commands which delete significant amounts of text kill it rather than simply removing it, so that you can use those commands either to "delete" text or to "cut" it for later use.

Yanking / Pasting Text After a piece of text has been killed, it goes to a place called the kill ring which is analogous to the "clipboard": you can yank an item to restore it from the kill ring with C-y. Unlike the clipboard, however, the kill ring is capable of holding many different items. If the item you want to yank is not placed when you type C-y, type M-y (repeatedly, if necessary) to cycle through previously killed items. C-yYanks last killed text M-yReplace yanked text with previously killed text Recall that most commands which delete a large amount of text in fact kill it (i.e. place it in the kill ring) so you can restore it later. Emacs makes it very difficult to lose a lot of text permanently: in editors with only a single clipboard, one can easily accidentally delete a large chunk of text or clobber the contents of the clipboard (by cutting two items in succession). But in Emacs, in either of those cases, the lost text can easily be retrieved from the kill ring.

Undo! Aka, Uh-oh, where did my thesis go? Many editors feature an Undo function, but commonly if you perform an “Undo”, then change some text, you are unable to “Redo”. Emacs however stores all actions, enabling you to do some things, undo them, do some other things, and then at any point undo over and over back to any of the previous states. If this sounds complicated, just remember that "undo" is always capable of getting you back to any previous state your buffer was in (unless Emacs has run out of memory to store the undo history). The principle here is that Emacs makes it very difficult to accidentally lose your work. Undo is available via three different keys: C-/Undo C-_Undo C-x uUndo So if you need to get back to a previous buffer state, simply move the cursor (so as to break any existing sequence of undos), and press C-/ until you find what you want.

Search & Replace M-%Query replace The query replace command prompts you for a search string and a replacement. Then, for each match in the buffer, you can choose whether or not to replace the search string. Here are some of the options available at each prompt: * Type y to replace the current match. * Type n to skip to the next match without replacing. * Type q to exit without doing any more replacements. * Type. to replace this match, then exit. * Type ! to replace all remaining matches with no more questions. Also, in addition to the search methods listed earlier, there exists: C-M-sRegular expression incremental search

Forgetting Commands If you don't remember what a particular key or command does, you can read a description of it by using one of the following commands: C-h kShows documentation for the command associated with any particular key. C-h fShows documentation for any particular command, by name (i.e. what you would type after M-x). C-h a Allows a search for a feature you do not know exactly how to perform. For example, C-h k C-s and C-h f isearch-forward RET both display a page describing incremental search.

Tools M-x shell Starts a shell in the buffer named *shell*, switching to it if it already exists. Use C-u M-x shell to use a buffer with a different name. M-x compile Invokes make (with targets and options of your choice) and displays output in a new buffer. Emacs identifies error lines containing filenames and line numbers, and you can click on them to jump directly to the corresponding buffer and line. M-x grep Invokes grep and prints results in a new buffer. Like M-x compile, when you click on a match Emacs opens the correct file and takes you to the matching line. M-x man Displays man pages. M-x shell-command or M-! Executes a command and displays the output in a new buffer.

Modules You can switch modes in an existing buffer by using M-x and the name of the mode: M-x java-modeMode for editing Java files M-x python-modeMode for editing Python files M-x text-modeMode for editing text files M-x fundamental-modeMode with no specializations at all M-x highlight-changes Mode which colors text added most recently Emacs is very good at determining the right mode to use when you open a file so often these commands are unnecessary. These are examples of the commands provided by language major modes: LanguageSome special commands available LispManipulate s-exps in various ways; execute expressions PythonIndent, unindent blocks; run code in Python shell HTMLInsert and close tags; preview in browser In almost all cases, major modes for unsupported formats are available as extension packages. You can find many of them on EmacsWiki.

Ports There are many different builds of Emacs available freely online. The source code is also available online. Emacs is built on many Linux distros, Windows, DOS, OSX, and others. Emacs exists in terminal, Xwindow, and other GUI flavors.