CIS 240 Introduction to UNIX Instructor: Sue Sampson.

Slides:



Advertisements
Similar presentations
In the last Session… ls -l command seven fields nine permissions of a file ls -ld file ownership file permissions (three-tiered file protection system)
Advertisements

CS 497C – Introduction to UNIX Lecture 8: The vi/vim Editor Chin-Chih Chang
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.
Vi Editor TA for ITIS3100: Xu Fei
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.
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.
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.
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:
Chapter Three The UNIX Editors. 2 Lesson A The vi Editor.
Agenda Using vi Editor Starting vi Session Command / Input Modes Entering Text Editing Text Saving vi Session Aborting Editing Session.
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.
Software I: Utilities and Internals Lecture 2 – The vi Text Editor * Modified from Dr. Robert Siegfried original presentation.
Introduction to Vim Robbie CSCI2100 Data Structures Tutorial 3.
Editing, vi and Configuration Files Introduction to Linux June 16, 2009 Papeete, French Polynesia Hervey Allen.
UNIX Intro vi  vi is the standard UNIX text editor v Contents 1.Why use vi ? 2. vi Basics 3.Moving Around 4.Inserting Text.
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.
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.
1May 16, 2005 Week 2 Lab Agenda Command Line FTP Commands Review More UNIX commands to learn File name expansion - * Introduction of vi.
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.
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 May 29, 2011 Dar es Salaam, Tanzania
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
Editing, vi and Configuration Files Introduction to Unix May 25, 2008 Rabat, Morocco Hervey Allen.
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.
1 Lecture 3 More on editors: emacs and vi COP 3344 Introduction to UNIX.
Editing, vi and Configuration Files Unix/Linux Preparation Course June 27, 2010 Pago Pago, American Samoa
Getting Started with Linux Linux System Administration Editors.
1 Day 4 Introduction to VI. 2 Vi – Visual Editor Used to edit text files on a UNIX system –Now also available for Windows/Mac etc. Very powerful for editing.
BIF703 FTP (File Transfer Protocol) Utility vi editor Utility.
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
CS:414 introduction to Unix and Linux
Vim basics Vi IMproved.
Guide To UNIX Using Linux Third Edition
Editing, vi and Configuration Files
Vi Editor.
Unix Fundamentals - Part iii 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.
Editing, vi and Configuration Files
Linux System Administration Editors
Text Editors Vim (Chapter 6) Emacs (Chapter 7)
The Linux Command Line Chapter 12
Chapter 2 Basic vi Editor.
Lab 7 Shell Script Reference:
CSCI The UNIX System Editing files
Day 5 Emacs Editor David A. Gaitros Department of Computer Science
The Linux Command Line Chapter 12
Presentation transcript:

CIS 240 Introduction to UNIX Instructor: Sue Sampson

CIS240 – Session Log-in Sessions: Allow concurrent logins Six are available – F1 through F6 By default, when you first log in, you are using F1 session Command: who = shows which user is logged in, which session they are using, and time of log in.

CIS240 – Using the vi(sual) editor Text Editors: Applications programs that allow you to create and edit text files Common UNIX editors are vi, emacs, and pico We will be using vi in CIS 240

CIS240 – Using the vi(sual) editor Initiating: Command: vi Example: vi /student01/outline.txt vi has two modes: Command mode Insert mode Commands are case sensitive

CIS240 – Using the vi(sual) editor Command Mode: Input is interpreted as commands to vi, NOT TEXT Typing text will confuse vi and the results will be unpredictable

CIS240 – Using the vi(sual) editor Insert Mode: Input will be interpreted as text to be inserted or appended into a document The same letters that represented commands in command mode are now inserted as text

CIS240 – Using the vi(sual) editor Switching to Insert Mode: i insert new text before the cursor I insert new text at the beginning of a line a Append new text after the cursor A Append new text at the end of a line o Open a line below the current line and insert O Open a line above the current line and insert

CIS240 – Using the vi(sual) editor Returning to Command Mode: Press the key

CIS240 – Using the vi(sual) editor Deleting Text: Done in Command Mode x deletes the current character X deletes the previous character dd deletes current line into paste buffer (p pastes it back into the file) * You can delete multiple characters or lines by prefacing the command with a number – no space

CIS240 – Using the vi(sual) editor Moving around the document: (when arrow keys don’t work) k go up one line j go down one line l go right one character h go left one character f move forward one word b move back one word G go to line (default is end) - prefacing the command with a number places cursor on that line.

CIS240 – Using the vi(sual) editor Exiting vi: Press to enter command mode Type :q! to quit without saving Type :wq to save and quit Type :q to quit if your document is unchanged since the time you opened it

CIS240 – Using the vi(sual) editor What to do if things go wrong: Enter Command mode Quit without saving When all else fails, hit CTRL Z, this stops current process Lab Worksheet 2 – not graded Lab Homework 1 - graded