1. 程式人生 > >讓editplus可以支援lua語法高亮

讓editplus可以支援lua語法高亮

editplus預設是沒有sql語法高亮的,原因是它的內部沒有lua.stx的這樣一個檔案
我們自己在 C:\Documents and Settings\Administrator\Application Data\EditPlus 3 這樣的目錄下面新建一個檔名為lua.stx這樣一個檔案
裡面的內容是:
#TITLE=LUA
; LUA syntax file written by ES-Computing.
; This file is required for EditPlus to run correctly.


#DELIMITER=,(){}[]-+*%/="'~!&|<>?:;.#
#QUOTATION1='
#QUOTATION2="
#CONTINUE_QUOTE=n
#LINECOMMENT=--
#COMMENTON=--[[
#COMMENTOFF=]]--
#ESCAPE=\
#CASE=y
#NUMBER_PATTERN=lua
#SPECIAL_STX=lua


#KEYWORD=Reserved words
function
then
end
nil
local
break
do
else
elseif
for
if
return
while
true
false
string
time
print
repeat
until
in
assert
not
or
and
sprint
pairs
ipairs




#KEYWORD=Compiler directives
define
error
include
#
然後開啟editplus,開啟tools -> Preferences -> Files -> Setting &syntax 單擊右上角的add,新增一個型別,在description欄位填上lua,file Extensions欄位也填上lua,如果有多個副檔名,之間用“;”隔開(例如:lua;sd),然後在syntax file欄位填上lua.stx檔案所在的路徑,應用即可