What mobile methods does vscode have?

Move cursor by word

In Visual Studio Code (VS Code), you can use the following shortcuts to move the cursor word by word:

  • On Windows and Linux systems, pressing Ctrl + Left Arrowor Ctrl + Right Arrowmoves the cursor one word left or right.
  • On macOS, pressing Option + Left Arrowor Option + Right Arrowmoves the cursor one word left or right.

The above are the default shortcut key settings, you can also customize according to your preferences. In VS Code, select "File" -> "Preferences" -> "Keyboard Shortcuts", and then search for "cursorWord" in the opened interface, you can see all the shortcut key settings related to moving the cursor.

other

Visual Studio Code (VS Code) provides a number of handy shortcuts to help you navigate text. Here are some common shortcut keys for moving the cursor:

  1. Move to beginning/end of line :

    • Windows/Linux: Home / End
    • macOS: Command + Left Arrow / Command + Right Arrow
  2. Move up/down one line :

    • Windows/Linux/macOS: Up Arrow / Down Arrow
  3. Move to beginning/end of file :

    • Windows/Linux: Ctrl + Home / Ctrl + End
    • macOS: Command + Up Arrow / Command + Down Arrow
  4. Move by word :

    • Windows/Linux: Ctrl + Left Arrow / Ctrl + Right Arrow
    • macOS: Option + Left Arrow / Option + Right Arrow
  5. Jump to a specific line : Ctrl + G(then enter the line number and press Enter)

  6. Jump to definition :F12

  7. Jump to next/previous symbol : Ctrl + Shift + ./Ctrl + Shift + ,

  8. Skip to next/previous question : F8/Shift + F8

  9. Jump to next/previous highlighted symbol : F3/Shift + F3

The above are the default shortcut key settings, you can customize these shortcut keys in the settings of VS Code. Select "File" -> "Preferences" -> "Keyboard Shortcuts", and then search for the operation you want in the opened interface to customize the settings.

In addition, VS Code also provides many other powerful navigation functions, such as navigation through symbols, files, or panels. You can learn more in the official documentation of VS Code.

Guess you like

Origin blog.csdn.net/m0_57236802/article/details/131295796