免费开源的编辑器 - SciTE

来源:互联网 发布:计算机稳定性测试软件 编辑:程序博客网 时间:2024/05/17 02:47
SciTE,早有耳闻的一个开源编辑器,Windows/Linux两个平台都有很好的支持,今天偶然的机会把它下了下来,用VC编译后,使使,感觉还不错!
SciTE是一个基于SCIntilla的文本编辑器,支持C/C++/VB/Parscal/Smalltalk/Ada/Python/Java等许多语法的高亮显示,支持类似.net ide里的分段显示代码的功能(Great!),非常适合编写C/Script一类,不需要可视化设计的语言.

介绍:
http://scintilla.sourceforge.net
Development of Scintilla started as an effort to improve the text editor in PythonWin. After being frustrated by problems in the Richedit control used by PythonWin, it looked like the best way forward was to write a new edit control. The biggest problem with Richedit and other similar controls is that they treat styling changes as important persistent changes to the document so they are saved into the undo stack and set the document's dirty flag. For source code, styling should not be persisted as it can be mechanically recreated. 

下载地址:http://scintilla.sourceforge.net/ScintillaDownload.html

开始安装: 
1.) 我机器上安装了VC 6.0
2.) 解开包:
scite164
├─scintilla
│ ├─bin
│ ├─doc
│ ├─gtk
│ ├─include
│ ├─src
│ ├─vcbuild
│ └─win32
└─scite
├─bin
├─boundscheck
├─doc
├─gtk
├─lua
│ ├─include
│ └─src
│ └─lib
├─scripts
├─src
├─vcbuild
│ ├─Debug
│ └─Release
└─win32
3.) 首先编译scintilla
打开"命令提示符",CD到scite164/scintilla/win32这个目录
输入编译命令:
> nmake -f scintilla_vc6.mak
首次编译时非常慢,一大堆东西需要产生Obj文件,连接的时候就快了,命令执行成功后,在目录:scite164/scintilla/bin
Dir一下,将看到如下文件:
2005-06-23 17:03 <DIR> .
2005-06-23 17:03 <DIR> ..
2000-03-08 11:33 55 empty.txt
2005-06-23 17:01 317,952 SciLexer.dll
2005-06-23 17:01 639 SciLexer.exp
2005-06-23 17:01 2,038 SciLexer.lib
2005-06-23 17:01 172,544 Scintilla.dll
2005-06-23 17:01 644 Scintilla.exp
2005-06-23 17:01 2,050 Scintilla.lib
上面的两个dll文件是关键.

4.) 再编译scite:
打开VC 6.0,在VC 6.0的菜单: File -> Open Project,打开scite164/scite/vcbuild/SciTE.dsp
VC加载的时候非常慢(按ReadMe上所说作者没有为VC 6.0编写SciTE)所以VC加载的时候把文件转换为VC 6.0的格式.
加载完之后,菜单Build->Set Active Configuration...,选Release版本的,确定.
之后,按F7或者菜单Build->Build SciTE.exe,还是很慢,之后将在scite164/scite/vcbuild/Release下找到SciTE.exe.

5.) 将编译好的那两个dll和SciTE.exe复制到同一个目录下,如在mkdir scite164/Editor/
再把scite164/scite/src下的*.properties复制到同一个目录下,有一些properties可以不要,具体就看你自己的工作需求了.
由于是开源的,你可以参考GPL的License制作自己的SciTE啦!

6.) 汉化
打开SciTE.exe
将如下网页上的字符复制下来:
http://scintilla.sourceforge.net/locale.zh_gb.properties
再将复制的字符粘贴到SciTEH,保存到与SciTE.exe相同目录下,命名为:locale.properties
# 语言文件使用方法:
# 请将此文件命名为locale.properties,拷贝到SciTE安装目录下即可。

关于SciTE配置的文章过几天整理整理发出来,供大家参考!

出处:http://spaces.msn.com/members/unsee/

上传一个可用的给大家:
汉化文件:locale.properties
代码提示:APIs这个目录下
将IE默认HTML查看器更改为:SciTE使用SciTE.reg文件(但需要修改该文件中的SciTE的路径)
其它文件还是参考http://scintilla.sourceforge.net