tearin' it up

blogging about learning to lift and code - and everything along the way...

Beginner Vim Commands

I’m new to Vim but I’ve been using Sublime Text in vintage mode to practice. I’ve tried a few tutorials but I’ve found it more helpful to actually learn by using the commands while coding.

I wanted to share my starter set of commands and I hope I remember to add blog posts as I add to my repetoire.

Shortcut
gg go to the top
G go to the bottom
i insert (puts cursor before marker location)
a append (puts cursor after marker location)
x deletes character above the cursor
X deletes character before the cursor
D delete from cursor to end of the line
dd deletes a row
diw deletes a word
ciw deletes a word and goes to insert mode

How to cut/copy and paste:
1. v (or V for whole lines) to highlight what you want to cut or copy
2. d (for cut), y (for copy)
3. p to paste after cursor (P for before the cursor)