github

dodie / vim-disapprove-deep-indentation

  • среда, 8 марта 2017 г. в 17:26:29
https://github.com/dodie/vim-disapprove-deep-indentation

Vim script
ಠ_ಠ Vim plugin to disapprove deeply indented code. ಠ_ಠ



vim-disapprove-deep-indentation

This Vim plugin disapproves deeply indented code.

Disapproval in action

By default, it shows ಠ_ಠ at the beginning of each line that is indented at least 5 levels. It can be configured by with the following variables (setting them to 0 disables the feature):

let g:LookOfDisapprovalTabTreshold=5
let g:LookOfDisapprovalSpaceTreshold=(&tabstop*5)

Disapproval in action

The plugin uses Vim's conceal feature. It does not modify the source code in any way, the disapproving look is just a visual indicator.

Installation

You can easily install this Plugin with Pathogen or Vundle.

Vim needs to be compiled with +conceal for the face to appear.

Inspiration

The idea came from a comment made by StripTheFlesh in this thread on Reddit:

Just use ಠ_ಠ for indents. It will remind you to not use a lot indentation levels.