Menu

Highlighting function calls in C/C++ files

2007-12-07
2012-11-13
  • Abhir Joshi

    Abhir Joshi - 2007-12-07

    In Notepad++, is it possible to highlight/embolden the name of the function at the place where it is called?  This is something that can be achieved in vim by defining the following in the syntax file
               syn match Member       display "\<\h\w*\>\s*("me=e-1
               highlight Member gui=bold

    It would be quite useful to define a rule for matching text and then give it a style.

    Abhir

     
    • Nobody/Anonymous

      It would be healthy. Add please such opportunity!

       
    • Nobody/Anonymous

      What is "the name of the function at the place where it is called"?

       
      • Abhir Joshi

        Abhir Joshi - 2007-12-08

        The function name at the place where it is invoked, i.e. all the function calls.
        Consider the following sample C code --
        -----------------------
        var1 = var2 * 10;
        var3 = func1(var1);
        var4 = func2(var3);
        var5 = var4 + var3;
        -----------------------
        In the above code, I want the words "func1" and "func2" to be of bold type.  The names of variables, etc will be normal, i.e. non-bold.  The idea is to identify words followed with a parenthesis start "(" and make those words bold.  The parenthesis may not be bold.  Such words could also be macro invocations.

        Abhir

         
MongoDB Logo MongoDB