Community
    • Login

    startfunc tip (autocomplete)

    Scheduled Pinned Locked Moved General Discussion
    8 Posts 3 Posters 309 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.
    • VAVoicesV
      VAVoices
      last edited by

      Hello, i have problem with tips after autocomplete

      this works if there are no characters before the word
      7992578d-de27-49d5-a3b4-02b6f2a5696d-image.png

      but it doesn’t work if you do it like this:
      c958d0e5-b07e-4e93-904b-7f8358448b99-image.png

      Is it possible to fix this?

      P.S. I will also note that in this example, autocomplete works:
      fab51a25-e28b-4341-9af2-08f6f0b656c5-image.png

      Thanks.

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @VAVoices
        last edited by

        @VAVoices ,

        It works for me

        <?xml version="1.0" encoding="UTF-8" ?>
        <NotepadPlus>
        	<AutoComplete>
        		<Environment ignoreCase="yes" startFunc="(" stopFunc=")" paramSeparator="," terminal=";" />
        		<KeyWord name="SSAO_Blend" func="yes">
        			<Overload retVal="native static" descr="SSAOAPI.uc">
        				<Param name="int Mode" />
        			</Overload>
        		</KeyWord>
        	</AutoComplete>
        </NotepadPlus>
        

        What version of Notepad++ are you using? (?-menu, Debug Info, copy from there, paste to here)

        Notepad++ v8.4.6   (64-bit)
        Build time : Sep 25 2022 - 19:51:39
        Path : C:\usr\local\apps\npp\npp.8.4.6.portable.x64\notepad++.exe
        Command Line : 
        Admin mode : OFF
        Local Conf mode : ON
        Cloud Config : OFF
        OS Name : Windows 10 Enterprise (64-bit) 
        OS Version : 20H2
        OS Build : 19042.2130
        Current ANSI codepage : 1252
        Plugins : 
            mimeTools (2.8)
            NppConverter (4.4)
            NppExport (0.4)
        
        VAVoicesV 1 Reply Last reply Reply Quote 1
        • VAVoicesV
          VAVoices @PeterJones
          last edited by

          @PeterJones said in startfunc tip (autocomplete):

          It works for me

          very strange

          <Environment ignoreCase="no" startFunc="(" stopFunc=")" paramSeparator="," terminal=";" additionalWordChar="."/>
          ...
          <KeyWord name="SSAO_Blend" func="yes">
          <Overload retVal="native static" descr="...\Classes\SSAOAPI.uc">
          <Param name="int Mode"/>
          </Overload>
          </KeyWord>
          ...
          

          @PeterJones said in startfunc tip (autocomplete):

          What version of Notepad++ are you using? (?-menu, Debug Info, copy from there, paste to here)

          Notepad++ v8.4.6   (64-bit)
          Build time : Sep 25 2022 - 19:51:39
          Path : C:\Program Files\Notepad++\notepad++.exe
          Command Line : 
          Admin mode : ON
          Local Conf mode : OFF
          Cloud Config : OFF
          OS Name : Windows 10 Pro (64-bit) 
          OS Version : 1903
          OS Build : 18362.356
          Current ANSI codepage : 1251
          Plugins : 
              mimeTools (2.8)
              NppConverter (4.4)
              NppExport (0.4)
          
          
          Michael VincentM PeterJonesP 2 Replies Last reply Reply Quote 0
          • Michael VincentM
            Michael Vincent @VAVoices
            last edited by

            @VAVoices said in startfunc tip (autocomplete):

            additionalWordChar=“.”/>

            Note the difference from @PeterJones , you have:

            additionalWordChar="."/>
            

            in your <Environment ... /> tag. This could be the problem as counting . as a word character, I think you’ll actually need object.SSAO_Blend as a <KeyWord ... >.

            Cheers.

            VAVoicesV 1 Reply Last reply Reply Quote 3
            • VAVoicesV
              VAVoices @Michael Vincent
              last edited by

              @Michael-Vincent Yes, you are absolutely right. Removing additionalWordChar from Environment - everything works fine. Thanks.

              1 Reply Last reply Reply Quote 2
              • PeterJonesP
                PeterJones @VAVoices
                last edited by PeterJones

                @VAVoices ,

                I had just finished confirming, and switched back over to my browser to reply when I saw @Michael-Vincent’s response.

                Yes, when I have

                <Environment ignoreCase="no" startFunc="(" stopFunc=")" paramSeparator="," terminal=";" additionalWordChar="." />
                

                it won’t work. When I don’t have that attribute, it does work.
                This is because if . is a word char, then object.SSAO_Blend does not match any of your KeyWord entries. If . is not a word char, then the word starts at the S and SSAO_Blend does match the KeyWord entry.

                (And by the time I finished typing, you’d already read and confirmed. I’m slow.)

                VAVoicesV Michael VincentM 2 Replies Last reply Reply Quote 3
                • VAVoicesV
                  VAVoices @PeterJones
                  last edited by

                  @PeterJones said in startfunc tip (autocomplete):

                  (And by the time I finished typing, you’d already read and confirmed. I’m slow.)

                  Don’t worry. Your hint was the first and contained the answer, I’m just inattentive and didn’t notice. Thanks to you, too.

                  1 Reply Last reply Reply Quote 2
                  • Michael VincentM
                    Michael Vincent @PeterJones
                    last edited by

                    @PeterJones said in startfunc tip (autocomplete):

                    I had just finished confirming

                    Thank you for actually testing my conjecture. Proof that it works and why is certainly more valuable than speculation.

                    Cheers.

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