search
HomeDevelopment ToolsVSCodeSeveral vscode configurations and key bindings you should know

Several vscode configurations and key bindings you should know

正版起飞,jetbrains-agent宣布不再更新,万狗哀嚎。多年老vscode玩家再次回归

因为vscode的默认配置,导致现在用的不是很舒服,奋发图强,一番点睛查询试验过后,总结了以下能让你的vscode起飞的配置。

版本: 1.48.2

相关推荐:《vscode基础教程

snippetsPreventQuickSuggestions

问题: 输入log按tab快速生成代码后,提示居然没了?
解决:

"editor.suggest.snippetsPreventQuickSuggestions": false,

wordSeparators

问题: 对于calendar-header这种中间是-的分隔符的className双击总是不能选中,只能选中一部分?

解决: 去掉 - 字符

"editor.wordSeparators": "`~!@#$%^&*()=+[{]}\\|;:&#39;\",.<>/?"

quickSuggestionsDelay

问题: 这本来不是个问题,但是我记得以前是没这个配置的,导致我的vscode提示一直有延迟( 默认500 ),一直觉得vscode卡..
解决:

"editor.quickSuggestionsDelay": 0

cursorBlinking

问题: brackets默认就有的功能,让你的光标移动有个动画效果。
解决:

"editor.cursorSmoothCaretAnimation": true

acceptSuggestionOnCommitCharacter

问题:

Several vscode configurations and key bindings you should know

这种情况,输入左括号,会成为这个样子

Several vscode configurations and key bindings you should know

这肯定不是我想要的啊

解决:

"editor.acceptSuggestionOnCommitCharacter": false

formatOnPaste

问题: 粘贴代码之后, 又得重新格式化下代码。如果不想改动整个代码,还得选中粘贴的部分代码再手动格式化。
解决: 启用粘贴时自动格式化

editor.formatOnPaste: true

renderCharacters

问题: 只渲染小地图大概色块而不是具体字符, 感觉能提升性能。默认是渲染具体字符。~~~~
解决:

editor.minimap.renderCharacters: false

两个配置

记得第一次使用vscode的时候,那时候还没有UI设置编辑器...

workbench.settings.editor: &#39;json&#39;,
workbench.settings.useSplitJSON: true

自动行尾加逗号

一个插件: macros

一句配置:

"macros": {
        "comma": [ // 末尾加逗号并新加一行
            "cursorLineEnd",
            {
                "command": "type",
                "args": {
                    "text": ","
                }
            },
            "editor.action.insertLineAfter"
        ]
    }

一个快捷键:

Several vscode configurations and key bindings you should know

自动插入右括号,右引号

平时好像也没有按了左括号不需要右括号的情况~~

"editor.autoClosingBrackets": "always",
"editor.autoClosingQuotes": "always",

截屏模式

类似up颜色代码时显示按键和高亮鼠标的功能

搜索Screencast然后绑定快捷键:

Several vscode configurations and key bindings you should know

更多编程相关知识,请访问:编程教学!!

The above is the detailed content of Several vscode configurations and key bindings you should know. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Visual Studio and VS Code: Understanding Their Key DifferencesVisual Studio and VS Code: Understanding Their Key DifferencesApr 19, 2025 am 12:16 AM

VisualStudio is suitable for large-scale projects and enterprise-level application development, while VSCode is suitable for rapid development and multilingual support. 1. VisualStudio provides a comprehensive IDE environment and supports Microsoft technology stack. 2.VSCode is a lightweight editor that emphasizes flexibility and scalability, and supports cross-platform.

Is Visual Studio Still Free? Understanding the AvailabilityIs Visual Studio Still Free? Understanding the AvailabilityApr 18, 2025 am 12:05 AM

Yes, some versions of VisualStudio are free. Specifically, VisualStudioCommunityEdition is free for individual developers, open source projects, academic research, and small organizations. However, there are also paid versions such as VisualStudioProfessional and Enterprise, suitable for large teams and enterprises, providing additional features.

Using Visual Studio: Developing Software Across PlatformsUsing Visual Studio: Developing Software Across PlatformsApr 17, 2025 am 12:13 AM

Cross-platform development with VisualStudio is feasible, and by supporting frameworks like .NETCore and Xamarin, developers can write code at once and run on multiple operating systems. 1) Create .NETCore projects and use their cross-platform capabilities, 2) Use Xamarin for mobile application development, 3) Use asynchronous programming and code reuse to optimize performance to ensure efficient operation and maintainability of applications.

How to format json with vscodeHow to format json with vscodeApr 16, 2025 am 07:54 AM

The ways to format JSON in VS Code are: 1. Use shortcut keys (Windows/Linux: Ctrl Shift I; macOS: Cmd Shift I); 2. Go through the menu ("Edit" > "Format Document"); 3. Install JSON formatter extensions (such as Prettier); 4. Format manually (use shortcut keys to indent/extract blocks or add braces and semicolons); 5. Use external tools (such as JSONLint and JSON Formatter).

How to compile vscodeHow to compile vscodeApr 16, 2025 am 07:51 AM

Compiling code in VSCode is divided into 5 steps: Install the C extension; create the "main.cpp" file in the project folder; configure the compiler (such as MinGW); compile the code with the shortcut key ("Ctrl Shift B") or the "Build" button; run the compiled program with the shortcut key ("F5") or the "Run" button.

How to install vscodeHow to install vscodeApr 16, 2025 am 07:48 AM

To install Visual Studio Code, please follow the following steps: Visit the official website https://code.visualstudio.com/; download the installer according to the operating system; run the installer; accept the license agreement and select the installation path; VSCode will start automatically after the installation is completed.

How to enlarge fonts with vscodeHow to enlarge fonts with vscodeApr 16, 2025 am 07:45 AM

The methods to enlarge fonts in Visual Studio Code are: open the settings panel (Ctrl, or Cmd,). Search and adjust "Font Size". Choose "Font Family" with the right size. Install or select a theme that provides the right size. Use keyboard shortcuts (Ctrl or Cmd) to enlarge the font.

How to connect to a remote server with vscodeHow to connect to a remote server with vscodeApr 16, 2025 am 07:42 AM

How to connect to a remote server through VSCode? Install Remote - SSH Extended Configuration SSH Create a Connection in VSCode Enter connection information: Host, Username, Port, SSH Key Double-click the saved connection in Remote Explorer

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment