ಠ_ಠ Vim plugin to disapprove deeply indented code. ಠ_ಠ
Vim script
Switch branches/tags
Nothing to show
Clone or download
Dávid Csákvári
Latest commit c53ef56 May 14, 2018
Permalink
Failed to load latest commit information.
doc Add doc. Mar 11, 2017
plugin Fix display issue introduced in previous commit. May 14, 2018
LICENSE Initial commit Mar 5, 2017
README.md Update README.md Apr 20, 2017
screenshot.png Add images Mar 5, 2017
tty.gif Add images Mar 5, 2017

README.md

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 with the following variables (setting them to 0 disables the feature):

let g:LookOfDisapprovalTabThreshold=5
let g:LookOfDisapprovalSpaceThreshold=(&tabstop*5)

Disapproval in action

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.

How it works

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.

Conceal depends on modifying the syntax highlighting rules. For some file types and syntax settings, the rules defined in this plugin may conflict with the default rules applied for a filetype, making the look of disapproval appear in the beginning of shallowly indented lines as well.

In the case you encounter this issue, feel free to open an issue. Until it's fixed, you can disable the plugin for the problematic file types with the following command:

autocmd FileType SOME_FILETYPE let g:LookOfDisapprovalTabThreshold=0 | let g:LookOfDisapprovalSpaceThreshold=0