Ace编辑器:定制语法错误信息 [英] Ace editor: customizing syntax error gutter

查看:470
本文介绍了Ace编辑器:定制语法错误信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

想知道,是否可以自定义语法错误信息?

Just wondering, if the syntax error gutter can be customized? Also is it possible to highlight texts which has syntax error?

例如下面的示例,我正在尝试检查 myString 反对字符串 chetan,但不带引号。现在,这是语法错误。当前,我们在行号之前的装订线中显示错误。但是是否可以自定义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 )或修改荧光笔令牌,请参见 https: //groups.google.com/d/msg/ace-discuss/_PRUJ_HemNo/wvDf9FqwzhMJ

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆