O VIM Command

How to use O Command in Linux VIM editor?

Explanation


O stands for Open a new line above the current line
This command is used to create a new line above the current line. Then, the editor will go to insert mode automatically.

Usage:

O

Example:

  • Open the file test.txt using the command
    $ vim test.txt
  • The cursor is on the first line now.
    O Vim Command
  • To open a new line above the current line and go into insert mode
    Press O
    Open New Line Above Current Line Vim

Ask Questions

Ask Question