v7.6.3 auto completion *.cpp Not Working
-
Many words Not Working ,for example “accumulate,define,pragma”
please help!!! -
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,
ornpp.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. -
My cpp.xml is the same as yours. It should not be #prefix proleme.
-
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.
-
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 zoneJust insert a
#
character in the fiedFrom now on, the
#
character is seen as a word character when double-clicking for selection and also, when searching inNormal
mode search, with the optionMatch 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 unchecked1 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
-
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. 👍