具有自定义语法的最佳文本编辑器

发布于 2024-07-18 14:57:40 字数 127 浏览 2 评论 0原文

能够创建自定义语法的最佳文本编辑器是什么? 我使用了notepad++,但自定义语法有点有限,而且插件(即textFX)有一些错误可以满足我的要求。 我听说过 Vim 和 Emacs(哪个更好?),但我想要一个具有多种功能的快速编辑器。

What is the best text editor with the ability to create custom syntax? I used notepad++, but the custom syntax was a bit limited and the plugins (namely textFX) had a few bugs to satisfy me. I heard about Vim and Emacs (which one is better?), but I want a FAST editor with many features.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(16

小兔几 2024-07-25 14:57:41

如果您使用的是 Mac,Smultron 提供极其简单的自定义语法突出显示。 这几乎是点击式操作。 您只能使用大约 7 或 8 个不同的标签/关键字组合,但当我知道要查找的位置后,我花了大约 5 分钟的时间来组合自定义突出显示方案。

我还赞同其他人对 vim 现有语法文件的看法。 有人很有可能为您正在做的事情创建了语法文件(或接近它的文件)。 我的建议:尝试找到一个类似的语法文件,然后将其破解并将其放入 ~/.vim/syntax 目录中。 不过,在遇到麻烦之前,请先浏览一下 vim 教程(您应该能够在命令提示符下键入“vimtutor”)并看看古怪的键盘命令是否适合您。

至于 Jens Alfke 对 vi 的评论,我定期使用 vim(“VI-iMproved”),发现在处理多个大型文本文件时,无需使用箭头键或鼠标即可快速移动。 在我使用 vimtutor 之前,我对那些神秘的字母命令的感受和 Jens 一样 - 从那时起,vim 就成了我最喜欢的编辑器。 唯一的副作用是有时我会在非 Vim 文本字段中出现奇怪的字符。
:wq

If you're on a Mac, Smultron offers dead-simple custom syntax highlighting. It's pretty much point and click. You're limited to about 7 or 8 different tag/keyword combinations, but it took me about 5 minutes to put together a custom highlighting scheme once I knew where to look.

I'd also second what other people said about existing syntax files for vim. There are pretty good odds that someone has created a syntax file (or something close to it) for what you're doing. My advice: Try to find a similar syntax file, then hack it up and put it in your ~/.vim/syntax directory. Before you go to the trouble, though, go through the vim tutorial (you should be able to just type "vimtutor" at your command prompt) and see if the quirky keyboard commands would work for you.

As for Jens Alfke's comments about vi, I use vim ("VI-iMproved") on a regular basis and find that the moving around without the arrow keys or mouse is dramatically faster when working with multiple large text files. I felt the same way as Jens about the cryptic letter commands until I ran through vimtutor - since then, vim has been my favorite editor. The only side effect is that I'll end up with odd characters in non-vim text fields sometimes.
:wq

千紇 2024-07-25 14:57:41

尝试HippoEDIT。 这是我放弃 Notepad++ 后选择的编辑器。

Try HippoEDIT. It's my editor of choice after I dumped Notepad++.

北笙凉宸 2024-07-25 14:57:41

对于类 C 语言的简单语法突出显示,请尝试 Textpad。 您可以在几分钟内为您的语言定义运算符、大括号、注释分隔符和关键字。

编辑器 Komodo Edit、Emacs、VIM 和 Epsilon 使您能够定义几乎任何类型的语法突出显示。 如果您非常了解这些编辑器的语法突出显示模型(需要几个小时或更长时间才能学习),通常您必须花费至少一个小时,但通常需要一天的时间来创建自定义语法突出显示,VIM 是最容易对语法进行编程的突出显示。

我在 Linux 上使用编辑器 Joe,它也允许用户定义自定义语法突出显示,但其状态基于机器的模型并不像上一段中编辑提到的那么强大。

For simple syntax highlighting for C-like languages, try Textpad. You can define the operators, braces, comment delimiters and keywords for your languages in a few minutes.

The editors Komodo Edit, Emacs, VIM and Epsilon give you the power to define almost any kind of syntax highlighting. If you know the syntax highlighting model of these editors very well (takes hours or more to learn), usually you have to spend at least an hour, but usually a day to create your custom syntax highlighting, VIM being the easiest to program the syntax highlighting.

I use the editor Joe on Linux, which also lets the user define custom syntax highlighting, but its state machine-based model is not so powerful as the editors mentioned in the previous paragraph.

独行侠 2024-07-25 14:57:41

几年前,我也会回答 Textpad,但从那时起,开发似乎已经放缓,并且自动突出显示括号完成等功能(如今几乎成为标准)仍然缺失(请参阅 Textpad 论坛进行讨论)。 语法突出显示选项是用户贡献的,但 Textpad 网站上多年来一直没有进行任何修饰,因此您可以自行查找 11 个 PHP 突出显示器中哪一个效果最好。

我最近发现的是 Editra,这是一款基于 Scintilla 的应用程序,速度快、跨平台且可自定义。 它仍处于早期版本,但到目前为止在 Windows 上没有给我带来任何麻烦。 对于语法自定义,请在安装后查看library.zip 文件内的语法文件夹。

科莫多很强大,但我发现它比慢更慢,尤其是在启动时。 卸载后,它还在我的注册表中留下了“使用 Komodo 编辑”条目,因此它不会被邀请回来。

A few years ago I would have answered Textpad as well, but development seems to have slowed since then and features such as auto-highlighting bracket completion, pretty much standard these days, are still missing (see the Textpad forums for discussion). The syntax highlighting options are user-contributed but there's been no gardening done on the Textpad website for years, so it'll be up to you to find, for example, which of the 11 PHP highlighters works the best.

A recent find for me is Editra, a Scintilla-based app that is fast, multi-platform and customizable. It's still in early versions but has given me no troubles so far on Windows. For syntax customizations look in the syntax folder inside the library.zip file once it's installed.

Komodo is powerful but I've found it to be slower than slow, particularly when launching. It also left "Edit with Komodo" entries scattered all through my registry after being uninstalled, so it won't be invited back.

蓝海 2024-07-25 14:57:41

这是适用于 Windows 操作系统

Atom 是一个很酷的文本编辑器
https://atom.io/

支持智能自动补全,有很多插件可用。
它帮助我使用简单的插件 Pretty-json 使 json 文档变得漂亮。
大尺寸大约100mb

不过编辑器的感觉真的很棒

This is for windows OS

Atom is a cool text editor
https://atom.io/

supports smart autocompletion, lot of plugins are available.
It helped me to make a json document pretty with simple plugin pretty-json.
Large size around 100mb.

But Feel of the editor is really awesome.

软糖 2024-07-25 14:57:40

Vim 和 Emacs 速度速度很快,并且具有很多功能,包括语法突出显示。

我个人使用 Vim,但它们都是强大的编辑器。 如果您使用 Visual Studio,ViEmu 插件是一个非常好的选择,因为它允许在 Visual Studio 中进行几乎完整的 Vim 编辑。

Vim and Emacs are fast and have lots of features, including syntax highlighting.

Personally I use Vim, but both of them are powerful editors. If you use Visual Studio the ViEmu plug-in is a very nice option as it allows almost complete Vim editing within Visual Studio.

说谎友 2024-07-25 14:57:40

我喜欢 SciTE。 它是非常可定制的(使用 lua),并且在 Windows 和 Linux 上运行良好。 修改现有语言规则或添加新语言很容易。 一般来说,我只做语法高亮和制表符行为,但如果你使用 lua,那就没有限制了。

I like SciTE. It's very customizable (with lua), and works great on windows and linux. It's easy to modify existing language rules, or add new languages. Generally I only do syntax-highlighting and tab behavior, but the sky's the limit if you use lua.

迷爱 2024-07-25 14:57:40

Zeus 编辑器 语法荧光笔具有高度可配置性。

The Zeus editor syntax highlighter is highly configurable.

吹梦到西洲 2024-07-25 14:57:40

您可能想尝试一下 PSPad。 免费且功能丰富。 甚至不需要安装,如果您生活在受限制的环境中(即没有本地管理权限),这是一个优点。

You might want to give PSPad a try. Free and feature-rich. Does not even need to be installed, which is a plus if you live in a restricted environment (i.e. no local admin rights).

心舞飞扬 2024-07-25 14:57:40

Sublime Text

  • 快速
  • 轻量级
  • 语法高亮、代码完成、代码折叠
  • 完全可定制
  • 自定义语法
  • 代码片段
  • 插件
  • 已支持多种语言
  • 小地图导航
  • 键重新映射
  • 宏 正
  • 则表达式
  • 项目处理
  • 构建和执行脚本/exe
  • 全屏、多显示器、最多 4 列(文件)一段时间
  • 增长非常快,等等......

Sublime Text

  • Fast
  • Lightweight
  • Syntax highlight, Code completion, Code folding
  • Completely customizable
  • Custom syntax
  • Code snippets
  • Plugins
  • Supports many languages already
  • Minimap navigation
  • Keys remapping
  • Macros
  • Regex
  • Projects handling
  • Builds and executes scripts/exes
  • Full screen, multi-monitor, up to 4 columns (files) at a time
  • Really fast growing, etc...
人生百味 2024-07-25 14:57:40

在 Windows 上,E 文本编辑器 支持 TextMate 捆绑包,考虑到如何创建该捆绑包,这似乎相当容易其中有很多以及他们的力量有多大。 (基本上,TM 捆绑包可以用您喜欢的任何语言完成繁重的工作。)

但是,它是付费软件,并在底层使用 Cygwin,这使得它在执行捆绑命令时有点滞后和不稳定。

On Windows, the E Text Editor supports TextMate bundles, which seem to be fairly easy to create given how many there are and how powerful they tend to be. (Basically, TM bundles can do the heavy lifting in any language you please.)

However, it's paid software, and uses Cygwin underneath, which makes it a bit laggy and flaky when executing the bundle commands.

岛歌少女 2024-07-25 14:57:40

对于 Windows,我对 程序员记事本 已经有一段时间了。 它稳定、可定制、足够轻,而且是开源的。

For Windows, I've been very happy with Programmer's Notepad for a while. It's stable, it's customizable, it's light enough, and it's open-source.

黯然#的苍凉 2024-07-25 14:57:40

notepad2 是一个非常简单易用的工具。

notepad2 is really simple and easy to use tool.

日记撕了你也走了 2024-07-25 14:57:40

我对 Visual Studio 非常满意 - 两种本机编辑功能都很简单 扩展 型号 < em>和可自定义语法

I'm very happy with Visual Studio - both native editing abilities, easy extension model and customizable syntax.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文