Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Vim Training Guide πŸš€ Sessions 1 & 2 – Core Navigation & Editing Skills

This guide helps you master Vim step by step with hands-on exercises. Follow actively inside nvim for best results.

πŸ“˜ SESSION 1: Basics Modes, Movement, Insert, Save/Quit πŸ“Œ Exercise 1: Moving Around

Use:

h ← left j ↓ down k ↑ up l β†’ right * * *


  *         *

πŸ‘‰ Land on each * without arrow keys.

✍️ Exercise 2: Insert Mode

Steps:

Move with h/j/k/l Press i Type text Press Esc The capital of India is _____. Neovim is a modern version of _____. The four main modes are Normal, Insert, Visual, and _____. The key 'j' moves the cursor . To save a file, type : in command mode. ⌨️ Exercise 3: Insert Variants Use 'A' to append text at the END of this line --> <-- Use 'I' to insert text at the START of this line Use 'o' to open a new line BELOW this line Use 'O' to open a new line ABOVE this line Use 'a' to append text AFTER the cursor on this line πŸ’Ύ Exercise 4: Save & Quit Command Action :w Save :q Quit :wq Save & Quit :q! Force Quit ZZ Save & Quit ZQ Quit without saving nvim session1_practice.txt πŸ‘€ Exercise 5: Modes Mode Indicator Insert -- INSERT -- Visual -- VISUAL -- Normal (none)

Practice:

i β†’ Esc β†’ a β†’ Esc β†’ o β†’ Esc β†’ I β†’ Esc β†’ A β†’ Esc β†’ O β†’ Esc 🧭 Exercise 6: Golden Rule

Always return to NORMAL mode.

Normal = Control Insert = Typing Visual = Selecting Command = Executing

🎯 Spend 80% time in Normal mode

πŸ“— SESSION 2: Movement Mastery Word, Line, Screen Navigation πŸ”€ Exercise 1: Word Movement

Commands:

w β†’ next word b β†’ previous word e β†’ end of word The quick brown fox jumps over the lazy dog near the river. πŸ”  Exercise 2: word vs WORD hello-world foo.bar test_name some-thing else.more stuff w β†’ stops at punctuation W β†’ skips punctuation πŸ“ Exercise 3: Line Navigation

Commands:

0 β†’ start of line ^ β†’ first non-blank $ β†’ end of line g_ β†’ last non-blank indented line with leading spaces and trailing spaces here
another deeply indented line of code goes here this line starts at column 1 with no indentation at all here int x = 42; // notice the difference between 0 and ^

πŸ‘‰ Practice: 0 β†’ ^ β†’ $ β†’ g_

πŸ”’ Exercise 4: Vertical Jumps gg β†’ top G β†’ bottom 50G β†’ line 50 :100 β†’ line 100 πŸ” Exercise 5: Counts one two three four five six seven eight nine ten eleven twelve

Examples:

3w 5w 2b 4e πŸ“š Exercise 6: Paragraph Jumps { β†’ previous paragraph } β†’ next paragraph πŸ”— Exercise 7: Bracket Matching

Use %:

function example() { if (condition) { return [1, 2, 3]; } }

array = [one, two, [nested, list], four] result = (a + b) * (c - d) πŸ–₯️ Exercise 8: Screen Movement H β†’ top of screen M β†’ middle L β†’ bottom Ctrl-d β†’ half down Ctrl-u β†’ half up Ctrl-f β†’ full down Ctrl-b β†’ full up zz β†’ center πŸ”€ Exercise 9: Combo Practice apple banana cherry date elderberry fig grape honeydew kiwi lemon

Tasks:

2w β†’ cherry 8w β†’ kiwi 8b β†’ back to apple $ β†’ end 0 β†’ start ⚑ Exercise 10: Speed Drill

Navigate WITHOUT h j k l:

The cat [TARGET] sat on the mat. The dog [TARGET] ran in the park. The bird [TARGET] flew over the trees. The fish [TARGET] swam in the pond. The horse [TARGET] galloped across the field with great [TARGET] speed and energy. πŸ“œ Extra Lines (for jumping) line 80 line 81 ... line 100 <-- try :100 or 100G ... line 110 πŸŽ‰ Progress

βœ… Session 1 Completed βœ… Session 2 Completed

About

Vim tutorial Repo ( i am using NVIM)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors