让editplus支持sql编辑

让editplus支持sql编辑
平时比较喜欢用editplus编辑器,用它来写Java程序,HTML程序和JSP程序,都很方便,但是最近我处于习惯用editplus来编写SQL存储过程的时候,就觉得很不舒服,主要是它不认SQL关键字,后来我发现这个问题其实是可以解决的。

首先就是要自己编写一段代码,存为.stx 文件(例如sql.stx),然后在editplus的菜单栏Tools(工具)-> Configure User Tools(配置用户工具)->Files(文件)->Setting &syntax(设置和语法),点add(添加)按钮,在 description(输入文件类型说明)栏位填上sql,file Extensions(文件扩展名)栏位也填上sql,如果有多个扩展名,之间用“;”隔开(例如:sql; db2),然后在syntax file栏位填上sql.stx文件所在的路径,


我的是在D:\tools\editplus\SQL.stx,这样就可以了。


下面是我的sql.stx文件源码:


#TITLE=SQL  
; SQL syntax file written by xxx   
#DELIMITER=,(){}[]-+*%/='~!&|<>?:;.  
#QUOTATION1='  
#CONTINUE_QUOTE=n  
#LINECOMMENT=--  
#LINECOMMENT2=#  
#COMMENTON=/*  
#COMMENTOFF=*/  
#ESCAPE=\  
#SPECIAL_STX=SQL   
#KEYWORD=SQL Tags  
;var type  
sql_variant  
datetime  
smalldatetime  
float  
real  
date
decimal  
money
number  
smallmoney  
bigint 
int  
smallint  
tinyint  
bit  
ntext  
text 
image 
integer  
timestamp  
uniqueidentifier 
nvarchar 
nchar 
varchar 
varchar2
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  
MODIFY
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 
RENAME
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


你可能感兴趣的:(让editplus支持sql编辑)