Update vim

Using same format as 7z and emacs
This commit is contained in:
ABorgna 2013-09-10 23:19:48 -03:00
parent 64cba079f9
commit ba904a2bd6
1 changed files with 54 additions and 13 deletions

View File

@ -1,14 +1,55 @@
# Insertion
a - enters insertion mode, append after the cursor.
A - enters insertion mode, at the end of the line.
i - enters insertion mode, insert before the cursor.
I - enters insertion mode, at the beginning of the line.
o - enters insertion mode, creating a new line under the cursor.
O - enters insertion mode, creating a mew line above the cursor.
C - enters insertion mode, cut the end of the line.
# File management # File management
:w - writes (saves) file
:x - writes (saves) file ans exit :e reload file
:q - quits :q quit
:q! - quits without saving changes :q! quit without saving changes
:w write file
:w {file} write new file
:x write file and exit
# Movement
k
h l basic motion
j
w next start of word
w next start of whitespace-delimited word
e next end of word
E next end of whitespace-delimited word
b previous start of word
B previous start of whitespace-delimited word
0 start of line
$ end of line
# Insertion
# To exit from insert mode use Esc or Ctrl-C
# Enter insertion mode and:
a append after the cursor
A append at the end of the line
i insert before the cursor
I insert at the beginning of the line
o create a new line under the cursor
O create a new line above the cursor
R enter insert mode but replace instead of inserting chars
:r {file} insert from file
# Editing
u undo
yy yank (copy) a line
y{motion} yank text that {motion} moves over
p paste after cursor
P paste before cursor
<Del> or x delete a character
dd delete a line
d{motion} delete text that {motion} moves over
# Preceding a motion or edition with a number repeats it n times
# Examples:
50k moves 50 lines up
2dw deletes 2 words
5yy copies 5 lines