fir3net
PPS-Firenetbanner-780.5x190-30-03-17

How do I tab multiple lines within VI ?

Within this article we will looking at the steps required to tab multiple lines within VI.
This feature is great for ensuring readability, when editing indent based languages such as Python or just programming in general.

Steps

  1. Press "<SHIFT> + v" to enter VISUAL LINE mode.
  2. Select the text you wish to indent but using either the cursor keys or the "j" and "k" keys.
  3. To indent press "<SHIFT> + dot" (> character).

You can then repeat the indentation by using the "." key.

About the Author

RDonato

R Donato

Rick Donato is the Founder and Chief Editor of Fir3net.com. He currently works as a Principal Network Security Engineer and has a keen interest in automation and the cloud.

You can find Rick on Twitter @f3lix001