Coatzacoalcos, Mexico to

PRINCIPAL

Home
Blog
Photo Gallery
Joke (Spanish: chistes)
Curriculum
Contacts me

GNU / LINUX

Linux.org
The gnu project
Slackware
Slackware forum
Debian
Debianitas punto net
Ubuntu Linux

ARTICLES

The Vi editor

Graphics with Turbo C++

The ftp manual

Installing the Apache Server

How to convert with Latex to PDF file

Configuring Samba.

A basic program in gtk+

OTHER ARTICLES

Introduction to Network security

How to Print Screen with yast.

The DNS Howto's

CONFERENCES

Free software in the Government
See material

Introduction to Linux.
See material

Database Security in MySQL.
See material

Stocastics Model for inundations.
See material







The Vi Editor.

The article has important material for use Vi, but only cover a part of Vi capacity. Vi is present in all UNIX (AIX, HP-UX, BSD, System V, IRIX, GNU/Linux) and other system as DOS, Windows and OS/2.

Enter and leave the editor.

Write 'vi' in the shell and push INTRO, now the editor is open. The screen don`t have menus, indications and animed iconos consumming memory. Vi has 2 ways: Command and Insertion. The operations of command way are: write or read, search and sustitutions. The second way is for insert text in the editor.

For pass of Insertion to Command way push ESC. If you are in Command way, push the letter ' i '. And ' A ' put the cursor in endline.

For leave the editor you need the Command way. Then write ' :q! ' and push INTRO.

Write text.

you should to be in Insertion way, now write any lines and if you want leave the editor with ' :q! ', you will have a msg that indicate you should save of file. For save the file write ' :w filename ', when the file is saved and you modificate the text you can leave with ' :wq! ' (write and quit).

Basic Commands

:q! Leave vi without save the modifications.
:wq! Write and quit.
ESC Activate the Command way
i Activate the insertion way
R Activate the replacement way
gh Activate the selection way
h Move the cursor to left
j Move the cursor to down
k Move the cursor to top
l Move the cursor to right

Customer the editor

There are any command that can modificate the functioning of editor. For example, write ' :set number ', you will see that the lines appears enumerates. with ' :set ruler ' you see that in the right appears the column and row of the cursor.

If you want to meet your way of work, write ' :set showmode '. For disactivate the options write 'no' before the command, for example: if you don't want that the lines appears enumerates, write ' :set nonumber '.


2005 - Farid A. Bielma Lopez

Home | Unix Mexico | El Demonio | OpenBSD | Ubuntu Guide
Internet.com | Barrapunto | Diario Linux | Unam - Cert | Securityfocus
Send me a mail.