Home arrow BrainDump arrow A Look at the VI Editor

A Look at the VI Editor

VI is the widely used text editor in UNIX operating systems. I have had the chance to use the VI editor in the Solaris and Linux operating systems. In this article we are going to learn how to use the VI editor.

  1. A Look at the VI Editor
  2. Saving and Closing a file
  3. Cursor motion/movements
  4. Undo editing
By: Mamun Zaman
Rating: starstarstarstarstar / 9
August 07, 2007

print this article



VI in Linux and Solaris is almost the same. The main difference I encountered is the arrow keys. In UNIX-based versions you have to use h, j, k and l for left, down, up and right, moving one character/line at a time. But in Linux, we can use the standard arrow keys for editing.

In the Solaris OS, if you use the standard arrow keys during editing you will see some unwanted outputs if the arrow keys are not mapped correctly. Sometimes it may display the error "Terminal too wide" if your terminal is wider than the typical 1024 x 768.

Open a new file/open for editing: To open a new file just use the vi command with a filename like the example below.

vi newfile.txt

This command will open the VI editor with a new file named newfile.txt in the current directory. If a file named newfile.txt is present in the current directory, then the above command will open that file for editing.

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

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Apple Founder Steve Jobs Dies
- Steve Jobs` Era at Apple Ends
- Google's Chrome Developer Tool Updated
- Google's Chrome 6 Browser Brings Speed to th...
- New Open Source Update Fedora 13 is Released...
- Install Linux with Knoppix
- iPad Developers Flock To SDK 3.2
- Managing a Linux Wireless Access Point
- Maintaining a Linux Wireless Access Point
- Securing a Linux Wireless Access Point
- Configuring a Linux Wireless Access Point
- Building a Linux Wireless Access Point
- Migrating Oracle to PostgreSQL with Enterpri...
- Demystifying SELinux on Kernel 2.6
- Yahoo and Microsoft Create Ad Partnership

Developer Shed Affiliates


Dev Shed Tutorial Topics: