Introduction to vi. Intro to vi vi is a ubiquitous text editor. It is available for Linux, Unix, Mac OS X and Windows (from and.

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
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.
CIS 240 Introduction to UNIX Instructor: Sue Sampson.
VIM: The basics Tang Wai-Chung, Matthew (MaFai) 29/12/2006.
Vi Editor TA for ITIS3100: Xu Fei
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.
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.
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.
Copyrights© 2008 BVU Amplify DITM Basics of OS,UNIX/LINUX and Shell programming Page:1 Lesson 3: Vi- editor By Simi By Simi.
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 Three The UNIX Editors. 2 Lesson A The vi Editor.
Introduction to vi (a Unix, Linux, and Windows text editor)
Agenda Using vi Editor Starting vi Session Command / Input Modes Entering Text Editing Text Saving vi Session Aborting Editing Session.
Introduction to Linux Instructor: Bennett M. Tanyag PART - 2.
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.
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.
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.
CSCI-1411 F UNDAMENTALS O F C OMPUTING L AB Shane Transue Spring
Text Editing February 2 nd, 2004 Class Meeting 3.
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.
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.
Week 8: Linux / ubuntu Dr. I. H. Shah. / CSCS 301 Fall 2009.
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
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
2.4 vi 에디터. UNIX 표준 에디터 %vi filename 두 개 모드 명령어 모드 (command mode) initial mode, editing commands 텍스트 입력 모드 (text entry mode) enter text you'd like to.
Editing, vi and Configuration Files Introduction to Unix May 25, 2008 Rabat, Morocco Hervey Allen.
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.
Introduction to Emacs (a Unix, Linux, and Windows text editor)
Shell Script Reference: Linux Shell Scripting Tutorial v1.05r3 A Beginner's handbook
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.
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
Editing, vi and Configuration Files
Vi Editor.
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
Editing, vi and Configuration Files
Linux System Administration Editors
Text Editors Vim (Chapter 6) Emacs (Chapter 7)
The Linux Command Line Chapter 12
Emacs CSC 135.
Linux Operations and Administration
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
The Linux Command Line Chapter 12
Presentation transcript:

Introduction to vi

Intro to vi vi is a ubiquitous text editor. It is available for Linux, Unix, Mac OS X and Windows (from and others). To run vi, simple type  vi  vi test.cpp

Intro to vi vi has 3 modes: 1. edit mode 2. insert mode 3. command mode

vi mode: edit Escreturn to edit mode /search-string /search again arrow keys Retnext line ^beginning of line $end of line xdelete char dwdelete word dddelete line n dddelete n lines uundo Ctrl-bbackwards a screenful of text Ctrl-fforwards a screenful of text Ctrl-rredo

vi mode: insert astart adding after cursor Astart adding at end of line iinsert in front of current cursor position Istart adding in front of line oopen a new line underneath current line Oopen a new line above current line Escexit insert mode

vi mode: command Command mode is entered with : from edit/insert mode. :qquit (if changes haven’t been made) :q!quit without saving changes :wsave changes; don’t quit :xsave changes and quit

copy-paste steps: 1. Place cursor (anywhere) on line you wish to copy. 2. shift-yyank (makes a copy of the line) or n shift-y to yank n lines 3. Move to location where you wish to paste line. 4. shift-pput

cut-paste steps: 1. Place cursor (anywhere) on line you wish to cut. 2. dddelete line or n dd to delete n lines 3. Move to location where you wish to paste line. 4. shift-pput

Remember… Escreturn to move/modify mode :xsave changes; quit :qquit :q!quit without saving changes dddelete line dwdelete word iinsert uundo