简体   繁体   English

是否有任何文本编辑器/ IDE一般支持语言?

[英]Are there any text-editors/IDEs that support languages generically?

I'm looking for an editor/IDE that can provide features that are nice to have while coding (example: being able to click-through to function definitions) for languages that it is not specifically built for. 我正在寻找一个编辑器/ IDE,它可以提供编码时很好的功能(例如:能够点击到函数定义),而不是专门为它编写的语言。 By these, I have in mind languages designed for a very specific purpose and often only used by a small community. 通过这些,我考虑到了为特定目的而设计的语言,并且通常仅由小社区使用。 In other words, ones that would not have native support in most software. 换句话说,那些在大多数软件中都没有本机支持的。

I realize this would require a fair bit of fairy dust but I don't think it's out of the scope of what's possible. 我意识到这需要相当多的仙尘,但我不认为这超出了可能的范围。 Basically, the editor would have to be smart enough to recognize the commonly used syntax and semantics that many declarative languages have in common. 基本上,编辑器必须足够聪明才能识别许多声明性语言共有的常用语法和语义。 It's quite possible this would require some amount of configuration. 这很可能需要一些配置。

Does something like this exist? 这样的事情存在吗? If not, what challenges do you think there would be in creating it? 如果没有,您认为在创建它时会遇到什么挑战?

If you need only the feature to jump of to the definition of a specific function or class, then VIM (and many other editors, like Emacs, Epsilon and JOE) can read the jump location from the ctags file. 如果您只需要跳转到特定函数或类的定义的功能,那么VIM(以及许多其他编辑器,如Emacs,Epsilon和JOE)可以从ctags文件中读取跳转位置。 You just have to write a ctags file generator for your custom language. 您只需为自定义语言编写ctags文件生成器。

For programmable editors (like VIM, Emacs, Epsilon, Eclipse and gedit), you can write your own plugin for your custom language, but it may quickly become time-consuming and a maintenance nightmare, because new versions of editors tend to change the plugin interface. 对于可编程编辑器(如VIM,Emacs,Epsilon,Eclipse和gedit),您可以为自定义语言编写自己的插件,但它可能很快变得耗时并且成为维护的噩梦,因为新版本的编辑器倾向于更改插件接口。

Please note that adding support for syntax highlighting is usually much easier than adding ctags-like support for symbol lookups. 请注意,添加对语法突出显示的支持通常比为符号查找添加类似ctags的支持要容易得多。 More advanced features, like refactoring and context-sensitive symbol completion (like Ctrl-Space and Tab in modern IDEs) are even harder to implement. 更高级的功能,如重构和上下文相关的符号完成(如现代IDE中的Ctrl-Space和Tab)更难实现。

GNU Emacs has a pretty good infrastructure for this sort of thing. GNU Emacs在这方面有很好的基础设施。 Until recently Haskell was a relatively unknown language used primarily by researchers. 直到最近,Haskell还是一种主要由研究人员使用的相对未知的语言。 Nevertheless, in a few thousand lines of Emacs Lisp, we have 然而,在几千行的Emacs Lisp中,我们有

  • Syntax highlighting with colors 语法用颜色突出显示
  • Automatic indentation 自动缩进
  • Package support 包支持
  • Automatic highlighting of type and other information when placing the cursor over library functions 将光标放在库函数上时自动突出显示类型和其他信息
  • Meta-dot on an identifier to jump to its definition (through the standard emacs tags mechanism) 标识符上的元点跳转到其定义(通过标准的emacs标记机制)

The nice thing about Emacs is that (a) there are many models to follow, and (b) you can build up the environment gradually, starting with those aspects that are most important to you. 关于Emacs的好处是(a)有许多模型要遵循,(b)你可以逐步建立环境,从那些对你最重要的方面开始。

I'm suprised no one has mentioned Notepad++ yet: http://notepad-plus-plus.org/ 我很惊讶没有人提到过Notepad ++: http//notepad-plus-plus.org/

It offers syntax support for a great many languages and offers the user to add new languages, and an active community that adds many languages that are not included out-of-the-box. 它为多种语言提供语法支持,并为用户提供添加新语言的功能,以及一个活跃的社区,可添加许多未包含在内的语言。

Most good IDE's are language agnostic and supports several if not many programming languages. 大多数优秀的IDE都是语言无关的,并且支持几种(如果不是很多)编程语言。 If you are talking about DSL's, eclipse has a solution that seems pretty awsome - Xtext 如果你在谈论DSL,那么eclipse有一个看起来非常棒的解决方案--Xtext

EditPadPro comes with a set of tools that allow you to build your own syntax highlighting , code folding and file navigation schemes, based on a very powerful regex syntax. EditPadPro附带了一组工具,允许您基于非常强大的正则表达式语法构建自己的语法突出显示代码折叠和文件导航方案。 So if your language is not among the many that have already been provided out-of-the-box or can be downloaded off the website , you can roll your own quite easily (and share it with the community). 因此,如果您的语言不是已经开箱即用的许多语言,或者可以从网站上下载 ,您可以轻松地自己动手(并与社区分享)。

替代文字

Visual Studio is designed to allow for this, but it requires the language to add explicit support. Visual Studio旨在允许这样做,但它需要语言添加显式支持。 For example, Delphi Prism will install into Visual Studio, and provide full language support. 例如, Delphi Prism将安装到Visual Studio中,并提供全面的语言支持。

This is far above and beyond "configuration", however, and requires quite a bit of custom development to support. 然而,这远远超出“配置”,并且需要相当多的定制开发来支持。

SciTE and Scintilla offer a generic editor/platform for different languages. SciTE和Scintilla为不同语言提供通用编辑器/平台。 The library contains several parsers that work with many programming languages and you can reuse one of these for your own language to add formatting and syntax highlighting. 该库包含几个可与许多编程语言一起使用的解析器,您可以将其中一个解析为您自己的语言,以添加格式和语法突出显示。

They don't offer advanced features like click-throughs, but you could build it on top of the library. 它们不提供点击等高级功能,但您可以在库之上构建它。

Visual Studio and Eclipse also support language plug-ins. Visual Studio和Eclipse也支持语言插件。

Zeus is a language neutral IDE for the Windows platform and it provides this go to definition/declaration functionality for any language supported by ctags . ZeusWindows平台的语言中立IDE,它为ctags支持的任何语言提供定义/声明功能。

To make it work you just create a Zeus project/workspace and then add the files to this workspace. 要使其工作,您只需创建一个Zeus 项目/工作区 ,然后将文件添加到此工作区。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 像串联一样编辑文件——是否有任何 IDE 或文本编辑器具有此功能? - Edit files as if concatenated as one -- Do any IDEs or text editors have this feature? 你是否区分了文本编辑器和IDE? - Do you draw a distinction between text editors and IDEs? 任何R IDE都支持条件断点吗? - Do any R IDEs support conditional breakpoints? 是否有任何具有HTML5 IntelliSense支持的IDE? - Are there any IDEs with HTML5 IntelliSense support? 哪些IDE和文本编辑器可以推断出在C ++ 11中使用auto关键字声明的变量类型 - Which IDEs and text editors can deduce type of variables declared using auto keyword in C++11 是否有任何 IDE/IDE 插件支持 JavaScript CommonJS 模块? - Do any IDEs/IDE plugins have support for JavaScript CommonJS modules? 编程IDE /编辑器中垂直条的目的 - purpose of vertical bar in programming IDEs/Editors 有没有支持AJAX的好的拖放式网络应用程序IDE? - Are there any good drag&drop web app IDEs out there that support AJAX? 是否可以使用任何文本编辑器插入(插入)代码或文本? - Is it possible to inject (insert) codes or text with any text editors? 是否有任何Python IDE支持类型提示或函数参数的有限代码完成功能? - Do any Python IDEs have support for type hinting or limited code completion for function arguments?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM