问题描述
我观看了YUIConf 2012的一段视频,其中Douglas Crockford讲述了在JavaScript中实现monad的问题。在这个演讲中,他给出了一个代码示例,利用他所谓的上下文着色,它抛出了通过语言语法着色的想法,并为不同的范围引入了不同的颜色。以下是该视频特定部分的链接。
I watched a video from YUIConf 2012 in which Douglas Crockford gives a talk about implementing monads in JavaScript. In this talk he gives a code example that utilizes what he calls "Context Coloring" which throws out the idea of coloring by language syntax and introduces different colors for different levels of scope. Here is the link to that specific part of the video.
这个上下文着色方案是由JavaScript或任何语言的任何代码编辑器实现的吗?
我使用Sublime Text和这个编辑器像所有其他代码编辑器一样已经遇到过允许将颜色应用于语法。我不确定插件是否可以解决这个问题,或者编辑器是否必须从头开始设计以允许这种上下文着色方案。
I use Sublime Text and this editor like every other code editor I have come across allows color to be applied to syntax. Im not sure if a plugin could solve this problem or if an editor would have to be designed from the ground up to allow this context coloring scheme.
推荐答案
截至2013年2月13日,Crockford已向JSLint添加了实验性上下文着色功能。
As of Feb-13th 2013 Crockford has added an experimental context coloring feature to JSLint.
这篇关于在任何代码编辑器中都实现了Crockford样式的Context Coloring吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!