More on Linux - vi 9-10-2003. Opening Discussion zWhat did we talk about last class? zYou will use the command line a lot in this course. So lets review.

Slides:



Advertisements
Similar presentations
A Guide to Unix Using Linux Fourth Edition
Advertisements

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.
Cosc 4750 Getting Started in UNIX Don’t be afraid of the prompt, in linux it can be your best friend. In some cases, the only way to do certain things.
Program Development Tools IDE vs point tools Two tool flavors exist for developing embedded software: -IDEs: (Integrated Development Environments) i.e.,
CIS 240 Introduction to UNIX Instructor: Sue Sampson.
VIM: The basics Tang Wai-Chung, Matthew (MaFai) 29/12/2006.
Working Environment - - Linux - -.
Computer Science 117 Intro to C++ 08/26/13. Today Discuss Syllabus Brief History of C++ How to Execute a C++ program. Reading assignment.
Vi Editor TA for ITIS3100: Xu Fei
Linux+ Guide to Linux Certification, Second Edition
Chapter 5 Editing Text Files
CS 202 Computer Science II Lab Fall 2009 September 3.
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.
Guide to Linux Installation and Administration, 2e1 Chapter 6 Using the Shell and Text Files.
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.
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:
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
Chapter Three The UNIX Editors. 2 Lesson A The vi Editor.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.1 © Copyright IBM Corporation 2008 Unit 7 Editing.
1 Editing a C Program 01/16/15. 2 Objective Use Linux to edit, compile and execute a C program.
Carnegie Mellon Linux Boot Camp Jenna MacCarley, Peter Pearson, Shashank Goyal 9/19/2015.
Introduction to Vim Robbie CSCI2100 Data Structures Tutorial 3.
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.
UNIX Introduction CSCE 221H Texas A&M University.
Chapter 5 Editing Text Files. Basic Concept A text editor works on a file buffer that is a memory copy of a disk file The disk file is not updated until.
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.
Chapter Three Text Editing1 System Programming Text Editing.
Unix Environment Input Output 2  List Content (ls) ◦ ls (list current directory) ◦ ls –all (include hidden files/folders)  Make directory (mkdir) ◦
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.
Chapter 9 Using Text Editors. vi Editor visual Editor, ASCII text editor, no formatting capabilities almost as powerful as MS Word, has 26 clipboards.
1 © 2012 John Urrutia. All rights reserved. Chapter 6 The vi Editor.
Getting Started with Linux Linux System Administration Editors.
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.
Linux Class #03. File Access Permissions Types of users in Linux: Local User (u) Group User (g) Other User (o) Each User can have 3 types of permissions:
Isecur1ty training center Presented by : Eng. Mohammad Khreesha.
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
Editing, vi and Configuration Files Unix/IP Preparation Course July 19, 2009 Eugene, Oregon, USA
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.
More on Using onyx 8/28/13. Program 1 Due a week from today. See website for details.
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.
Getting Started with Linux Linux System Administration Editors.
BIF703 FTP (File Transfer Protocol) Utility vi editor Utility.
Purdue Linux Users Group Presents Linux 201: Session 1 Everything you ever wanted to do in VIM Thor Smith.
Vim basics Vi IMproved.
Guide To UNIX Using Linux Third Edition
Vi Editor.
Vim.
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
Linux System Administration Editors
Technical University of Kosice
Text Editors Vim (Chapter 6) Emacs (Chapter 7)
The Linux Command Line Chapter 12
Linux Operations and Administration
The Emacs Editor Read: Forouzan, Appendix C
CSCI The UNIX System Editing files
The Linux Command Line Chapter 12
Presentation transcript:

More on Linux - vi

Opening Discussion zWhat did we talk about last class? zYou will use the command line a lot in this course. So lets review some of the commands that you talked about two classes ago. You can also log in and “follow along” by doing things with the command line interface. zDid you discuss the use of “>”, “<“, and “|” in the command line?

Working From Your Room zOne of the advantages of Linux in the multiuser ability. This is greatly facilitated by the command line interface. zOn the links page I have a link to the “putty executable”. This is a program that allows you to connect to Unix machines through either the telnet or the ssh protocol. For these machines use ssh. zMachine names are like janus00.cs.trinity.edu.

Editing Files zThere are many ways to edit text files on a Linux box and all are basic text editors. On a windows box Notepad is the default text editor. Word typically saves in a binary format that isn’t straight text. zI’m going to show you how to use vi in this class. Other options open to you are ed and emacs. If you are in the lab you can use gvim, xemacs, or gedit.

Two Faces of vi zvi has two different modes that you can work in. When you start vi you always begin in the command mode. This is the mode that vi gets its power from. Keystrokes in this mode don’t get added to the text, they issue different commands. zThe second mode in vi is an edit mode and there are 3 flavors of it: insert, append, and replace.

Commands in vi zThe power of vi comes from the fact that there are many commands that you can use to help with editing files. There are far more commands than any one person really uses. You find a subset that works well for you. zThe keys that change you into edit mode are i, I, a, A, and R. You can probably figure out which or insert, append, and replace.

Other Basics zEsc - This is the key that you use to leave any of the edit modes and return to the command mode. zSome very significant commands for command mode are saving and quitting. y:w - write to disk y:q - quit y:wq - write then quit y:q! - forced quit without writing

More Commands in vi z$ - Jump to the end of a line. zcw - Change a word z. - Repeat the last command. This could be an insert, append, or replace. z/ - Search for a given string. zn - repeat the last search. z:# - Jump to the # line of the file. zu, ^r - undo and redo.

Copying, Cutting, Pasting zdd - Delete a line. Can be preceded by number of lines. zyy - Yank a line. Can be preceded by number of lines. zp - Paste below the current line. zP - Paste above the current line. zIn vim you can highlight areas and yank or delete using ^v.

The.exrc File zThe way that vi works can be altered by creating and editing a file with the name.exrc in your home directory. zThere are many options you can put in your.exrc file. I recommend you have a line with “set showmatch tabstop=4”. This will match parentheses and brackets when closed and use a smaller tab for indentation. zAs always, man can give you more info.

Minute Essay zWhat did we talk about today? zRemember that assignment #1 is due Friday. The assignment is basically testing your ability to do some different things in the Linux environment. Also try to read chapter 7.