Here is the outline to the VI presentation. I anyone has any additional questions with vi let me know and I'll do my best to answer them. If anyone is interested I can also post my .vimrc file so that people can have a better understanding of the vim shortcuts I was rambling about last night. Also the link to the VI image at the end of my presentation is at the end of the email, (nice to have a printout of it as a poster by your computer or on your door, I've posted a copy on my door at work :-D... chix dig VI)

Jason


***** Note: This was copied from Impress >> vim, edited in vim, then vim to mozilla (I stand by my VI moto :) ) *****


VI the editor
   Presentation By: Jason Louie
   Use VI a full two weeks and you will use it to edit everything!
What is VI?
   Vee-Eye - not Vie nor six
   Written by Bill Joy in 1976 to replace the line editor ed
   Editor included with all of Linux distros
   The editor with two modes
Why VI?
   Will work even if things are broken in Linux
   Light on the resources
   Fast
   Powerful
Why VI? cont...
   Loaded with shortcuts
   has 36 buffers for storing pieces of text
   Available in Linux, Unix, Windows, Mac, Atari and Amiga
   Sounds cool
   AND MORE...
Why Not VI?
   Require at least a hand full of command to us VI
   Steep learning curve
   Can be frustrating
Flavors of VI
   Vim
   www.vim.org
   Elvis
       www.elvis.the-little-red-haired-girl.org
   Lemmy
       www.softwareonline.org/index.html
Two Faces of VI
   Edit Mode
       Mode where the user types text to the file
       Insert text
       Overwrite text
   Command Mode
       Escaping to command mode
           <ESC> or <CTRL-[>
       Quiting
           :q or :q!
       Save
           :w or :w [filename]
       Save & Quit
           :wq
Basic Commands
   i / I        - Insert
   a / A        - After cursor / At EOL
   o / O        - Open new line below / above
   s / S        - Substitute
   r / R        - Replace
Basic Commands cont?
   x / X        - Character delete
   dd / D       - Delete line (Cut)
   yy / Y       - Yank line (Copy)
   p / P        - Paste
   u            - Undo
   .            - Repeat
Navigation Commands
   k / j            - Up / Down
   h / l            - Left / Right
   0 / $            - Beginning of line / EOL
   /[string] / ?[string]
                  - Search down / Search up
   n / N          - Repeat find up / down
Preceeding Number
   #dd
   #yy
   #h
   #A
   #I
   #.
   - Will repeat the command # times
Search & Replace
   Change foo >> bar
   / & .
       1.    /foo
       2.    cw bar
       3.    n.n.n.n.n.n.n...
   or
       :%s/foo/bar/g
Summary
   VI takes time and patience
   GOOGLE is your friend
   Use VI for two full weeks and you will use it to edit everything
VIM
   vim.org
   Syntax Hilighting
   Copy & Paste
   iab
       teh >> the
       YDATE >> date()
   imap, map
       ,lm - Last Modified
       ,ph - PHP file header
       ,ch - C / C++ file header
VIM cont...
   $HOME/.vimrc - Linux
   $HOME/.vim/
   _vimrc - Windows
   Class / function / method tags
References
   www.vim.org
   www.thomer.com/vi/vi.html


Additional Commands (Ones that I missed)
cw - Change word (Delete the remainder of the word and insert)
C - Chnage the rest of the line



The final slide with VI commands: (VI Cheat sheet) http://faculty.necc.mass.edu/mkolotila/cis121/images/vi.gif





Reply via email to