Administration
  Home arrow Administration arrow Page 4 - Vi 101
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  
ADMINISTRATION

Vi 101
By: Vikram Vaswani, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 5
    2000-03-27


    Table of Contents:
  • Vi 101
  • Vi? V who?
  • Start Me Up!
  • Let's Tango!
  • Lather, Rinse, Repeat...
  • One, Two, Buckle My Shoe...
  • Searching For Hope
  • Of Files And Windows
  • Saved By The Bell

  • 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


    Vi 101 - Let's Tango!
    ( Page 4 of 9 )

    Now that you know how to insert text, it's time to teach you the second most confusing thing about vi - moving around within the document. In order to gain the maximum benefit from this lesson, I suggest you either open an existing document, or create a new one and enter a few lines of text into it. Make sure that you're in command mode by hitting

    <ESC>
    a few times when you're done.

    Vi's movement keys are

    h = left
    j = down
    k = up
    l = right

    On some UNIX consoles, it may also be possible to use the cursor keys to accomplish movement within the document; however, I suggest that you take a few moments to memorize the list above instead, as cursor key movements can sometimes get lost over telnet connections, while the standard vi keys above will work in any situation.

    Care to move between words? Try

    w
    to move one word forward, or 
    

    b
    to move one back.

    To move between paragraphs, try

    {
    and 
    

    }
    while moving between sentences requires careful use of 
    

    (
    and 
    

    )
    If you need to move to a specific line in your docume nt - line 568, 
    for example - try this 
    

    :568
    To move to the beginning of the file, type 
    

    gg
    while the end of the file is just a 
    

    G [that's shift-G]
    away. And vi also has an equivalent for the "Page-Up" and "Page-Down" 
    commands common in other text editors; try 
    

    ^F [that's Ctrl-F]
    to move one page forward, and 
    

    ^B [that's Ctrl-B]
    to move one page back.

    To find out your exact position in the document [kinda like GPS, but not as cool!], try

    ^G [that's Ctrl-G]
    Of course, these aren't the only motion keys - there are quite a few 
    more, but I'm afraid that you'll only hear about them in "Vi 202". For the 
    moment, these should be sufficient for our next exercise, in which you'll be 
    doing the tango with your keyboard. Come on, you know how this goes - two steps 
    left, one step right, three steps back, and shake it all about... 

    This article copyright Melonfire 2000. All rights reserved.

     
     
    >>> More Administration Articles          >>> More By Vikram Vaswani, (c) Melonfire
     

       

    ADMINISTRATION ARTICLES

    - Network Booting via PXE: the Basics
    - Scalix: Linux Administrator`s Guide
    - Network Administration with FreeBSD 7
    - Components of an Information Architecture
    - The Anatomy of an Information Architecture
    - Configuring Load-Balanced Clusters
    - Load-Balanced Clusters
    - UNIX Time Format Demystified
    - Making Changes in the CVS
    - Building Your First CVS Repository
    - CVS Quickstart Guide
    - Authorizing Users in Samba
    - Handling User Accounts in Samba
    - Authentication in Samba
    - Accounts, Authentication, and Authorization





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