EditPlus支持SQL突出显示,Shane版,市面最佳
最近要编写一批存储过程,文本编辑器使用 EditPlus3 。EditPlus 本身主打文本编辑、HTML + PHP 编辑,至 2012
年中还没有提供官方对 SQL
文件的语法高亮显示支持,需要自己编写语法高亮显示文件。市面上能找到很多资料,我看了接近十份明面上来源、时间各不一样的资料,全部都是来自一个叫 KK 之人制作的高亮显示文件。此文件没有区分各种关键字的不同,而且竟然将双引号认定为字符串包括符。于是我重写了一份 sql.stx 文件,改善了发现的上述问题。
此文件后边附上内容,文件本身的下载页面地址为: http://download.csdn.net/detail/shanelooli/4565071
拿到文件之后,将文件放在一个确定的位置,不要放在桌面这些临时位置。然后在 EditPlus 的菜单栏选择 工具(T) -> 配置用户工具(C)...
点击之后会出现如下界面:
选择左边“类别”中的 文件 -> 设置&语法 ,点击右边“添加”按钮。类型名称用 SQL ,还需要填写扩展名和语法文件。其中扩展名就写 sql ,不要加点;语法文件通过 ... 按钮选中即可。点击确定,然后最好能重启 EditPlus 。
如此,EditPlus 对 SQL 的语法识别即刻生效。
附:sql.stx
#TITLE=SQL ; SQL syntax file written by Shane Loo Li at 2012-9-12 Wednesday ; This file is required for EditPlus to run correctly. #DELIMITER=,(){}[]-+*%/='~!&|<>?:;. #QUOTATION1=' #CONTINUE_QUOTE=n #LINECOMMENT=-- #COMMENTON=/* #COMMENTOFF=*/ #ESCAPE=\ #SPECIAL_STX=SQL #KEYWORD=SQL Tags ;var type sql_variant datetime smalldatetime float real decimal money smallmoney bigint int smallint tinyint bit ntext text image integer timestamp uniqueidentifier nvarchar nchar varchar char varbinary binary ;database entities COLUMN CONSTRAINT CURSOR DATABASE INDEX TABLE VIEW ENGINE #KEYWORD=Entities ;index type BTREE HASH ;character set utf8 latine ;MySQL features InnoDB #KEYWORD=Reserved words ;Common ADD ALL ALTER AND ANY AS ASC AUTHORIZATION AVG BACKUP BEGIN BETWEEN BREAK BROWSE BULK BY CASCADE CASE CHARACTER CHECK CHECKPOINT CLOSE CLUSTERED COALESCE COMMIT COMMENT COMMITTED COMPUTE CONFIRM CONNECT CONTAINS CONTAINSTABLE CONTINUE CONTROLROW CONVERT COUNT CREATE CROSS CURRENT CURRENT_DATE CURRENT_TIME CURRENT_TIMESTAMP CURRENT_USER DBCC DEALLOCATE DECLARE DEFAULT DELETE DENY DESC DISK DISTINCT DISTRIBUTED DOUBLE DROP DUMMY DUMP ELSE END ERRLVL ERROREXIT ESCAPE EXCEPT EXEC EXECUTE EXISTS EXIT FETCH FILE FILLFACTOR FLOPPY FOR FOREIGN FREETEXT FREETEXTTABLE FROM FULL GOTO GRANT GROUP HAVING HOLDLOCK IDENTITY IDENTITY_INSERT IDENTITYCOL IF IN INNER INSERT INTERSECT INTO IS ISOLATION JOIN KEY KILL LEFT LEVEL LIKE LINENO LOAD MAX MIN MIRROREXIT NATIONAL NOCHECK NONCLUSTERED NOT NULL NULLIF OF OFF OFFSETS ON ONCE ONLY OPEN OPENDATASOURCE OPENQUERY OPENROWSET OPTION OR ORDER OUTER OVER PERCENT PERM PERMANENT PIPE PLAN PRECISION PREPARE PRIMARY PRINT PRIVILEGES PROC PROCEDURE PROCESSEXIT PUBLIC RAISERROR READ READTEXT RECONFIGURE REFERENCES REPEATABLE REPLICATION RESTORE RESTRICT RETURN REVOKE RIGHT ROLLBACK ROWCOUNT ROWGUIDCOL RULE SAVE SCHEMA SELECT SERIALIZABLE SESSION_USER SET SETUSER SHUTDOWN SOME STATISTICS SUBSTR SUM SYSTEM_USER TABLE TAPE TEMP TEMPORARY TEXTSIZE THEN TIMESTAMP TO TOP TRAN TRANSACTION TRIGGER TRUNCATE TSEQUAL UNCOMMITTED UNION UNIQUE UPDATE UPDATETEXT USE USER USING VALUES VARYING WAITFOR WHEN WHERE WHILE WITH WORK WRITETEXT ;MySQL Features AUTO_INCREMENT
本日志也发表于我在 CSDN 的博客: http://blog.csdn.net/shanelooli/article/details/7970082
上一篇: 在Lucene或Solr中实现高亮的策略
下一篇: lucene highlighter