PracticalVim Tip29 - yszheda/wiki GitHub Wiki

Table of Contents

Tip 29: Duplicate or Move Lines Using `:t` and `:m` Commnads

Return to the top: <>

Duplicate Lines with the `:t` Commnad

  • `:t` (copy TO) is short for `:copy`/`:co`
  • The format of the copy command:`:[range]copy {address}`
  • differences between `yyp` and `:t.`: `yyp` uses a register, whereas `:t.` doesn't.

Example:

References:

Move Lines with the `:m` Command

  • The format of the move command:`:[range]move {address}`

Example:

Alternative for `:'<,'>m$`: `dGp`

References:

⚠️ **GitHub.com Fallback** ⚠️