part of the groupelephant.com family
beyond corporate purpose

Vim Flog Plugin

13 Feb 2011

A couple of days ago I found a nice Vim plugin to show the flog scores of your Ruby code insise your Vim editor.

But because it wasn’t really displayed the way I wanted, I forked and customized it.

Now what is Flog?

Flog shows you the most torturous code you wrote. The more painful the code, the higher the score. The higher the score, the harder it is to test.

For more information on the scores, you can read some interesting blog posts here and here.

Vim Plugin

Here is a screenshot of what flog integration looks like in Vim:

Vim Flog Plugin

As you can see you now always have a number in front of each def block. This number is the flog score, the higher, the more complex your code is.

In case you would like to use it, you can install it by following these steps.

Credits

All the credits for this plugin go to @skammer because he initially wrote the plugin, I just jumped on it and changed it a bit.

Emacs

In case you’re using emacs, Piet recommends using the Emacs Ruby Complexity Plugin.

Resources

blog comments powered by Disqus