DEV Community


Posted on

Tab Autofill, Use It


I am in a class of people who just started coding for the first time. I noticed that a lot of the shortcuts and speedy things used in normal day to day programming are not intuitive to them.

If you are one of those students, hello! This guide is specifically for you. Feel free to ask me in-person if you want any more details on this stuff.

Basic Tab Autofill

Type is slow, tab is fast.

Type the first 2-3 characters of anything, then use the 🠕/🠗 keys to select the exact thing you want.

Basic Tab Autofill example

The following sequence of inputs, when done right, is significantly faster than typing the full thing.



⇥ Tab

. l

⇥ Tab

Take it slow to start with, your brain will pick it up and you will be doing tab autofill like a god.

Tab Autofill - full statements

VSCode adds in a few extra tab autofill entries for making large functions.

The icon on the left of the autofill list entry can help you tell what its going to do:

Icon Description
an isometric cube a function
a brick between square brackets a variable
a bunch of text or something statements
a square with a dotted underline MAGIC FULL FUNCTION FILLING

for loops

depending on the type of thing you are looping through you select different things

"standard" for loop example


🠗⇥ Tab

Once you press tab for on the super magic full statement thing you get put into "magic variable entry mode"

Note down the text is currently highlighted, think of a good name for it, then type it

In this case, I typically use i as the variable name for this type of for loop, so I press it


Suddenly, all of the "index"es have turned to i

To enter the next variable of the super magic full statement thing, press tab, then type the name of it

for this example I thought of the excellent array name example, so I type that in and press tab again


I then can press tab again to set a name for the inner element of this for loop, where I give it a great name:

Pressing tab a final time will place your cursor inside the for loop

other for loops

Looking at the other types of for loops we can quickly make gives a neat way to select them

Sure you could press down repeatedly to get to the correct one for your usecase. Orrr, you can add a single letter and then press tab

array foreach

fore ⇥ Tab

Use to access every element of an array, in order

object forin

Use this to access the value of every key of a object

fori ⇥ Tab


Please look into doing stuff quicker.

I will be writing more blogs on this stuff.

Top comments (1)

elliotmangini profile image
Elliot Mangini

cheers m8