CSCI-1411 F UNDAMENTALS O F C OMPUTING L AB Shane Transue Spring 2014 1.

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
Screen Cli based screen manager for Linux/Unix. Installing Screen Debian based systems: apt-get install screen Redhat based systems including centos:
Editing with vi Or more fun than you thought you’d have without a mouse Prof. Chris GauthierDickey.
CSCI 1411 FUNDAMENTALS OF COMPUTING LAB Lab Introduction 1 Shane Transue MSCS.
CIS 240 Introduction to UNIX Instructor: Sue Sampson.
CS 497C – Introduction to UNIX Lecture 17: - The GNU emacs Editor Chin-Chih Chang
Vi Editor TA for ITIS3100: Xu Fei
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.
13-Jul-15 BlueJ: A Very Quick Introduction. BlueJ BlueJ is an IDE (Integrated Development Environment). It includes an editor, which you use to write.
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.
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.
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
CENT 305 Information Systems Security Linux Introduction.
Chapter Three The UNIX Editors. 2 Lesson A The vi Editor.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
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.
Introduction to vi (a Unix, Linux, and Windows text 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.
Vim Editor and Unix Command gcc compiler Computer Networks.
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.
1 © 2014 John Urrutia. All rights reserved. Chapter 7 The “ Emacs “ Editor.
UNIX Introduction CSCE 221H Texas A&M University.
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.
Introduction to Unix – CS 21 Lecture 7. Lecture Overview Regular expressions revisited emacs versus vi Basic emacs and vi usage.
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.
Chapter 9 Using Text Editors. vi Editor visual Editor, ASCII text editor, no formatting capabilities almost as powerful as MS Word, has 26 clipboards.
Introduction to Unix (CA263) File Editing By Tariq Ibn Aziz.
Chapter Three The UNIX Editors.
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
1 Lecture 3 More on editors: emacs and vi COP 3344 Introduction to UNIX.
THE C PROGRAMMING ENVIRONMENT. Four parts of C environment  Main menu  Editor status line and edit window  Compiler message window  “Hot Keys” quick.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
Exploring Spyder: An IDE for scientific computing
Introduction to Emacs (a Unix, Linux, and Windows text editor)
October 24,  Creating and Opening Files  Save and Exit  Navigation  Shortcuts  Copying, Cutting and Pasting  Searching and Replacing  More.
Basic VI Tran, Van Hoai Faculty of Computer Science and Engineering HCMC Uni. of Technology
CS:414 introduction to Unix and Linux
Chapter 3: Mastering Editors Chapter 3 Mastering Editors (Emacs)
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.
Text Editors Vim (Chapter 6) Emacs (Chapter 7)
The Linux Command Line Chapter 12
vim Basics Understanding And Using the vim Text Editor
Emacs CSC 135.
C151 Multi-User Operating Systems
Linux Operations and Administration
Графика в Pascal.
The Emacs Editor Read: Forouzan, Appendix C
CSCI The UNIX System Editing files
Mu Editor – New User Cheat Sheet – CircuitPython Mode
In the last class… The vi basics command, input and ex mode
Mu Editor – New User Cheat Sheet – CircuitPython Mode
The Linux Command Line Chapter 12
Presentation transcript:

CSCI-1411 F UNDAMENTALS O F C OMPUTING L AB Shane Transue Spring

Introduction  Problem: Need simple editors that can be used in the Unix console (why?)  Moving files back-and-forth is tedious and error-prone  Other editors may do things you don’t intend  What editors should we use?  nano  vi  Why use simple console editors?  How do we use (nano and vi)? 2

Editor Introduction  Editors Covered  nano Basic console-based text editor (simple)  vi Command-based text editor (advanced)  What are we doing?  Creating a file  Editing the file  Saving the file  Exiting the editor 3

Why are we using Unix editors?  Edit, Compile, Run all from the command line (terminal)  Faster than always copying files  Practice!  More complex editors are easy to misuse  A.docx file will never compile using a C++ compiler (g++)  Provide an understanding for more complex editing environments (such as IDEs)  Need to understand what they are doing internally  What if a more complex editor is not doing what you want?  Part of a larger Software Engineering Ecosystem  Programmers and software engineers will understand what you are doing 4

nano Overview  Simple Text Editor  Opening and Editing Files (txt, cpp)  Creating a new file/Editing an existing file  What you see is what you get (WYSIWYG)  Help Ctrl+G  Basic Navigation  Moving around using arrow keys and tab  Saving and Exiting  Writing out to a file  Exiting nano 5

Using nano  Creating/Opening a file  nano test.cpp  Editing a file  Arrow Keys, Type away  Cut/Paste  Ctrl+^ (to select)  Ctrl + K (to cut), Ctrl + U (to paste)  Saving a file  Ctrl+O (type in filename and hit enter)  Exiting nano  Ctrl+X 6

vi Overview  Command Driven Text Editor  Commands Mode  Creating/Opening Files  Navigation  Saving a file  Insert Mode  Navigation  Writing a quick C++ program 7

Using vi  vi test.cpp  Command Mode  Default Mode  Enter Command mode with the “Esc” Key  :w filename.cpp (save to file: filename.cpp)  :q (Quit the vi editor)  Movement H (Move left), L (right), J (down), K (up)  Insert Mode  Normal Input (like everyone is used to)  Enter Insert mode with the “i” key  Movement Arrow Keys 8

Reference Guides and Links  Nano Website (GNU):  Nano Guide:  Intractive Vi Tutorial:  Vi Cheat Sheet: 9