• Login
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 Feb 22, 2019, 1:26 AM

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

    M 1 Reply Last reply Feb 22, 2019, 2:04 AM Reply Quote 0
    • M
      Meta Chuh moderator @林園
      last edited by Meta Chuh Feb 22, 2019, 2:13 AM Feb 22, 2019, 2:04 AM

      @林園

      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 Feb 22, 2019, 2:51 AM

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

        M 1 Reply Last reply Feb 22, 2019, 3:05 AM Reply Quote 0
        • M
          Meta Chuh moderator @林園
          last edited by Feb 22, 2019, 3:05 AM

          @林園

          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
          • G
            guy038
            last edited by guy038 Feb 22, 2019, 10:12 AM Feb 22, 2019, 9:48 AM

            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

            M 1 Reply Last reply Feb 22, 2019, 10:08 AM Reply Quote 2
            • M
              Meta Chuh moderator @guy038
              last edited by Feb 22, 2019, 10:08 AM

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