SynEdit/zh CN

From Free Pascal wiki
Jump to: navigation, search

Deutsch (de) English (en) español (es) français (fr) 日本語 (ja) русский (ru) 中文(中国大陆)‎ (zh_CN)

发展历史

SynEdit 是一个开源的文本编辑器,支持多种语法高亮,官方网页在 SF.net,2007年发布版本 2.0.6,现已迁移到 github

在 Lazarus 界面中,提供一个 SynEdit tab 组件面板。其中包含一个名为TSynEdit的源编辑器组件,支持几种语法高亮,和其他组件一起用于源代码的编辑。包含在Lazarus中的SynEdit是从 SynEdit 1.0.3 中分离出来的,大部分代码由 Martin Friebe 发表在论坛上,并且被改编和扩展了很多,在与原始SynEdit(MPL或GPL)相同的条款下获得许可。

Component Palette SynEdit.png

原始版本 SynEdit 与 Lazarus版 SynEdit

Lazarus 版SynEdit 大部分是由 Martin Friebe. Martin 在论坛上写的,那么自从分支出现后,发生了什么呢?

加入Laza的大事记:

  • 折叠(代码块)
  • 可配置的天沟 - 天沟部分
  • 几个编辑器之间的共享文本
  • utf-8支持
  • 同步编辑插件
  • 基本的RTL-LTR支持
  • 鼠标配置通过MouseActions
  • 重写各种亮点

Delphi和Lazarus的两个版本,代码库是独立重构的,他们之间的重叠很少。

Linux下的bug

不能调用输入法

使用帮助

设置高亮的语法类别


进一步的开发与讨论

  • RTL (right-to-left): started by Mazen (partly implemented on Windows)
  • SynEdit 只支持 UTF8; 不存在 ASCII/ANSI 版本。 A font is pre-selected depending on the system. The user can choose another font, but must then take care to choose a monospaced font.
    • automatic monospace font selection: At the moment SynEdit starts with a font 'courier'. At the moment the LCL TFont does not provide a property to filter monospaced fonts.
    • automatic UTF-8 font selection: Same as above monospace, but also with an UTF-8 font, so that for example umlauts are shown correctly.
  • Dead keys. Most keyboards support typing two or more keys to create one special character (like accented or umlaut characters). (This is handled by LCL widgedset)
  • Redesign of the SynEdit component. The primary goal is more reliable display and navigation in the text. A more modular approach also allows for better integration of extensions, and for specialized controls, for use outside of Lazarus.
  • Word Wrapping. This is an experimental implementation following the idea of the TextTrimmer/TabExpansion classes. The linked bugtraker issue has the class and the explanation of changes required in other files for it to work.
  • Hooks in SynEdit key/command processing. On the forum: http://forum.lazarus-ide.org/index.php/topic,35592.msg243316.html#msg243316