![]() ![]() ⌘D (Windows, Linux Ctrl+D) selects the word at the cursor, or the next occurrence of the current selection. Note: Your graphics card driver (for example NVIDIA) might overwrite these default shortcuts. A common way to add more cursors is with ⌥⌘↓ (Windows Ctrl+Alt+Down, Linux Shift+Alt+Down) or ⌥⌘↑ (Windows Ctrl+Alt+Up, Linux Shift+Alt+Up) that insert cursors below or above. Each cursor operates independently based on the context it sits in. You can add secondary cursors (rendered thinner) with Alt+Click. VS Code supports multiple cursors for fast simultaneous edits. Customize Keyboard Shortcuts - Change the default keyboard shortcuts to fit your style.Install a Keymap extension - Use the keyboard shortcuts of your old editor (such as Sublime Text, Atom, and Vim) in VS Code by installing a Keymap extension.Keyboard Shortcuts Reference - Learn the most commonly used and popular keyboard shortcuts by downloading the reference sheet.VS Code has a rich set of default keyboard shortcuts as well as allowing you to customize them. Keyboard shortcutsīeing able to keep your hands on the keyboard when writing code is crucial for high productivity. This topic takes you through the basics of the editor and helps you get moving with your code. Visual Studio Code is an editor first and foremost, and includes the features you need for highly productive source code editing. Configure IntelliSense for cross-compiling.Did I miss anything important in this list of useful features? Let me know in the comments below. div.form-group>label+input.form-control#txtname - Better to try this yourself.div>p.text-danger*5 - Creates five paragraphs with the class attribute set to text-danger as the child element of tag.div>h1+p - Creates a div tag with h1 and p tag as its child elements.div>p - Creates a paragraph tag as the immediate child of a div tag. ![]() (Remember to press Tab after typing the snippet) This is the feature of the Visual Studio Code that I use the most. A block of foldable regions can be created using and. You can add foldable regions to a block of HTML code just like, multi-line comments. You can use this shortcut to rename all the occurrence of a varia ble name or a function. This is one of the most helpful shortcuts I've ever used. You can even use regular expressions to find and replace the text from the file. If you have something to find and replace, use this shortcut. So, I'm skipping this without any explanations. You might already be familiar with this shortcut. In such cases, you can use this shortcut and easily find the required file by typing some hints. Finding the required file can be difficult if the project contains a lot of files and folders. This is one of the shortcuts I like the most. Move code to a different position Ctrl + P - Go to file ![]() This shortcut can be used to move a single or a group of lines up or down. Use the shortcut again to uncomment the lines. You can also use this shortcut to comment multiple lines by selecting them before using the shortcut. This is a very useful shortcut that you gonna use frequently, especially if you write comments for your code. But the Ctrl + Enter key combination inserts a new line just below the line without splitting it. Pressing Enter key splits the line into two based on the position of the cursor. You might be wondering why we should use Ctrl + Enter to create a new line instead of using Enter. This will close the active file in the editor. To close files that you no longer need, press Ctrl + F4. Go to beginning and end of a file Ctrl + F4 - Close the current file While editing pages with hundreds or thousands of lines, you can easily scroll to the top or bottom of the file by pressing Ctrl + Home (Navigates to the top) or Ctrl + End (Scrolls to the last line). Ctrl + Home/End - Go to the beginning/end of the file Here, I'm sharing some useful keyboard shortcuts that can make the experience with VS Code even better. It has a rich set of extensions to choose from and is available on all major platforms. Choosing the right text editor can save a lot of time and effort in writing code.Īccording to Stack Overflow Developer Survey, Visual Studio Code (often called VS Code) is the most popular text editor used by developers worldwide. A text editor is an unavoidable tool that every developer should have. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |