Difference between revisions of "Vim keys"

From Jens' Hjørne
Jump to navigation Jump to search
m
m
Line 14: Line 14:
 
|style="background-color:#ffffcc;"|Character|| || || || || || || ||  
 
|style="background-color:#ffffcc;"|Character|| || || || || || || ||  
 
|-
 
|-
−
|style="background-color:#ffffcc;"|Word|| || || || || || || ||  
+
|style="background-color:#ffffcc;"|Word|| ||w|| ||Move 1 word forward|| || || ||  
 
|-
 
|-
 
|style="background-color:#ffffcc;"|Line|| || || || || || || ||  
 
|style="background-color:#ffffcc;"|Line|| || || || || || || ||  
 
|-
 
|-
−
|style="background-color:#ffffcc;"|Line|| || || || || || || ||  
+
|style="background-color:#ffffcc;"|Line|| || || || || ||0 (zero)|| ||Move to start of line
 
|-
 
|-
 
|style="background-color:#ffffcc;"|Sentence|| || || || || || || ||  
 
|style="background-color:#ffffcc;"|Sentence|| || || || || || || ||  
 
|-
 
|-
 
|style="background-color:#ffffcc;"|Document|| || || || || || || ||  
 
|style="background-color:#ffffcc;"|Document|| || || || || || || ||  
 +
|}
 +
 +
==Editing==
 +
{|
 +
!align="left"|Key!! !!align="left"|Function
 +
|-
 +
|<DelBack>||&nbsp;||BackSpace - Delete character just before cursor
 +
|-
 +
|C-d||&nbsp;||Delete next character after the cursor
 +
|-
 +
|M-<DelBack>||&nbsp;||Kill word before cursor
 +
|-
 +
|M-d||&nbsp;||Kill word after the cursor
 +
|-
 +
|C-k||&nbsp;||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||&nbsp;||Kill to end of sentence
 +
|-
 +
|C-@||&nbsp;||Set mark
 +
|-
 +
|C-Spc||&nbsp;||Set mark
 +
|-
 +
|C-w||&nbsp;||Kill from set mark to just before cursor position
 +
|-
 +
|C-y||&nbsp;||Yank back killed text at current cursor position. M-y will then cycle through earlier killed texts.
 
|}
 
|}
  
 
[[Category:Værktøjer, Programmering]][[Category:Keyboard shortcuts]]
 
[[Category:Værktøjer, Programmering]][[Category:Keyboard shortcuts]]

Revision as of 10:03, 24 January 2018

Links to check

Movement

    Forward   Backward
Unit   Key   Function   Key   Function
Character        
Word   w   Move 1 word forward    
Line        
Line       0 (zero)   Move to start of line
Sentence        
Document        

Editing

Key   Function
<DelBack>   BackSpace - Delete character just before cursor
C-d   Delete next character after 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.