Ace 编辑器:自定义语法错误槽 [英] Ace editor: customizing syntax error gutter
问题描述
只是想知道,是否可以自定义语法错误槽?是否可以突出显示有语法错误的文本?
Just wondering, if the syntax error gutter can be customized? Also is it possible to highlight texts which has syntax error?
例如,下面我试图根据字符串 a "chetan" 但没有引号检查 myString
的值.现在这是一个语法错误.目前我们在行号之前在装订线中显示错误.但是是否可以自定义 ace 编辑器提供内联突出显示和更改颜色?
For example below I am trying to check value of myString
against string a "chetan" but without quotes. Now this is a syntax error. Currently we display the error in gutter prior to line number. But is it possible to customize the ace editor provide inline highlight and change the color?
if myString==chetan:
//do something
endif
推荐答案
你可以添加下划线类似于 cloud9 和 zed 的做法(参见 https://github.com/zedapp/zed/commit/59ae66c545db2ad92dc5efc1a069edd16960ebdd) 或修改
You can add underline similar to the way cloud9 and zed do (see https://github.com/zedapp/zed/commit/59ae66c545db2ad92dc5efc1a069edd16960ebdd) or modify highlighter tokens see https://groups.google.com/d/msg/ace-discuss/_PRUJ_HemNo/wvDf9FqwzhMJ
这篇关于Ace 编辑器:自定义语法错误槽的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!