2

I'm using vim 8.

In the attached picture you see yellow vertical lines that indicate the indentations of a code.

enter image description here

Is it possible to color depending on their indentation level? E.g.

all vertical indentation lines on indentation level 1 should be red

all vertical indentation lines on indentation level 2 should be yellow

all vertical indentation lines on indentation level 3 should be green

etc.

PS: If it is of any relevance: I'm using https://github.com/Yggdroot/indentLine That plugin doesn't have an option to color the vertical indentation lines dependent on the indentation level

  • no it is not possible. – Christian Brabandt Feb 10 '18 at 18:32
  • @ChristianBrabandt Why not? – thadeuszlay Feb 10 '18 at 18:53
  • Because it is not possible? – Christian Brabandt Feb 10 '18 at 18:56
  • but you could use different line styles for different levels with let g:indentLine_char_list = ['|', '¦', '┆', '┊'] if this helps. – Wolfson Dec 2 '20 at 11:09
  • You may also like the vim-indent-guides plugin. It does not color the lines, but visualizes indentation levels based on alternating colors of white spaces. – Wolfson Dec 2 '20 at 11:42

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.