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
發表於我在 ITeye 的博客: http://surmounting.iteye.com/blog/1676742
相關文章
相關標籤/搜索