• Stars
    star
    558
  • Rank 79,819 (Top 2 %)
  • Language
    Vim Script
  • License
    MIT License
  • Created over 7 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

ಠ_ಠ 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 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.

Styles for all concealed characters in Vim can be set with a single style rule. This plugin makes them red in order to have a really disapproving look for the eye. If you are using this plugin in conjunction with other plugins that rely on conceal feature (for example, indentLine), you might want to disable this styling:

let g:LookOfDisapprovalNoStyle=1

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

More Repositories

1

vim-fibo-indent

Fibonacci Indentation for Vim.
Vim Script
272
star
2

scott

Never debug a test again: Detailed failure reports and hassle free assertions for Java tests - Power Asserts for Java
Java
135
star
3

testing-in-bash

Bash test framework comparison
Shell
100
star
4

tracing-paper-sketching

Android App to copy images from the screen to physical paper.
JavaScript
15
star
5

time-admin

A simple web application for time tracking.
Scala
10
star
6

jvm-dynamic-optimizations-performance-test

Performance tests to demonstrate some of the profile-based (optimistic, speculative) optimizations performed by the JVM.
Java
7
star
7

bash-preprocessor

Bash Macros: replace snippets in a script file with their output
Shell
4
star
8

cucumber-gifreporter-experiment

Experiment to embed animated GIFs to Cucumber test reports.
Java
4
star
9

srtm-map-renderer

Java application to render SRTM data
Java
3
star
10

java-helpful-npe-demo

Java 14 Helpful NullPointerExceptions Demo
Java
2
star
11

unreal-engine-stealthgame-tutorial

A very simple single/multiplayer FPS game
C++
2
star
12

working-with-structured-data-in-java

Examples for updating, merging and comparing hierarchical data in Java, using Maps, POJOs and JsonStructures with Jackson, Apache Commons Lang, JSON-P and Guava.
Java
2
star
13

unreal-coop-shooter-game

C++
1
star
14

unreal-bullcowgame-tutorial

Word guessing terminal game in Unreal Engine 4
C++
1
star
15

AJAX-activity-indicator

This script adds onOpenGlobal and onDoneGlobal functions and numberOfOpenCalls property to XMLHttpRequest.
JavaScript
1
star
16

cucumber-attached-tests-example

Java
1
star
17

java-tutorials

Java Tutorials and Examples
Java
1
star
18

bash-jq-tutorial

Showcasing bash with jq by creating statistics based on the contents a dummy blog engine
TSQL
1
star