How to move a block of code Pro Preview

We know the code that is dependant on operators must be indented forward, but if we decide to place 100 lines of code in an operator after it has already been written out, the indenting of each line of code separately would be a painfully lengthy process.

To access the full video please subscribe to


  • #1634
  • 11 Jun 2020

To indent several lines of code simultaneously in VS-Code, you simply need to mark the lines you wish to indent and press "tab". Semi-marked lines will also be completely indented.

The first of the three marked lines in this example is not entirely marked:


However, if you press tab, all three lines  will be indented:


Courses and lessons with this Tutorial

This Tutorial is used in the following courses and lessons

Image for Python with LEGO Mindstorms EV3 - Level 2
  • 39
  • 19:58
  • 93
Image for Lesson 2 - Grabber control panel
  • 6
  • 6
  • 7
  • 3d_rotation 2