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 same folder as Notepad++ .exe, as well as the zero-length file doLocalConf.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.xml file, 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.xml file, below :

    <?xml version="1.0" encoding="Windows-1252" ?>
    		<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" />

    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,


    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!?

Log in to reply