Skip to content

Instantly share code, notes, and snippets.

@sectore
Last active April 17, 2016 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sectore/bb7fed67da3422fa7e18cc6577c21769 to your computer and use it in GitHub Desktop.
Save sectore/bb7fed67da3422fa7e18cc6577c21769 to your computer and use it in GitHub Desktop.
Notes about egghead.io's "Learn to use VIM"

Notes about egghead.io's "Learn to use VIM"

9 Lessons: https://egghead.io/series/learn-to-use-vim

MODES

v visual mode

i insert mode

shift + : command mode

MOVE (normal mode)

h move left

l move right

j move down

k move top

w move one word

b move one word back

DELETE (normal mode)

dd delete line

dw delete one word

d3w delete 3 words

shift + d delete line + preserve space

SAVE (command mode)

w myfile.txt name a file to save

w save

COMMANDS (normal mode)

Action + Location + Context

CHANGE COMMAND (normal mode) to jump into interactive mode

cw change one word

c3w change 3 words

c3j change 3 lines down

cit change content of a tag

ci{ change content of {}

ci" change content of ""

COPY (visual mode)

y copy

PASTE (normal mode)

p paste

CONFIGURE VIM (command mode)

syntax on enable syntax highlighting

syntax off disable syntax highlighting

set number enable line number

set nonumber disable line numbers

set relativenumber enable relative line numbers

set norelativenumber disable relative line numbers

set number relativenumber enable absolute + relative line numbers

help otion-list show all options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment