Community
    • Login

    How to enable auto-complete for Fortran

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 2.5k Views 1 Watching
    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 Offline
      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 Offline
        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 Offline
          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

          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
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors