Getting Started into the world of VI

Card Puncher Data Processing

About

A getting started page for VI editors.

Steps

Install a VI editor

Open a file

To open the file, run

# for neovim
nvim /path/to/file
# for vim
vim /path/to/file
# for vi
vi /path/to/file

The contents of the file must appear.

The file is created if it does not exist yet.

How to edit a file

To work in VI, you navigate between two modes:

When you want to edit/modify a file, the logical sequence is:

  • create/open a file in Vim
nvim tmp.txt
  • Tape i to enter in Insert Mode and type your text and made modifications
Hello World

  • The screen must be like this

Vim Insert Mode

  • to press the ESC button to leave the insert mode and to enter in a normal mode
  • save the file by entering the command :w

Quit

You would type the command,

  • ESC to go to the normal mode
  • then:
    • :q to quit Vim
    • or :q! to quit without saving. The override command modifier ! is needed because Vim is reluctant to throw away changes





Discover More
Card Puncher Data Processing
VI Text Editors (Vim, Nvi)

A Vi editor is: a console text/code editor a file browser (Search, delete, ...) a shell All these editors are VI editors vi : the original vim: Vim, Vi IMproved, an enhanced version of VI...



Share this page:
Follow us:
Task Runner