vim.how

    Copy & paste

    In normal mode you can use these commands to copy, cut and paste text, whole lines or multiple lines.
    y
    y
    Copy (yank) line
    You can append the command with a number to copy multiple lines. For example 5yy to copy 5 lines.
    y
    w
    Copy (yank) from the cursor to the next word
    A combination of 'y' (for copy) with 'w' (for the beginning of the next word).
    y
    b
    Copy (yank) from the cursor to the previous word
    A combination of 'y' (for copy) with 'b' (for the beginning of the previous word).
    y
    $
    Copy (yank) from the cursor to the end of the line
    A combination of 'y' (for copy) with '$' (for the end of the line).
    y
    0
    Copy (yank) from the cursor to the beginning of the line
    A combination of 'y' (for copy) with '0' (for the beginning of the line).
    d
    d
    Cut (delete) line
    You can append the command with a number to cut multiple lines. For example 5dd to cut 5 lines.
    d
    w
    Cut (delete) from the cursor to the next word
    A combination of 'd' (for cut) with 'w' (for the beginning of the next word).
    d
    b
    Cut (delete) from the cursor to the previous word
    A combination of 'd' (for cut) with 'b' (for the beginning of the previous word).
    d
    $
    Cut (delete) from the cursor to the end of the line
    A combination of 'd' (for cut) with '$' (for the end of the line).
    d
    0
    Cut (delete) from the cursor to the beginning of the line
    A combination of 'd' (for cut) with '0' (for the beginning of the line).
    D
    Cut (delete) from the cursor to the end of the line
    A shorter form of 'd$'.
    x
    Cut (delete) a single character
    p
    Paste (put) after the cursor
    P
    Paste (put) before the cursor