SciTe編輯器設(shè)置

轉(zhuǎn)載自SciTe 中文設(shè)置(解決亂碼,中文界面)

作為編程語言尤其是簡易腳本語言的輕量級的編輯器,SciTE無疑是一種很好的選擇,它整個的大小不到3M,功能卻不弱。

軟件從[這里](http://www.scintilla.org/SciTEDownload.html)下載(http://www.scintilla.org/SciTEDownload.html)
你可以選擇相應(yīng)的版本(Windows或者Linux,安裝版或者綠色版),至于

Archlinux可以簡單的使用命令安裝:pacman -S scite
或者你想使用專用語言版本,比如AutoIt或者AutoHotKey,下載SciTE4AutoHotKey v3下載SciteAutoIt3,網(wǎng)上可是幫你基本設(shè)置好了的。
好了,接著說重點,嘿嘿。
要想顯示編輯中文,有幾個地方設(shè)置一下:
運行SciTE,點Option->Open User Options File,增加兩行:
code.page=65001 output.code.page=65001
這是使用UTF-8編碼,或者如果你使用GBK、GB2312(Windows下一般都是),那就是:
code.page=936
output.code.page=936
然后保存(File->Save)。如果臨時需要用UTF-8,點File->Encoding->UTF-8。
是不是正常了!
<big style="box-sizing: border-box; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; line-height: 33px; color: rgb(61, 61, 61); font-family: "Hiragino Sans GB W3", "Hiragino Sans GB", Arial, Helvetica, simsun, u5b8bu4f53;"><big style="box-sizing: border-box; line-height: 40px;"><big style="box-sizing: border-box; line-height: 33px;"><big style="box-sizing: border-box; line-height: 40px;">字體</big></big><big style="box-sizing: border-box; line-height: 33px;"><big style="box-sizing: border-box; line-height: 40px;">太小?</big></big></big></big>再增加:
font.base=font:!Monaco,size:20
font.small=font:!Monaco,size:16
font.comment=font:!Monaco,size:18
font.monospace=font:!文泉驛微米黑,size:20
font.code.comment.box=$(font.comment)
font.code.comment.line=$(font.comment)
font.code.comment.doc=$(font.comment)
font.code.comment.nested=$(font.comment)
font.text=font:!Monaco,size:20
font.text.comment=font:!Monaco,size:18
font.embedded.base=font:!Monaco,size:20
font.embedded.comment=font:!Monaco,size:20
把上面的字體替換成你喜歡的,<big style="box-sizing: border-box; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; line-height: 33px; color: rgb(61, 61, 61); font-family: "Hiragino Sans GB W3", "Hiragino Sans GB", Arial, Helvetica, simsun, u5b8bu4f53;"><big style="box-sizing: border-box; line-height: 40px;"><big style="box-sizing: border-box; line-height: 33px;"><big style="box-sizing: border-box; line-height: 40px;">注意了</big></big></big></big>,"font:"后面的“!”千萬要有,否則中文出不來了,我就是丟了它,結(jié)果好半天沒搞定,吐血...

<big style="box-sizing: border-box; line-height: 33px;"><big style="box-sizing: border-box; line-height: 40px;">中文界面的實現(xiàn)</big></big>:
下載中文語言包,可惜SciTE官方網(wǎng)站提供的鏈接國內(nèi)根本難以連上,不過沒關(guān)系,前文所述下載SciTE4AutoHotKey v3的包里就有中文語言包(在包里locales的目錄下"Simplified Chinese.locale.properties"),直接拿過來用就好。我把它改名為"zh_CN.properties",嘿嘿。
有兩個方法設(shè)置:
1.將下載的語言包復(fù)制到你的SciTE安裝目錄,改名為locale.properties
2.將下載的語言包復(fù)制到你的SciTE安裝目錄,在User Options File中增加一行:
locale.properties=zh_CN.properties
我的語言包改名了"zh_CN.properties",所以上面等號右邊就是它了,這種方法的好處是你可以隨時在多個菜單語言間切換。

最后看看我的User Options File 內(nèi)容:

1、文字編碼

SciTE 默認似乎是采用西方語言編碼的,這樣會把一個中文字符視為兩個單字節(jié)字符。

UTF-8code.page=65001

GBK:code.page=936

Big5:code.page=950

locale.properties=zh_CN.properties
code.page=65001
output.code.page=65001

2、換行

由于 SciTE 一般用于編寫代碼,所以默認設(shè)置是不換行的。

wrap=1

3、窗口最大化

默認窗口是長條形,不符合通常的習(xí)慣。

position.width=-1
position.height=-1

4、工作目錄

SciteDefaultHome=~

5、最小化到系統(tǒng)托盤

minimize.to.tray=1

6、文件尾留空

默認設(shè)置中,光標在文件最后一行時垂直滑動條無法再向下滾動,不符合使用習(xí)慣。

end.at.last.line=0

7、工具條

默認不顯示工具條,可能是覺得快捷鍵更好吧。

toolbar.visible=1

8、狀態(tài)條

默認不顯示狀態(tài)條。

statusbar.visible=1

9、選中部分顏色

分別為前景色和后景色,都換成了我習(xí)慣用的顏色。

selection.fore=#FFFFFF
selection.back=#0080FF

10、設(shè)置語法提示

除了默認的語法提示之外,還可以通過新增 API 文件增加語法提示種類。需要告訴程序 API 文件的位置。我建議是在工作目錄中新建一個 api 目錄,專門存放這些文件。$(SciteDefaultHome) 表示工作目錄。

api..c=$(SciteDefaultHome)\api\c.api
api.
.py=$(SciteDefaultHome)\api\python.api
api.*.php=$(SciteDefaultHome)\api\php.api

11、設(shè)置 Tab

默認是縮排8位,最好是統(tǒng)一改為4位。

tabsize=4
indent.size=4

12、文件中搜索

默認搜索 .c、.cxx 和 *.h 文件。

find.files=.

13、自動完成

autocompleteword.automatic=1

14、自動補全 XML 標簽

xml.auto.close.tags=1

15、顯示最近打開的文件

save.recent=1

16、設(shè)置 Home/End

默認跳至邏輯行的行首和行尾,即使打開了自動換行。

wrap.aware.home.end.keys=1

縮略詞配置:

編輯 abbrev.properties 文件,按照如下格式定義縮略詞。

縮略詞=完整詞句

如 Calon=Remainder Book

編輯后輸入“Calon”后按下 Ctrl+B,則自動替換為 Remainder Book。

如果想讓光標在替換之后定位在詞尾之外的位置,則用一個管道符“|”指示該位置。

如 Calon=Remainder|Book

17 字體設(shè)置

font.base=font:!Monaco,size:20
font.small=font:!Monaco,size:16
font.comment=font:!Monaco,size:18
font.code.comment.box=$(font.comment)
font.code.comment.line=$(font.comment)
font.code.comment.doc=$(font.comment)
font.code.comment.nested=$(font.comment)
font.text=font:!Monaco,size:20
font.text.comment=font:!Monaco,size:18
font.embedded.base=font:!Monaco,size:20
font.embedded.comment=font:!Monaco,size:20
font.monospace=font:!文泉驛微米黑,size:20
font.vbs=font:!Monaco,size:18

我把中文語言包的內(nèi)容也貼上來了,方便不想再去下載的懶蟲,復(fù)制保存就可。感謝制作語言包的各位大大:

locale.properties by Neil Hodgson neilh@scintilla.org

Placed in the public domain 2001

locale.properties defines the localised text for the user interface

Some definitions are commented out because they duplicate another string

The format of each line is original=localised, such as File=&Fichier

Even though the original text may have ellipses "..." and access key

indicators "&" in the user interface, these do not appear in this file

for the original texts. Translated texts should have an access key indicator

if needed as the translated text may not include the original access key.

Ellipses are automatically added when needed.

Each original text may have only one translation, even if it appears in

different parts of the user interface.

Please state any further license conditions and copyright notices you desire.

If there are no further notices then contributed translations will be assumed

to be made freely available under the same conditions as SciTE.

2002/02/03 before 1.43 Translated by Chii Liao (廖啟邑)

2003/11/07 1.44-1.56 Translated by Daniel Lin(daniel@twpda.com)

2005/03/12 1.57-1.62 Translated by Edward Hsieh(edwardsayer at pchome dot com dot tw)

2005/09/03 1.63-1.66 Translated and corrected by 龔維正 in Taipei County.

2005/10/02 1.66 Translated and corrected by linnchord(高顯華) in Shanghai China. 參考繁體版修改.

2006/04/03 1.67-1.68 Translated and corrected by Calon Xu(calon.xu@gmail.com, http://calon.weblogs.us/) in China Mianland. Based on 1.66 traditional and simplified Chinese locale.properties.

2007/08/21 1.69-1.74 Translated and corrected by emlvvh(emlvvh@gmail.com) in Beijing, China. Based on simplified Chinese locale.properties.

translation.encoding=UTF-8

在 GBK環(huán)境下, SciTEGlobal.properties 要作下列修改

讓倒退鍵運作正常

code.page=936

我的設(shè)置是 code.page=65001,沒有出現(xiàn)以上情況,如果您發(fā)現(xiàn)存在此問題,再按照如上說明修改。(by Calon)

Menus

File menu

File=文件(&F)
New=新建(&N)
Open=打開(&O)
Open Selected Filename=根據(jù)所選文件名打開(&F)
Revert=返回上次保存狀態(tài)(&R)
Close=關(guān)閉(&C)
Save=保存(&S)
Save As=另存為(&A)
Export=導(dǎo)出(&E)
As HTML=為 HTML 文件(&H)
As RTF=為 RTF 文件(&R)
Page Setup=頁面設(shè)置(&U)
Print=打印(&P)
Load Session=載入文件列表(&L)
Save Session=保存當(dāng)前文件為文件列表(&V)
Exit=退出(&X)

Edit menu

Edit=編輯(&E)
Undo=撤銷(&U)
Redo=重復(fù)上次動作(&R)
Cut=剪切(&T)
Copy=復(fù)制(&C)
Paste=粘貼(&P)
Delete=刪除(&D)
Select All=全選(&A)
Copy as RTF=復(fù)制為 RTF(&F)
Match Brace=跳至對應(yīng)的括號(&B)
Select to Brace=選取括號內(nèi)容(包含括號)(&O)
Show Calltip=顯示函數(shù)提示(&H)
Complete Symbol=補齊符號(&Y)
Complete Word=補齊文字(&W)
Expand Abbreviation=展開縮略語(&E)
Block Comment or Uncomment=增加/消去行首注釋符(&M)
Box Comment=區(qū)塊首尾及行首加注釋符(&X)
Stream Comment=區(qū)塊首尾加注釋符(&N)
Make Selection Uppercase=轉(zhuǎn)為大寫(&S)
Make Selection Lowercase=轉(zhuǎn)為小寫(&L)

Search menu

Search=搜索(&S)
Find=查找(&F)
Find Next=查找下一個(&N)
Find Previous=查找上一個(&S)
Find in Files=在文件中查找(&I)
Replace=替換(&E)
Next Bookmark=下一個書簽(&M)
Previous Bookmark=上一個書簽(&V)
Toggle Bookmark=設(shè)置/清除書簽(&K)
Clear All Bookmarks=清除所有書簽(&C)

View menu

View=查看(&V)
Toggle current fold=折疊/展開(&C)
Toggle all folds=全部折疊/展開(&A)
Full Screen=全屏(&N)
Tool Bar=工具欄(&T)
Tab Bar=標簽欄(&B)
Status Bar=狀態(tài)欄(&S)
Whitespace=空白符(&W)
End of Line=換行符(&E)
Indentation Guides=縮排(&I)
Line Numbers=行號(&L)
Margin=書簽頁邊列(&M)
Fold Margin=折疊狀態(tài)列(&F)
Output=輸出窗口(&O)
Parameters=參數(shù)(&P)

Tools menu

Tools=工具(&T)
Compile=編譯(&C)
Build=調(diào)試(&D)
Go=執(zhí)行(&G)
Stop Executing=中止執(zhí)行(&S)
Next Message=下一個消息(&N)
Previous Message=上一個消息(&P)
Clear Output=清除輸出窗口(&O)
Switch Pane=切換窗格(&S)

Options menu

Options=選項(&O)
Always On Top=保持在頂層(&A)
Vertical Split=窗格垂直并列(&S)
Line End Characters=設(shè)置換行符(&L)
CR + LF=CR + LF(&+)
CR=CR(&C)
LF=LF(&L)
Convert Line End Characters=轉(zhuǎn)換換行符(&C)
Change Indentation Settings=更改縮排設(shè)置(&T)
Use Monospaced Font=使用等寬字體(&M)
Open Local Options File=打開 Local Options 文件(&O)
Open User Options File=打開 User Options 文件(&U)
Open Global Options File=打開 Global Options 文件(&G)
Open Abbreviations File=打開 Abbreviations 文件(&B)

Language menu

Language=語言(&L)

Buffers menu

Buffers=緩沖區(qū)文檔(&B)
Previous=上一個文檔(&P)
Next=下一個文檔(&N)
Close all=全部關(guān)閉(&C)

Help menu

Help=幫助(&H)
About Sc1=關(guān)于 SciTE4AutoHotkey Lite(&S)
About SciTE=關(guān)于 SciTE4AutoHotkey(&A)

Dialogs

Generic dialog

OK=確定
Cancel=取消
Yes=是
No=否

About dialog

About SciTE=關(guān)于 SciTE4AutoHotkey

This is to add something like: Swahili translation 1.41.1 by Neil Hodgson

TranslationCredit=Chinese translation v1.43-1.74 by\n Chii Liao\n Daniel Lin\n Edward Hsieh\n Gong Weizheng\n Linnchord\n Calon Xu\n emlvvh
Contributors:=

Open, Save dialogs

Open File=打開文件
Save File=保存文件
Save File As=另存為...
Export File As HTML=導(dǎo)出為 HTML 文件
Export File As RTF=導(dǎo)出為 RTF 文件
Save Current Session=保存當(dāng)前打開的文件為文件列表
Custom Filter=自定義文件類型

Find in Files dialog

Find in Files=在眾檔中尋找

Find what:=輸入查找字符(&N)
Files:=文件(&I)

Find=

Go To dialog

Go To=跳至(&G)
Destination Line Number:=目的行號(&D)
Current line:=當(dāng)前行號
Last line:=前一次行號

Indentation Settings dialog

Indentation Settings=縮排設(shè)置
Tab Size:=制表符寬度(&T)
Indent Size:=縮進寬度(&I)
Use tabs:=使用制表符(&U)

Replace and Find dialogs

Replace=替換(&R)

Find=

Find what:=輸入查找字符(&N)
Replace with:=替換為(&P)
Match whole word only=全字符匹配(&W)
Match case=區(qū)分大小寫(&C)
Regular expression=使用正則表達式(reg. exp.)(&E)
Wrap around=循環(huán)查找(&O)
Transform backslash expressions=使用反斜線(&B)
Find Next=查找下一個(&F)
Replace All=全部替換(&A)
Replace in Selection=在選取文字中替換(&S)

Close=

Direction=查找方向
Reverse direction=反向查找
Up=向上
Down=向下

Parameters dialog

Execute=執(zhí)行
Set=設(shè)置(&S)

Other UI strings

Untitled=無標題

Properties used in global options

Text=純文本
All Source=源代碼
All Files (.)=所有文件 (.)

Messages

Messages may contain variables such as file names or search strings indicated

by ^0 which are replaced by values before display. ^1, ^2, ... may be used in the future.

Can not find the string '^0'.=找不到 '^0'。
Find string must not be empty for 'Replace All' command.=全部替換時查找內(nèi)容不能空白。
Selection must not be empty for 'Replace in Selection' command.=在選取的文字中替換時一定要先選取文字。
No replacements because string '^0' was not present.=沒有找到字符 '^0',未完成替換。
Could not open file '^0'.=無法打開 '^0'。
Could not save file '^0'.=無法保存 '^0'。
Save changes to '^0'?=文件已被更改,是否要保存為 '^0'?
Save changes to (Untitled)?=文件已被更改,是否保存為 無標題 ?
The file '^0' has been modified. Should it be reloaded?=文件 '^0'已被更改過,是否重新載入?
Bad file.=損壞文件。
Failed to create dialog box: ^0.=無法開啟 ^0 對話框。
Can not start printer document.=無法打印。
URI '^0' not understood.=不能解析 '^0' URI。
Invalid directory '^0'.=無效的目錄/文件夾 '^0'。

1.42

Directory:=目錄(&D)
Wrap=自動換行(&W)
Hide=隱藏(&H)
Check if already open=檢查文件是否已經(jīng)打開(&H)

1.43

Find string must not be empty for 'Replace in Selection' command.=在選取的文字中替換時查找內(nèi)容不能為空白。
List Macros=列出所有宏
Run Current Macro=執(zhí)行當(dāng)前宏
Record Macro=錄制宏
Stop Recording Macro=停止錄制宏
SciTE4AutoHotkey Help=SciTE4AutoHotkey 文檔(&S)
Sci4AutoHotkey Lite Help=SciTE4AutoHotkey Lite 幫助
Edit Properties=編輯選項
Wrap Output=輸出時自動換行(&P)

1.44

Read-Only=只讀(&R)
READ=讀入

1.46

As TeX=為 TeX 文件
Export File As TeX=導(dǎo)出為 Tex 文件
Save a Copy=保存副本(&P)

1.47

As LaTeX=為 LaTeX 文件(&L)
Export File As LaTeX=導(dǎo)出為 TeX 文件
Encoding=編碼
8 Bit=8位元
UCS-2 Big Endian=
UCS-2 Little Endian=
UTF-8=

1.49

Save All=全部保存(&S)
Browse=瀏覽(&B)
Select a folder to search from=選擇要查找的目錄/文件夾
UTF-8 Cookie=

1.50

Insert Abbreviation=插入縮略語(&I)
Abbreviation:=縮略語:
Insert=插入
Mark All=標記搜索結(jié)果(&M)

1.51

In Selection=在選定區(qū)域
Paragraph=段落(&G)
Join=合并(&J)
Split=分割(&S)

1.52

Block comment variable '^0' is not defined in SciTE *.properties!=行首的注釋符號 '^0' 沒有在 SciTE *.properties 中定義!
Box comment variables '^0', '^1' and '^2' are not defined in SciTE *.properties!=區(qū)塊首尾和其中各行首的注釋符號 '^0' 、 '^1' 、 '^2' 沒有在 SciTE *.properties 中定義!
Stream comment variables '^0' and '^1' are not defined in SciTE *.properties!=區(qū)塊首尾的注釋符號 '^0' 及 '^1' 沒有在 SciTE *.properties 中定義!
The file '^0' has been modified outside SciTE. Should it be reloaded?=文件 '^0' 已經(jīng)被其他程序修改過,是否要重新載入?
As PDF=為 PDF 文件(&P)
Export File As PDF=導(dǎo)出為 PDF 文件

1.53

Version=
by=

1.54

Incremental Search=即輸即查(&L)
Search for:=即輸即查

1.55

Could not save file '^0'. Save under a different name?=無法保存 '^0' 文件,是否更名另存?

1.56

As XML=為 XML 文件(&X)
Export File As XML=導(dǎo)出為 XML 文件

1.57

Destination Line:=目的行(&D)
Column:=目的欄(&C)

1.58

Replacements:=替換:
Open Files Here=在此打開文件(&H)

1.59

1.60

1.61

File '^0' is ^1 bytes long,\nlarger than the ^2 bytes limit set in the properties.\nDo you still want to open it?=文件 '^0' 的長度為 ^1 字節(jié),\n超過了 properties 文件中\(zhòng)n ^2 字節(jié)的限制,您仍要打開\n它嗎?
Open Lua Startup Script=打開 Lua Startup Script
All Files ()=所有文件()
Hidden Files (.)=隱藏文件(.)

1.62

Show hidden files=顯示隱藏文件

1.63

Replace in Buffers=在緩沖區(qū)中替換(&U)
Find string must not be empty for 'Replace in Buffers' command.=在緩沖區(qū)中替換時查找內(nèi)容不能為空。
Search only in this style:=僅以此樣式查找:

1.67

Duplicate=重復(fù)當(dāng)前行(&D)

1.72

Convert=轉(zhuǎn)換(&C)

1.73

Code Page Property=系統(tǒng)內(nèi)碼
UTF-8 with BOM=帶 BOM 的 UTF-8
Open Directory Options File=打開 Directory Options 文件(&D

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

推薦閱讀更多精彩內(nèi)容