Custom AutoComplete file for XML language
Jim Dailey last edited by
You post looks like it includes some double quotation marks that are not in the ASCII character set. That may be the problem. Try this instead:
<?xml version="1.0" encoding="Windows-1252" ?> <NotepadPlus> <AutoComplete language="C++"> <Environment ignoreCase="no" startFunc="(" stopFunc=")" paramSeparator="," terminal=";" additionalWordChar = "."/> <KeyWord name="abs" func="yes"> <Overload retVal="int" descr="Returns absolute value of given integer"> <Param name="int number" /> </Overload> </KeyWord> </AutoComplete> </NotepadPlus>
Cronos Umbra last edited by Cronos Umbra
Did not work.
I add a new XML with this content.
C:\Program Files (x86)\Notepad++\plugins\APIs\my.xml
The tool does not display in the list of languages.
Can someone help me?
I’m wanting to stop using noteped ++
Is there a plugin that will help me with autocomplete?
do yu really have a language called my?
C:\Program Files (x86)\Notepad++\plugins\APIs\ my.xml
The xml name needs to match the language otherwise npp can’t know which xml needs to be loaded.
I don’t understand you (Eu não entendo você).
One xml which can be used by any language(Um XML que pode ser utilizado por qualquer linguagem)?
If so, this doesn’t work (Se assim for, isso não funciona).
I noticed that does not work, thank you for your help.
I created a fortran.xml and I will test it when I can, modified for my language.
Do you know if there is any way to change the colors of keywords that exist in the text to a fortran.xml format for example?
If you have some plugin I would like it.
Can someone explain to me how to put a file userDefineLang.xml?
Someone could tell me step by step, what should I do to make it work?
Or send me some files ready, and show me the steps of how it should work?
Step 1: define the new language
Menu Language->Define your language…
open tab Keywords Lists
press Styker in 1st group
choose a foreground and background color if needed
put the word “testkeyword” (without quotes) into the textbox of 1st group
press Save As… button
put the name “test” in (without quotes)
check menu Language, you should see the language now
Step 2: define API file
Open a new file - menu File->New
Put the following content into the file
<?xml version="1.0" encoding="Windows-1252" ?> <NotepadPlus> <AutoComplete language="test"> <Environment ignoreCase="yes" startFunc="(" stopFunc=")" paramSeparator="," terminal=";" /> <KeyWord name="testkeyword" func="yes"> <Overload retVal="int" > <Param name="int i" /> <Param name="int j" /> </Overload> </KeyWord> </AutoComplete> </NotepadPlus>
save it as C:\Program Files\Notepad++\plugins\APIs\test.xml
Step 3: Check Settings->Preferences->Atuo-Completion it should look like this
Step 4: use it
open a new file - menu File->New
check language - menu Language->test
type the word “testkeyword” (without quotes)
you should see the word in a list, use tab key to complete
press key “(” (without quotes) and you should see the hints
Claudia :********************************** S2
Emanuele Atza last edited by
Sorry forthe really late post
I follow what you have done but doesn’t work…
N++ doesn’t recognize the fuction and doesn’t show the hints
this is the fuction definition
<KeyWord name=“TestFuctionWord” func=“yes” />
<Overload retVal=“int” >
<Param name=“int Input” />
it recognize enerything else like number, operator, keyword, comment
and for Autocompleting the nameFuction?
Sorry for the bad english