BrainDump
  Home arrow BrainDump arrow Page 2 - A Look at the VI Editor
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
BRAINDUMP

A Look at the VI Editor
By: Mamun Zaman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 9
    2007-08-07


    Table of Contents:
  • A Look at the VI Editor
  • Saving and Closing a file
  • Cursor motion/movements
  • Undo editing

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    A Look at the VI Editor - Saving and Closing a file
    ( Page 2 of 4 )

    Use :w for saving the content and :q for quitting. Here are some examples.

    :w

    Saves current file but doesn't exit

    :w file

    Saves current content as file but doesn't exit

    :n,mw file

    Saves lines n through m to file

    :n,mw >>file

    Saves lines n through m to the end of file

    :q

    Quits VI and may prompt if you need to save

    :q!

    Quits VI without saving

    ZZ or :wq

    Saves and exits VI

    VI has two modes; one is the command mode and the other is the edit mode. To change to the edit mode you have to use i (insert) or a (append). Use the ESC character to change back to command mode.

    Inserting texts: Use i, I, a, A, o or O for insertion as described in the following table.

    i

    Insert before cursor

    I

    Insert before line

    a

    Append after cursor

    A

    Append after line

    o

    Open a new line after current line

    O

    Open a new line before current line



     
     
    >>> More BrainDump Articles          >>> More By Mamun Zaman
     

       

    BRAINDUMP ARTICLES

    - Replacing Oracle with PostgreSQL
    - Demystifying SELinux on Kernel 2.6
    - Yahoo and Microsoft Create Ad Partnership
    - The Advantages of Obscure Open Source Browse...
    - Dell Announces CSI-style Digital Forensics S...
    - Milepost GCC Speeds Open-Source Development
    - Learn These 10 Programming Languages
    - Tomcat Capacity Planning
    - Internal and External Performance Tuning wit...
    - Tomcat Benchmark Procedure
    - Benchmarking Tomcat Performance
    - Tomcat Performance Tuning
    - Wubi: Windows-based Ubuntu Installer
    - Configuring and Optimizing Your I/O Scheduler
    - Linux I/O Schedulers





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek