今天發現SciTE可以和IDE一樣在輸入"."之後顯示系統API的成員.本文最後的英文介紹了怎樣產生供SciTE使用的API檔案.當然你也可以下載別人產生的API.我一般用SciTE編寫Python代碼,那麼我就用怎麼使用python.api為例來介紹.首先下載下面的產生python API的指令碼,雙擊運行,運行完成之後會產生一個python.api的檔案,將python.api拷貝到scite的目錄中,然後在SciTE的選項菜單中選擇User Options,將開啟一個使用者個人設定檔案,然後將下面的代碼拷貝到裡面
api.*.py=$(SciteDefaultHome)/python.api
api.*.pyw=$(SciteDefaultHome)/python.api
autocomplete.choose.single=1
autocomplete.python.ignorecase=1
autocomplete.python.start.characters=.
autocomplete.python.fillups=(
#autocompleteword.automatic
calltip.python.ignorecase=1
calltip.python.word.characters=._$(chars.alpha)$(chars.numeric)
儲存後重新開啟SciTE就行了,另外這個使用者設定檔一般在你個人主目錄裡面.可以看看我的效果.在這裡可以下載C/C++ Windows API,Opengl API, java的API,以及其他很多語言的API檔案.
The .api files can be generated by hand or by using a program. There are also downloadable ready-to-use .api files.
For C/C++ headers, an API file can be generated using ctags and then the tags2api Python script (which assumes C/C++ source) on the tags file to grab complete multiple line function prototypes. Some common headers surround parameter lists with a __P macro and may have comments. The cleanapi utility may be used on these files.
To generate an API file for Python modules, there is a gen_python script.
To generate an API file for Java classes, there is a ApiBuilder.java program.