Vim lessons
Practice
Moderate
10 min
Advanced Insert Mode Entry
Task Instructions
Master all the ways to enter insert mode for different situations
Fix the Java class using different insert mode entries. Use 'A' to add semicolons at line ends, 'a' to add braces after methods, 'o' for closing braces on new lines, 'O' for annotations above, and 'i' for inline edits.
Learning objectives
- Master all insert mode entry methods
- Understand when to use each method
- Develop efficient editing patterns
Required keystrokes
Your submission is checked for these keystrokes, not just the final text — so reach for the technique, not a workaround.
- i Use insert mode
- a Use append mode
- A Use append at end of line
Helpful commands
- i
- Insert at cursor
- a
- Append after cursor
- I
- Insert at beginning of line
- A
- Append at end of line
- o
- Open new line below
- O
- Open new line above
Stuck? Peek at a hint 3 hints · try it on your own first
- I = insert at beginning of line, A = append at end of line
- o = new line below, O = new line above
- Choose the right entry point to minimize keystrokes
" Read the task on the left.
" A live Vim editor opens right here.
" Finish the edits, then submit.
~
~
NORMAL