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?
You can also add your own suggestion.
Open this path:
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.
Don't forget to add your libraries & check your versions. Good information is in Using Notepad Plus Plus as a script editor.
Go to
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.
It is very easy:
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.
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 forfopen
, whilephp.xml
is quite complete.