Move a line up or down with VS Code

A quick tip on moving lines up or down a file using your keyboard in VS Code

You can rearrange the order of lines in your VS Code file by using the keyboard. This can be really handy if you want to manually re-order a list or hard-coded array.

Hold down Option / Alt and use the Up or Down arrow keys to move the currently selected line up or down.

You can also select multiple lines in VS Code and move them all at once.

This is something you won’t need every day, but is much faster than cutting and pasting when you do need it.

Recent posts View all

SEOInterviews

WebLinkR Interview - we spoke with SEO Reddit Mod WebLinkR about, well, SEO

A short interview with SEO Reddit Mod WebLinkR about some of their SEO thinking.

Productivity Web Dev

81% of people more wary of dependencies due to AI

We polled people about how they felt about software dependenices since more folk used AI