Galaxy Dedicated servers

deal  |  faq  |  links  |  contact  |  news  |  about us

 
  • dedicated server unix
  • dedicated linux server
  • freebsd dedicated server
  • window dedicated server
  • dedicated nt server
  • cpanel dedicated server
  • window 2003 dedicated server
  • abc dedicated internet server
  • recommend book
  • dedicated server unix

    dedicated server unix

    How to use vi?

    vi is a text editor widely available for UNIX platforms. To begin editing a file: $vi filename There are 3 basic modes in vi. These modes are known as command mode, edit mode and ex mode. After starting vi you are in command mode. While in command mode, you can use arrow keys to move around the file, use x to delete a character under cursor, use dd to delete a current line. Pressing G (shift-g) will move cursor to the end of the file. The command 10G will move cursor to line 10 in the file. Typing i in command mode will place you into an edit mode. You can insert text in edit mode. Pressing A (shift-a) with begin inserting text at the very end of the line. To exit edit mode and return back to command mode hit ESC. To save your file and exit you need first to switch to ex mode. Ex mode is entered when you press : key from command mode. For example to write the file being edited use the command :w. Typing : causes you to enter ex mode and typing w followed by the Enter key completes the command. The command :wq writes to the file and exits vi. To quit vi without saving changes to the file use the command :q!. There are many other features in vi editor. Read about then in a book Using vi Editor. See Recommended Books.