Site icon TechGit

How To Use Vim Editor

Learn how to use vim editor; how to open vim editor in Ubuntu. This post explains about the basic vim editor commands in Linux Ubuntu. Vim is an editor to create or edit a text file. Vim exists as a console application, and therefore use the command “vim” (without quotes) to launch Vim in a terminal emulator.

Modes in Vim

There are two modes in vim. One is the command mode and another is the insert mode. In the command mode, user can move around the file, delete text, etc. In the insert mode, user can insert text.

Changing Vim Mode

From command mode to insert mode type a/A/i/I/o/O

From insert mode to command mode type Esc (escape key)

Pressing the Esc key switches back to command mode. If you’re not sure what mode you’re in because you use a really old version of vi that doesn’t display an “INSERT” message, type Esc and you’ll be sure to return to command mode. It is possible that the system gives a little alert when you are already in command mode when hitting Esc, by beeping or giving a visual bell (a flash on the screen). This is normal behavior.

Please note that the following commands can be used with the vim to enable other modes and working console interface:

Working on Files

Opening a New File

Editing a File

Moving through the text

Moving through the text is usually possible with the arrow keys. If not, try:

Save and Exit

To save and quit the vi or vim editor with saving all the changes:

To learn the basics of vim editing, issue the following command in a terminal emulator:

vimtutor

How To Use Vim Editor originally posted on Source Digit – Latest Technology, Gadgets & Gizmos.

FacebookTwitterTumblrRedditLinkedInHacker NewsDiggBufferGoogle ClassroomThreadsXINGShare
Exit mobile version