# redefine \ref{…} commands - TeXMaker ref auto-completion

I am redefining my reference command, to more easily reference chapters, tables, figures, etc.. Here e.g. for chapters

\newcommand{\CHAPREF}[1]{chapter \ref{#1}}    %Reference template for chapter


So that I can simply type

\chapter{A chapter}
\label{chp:chapter}
This is a reference to \CHAPREF{chp:chapter}


Which will result in

This is a reference to chapter 1.


But this way I can not use auto-completion in TeXMaker anymore, which would usually propose some chapter references when only typying \ref{...

Is there any way to make TeXMaker also auto complete these new commands?

After googleing for some time, posting this question, I now finally found the correct key words to search for...

Here is the solution:

In TeXMaker, select

User > Customize Completion


\CHAPREF{#label#}