Testing in Python
Essential VS Code Keyboard Shortcuts for writing test data
2 min readApr 11, 2021
Writing out rows of test data can be tedious and boring, even if just a few lines. But mastering a few keyboard shortcuts in VS Code can make it fun. You’ll feel like a wizard and your friends will be impressed. So let’s get started…
Move Lines — [ALT + Up/Down Arrow]
Copy Lines — [SHIFT + ALT + Up/Down Arrow]
Select Every Occurrence — [CTRL + SHIFT + L]
Replace all within selection — [CTRL + H -> Selection -> ALT + L]
Multiple Cursors 1 (mouse) — [ALT + Click]
Multiple Cursors 2 (keyboard) — [CTRL + ALT + Up/Down Arrow]
Column Box Selection — [ALT + SHIFT + mouse drag]
Hopefully you learned some new features of VS Code or have been convinced to give VS Code a try after witnessing the shortcuts above. If there are any shortcuts I’ve missed that you can’t live without when writing test data, please leave a comment!