我的想法是在 console.log 中使用特定语法进行注释,这将在代码中可见。例如:
console.log('<! here is very important comment, don\'t lose it'); // string itself is displayed as green bold text in IDE
// <! here is the sequence for detecting such strings
我怎样才能用我自己的风格来突出显示它们?
提前致谢!
最佳答案
当前功能无法突出显示自定义功能/关键字。
https://youtrack.jetbrains.com/issue/IDEABKL-5473和相关票证 - 观看它们(星标/投票/评论)以获取有关任何进展的通知。
<小时/>我现在可以建议的最好方法是使用 TODO comments :自定义标记和颜色将为您提供足够的可见度。
或者 - 尝试书签。他们不会突出显示代码..但会在“查看书签”窗口中的滚动条和导航上提供标记。
关于javascript - 在 WebStorm IDE 中突出显示自定义语法结构,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41147070/