Red Hat Linux Reference Guide

Linux Introduction

VI-EDITOR

Process Management

Linux Installation

Disk Partitions & File System Management

Logical Volume Management - LVM

User & Group Administration

Package Management

Network File System - NFS

Domain Naming System - DNS

Apache HTTP Web Server

KickStart Installations

FTP server

BOOT PROCESS

Dynamic Host Configuration Protocol - DHCP

Job Scheduling

File Links

Swap Management

Log Management

Performance Management

Linux Troubleshooting

Linux Summary

Start Preparation Smartly

We have the collection to start prepartion smartly.

Start Assessment

Red Hat Linux Reference Guide

  DevOps Tech Hub

116 Followers

Operation Modes


VI-EDITOR is used to add/modify/edit the data in any regular  files. Vi-Editor  has two operating modes

  1. insertion mode
  2. command mode

VI-EDITOR  begins in command mode, where the cursor movement and text deletion and pasting occur. Insertion mode begins upon entering an insertion(i) or change(a) command.

[ESC] returns the editor to command mode. Most commands execute as soon as you type them except for "colon" commands which execute when you press the return key.

Command mode: This mode enables user to perform administrative tasks such as saving files, executing commands, moving the cursor, cutting (yanking) and pasting lines or words, and finding and replacing. In this mode, whatever user  type is interpreted as a command.

Insert mode: This mode enables user to insert text into the file. Everything that's typed in this mode is  Interpreted as input and finally it is put in the file.

The vi always starts in command mode. To enter text, user  must be in insert mode. To come in insert mode user simply type i. To get out of insert mode, press the Esc key, which will put user back into command mode.

  • If you are not sure which mode you are in, press the Esc key twice, and then you'll be in command mode. You open a file using vi editor and start type some characters and then come in command mode to understand the difference.
  • The vi is case-sensitive, so you need to pay special attention to capitalization when using commands.
  • Most commands in vi can be prefaced by the number of times you want the action to occur. For example, 2j moves cursor two lines down the cursor location.


Previous Next