solianswers.blogg.se

Visual code shortcut keys
Visual code shortcut keys




visual code shortcut keys

You can also get the number of selections from the status bar, at the bottom of your screen: The number of selections as shown in the Status Bar Smart select If that doesn’t help, you can also press F3 to cycle through the occurrences to make sure you won’t overwrite something by accident. If you want to avoid editing something accidentally, before you press Ctrl + Shift + L, press Ctrl + F instead and check how many times the text is present in the search pop up: The number of occurrences as shown in the Search pop-up

visual code shortcut keys

I changed this shortcut to Ctrl + Shift + A because I associate the A with All. It can be useful when you want to rename a component for example. Select some text and then press Ctrl + Shift + L to select all occurrences of that text. I configured it to Ctrl + Shift + D because it’s similar to the Ctrl + D of the next occurrence, so it’s easy to remember. It’s called Add Selection To Previous Find Match. There is a shortcut to select the previous occurrence, but it’s not enabled by default. You can use this shortcut to rename, for example, a element to a or remove some double-quotes. In the video below, I use that shortcut to rename some React components.

visual code shortcut keys

Select some text and then press Ctrl + D to select the next occurrence of that text. This section contains shortcuts that you can use to select text efficiently. In the next video, I change the default shortcut for Select All occurrences-notice that it has a when clause when the editor has focus. That means that you can activate them under specific conditions. For example, many keywords have a when clause. I find it useful to right-click to open the context menu and select what I want to change from the shortcut. You can also search for keywords from within the command palette, without opening the keyboard shortcuts, but you can’t search for a shortcut by the keybinding. From there, you can type the name of the shortcut you want to change or its key-binding. This will open Keyboard Shortcuts in a new open editor. You can open the command palette with Ctrl + Shift + P.






Visual code shortcut keys