Difference between revisions of "Vim keys"

From Jens' Hjørne
Jump to navigation Jump to search
m
Line 29: Line 29:
 
{|
 
{|
 
!align="left"|Key!! !!align="left"|Function
 
!align="left"|Key!! !!align="left"|Function
 +
<!--
 
|-
 
|-
 
|<DelBack>||&nbsp;||BackSpace - Delete character just before cursor
 
|<DelBack>||&nbsp;||BackSpace - Delete character just before cursor
 +
-->
 
|-
 
|-
−
|C-d||&nbsp;||Delete next character after the cursor
+
|x||&nbsp;||Delete the character under the cursor
 
|-
 
|-
 
|M-<DelBack>||&nbsp;||Kill word before cursor
 
|M-<DelBack>||&nbsp;||Kill word before cursor

Revision as of 18:00, 11 February 2018

Ressources to check

Movement (Normal mode)

    Forward   Backward
Unit   Key   Function   Key   Function
Character   l or →   Move one character backward   h or ←   Move one character forward
Word   w   Move 1 word forward   b   Move one word backward
Line   j or ↓   Move to next line   k or ↑   Move to previous line
Line     Move to end of line   0 (zero)   Move to start of line
Sentence     Move forward to end of sentence     Move back to beginning of sentence
Document   G   Move to the end of the document   gg   Move to the start of the document

Editing (Normal mode)

Key   Function
x   Delete the character under the cursor
M-<DelBack>   Kill word before cursor
M-d   Kill word after the cursor
C-k   Kill to end of line (not including the newline). When given a count parameter C-k will kill to end of line including the newline for each count.
M-k   Kill to end of sentence
C-@   Set mark
C-Spc   Set mark
C-w   Kill from set mark to just before cursor position
C-y   Yank back killed text at current cursor position. M-y will then cycle through earlier killed texts.