How can I enable auto complete support in Notepad+

2019-01-16 02:33发布

I am trying to add simple syntax highlighting and auto completion for a simple scripting language...

I added syntax highlighting using this article

Now I want to know how to enable auto completion with Notepad ++ for my custom language. Does anyone know how to do that?

8条回答
Rolldiameter
2楼-- · 2019-01-16 02:56

You can also add your own suggestion.

Open this path:

C:\Program Files\Notepad++\plugins\APIs

And open the XML file of the language, such as php.xml. Here suppose, you would like to add addcslashes, so just add this XML code.

<KeyWord name="addcslashes" func="yes">
    <Overload retVal="void">
        <Param name="void"/>
    </Overload>
</KeyWord>
查看更多
趁早两清
3楼-- · 2019-01-16 02:57

Don't forget to add your libraries & check your versions. Good information is in Using Notepad Plus Plus as a script editor.

查看更多
Ridiculous、
4楼-- · 2019-01-16 03:05

Go to

Settings -> Preferences -> Backup/Autocompletion

  • Check Enable auto-completion on each input. By default the radio button for Function completion gets checked, that will complete related function name as you type. But when you are editing something other than code, you can check for Word completion.

  • Check Function parameters hint on input, if you find it difficult to remember function parameters and their ordering.

查看更多
小情绪 Triste *
5楼-- · 2019-01-16 03:11

It is very easy:

  1. Find the XML file with unity keywords
  2. Copy only lines with "< KeyWord name="......" / > "
  3. Go to C:\Program Files\Notepad++\plugins\APIs and find cs.xml for example
  4. Paste what you copied in 1., but be careful: Don't delete any line of it cs.xml
  5. Save the file and enjoy autocompleting :)
查看更多
唯我独甜
6楼-- · 2019-01-16 03:12

Autocomplete in Notepad++ is as simple as hitting Ctrl + Enter or Ctrl + Space in the interface.

Ctrl + Enter - as simple as that!

This, for many people, will be better than autocompleting on everything.

查看更多
老娘就宠你
7楼-- · 2019-01-16 03:13

For basic autocompletion, have a look at the files in %ProgramFiles%\Notepad++\plugins\APIs. It's basically just an XML file with keywords in. If you want calltips ("function parameters hint"), check out these instructions.

I've never found any more documentation, but cpp.xml has a calltip for fopen, while php.xml is quite complete.

查看更多
登录 后发表回答