Master Vim Without a Mouse: Essential Keyboard Shortcuts for Faster Editing
This guide teaches you how to operate Vim entirely with the keyboard, covering basic modes, movement commands, insertions, deletions, repetitions, cursor navigation, copying, pasting, and cutting so you can edit efficiently without ever touching the mouse.
Basic Operations
Movement
Use h, l, j, k to move left, right, down, up; w and b jump to the next or previous word.
Quick Exit
In normal mode press Shift+zz to save and quit Vim.
Enter Insert Mode
iinserts at the cursor, I at the line start, A at the line end, a after the cursor, and o / O open a new line below or above.
Document Editing
Commands follow the pattern operation + line number + motion . For example, d deletes; d2d deletes two lines; 2dd does the same with the line number first; 5G moves to line 5.
Deletion
xworks like Backspace, X deletes backward. dw deletes a word, d$ deletes to the end of the line, d^ to the start, dG to the file end, and d1G to the beginning.
Repeat Commands
After a command like dd (delete a line), pressing . repeats the last action.
Cursor Navigation
nGmoves to line n, gg to the first line, G to the last line. f<char> searches forward for a character, F<char> searches backward.
Copy and Paste
yyanks (copies); yy copies the whole line, 3yy copies three lines. y$ copies to the end of the line, yw copies a word, yG copies to the file end. Paste with p (after cursor) or P (before cursor).
Cut
The delete command also cuts; ddp swaps the current line with the line below.
Summary
With these shortcuts you can edit Vim completely without a mouse: move with h,l,j,k,w,b; jump with G, nG, f/F; locate with G, $, ^, w, b, e; manipulate text with y, d, p.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
