如何让 Editplus 支持 SQL 语法高亮???

 我来答
伪墨墨墨墨墨
2017-09-11 · TA获得超过2210个赞
知道大有可为答主
回答量:1678
采纳率:85%
帮助的人:946万
展开全部

需要创建一份模版文件来保存sql的关键字等信息,然后导入。

新建一个txt文件,命名为“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

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

保存到想存放的位置(建议Editplus安装目录),然后打开 editplus 的“参数设置”菜单,打开后点击“添加”按钮,输入 SQL,并确定。

点击如图所示的“三个点”按钮来添加语法文件,也就是刚才我们拖曳进去的 sql.stx 文件:

添加好后,在“文件扩展名”一栏中输入“sql”,即对打开的扩展名为 sql 的文件进行高亮显示。

匿名用户
2017-09-10
展开全部
首先新建一个文本文档,并打开它

在打开的文档中添加如下内容:(内容较长,建议复制)
#TITLE=SQL
; SQL syntax file written by xxx

#DELIMITER=,(){}[]-+*%/='~!&|<>?:;.
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式