Community
    • Login

    How to enable auto-complete for Fortran

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 2.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Sam EllisS
      Sam Ellis
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • guy038G
        guy038
        last edited by guy038

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

        1 Reply Last reply Reply Quote 0
        • Sam EllisS
          Sam Ellis
          last edited by

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

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors