Faster editing
If you have ever needed to alter multiple lines of code with the same change, there are a couple of tricks that can save you from having to repeat that change for each line. First, we will show how to edit when the change needs to be applied to lines that are stacked together, and then how to do it when they are not next to one another.
Column Mode
If you're like me, you might often end up having multiple lines of text that you need to edit with similar changes (that is, creating multiple variables with similar names, such as test1
, test2
, and so on). By using the Column Mode feature, you can edit all the items at the same time. This useful capability was briefly mentioned in the chapter on shortcuts and is reiterated here, in case you missed it:
You can make this feature even more useful by pairing it with a plugin such as Increment Selection in Visual Studio Code, and turn var pencil
into...