# Custom Command Highlighting in TeXstudio

I have defined several macros in my LaTeX report. For instance, following is a macro I defined for writing bold letter H. I have several macros like this I use throughout my work.

\newcommand{\channel}{\ensuremath{\mathbf{H}}}


Whenever I use \channel, TeXstudio highlights it as red saying unknown-command. But it is indeed supported by the auto-completion feature. I want to stop TeXstudio from highlighting it as red (as it is annoying and affects readability). Is there any way to do this?

Update---

After seeing the comments, I realize I forgot to include a important thing. I always write these macros and package calls all inside a single file. Then I input this file in the LaTeX file I am writing. But now I guess I am asking a bit too much. I mean I require the software to recognize the macros which I have input from another file. Nevertheless I was wondering if there was any solution.

-
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). You can also use backticks  to mark your inline code. –  Corentin Dec 14 '12 at 10:49
\documentclass{article}\newcommand{\channel}{\ensuremath{\mathbf{H}}}\begin{doc‌​ument}\channel\end{document} works as expected in TeXStudio 2.5.1 with TL2012. No red highlighting. –  hpesoj626 Dec 14 '12 at 14:13
@hpesoj626 please see the update –  dineshdileep Dec 15 '12 at 2:05
@Corentin Thanks frnd!! –  dineshdileep Dec 15 '12 at 2:06
Normally, TeXstudio recognizes a \usepackage{…} in the main file and does load the auto-completion list (.cwl), but TeXstudio isn’t intelligent enough to recognize packages loaded in external files.
For custom commands I only see a solution with a custom .cwl file which, of course, has the same disadvantage (always active if not disabled).
@dineshdileep See my linked answer for new Windows’s (%APPDATA%\texstudio\ ); the TeXstudio user manual also states: “This directory is placed in ~/.config/texstudio under linux and usually c:\Documents and Settings/User/AppData/Roaming/texstudio` under windows.” –  Qrrbrbirlbel Dec 15 '12 at 3:02