3

I would like to know if it was possible to change the color used to display function name.

Let's take the following example (using Python):

def function1(arg):
    function2(arg)
    # ...

function1 has a custom color, while function2 keeps the default text-color. I would like to change its color to something else (or, by the one used to highlight function1).

Is it possible to change the color function names when they're called? I wasn't able to find any lead on that…

  • 2
    Question is unclear. You want function2 to be highlighted in the same color of function1? By the way, you can create your own syntax region and give them a color. – SibiCoder Jun 7 '16 at 6:34
  • I clarified it a bit. I don't care whether the same color will be used. – user7906 Jun 7 '16 at 6:38
  • 2
    I'm not sure if it's possible due to the fact that you'll have to "record" every function definition and then create highlight group for them. Maybe have a look at github.com/vim-scripts/TagHighlight – nobe4 Jun 7 '16 at 6:59
  • 2
    My advice would be not to worry too much about it. If you have too many colours on the screen then you lose the benefit of having highlighted items standing out. – Antony Jun 7 '16 at 7:16
  • 1
    You can probably adapt what I did in vi.stackexchange.com/a/6963/205 – muru Jun 7 '16 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.