nerdexam
Linux_Foundation

LFCS · Question #795

What is the difference between the i and a commands of the vi editor?

The correct answer is B. i (insert) inserts text before the current cursor position whereas a (append) inserts text after the. In the vi editor, i inserts text before the current cursor position, while a inserts text after the current cursor position.

Submitted by suresh_in· Apr 18, 2026Essential Commands

Question

What is the difference between the i and a commands of the vi editor?

Options

  • Ai (interactive) requires the user to explicitly switch between vi modes whereas a (automatic)
  • Bi (insert) inserts text before the current cursor position whereas a (append) inserts text after the
  • Ci (independent rows) starts every new line at the first character whereas a (aligned rows) keeps
  • Di (interrupt) temporarily suspends editing of a file to the background whereas a (abort) terminates

How the community answered

(44 responses)
  • A
    2% (1)
  • B
    91% (40)
  • C
    5% (2)
  • D
    2% (1)

Why each option

In the `vi` editor, `i` inserts text before the current cursor position, while `a` inserts text after the current cursor position.

Ai (interactive) requires the user to explicitly switch between vi modes whereas a (automatic)

The terms 'interactive' and 'automatic' are not the correct meanings for `i` and `a` in `vi` modes, as both initiate insert mode.

Bi (insert) inserts text before the current cursor position whereas a (append) inserts text after theCorrect

The `i` command (insert) switches to insert mode, allowing text entry directly before the character under the cursor. The `a` command (append) also switches to insert mode, but places the cursor and allows text entry immediately after the character under the cursor.

Ci (independent rows) starts every new line at the first character whereas a (aligned rows) keeps

The commands `i` and `a` do not control how new lines are indented or aligned; their function is to define the point of text insertion relative to the cursor.

Di (interrupt) temporarily suspends editing of a file to the background whereas a (abort) terminates

Suspending or aborting file editing involves other `vi` commands or shell job control features, not `i` or `a`.

Concept tested: vi editor insert/append commands

Source: https://man7.org/linux/man-pages/man1/vim.1.html

Topics

#vi editor#text editing#insert mode#commands

Community Discussion

No community discussion yet for this question.

Full LFCS Practice