說明:今天重裝了系統後,從網上安裝下載了一個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