From the course: Learning Sublime Text 3

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Transposing and swapping code

Transposing and swapping code - Sublime Text Tutorial

From the course: Learning Sublime Text 3

Start my 1-month free trial

Transposing and swapping code

- [Male Narrator] As long as you're exploring Sublime Text, make some time to check out the Edit menu, because it's absolutely full of little gems, like on the Line menu we have Swap Line Up and Swap Line Down, which is ctrl + cmd, or ctrl + shift on windows, and then the up and down arrows. If I hold ctrl + cmd on my Mac and hit the down arrow I'll move this line down through the file, and I use this all the time to make sure meta charset tags are at the top of my header in an HTML file, and this ensures the browser knows which text encoding we're using before it tries to read the title of the page. You can also use these shortcuts to select and move multiple lines at once. I'll hit cmd + l, or ctrl + l on windows, to select these three lines, then ctrl + cmd up and down, or ctrl + shift up and down on windows, to move them all at once. There you go. Swap Line Up and Down: just two of the gems in the Edit menu in Sublime Text 3.

Contents