Different development tools can capture their own set of loyal users and supporters.

VS Code, Eclipse, IDEA, Atom…. Which development tool is better? There has always been this debate.

VS Code has been one of the most popular development tools in recent years, gaining popularity among more developers.

It is so popular, and its continuous innovation is inseparable from the breakthrough.

Even so, many users find VS Code difficult to use.

This is not difficult to understand, let A student who has used tool A suddenly migrate to tool B, even if it is perfect, but still can find A lot of nitpicking points.

This is partly due to usage habits and developers’ lack of understanding of the new tool.

However, it should be clear that VS Code supports many of the great features that other development tools have as a popular development tool at the moment.

In order to give you a clearer understanding of VS Code, today I will introduce you to some efficient uses of VS Code.

Integrated terminal

In VS Code, you can open the terminal directly. This eliminates the need to switch Windows, either to debug code or to execute terminal command line tools, avoiding some wasted time.

To use the VS Code terminal, you need to install it first. The installation steps are very simple and only need the following steps:

  • Start VS Code
  • shift+cmd+pOpen the command panel and entershell command
  • Click on the confirmation

This completes the development of the VS Code integration terminal.

Batch rename

Names play a crucial role in the development process. Function name, class name, variable name…. It’s common to deal with names when writing code.

Renaming is often used at this point, and if a variable name appears 100 times in the code, manually changing it one by one is obviously cumbersome.

The shortcut shift+ CMD + L allows you to select all the names that appear in the code and rename them in batches.

Given that a rename takes 5 seconds, this operation can be introduced in about 8 minutes.

Multiselect mode

Multi-line editing is supported in many development tools because it can be used in many scenarios and is very efficient.

If there are multiple lines close to each other, this feature is very useful and allows you to modify multiple lines and positions at the same time, avoiding duplication of effort.

Alt +click adds a new cursor with each click.

Alt + CMD + Down or Alt + CMD + Up will insert the cursor below or above, respectively.

The command panel

VS Code’s command panel makes VS Code fully accessible via keyboard only.

Typing Shift + CMD +P will bring up a command panel that gives you access to all of VS Code’s features.

Here are shortcuts to some of the most useful commands:

  • cmd+PWill allow you to navigate to any file or symbol by entering its name
  • ctrl+tabWill take you through the last set of files opened
  • shift+cmd+PWill take you directly to the editor command
  • shift+cmd+OWill allow you to navigate to specific symbols in the file
  • ctrl+gWill allow you to navigate to specific lines in the file

A shortcut

Keyboard shortcuts tend to be a burden on the user’s memory, but if you use them regularly and make them a habit, then it’s time to become more efficient.

Here are some useful VS Code shortcuts. You don’t need to remember them all, just a few that fit your own usage scenario.

Navigation shortcut

  • shift+cmd+Fsearch
  • shift+ctrl+GSource code management
  • cmd+shift+DOperation panel
  • cmd+shift+XExtend the panel
  • cmd+bToggle sidebar visibility
  • ctrl+cmd+wToggle label visibility
  • cmd+jUse terminal, issues, Output, debug console toggle open bottom panel

Common Shortcut keys

  • alt+ZToggle auto wrap. If the lines in the file are long and you need to see everything without formatting each line.
  • cmd+FSearch current file
  • alt+shift+left/alt+shift+rightAccording to the word choice
  • cmd+DFinds and selects the next match for the currently selected word.
  • cmd+down/cmd+upMove the cursor to the end/beginning of the current file
  • cmd+left/cmd+rightMove the cursor to the end of the current line
  • alt+left/alt+rightMove the cursor verbatim
  • ctrl+-/ctrl+shift+-Return and advance
  • shift+ctrl+cmd+left/shift+ctrl+cmd+rightEnlarge or shrink block selection
  • F12/cmd+clickJump to definition

Edit medium shortcut keys

  • cmd+XThe current line is clipped when no text is selected
  • cmd+shift+KDelete current row
  • shift+down/shift+upUp and down selection
  • alt+down/alt+upMove one line up and down
  • shift+alt+down/shift+alt+upCopy the row or selection and paste below or above the row or selection

conclusion

If you keep these efficient uses of VS Code in mind, you will find that they are much more efficient than the usual ones.

It may be impossible to perceive the changes brought by small steps, but in the development of large projects, the impact of a tool will be highlighted.

By doing this efficiently, VS Code allows you to focus on the Code itself, without being hampered by tool-level hurdles.


Dry recommended

In order to facilitate everyone, I spent half a month’s time to get over the years to collect all kinds of iso technical finishing together, content including but not limited to, Python, machine learning, deep learning, computer vision, recommendation system, Linux, engineering, Java, content of up to 5 t +, I put all the resources download link to a document, The directory is as follows:

All dry goods to everyone, hope to be able to support it!

Pan.baidu.com/s/1eks7CUyj… (Extraction code: 0000)