You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何查找Visual Studio 2017中JavaScript相关的语法高亮颜色设置列表?

Hey there! Let's break down your two questions about Visual Studio 2017's JavaScript syntax highlighting—first the full list of color settings you can tweak, then a trick to avoid that tedious "close and reopen" preview cycle.

一、JavaScript-specific syntax highlighting color settings in VS2017

Here are all the relevant items you'll find in the Fonts and Colors dialog (under Show settings for: Text Editor) that apply to JavaScript:

  • JavaScript Comment: Controls color for single-line (// ...) and multi-line (/* ... */) comments
  • JavaScript Identifier: Colors for variable names, function names, and other identifiers
  • JavaScript Keyword: Highlights JS core keywords like var, function, if, async, await
  • JavaScript Number: Colors numeric literals (e.g., 42, 3.14, 0xFF)
  • JavaScript Operator: Styles operators like +, -, =, &&, ||, ===
  • JavaScript String: Colors standard string literals ("hello" or 'world')
  • JavaScript String Escape Sequence: Highlights escape characters inside strings, like \n, \", or \t
  • JavaScript Regular Expression: Styles regex literals (e.g., /^\d+$/)
  • JavaScript Template String: Colors ES6 template strings wrapped in backticks (`hello ${name}`)
  • JavaScript Template String Substitution: Highlights the variable parts inside template strings (${variable})
  • JavaScript XML Documentation Comment: Styles JSDoc-style comments like /** ... */
  • JavaScript XML Documentation Tag: Colors tags within JSDoc comments, such as @param, @returns, or @example

二、Skip the "OK and close" cycle: Preview changes in real-time

You don't have to close the Fonts and Colors window every time to see your changes! Here's the trick:

  1. Open Tools > Options > Environment > Fonts and Colors like usual
  2. Keep this dialog open, then switch back to your JavaScript editor window (use Alt+Tab or just click the editor area—you can interact with both windows at once)
  3. After adjusting a color setting, click the Apply button at the bottom of the Fonts and Colors dialog
  4. Immediately switch back to your editor—you'll see the syntax highlighting update right away!

This saves you tons of time toggling between windows and re-opening the settings.

内容的提问来源于stack exchange,提问作者Klay

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 09:49:15