normal·mode
~ / neovim / comment-blockslesson 4/7

Comment blocks: gcgc, dgc and ygc

Treat a run of commented lines as one text object.

3 drills

  1. Bring a block back with gcgc: Uncomment the whole commented block around the cursor.
  2. Clear dead code with dgc: Delete the commented-out block around the cursor.
  3. Copy a commented example with ygc: Copy the commented-out example to the end of the file, then uncomment the copy (leave the original as it is).

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