Mac OS X 有语法高亮编辑器组件吗
我正在寻找一个语法突出显示组件,可以将其包含在 Mac OS X XCode 项目中,以允许编辑 Ruby、C++、Lua 等。
我需要一个开源组件或包含源代码的组件。
我的 Google 搜索根本没有找到太多关于 Mac OS X 框架或组件的信息,更不用说我正在寻找的类型了。
感谢您的指点!
I am looking for a syntax highlighting component that I can include in a Mac OS X XCode project to allow editing of Ruby, C++, Lua, etc.
I need a component that is open source or has the source included.
My Google searches didn't turn up much in the way of Mac OS X frameworks or components at all, let alone the type I am looking for.
Thanks for any pointers!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
UKSyntaxColoredTextDocument(特定于 Mac)或 Scintilla(跨平台并在各种编辑器中使用,包括 Komodo)可能就是您正在寻找的。
UKSyntaxColoredTextDocument (Mac-specific) or Scintilla (cross-platform and in use in a variety of editors, including Komodo) might be what you're looking for.
尝试使用闪烁。 http://www.scintilla.org/
Try to use scintilla. http://www.scintilla.org/
您可以尝试使用 CodeMirror。我在我的 SQLite Professional 应用程序中执行此操作以突出显示用户可编辑的查询。设置起来也相当简单:
添加以下代码:
他们还预定义了很多格式,因此效果很好。我发现的一个问题是,本机查找对话框在 WebView 上下文中不起作用。
You could try using CodeMirror. I do this in my SQLite Professional app to highlight user editable queries. It's also fairly simple to setup:
Add the following code:
They also have lots of formats pre-defined, so it works quite well. The one issue I have found with this, is that the native Find dialog does not work when in the context of the WebView.