How to enable auto-complete for Fortran
-
I am trying to get auto-complete working for Fortran. For my files I have selected language ‘Fortran (free form)’ and assume I simply create an XML file in plugins\APIs but don’t know what it’s name should be. I have tried ‘Fortran (free form).xml’ with tag ‘<AutoComplete language=“Fortran (free form)”>’ in it but it does not work.
-
Hello, @sam-ellis, and All,
-
First of all, it’s necessary to determine the right localization of your active \plugins\APIs folder. Depending on your initial N++ installation ( with the installer OR from a ZIP or 7Z archive ), the active configuration files should be found :
-
In the
samefolder asNotepad++ .exe, as well as the zero-length filedoLocalConf.xml, in case of a local installation of N++ -
And, in case of an usual installation of N++, with the installer :
-
In the folder
%AppData%\Roaming\Notepad++, for a W7, W8 or W10 configuration -
In the folder
%AppData%\Notepad++, for a XP or Vista configuration
-
-
-
Secondly, as you would like to use the Fortran (free form) language, just create a
fortran.xmlfile, in the …\plugins\APIs folder -
Finally, insert all your KeyWords in the fortran.xml file
-
Stop and restart N++
-
Open a new tab (
Ctrl + N) -
Select the option Language > F > Fortran (free form)
That’s it !
As for me, I did a test with the
fortran.xmlfile, below :<?xml version="1.0" encoding="Windows-1252" ?> <NotepadPlus> <AutoComplete> <Environment ignoreCase="no" /> <KeyWord name="ABSOLUTE" /> <KeyWord name="Blah_bla" /> <KeyWord name="FOR" /> <KeyWord name="Guy" /> <KeyWord name="PAPA" /> <KeyWord name="border" /> <KeyWord name="func" /> <KeyWord name="tesT" /> </AutoComplete> </NotepadPlus>It works, without any problem :-))
Remarks :
- Note that, if your KeyWords are all lowercase, the line, below, shouldn’t be necessary
<Environment ignoreCase="no" />- Besides, the complete syntax of this tag is, for instance :
<Environment ignoreCase="no" startFunc="(" stopFunc=")" paramSeparator="," terminal=";" additionalWordChar=".:$#"/>Best Regards,
guy038
P.S. :
For people who prefers the Fortran (fixed form) language, the name of the APIs .xml file, must be
fortran77.xml! -
-
Thanks Guy. Now working. But did not appear to work on a Fortran file that was already open but worked when I closed the file and reopened it!?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login