

#VISUAL STUDIO SHORTCUTS TO DIV CODE#
In short, VS Code allows for multiple insertion points and selections, which comes in handy in many cases. You can’t mention editing and selecting in VS Code without going into multi-cursor support. In HTML, there are some alternatives using Emmet, which we’ll get to later. I find these useful occasionally… but often, I find it expands the selection in bigger steps than I’d like. VS Code has shortcuts for expanding or shrinking your selection “intelligently” ( ⌘ + ⇧ + ⌃ + → and ⌘ + ⇧ + ⌃ + ←). However, I find that if a shortcut is truly useful, it quickly becomes second nature, and you start using it without thinking about it.Ī particular one worth mentioning: as you move around in a file, or between files, doing edits in different places, ⌃ + - will move the cursor back to the previous place you edited, while ⌃ + ⇧ + - moves it to the next. When it comes to these shortcuts, at first, trying to remember which shortcut to use or looking it up will slow you down. Of course, VS Code adds some editing shortcuts of its own, for moving and duplicating lines, joining the current line with the next one, and so on. You can look up some shortcuts here, and find out for yourself which ones apply in VS Code and which ones are useful to you. ⌃ + P and ⌃ + N are particularly useful for navigating through search results and code completions. While VS Code is no Vim (though there’s an extension for that), these shortcuts let you keep your fingers close to the home row instead of moving over to the arrow keys. I find some of these quite useful in VS Code. The shortcuts go back all the way to Emacs, are provided in many command-line applications using the Readline library, and work in many operating system text fields like search forms and address bars. These include shortcuts like ⌃ + P and ⌃ + N for going to the previous or the next line, and ⌃ + A and ⌃ + E for going to the start or end of the current line. There’s a classic set of text editing keyboard shortcuts that are available in many places. As soon as you switch layouts, the keyboard shortcut settings will switch to showing you the key combination that will trigger a particular command in that layout. Second, I personally switch between keyboard layouts often: I use my native layout for everyday tasks, but for programming, I switch to an American layout. The search is clever and recognizes both “cmd” and “command”, “ctrl” and “control”, and “option” and “alt” (though not “opt”). So, for example, searching for “ctrl shift cmd right” shows me that that keyboard shortcut is bound to “Expand Selection”.

There are a couple of things worth mentioning about the keyboard shortcut preferences: first, not only can you search for a command like “add cursor below” to find out what shortcut that command is bound to, you can also search for a key binding.
#VISUAL STUDIO SHORTCUTS TO DIV WINDOWS#
The shortcuts listed here will be for macOS - naturally, they have Windows counterparts, and the keyboard shortcut preferences ( ⌘ + K ⌘ + S on Mac) will show what they are. That way, I hope you may get something out of this article even if you’re quite familiar with Visual Studio Code (VS Code from now on). Instead, I’ll try to describe which features I find most useful in my day-to-day work, and in what context.

While I don’t think there’s much in the way of prerequisite knowledge needed in order to get something out of this article, my aim is not to go over the basics of a code editor or to list every keyboard shortcut. This is not quite an introductory article.
