说明:今天重装了系统后,从网上安装下载了一个EditPlus阅读代码,发现sql语句是灰色的,不和之前的带有颜色的看着美观了,顿时内心别扭了起来。觉得下错了版本,但是换了好几个,都是这样,网上查了一下,才知道缺乏个着色的文件。因此,咱们手动添加一下这个sql着色的文件就能够了。sql
解决方法:ide
(1)咱们先看看是什么文件,起到了让语法高亮的做用。工具
由于个人是英文版的,打开editplus,打开tools -> Preferences -> Files -> Setting &syntaxspa
中文的话是:“工具”“首选项”“文件”“设置和语法”code
如图:blog
(2)着色文件的创建ip
在那个着色的文件夹里,新建txt文档,打开,复制粘贴以下代码:ci
#TITLE=SQL ; SQL syntax file written by KK. #DELIMITER=,(){}[]-+*%/="'~!&|<>?:;. #QUOTATION1=' #QUOTATION2=" #LINECOMMENT=-- #COMMENTON= #SPECIAL_STX=SQL #KEYWORD=SQL Tags ;VAR sql_variant datetime smalldatetime float real decimal money smallmoney bigint int smallint tinyint bit ntext text image integer timestamp uniqueidentifier nvarchar nchar varchar char CHARACTER varbinary binary #KEYWORD=Reserved words ADD ALL ALTER AND ANY AS ASC AUTHORIZATION AVG BACKUP BEGIN BETWEEN BREAK BROWSE BULK BY CASCADE CASE CHECK CHECKPOINT CLOSE CLUSTERED COALESCE COLUMN COMMIT COMMENT COMMITTED COMPUTE CONFIRM CONNECT CONSTRAINT CONTAINS CONTAINSTABLE CONTINUE CONTROLROW CONVERT COUNT CREATE CROSS CURRENT CURRENT_DATE CURRENT_TIME CURRENT_TIMESTAMP CURRENT_USER CURSOR DATABASE 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 INDEX 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 VIEW WAITFOR WHEN WHERE WHILE WITH WORK WRITETEXT保存,将文件名修改为sql.stx。而后文档
添加一个新的文件类型。单击右上角的add,添加一个类型,在description栏位填上sql,file Extensions栏位也填上sql,若是有多个扩展名,之间用“;”隔开(例如:sql;db2),而后在syntax file栏位填上sql.stx文件所在的路径,或者点击…按钮,选择你本身创建的sql着色文件。对了,最后别忘了点击OK按钮奥。get