Added some notes into the vim reference

master
Nathan Steel 6 years ago
parent 73e138cc2b
commit 059bc17a6f

@ -3,10 +3,16 @@
Inserting text, saving and closing the buffer Inserting text, saving and closing the buffer
`i` - Insert Text at the cursor `i` - Insert Text at the cursor
`a` - Append Text after the cursor `a` - Append Text after the cursor
`I` - Insert text at the beginning of the line `I` - Insert text at the beginning of the line
`A` - Insert text at the end of the line `A` - Insert text at the end of the line
`esc` - Pressing escape will put you in normal mode, then pressing `:`
will put you into command mode
`:w` - Write to file `:w` - Write to file
`:q` - Quit file `:q` - Quit file
@ -16,18 +22,58 @@ Inserting text, saving and closing the buffer
# Movement # Movement
These can also be used with other commands, such as dw to delete to next word These can also be used with other commands, such as dw to delete to next word
or while selecting a visual block.
`h,l` - Left, Right
`j,k` - Down, Up
`0` - Go to the beginning of the line
`$` - Go to the end of the line
`gg` - Go to the top of the file
`G` - Go to the bottom of the file
`{ }` - Jump up and down paragraphs
`w` - Beginning of next word
`e` - End of next word
`b` - Beginning of last word
`5w` - Move forwards 5 words, this also works with most commands
# Deleting and Clipboard
`x` - Delete/cut character under cursor
`d` - Delete/cut selection
`dd` - Delete the line
`d5d` - Delete 5 lines
`d$` - Delete to end of the line
`y` - Yank/copy selection
`yy` - Yank the line
`p` - Put/Paste at cursor
`P` - Put/Paste after cursor
# Search # Search
`/<search>` - Search forwards `/<search>` - Search forwards
`?<search>` - Search backwards `?<search>` - Search backwards
`n` - Next search result `n` - Next search result
`N` - Previous search result `N` - Previous search result
# Replace/Change # Replace/Change
c Change c Change
cw cw
ci( - Change inside ( { "
:s/x/y Replace x for y on the selected line
:%s/x/y Replace x for y on each line :%s/x/y Replace x for y on each line
# Buffers Splits Multitasking # Buffers Splits Multitasking
@ -44,3 +90,7 @@ Ctrl + wr Switch the splits around
# Visual Selection # Visual Selection
`v` - Select lines
`V` - Select the current line
`Ctrl + v` - Visual selection in characters

Loading…
Cancel
Save