还有个 SynEditStudio V5.8 fix 2 完整版,只支持Delphi7,不支持 Delphi10.3https://www.2ccc.com/article.asp?articleid=4952
通过网盘分享的文件:bootini_SynEditstudio_V5.8.2.rar
链接: https://pan.baidu.com/s/1dwmJVUem-0ZT1YADKaoojA 提取码: 7fbv
下载 https://sourceforge.net/projects/synedit/files/latest/download
通过网盘分享的文件:SynEdit for VCL v2023.08 D12.rar
链接: https://pan.baidu.com/s/1ZUsi1bjJZIpxjsXVh87_4A 提取码: ntg4
安装:将
C:\SynEdit for VCL v2023.08 D12\Source
C:\SynEdit for VCL v2023.08 D12\Source\Highlighters
目录添加到
Library
找到
C:\Users\Administrator\Documents\Tencent Files\16130162\FileRecv\SynEdit for VCL v2023.08 D12\Packages\Rio\Delphi
目录下
SynEditDelphi.groupproj
右键,Complie All
右键,Install
0]设置背景色,设置SynEdit1的Color即可
1]左侧显示行号,拖一个SynEdit1到界面上,
将其Gutter\ShowLineNumbers设为True即可。
2]语法高亮
拖一个TSynPasSyn,其他语法类似
将SynEdit1的Highlighter设置为SynPasSyn1
3]自定义关键字的颜色
4]块 折叠 显示,要在 Gutter.Visible设为True。默认为True
还要在FormCreate事件里 设置
procedure TForm9.FormCreate(Sender: TObject);
begin
SynEdit1.UseCodeFolding:=TRUE;
end;
5]下拉列表,插入 选择 输入
最小设置:
表明使用 插入 列表SynCompletionProposal1.InsertList
2scoUseBuiltInTimer表明用TimerInterval延时弹出
3两个要成对
SynCompletionProposal1.InsertList.Add('Create');// 实际插入 文本
SynCompletionProposal1.ItemList.Add('\column{}\style{+B}constructor\style{-B} Create(AOwner: TCustomSynEdit)');//对应的显示的提示信息
增强功能
如果
scoUsePrettyText设为true,则可以在显示时 加粗显示
SynCompletionProposal1.InsertList.Add('Create');
SynCompletionProposal1.ItemList.Add('\column{}\style{+B}constructor\style{-B} Create(AOwner: TCustomSynEdit)');
SynCompletionProposal1.InsertList.Add('Distroy');
SynCompletionProposal1.ItemList .Add('destructor \column{}\style{+B}Distroy\style{-B}(AOwner: TCustomSynEdit)');
TSynCompletionProposal
- Introduction
- Painting and Formatting
Introduction
Painting and Formatting
I. Introduction
In this section I want to describe the new format mechanism, column painting and how existing applications must be modified to work with the new painting method.
II. Format Commands
The old binary format commands are exchanged for escape sequences. This was necessary because several Delphi function don't like low ASCII characters in strings. (Especially #0s)
The new format commands all start with a backslash followed by a command identifier and a parameter. Parameters are enclosed by { and }. This is similar to the syntax of TeX. If you want to use a single backslash without starting a command, just type two backslashes.
Example
A formatted string like
\color{clNavy}\style{+I}\\\\This\style{~I}\color{0} is a\style{+B}\color{$0000FF} Test
which was represented fomerly by
#1#0#0#128#3'I'\\This'#3'i'#1#0#0#0' is a '#3'B'#1#255#0#0' Test'
would produce this output:
All commands
Command Identifier | Description | Parameter |
color | Changes the font color | Either a Delphi color identifier or a hexadecimal color value. (Pascal style) (In fact anything that the Delphi function StringToColor can parse) |
style | Changes the font style | Either a "+", a "-" or a "~" followed by either "B", "I", "S" or "U" (for bold, italic, strike-out and underline). "+"/"-" switches the style on/off, while "~" toggles the specified font style. |
column | Marks the end of the current column | No parameters for this command. |
image | Inserts an image from the image list provided by the ImageList property | Index of the image you want to insert. |
hspace | Inserts an empty margin. Only useful in combination with the \image{} command. | Width of the margin in pixels. |
III. Column Painting
I've completly reworked column painting. The old TSynCompletionProposal had some rudimentary implicit column painting functionality. (Which could be controlled by the BiggestWord property)
The new method supports any number of columns. The \column{} command moves the cursor to the beginning of the next column, just like the old #9-command did. \column{} does no longer toggle the bold font style. As a replacement there is a default font style for every column.
Example
A formatted string...
function \column{}Length(S: string): \column{}Integer;
...with these column definitions:
- Column: (BiggestWord = "CONSTRUCTOR", FontStyle = [fsBold])
- Column: (BiggestWord = "VERYLONGDELPHIFUNCTION", FontStyle = [fsItalic, fsUnderline])
- Column: (BiggestWord = "INTEGER", FontStyle = [fsBold, fsItalic])
...looks like:
IV. Converting
To convert a current application using the new TSynCompletionProposal would require these steps:
- Convert the current format strings to the new ones.
- Create one single column with its BiggestWord-property set to your old BiggestWord property.
- Wherever you expected from a #9 to change the font style you have to insert one \style{} command.
8]导出为HTML格式
设置好SynExporterHTML1的Highlighter
SynExporterHTML1.ExportAll(SynEdit1.Lines);
SynExporterHTML1.SaveToFile('test.html');
Ctrl+鼠标左键 打开 超链接
查找与替换,最好直接用其Demo开始,因为涉及到好多关联
\Demos\SearchReplaceDemo