


The second advanced VSCode extension to improve JavaScript development efficiency!
As a hobbyist, professional, or even a developer who only codes once a month, you must know that having smart and agile tools is a must for anyone willing to put in maximum productive time at work. It is crucial, without further ado, it is more important to introduce the plug-in.
1. Material Theme & Icons
This is an important role in the VS Code theme. Themes that the author feels are important are the closest thing to writing with pen and paper in the editor (especially when using uncontrasted variant themes). From integrated tools to text editor, your editor looks virtually flat and seamless.
Imagine an epic theme coupled with epic icons. Material Theme Icons are a great choice to replace the default VSCode icons. The large icon directory designed to blend in with the theme makes it more beautiful, which helps you find your files easily in the explorer.
2. Zen Mode or Do Not Disturb mode with a centered layout
In order to allow the majority of hard-working coders to VSCode, which has a clear idea and represents the interests of the majority of coders, has also joined the "Zen Mode". This mode can be enabled when you edit a file on the page. The effect is to make your editing box full screen, and then have a looming cloud effect.
Open with: File> Preferences> Settings> User Settings> Workbench> Zen Mode
Here are the 6 best fonts that support ligatures (according to www.slant.co)
Fira Code, it's awesome and open source. Here's how to change that font in VSCode after introducing Fira Code.
"editor.fontFamily": "Fira Code", "editor.fontLigatures": true
4. Rainbow indent (indent-rainbow)
Indent style, this extension colors the indentation in front of the text, alternating four different colors at each step.settings.json
"indentRainbow.colors": [ "rgba(16,16,16,0.1)", "rgba(16,16,16,0.2)", "rgba(16,16,16,0.3)", "rgba(16,16,16,0.4)", "rgba(16,16,16,0.5)", "rgba(16,16,16,0.6)", "rgba(16,16,16,0.7)", "rgba(16,16,16,0.8)", "rgba(16,16,16,0.9)", "rgba(16,16,16,1.0)" ],
6. Tag Wrapping
如果你不认识 Emmet,那么你可能是一个喜欢打字的人。Emmet 允许你写入缩写代码并返回的相应标记,目前 VSCode 已经内置,所以不用配置了。
如果你想了解更多的 Emmet 的简写,可以查看 Emmet Cheatsheet
7. 内外平衡
这条建议来自 https://vscodecandothat.com/,作者非常推荐它。
你可以使用 balance inward 和 balance outward 的 Emmet 命令在 VS 代码中选择整个标记。 将这些命令绑定到键盘快捷键是有帮助的,例如 Ctrl + Shift + 向上箭头用于平衡向外,而 Ctrl + Shift +向下箭头 用于平衡向内。
8. Turbo Console.log()
没有人喜欢输入非常长的语句,比如 console.log()
。这真的很烦人,尤其是当你只想快速输出一些东西,查看它的值,然后继续编码的时候。如果我告诉你,你可以像 Lucky Luke一样快速地控制台记录任何东西呢?
这是通过名为 Turbo Console Log 的扩展来完成的。它支持对下面一行中的任何变量进行日志记录,并在代码结构之后自动添加前缀。你还可以 取消注释/注释 alt+shift+u / alt+shift+c
为所有由这个扩展添加的 console.log()
。
此外,你也可以通过 alt+shift+d
删除所有:
9. Live server
这是一个非常棒的扩展,可以帮助你启动一个本地开发服务器,为静态和动态页面提供实时重新加载功能,它对 HTTPS、CORS、自定义本地主机地址和端口等主要特性提供了强大的支持。
如果与 VSCode LiveShare 一起使用,它甚至可以让你共享本地主机。
10. 使用多个游标 复制/粘贴
当在不同的行上添加游标来编辑多行代码时,发现这个特性非常有用。你可以复制和粘贴这些游标选择的内容,它们将按照复制的顺序进行粘贴。
Mac: opt+cmd+up or opt+cmd+down Windows: ctrl+alt+up or ctrl+alt+down Linux: alt+shift+up or alt+shift+down
11. Breadcrumbs(面包屑)
编辑器的内容上方现在有一个被称为 Breadcrumbs
的导航栏,它显示你的当前位置,并允许在符号和文件之间快速导航。要使用该功能,可使用 View > Toggle Breadcrumbs
命令或通过 breadcrumbs.enabled
设置启用。要与其交互,请使用 Focus Breadcrumbs 命令或按 Ctrl + Shift +
。
12. Code CLI
VS代码有一个强大的命令行界面,允许你控制如何启动编辑器。你可以通过命令行选项打开文件、安装扩展名、更改显示语言和输出诊断信息。
想象一下,你通过 git clone <repo-url> </repo-url>
克隆一个远程库,你想要替换你正在使用的当前 VS Code实例。 通过命令 code . -r
将在不必离开 CLI 界面的情况下完成这一操作 (在此处了解更多信息)。
13. Polacode
你经常会看到带有定制字体和主题的代码截屏,如下所示。这是在VS代码与 x 扩展
I know Carbon is also a better and more customizable alternative. However, Polacode allows you to stay in the code editor and use any specialized fonts you may have purchased that are not available in Carbon.
14. Quokka (JS/TS ScratchPad)
Quokka is a rapid prototyping platform for JavaScript and TypeScript. As you enter code, it will immediately run your code and display various execution results in the code editor.
#A great extension for Quokka that allows you to output each step without having to set breakpoints in the debugger when preparing for technical interviews. It can also help you study the functions of a library like Lodash or MomentJS before actually using it, and it can even be used for asynchronous calls.
15. WakaTime
If you want to log how much time you spend programming every day, WakaTime is an extension that helps record and store metrics and analytics about your programming activities .
Original address: https://medium.freecodecamp.org/here-are-some-super-secret-vs-code-hacks-to-boost-your- productivity-20d30197ac76
In order to ensure readability, this article uses free translation rather than literal translation.
The first article in this series can be seen here:
Advanced VSCode extension to improve JavaScript development efficiency!
Recommended tutorial: vscode tutorial
The above is the detailed content of The second advanced VSCode extension to improve JavaScript development efficiency!. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











How to define header files using Visual Studio Code? Create a header file and declare symbols in the header file using the .h or .hpp suffix name (such as classes, functions, variables) Compile the program using the #include directive to include the header file in the source file. The header file will be included and the declared symbols are available.

VS Code system requirements: Operating system: Windows 10 and above, macOS 10.12 and above, Linux distribution processor: minimum 1.6 GHz, recommended 2.0 GHz and above memory: minimum 512 MB, recommended 4 GB and above storage space: minimum 250 MB, recommended 1 GB and above other requirements: stable network connection, Xorg/Wayland (Linux)

How to solve the problem that Chinese comments in Visual Studio Code become question marks: Check the file encoding and make sure it is "UTF-8 without BOM". Change the font to a font that supports Chinese characters, such as "Song Style" or "Microsoft Yahei". Reinstall the font. Enable Unicode support. Upgrade VSCode, restart the computer, and recreate the source file.

vscode built-in terminal is a development tool that allows running commands and scripts within the editor to simplify the development process. How to use vscode terminal: Open the terminal with the shortcut key (Ctrl/Cmd). Enter a command or run the script. Use hotkeys (such as Ctrl L to clear the terminal). Change the working directory (such as the cd command). Advanced features include debug mode, automatic code snippet completion, and interactive command history.

Writing code in Visual Studio Code (VSCode) is simple and easy to use. Just install VSCode, create a project, select a language, create a file, write code, save and run it. The advantages of VSCode include cross-platform, free and open source, powerful features, rich extensions, and lightweight and fast.

Common commands for VS Code terminals include: Clear the terminal screen (clear), list the current directory file (ls), change the current working directory (cd), print the current working directory path (pwd), create a new directory (mkdir), delete empty directory (rmdir), create a new file (touch) delete a file or directory (rm), copy a file or directory (cp), move or rename a file or directory (mv) display file content (cat) view file content and scroll (less) view file content only scroll down (more) display the first few lines of the file (head)

VS Code One-step/Next step shortcut key usage: One-step (backward): Windows/Linux: Ctrl ←; macOS: Cmd ←Next step (forward): Windows/Linux: Ctrl →; macOS: Cmd →

Causes and solutions for the VS Code terminal commands not available: The necessary tools are not installed (Windows: WSL; macOS: Xcode command line tools) Path configuration is wrong (add executable files to PATH environment variables) Permission issues (run VS Code as administrator) Firewall or proxy restrictions (check settings, unrestrictions) Terminal settings are incorrect (enable use of external terminals) VS Code installation is corrupt (reinstall or update) Terminal configuration is incompatible (try different terminal types or commands) Specific environment variables are missing (set necessary environment variables)
