Community
    • Login

    v7.6.3 auto completion *.cpp Not Working

    Scheduled Pinned Locked Moved General Discussion
    6 Posts 3 Posters 1.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.
    • 林園林
      林園
      last edited by

      Many words Not Working ,for example “accumulate,define,pragma”
      please help!!!

      Meta ChuhM 1 Reply Last reply Reply Quote 0
      • Meta ChuhM
        Meta Chuh moderator @林園
        last edited by Meta Chuh

        @林園

        keywords with a #prefix will not autocomplete automatically.

        if you want them to autocomplete after typing the prefix #you will have to add them without prefix to your cpp.xml.

        cpp.xml is usually located at:
        %ProgramFiles(x86)%\Notepad++\autoCompletion\cpp.xml for notepad++ x86,
        and %ProgramFiles%\Notepad++\autoCompletion\cpp.xml for notepad++ x64,
        or npp.7.6.3.bin[.x64]\autoCompletion\cpp.xml for portable versions.

        edit your cpp.xml and insert the following between <KeyWord name="#undef" /> and <KeyWord name="abort" func="yes">:

        		<KeyWord name="define" />
        		<KeyWord name="elif" />
        		<KeyWord name="else" />
        		<KeyWord name="endif" />
        		<KeyWord name="error" />
        		<KeyWord name="if" />
        		<KeyWord name="ifdef" />
        		<KeyWord name="ifndef" />
        		<KeyWord name="include" />
        		<KeyWord name="line" />
        		<KeyWord name="pragma" />
        		<KeyWord name="undef" />
        

        note: keys like accumulate should auto complete correctly on 7.6.3, if you have auto completion enabled.

        if not, here’s the current >>> cpp.xml <<< for you to use and/or compare.

        also make sure your cpp.xml is not in a folder called plugins/APIs, as this would be a wrong location, and only a left-over folder from an older notepad++ installation on your machine.

        1 Reply Last reply Reply Quote 1
        • 林園林
          林園
          last edited by

          My cpp.xml is the same as yours. It should not be #prefix proleme.

          Meta ChuhM 1 Reply Last reply Reply Quote 0
          • Meta ChuhM
            Meta Chuh moderator @林園
            last edited by

            @林園

            if your cpp.xml is the same as mine, and you have added the lines as described above, your auto completion will work correctly, as seen at the screenshots below.

            if not, please re-check all instructions from above.

            Imgur
            Imgur

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

              Hello @林園, @meta-chuh and All,

              An other possibility which does not need any change in auto-completion files, is to modify the following N++ setting :

              Settings > Preferences... > Delimiters > Add your character as part of word in the Word character list zone

              Just insert a # character in the fied

              From now on, the # character is seen as a word character when double-clicking for selection and also, when searching in Normal mode search, with the option Match whole word only set !

              Just play around with that text, below, double clicking and searching, in Normal mode, with the Match whole word only checked or unchecked

               1 word #word word     5 word word# word      9 word wo#rd word
               2 word#word word      6 wordword# word      10 wordwo#rd word
               3 word #wordword      7 word word#word      11 word wo#rdword
               4 word#wordword       8 wordword#word       12 wordwo#rdword
              

              Remark :

              Note that, in that case, when using the Regular expression search mode, this added # character is still not considered as a word character ( \w ) and only as a NON-word character ( \W ) or as a punctuation character ( [[:punct:]] ) !

              Best Regards,

              guy038

              Meta ChuhM 1 Reply Last reply Reply Quote 2
              • Meta ChuhM
                Meta Chuh moderator @guy038
                last edited by

                @guy038

                very nice.
                your recommendation is the best way, as adding # as part of word, will also trigger auto completion immediately, as soon as a # is typed. 👍

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