Notepad++
的自动完成功能适用于默认包含的文件类型,例如 PHP
和 CSS
。但是我根本无法让它为来自 Stata 的 DO
文件工作。一个简单的 do.xml
包括以下内容:
<?xml version="1.0" encoding="Windows-1252" ?>
<NotepadPlus>
<AutoComplete>
<KeyWord name="xtreg" func="yes">
<Overload retVal="void">
<Param name="void"/>
</Overload>
</KeyWord>
</AutoComplete>
</NotepadPlus>
我将其正确存储在 plugins/APIs
下。但它对 DO
文件根本不起作用。有什么建议吗?
最佳答案
好的,我想通了问题:语言的名称必须与自动完成的 xml
的名称相同。因此,如果语言名称是 Stata
,则自动完成文件的名称必须是 Stata.xml
。
API files are located in the plugins\APIs\ subfolder of the Notepad++ installation folder. These files are optional: you need only one for each language for which you'll use Auto Completion or calltips. They are also supported for User Defined Languages, and bear the name <Language name>.xml.
关于autocomplete - Notepad++ 自动完成不适用于特定文件类型的自定义 xml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13442218/