Is it possible to display indentation guides in Vim?

后端 未结 7 1172
暖寄归人
暖寄归人 2020-11-30 18:50

I\'m a longtime Vim user (3 or 4 years) who has recently started dealing with some deeply nested code. This code is indented with spaces, not tabs. I would like some clean

7条回答
  •  感情败类
    2020-11-30 19:04

    NOTE: This answer is a bit late to the party and also a shameless plug :)

    Regardless, try my Indent-Guides.vim plugin. It was created to scratch my own itch regarding the lack of indent guides in vim. I got fed-up waiting for someone else to come along and build it, so I just did it myself.

    Features:

    • Can detect both tab and space indent styles.
    • Automatically inspects your colorscheme and picks appropriate colors (gVim only).
    • Will highlight indent levels with alternating colors.
    • Full support for gVim and basic support for Terminal Vim.
    • Seems to work on Windows gVim 7.3 (haven't done any extensive tests though).
    • Customizable size for indent guides, eg. skinny guides (soft-tabs only).
    • Customizable start indent level.

    Here's a few screenshots of the plugin in action: put your mouse here and click.

提交回复
热议问题