normal·mode
~ / ex / line-rangeslesson 1/7

Line ranges: :d, :j and friends

Put a range in front of an Ex command to work on lines without moving to them.

3 drills

  1. Delete a block of lines: Delete the lines that are gone in the target with a single :{from},{to}d, without moving the cursor there first.
  2. From here to the end: Delete everything from the cursor line to the end of the file with one Ex command. . is the cursor line and $ the last one.
  3. Join a range: Join the lines that are one line in the target with a single :{from},{to}j.

The drill editor loads in your browser.

outside the editor the page is in normal mode: ? keymaps · / find · : commandsfound this useful? ☕ support it ·credits · source · not affiliated with Vim or Neovim