In vim you have the concept of buffers.
# List buffers :buffers # Switch buffer # By number b1 b2 # By name b [name] # Close/delete a buffer :bdelete :bd
Movement - Motion commands
start of line
end of line
beginning of next word
beginning of next word, defined by white space
end of the next word
end of the next word, defined by white space
back to the beginning of previous word
back to the end of previous word
go to next character of your choice
If you want to go to the next comma
start of file
end of file
Operators are commands that do things. Like delete, change or copy.
c - change
ce - change until end of the word.
c$ - change until end of line.
Combining Motions and Operators
Now that you know some motion commands and operator commands. You can start combining them.
dw - delete word
d$ - delete to the end of the line
Count - Numbers
You can add numbers before motion commands. To move faster.
4w - move cursor three words forward
0 - move curso to the start of the line
You can use numbers to perform operations.
d3w - delete three words
3dd - delete three lines
If you need to replace a character, there is no need to enter insert-mode. You can just use replace
Go to a character and the press
r followed by the character you want instead.
rp if you want to replace p.
In order to copy something FROM vim to the OS-clipboard you can do this:
" means that we are not entering a registry. And the
* means the OS-clipboard. So we are yanking something and putting it in the OS-clipboard registry.
Substitute - Search and replace
i - current character
o - next line
O - line before
a - end of word
A - end of line
Here is all your vim-configuration.
Install vundle here
Add plugin to your .vimrc-file and then open vim and write