📄 cncodeformatrules.pas
字号:
{******************************************************************************}
{ CnPack For Delphi/C++Builder }
{ 中国人自己的开放源码第三方开发包 }
{ (C)Copyright 2001-2009 CnPack 开发组 }
{ ------------------------------------ }
{ }
{ 本开发包是开源的自由软件,您可以遵照 CnPack 的发布协议来修 }
{ 改和重新发布这一程序。 }
{ }
{ 发布这一开发包的目的是希望它有用,但没有任何担保。甚至没有 }
{ 适合特定目的而隐含的担保。更详细的情况请参阅 CnPack 发布协议。 }
{ }
{ 您应该已经和开发包一起收到一份 CnPack 发布协议的副本。如果 }
{ 还没有,可访问我们的网站: }
{ }
{ 网站地址:http://www.cnpack.org }
{ 电子邮件:master@cnpack.org }
{ }
{******************************************************************************}
unit CnCodeFormatRules;
{* |<PRE>
================================================================================
* 软件名称:CnPack 代码格式化专家
* 单元名称:代码格式化规则
* 单元作者:CnPack开发组
* 备 注:该单元实现代码格式化规则
* 开发平台:Win2003 + Delphi 5.0
* 兼容测试:not test yet
* 本 地 化:not test hell
* 单元标识:$Id: CnCodeFormatRules.pas,v 1.11 2009/01/02 08:36:28 liuxiao Exp $
* 修改记录:2003.12.16 V0.1
* 建立。目前包括 缩进空格数、操作符前后空格数、关键字大小写 的设置。
代码风格未实现。
================================================================================
|</PRE>}
interface
type
TCnCodeStyle = (fsNone);
TKeywordStyle = (ksLowerCaseKeyword, ksUpperCaseKeyword, ksPascalKeyword);
TCnCodeStyles = set of TCnCodeStyle;
TCnPascalCodeFormatRule = record
ContinueAfterError: Boolean;
CodeStyle: TCnCodeStyles;
KeywordStyle: TKeywordStyle;
TabSpaceCount: Byte;
SpaceBeforeOperator: Byte;
SpaceAfterOperator: Byte;
SpaceBeforeASM: Byte;
SpaceTabASMKeyword: Byte;
WrapWidth: Integer;
end;
const
CnPascalCodeForVCLRule: TCnPascalCodeFormatRule =
(
ContinueAfterError: False;
CodeStyle: [];
KeywordStyle: ksLowerCaseKeyword;
TabSpaceCount: 2;
SpaceBeforeOperator: 1;
SpaceAfterOperator: 1;
SpaceBeforeASM: 8;
SpaceTabASMKeyword: 8;
WrapWidth: 80;
);
var
CnPascalCodeForRule: TCnPascalCodeFormatRule;
implementation
initialization
// Default Setting
CnPascalCodeForRule := CnPascalCodeForVCLRule;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -