sentientmonkey/vim-flog — pull request #5 by vrybas (2014-09-17 05:19:49+00:00)
Title: Combine semi-active forks into one

Greetings,

It looks like this fork is the most active one.

In this PR I've merged valuable code from [onemastartup][1] fork, fixed
few bugs myself, and resolved conflicts with this fork.

![network_graph_ _onemanstartup_vim-flog](https://cloud.githubusercontent.com/assets/30538/4298682/f2739c2e-3e28-11e4-9aa0-439248b038ce.png)

### Summary of changes

#### Highlighting

Use Vim standard highlighting groups. No need to use variables and
`UpdateHighlighting()` calls. Colors can be set like this

```vimrc
".vimrc
highlight SignLowComplexity guifg=#009900 guibg=NONE ctermfg=2 ctermbg=NONE
highlight SignMediumComplexity guifg=#bbbb00 guibg=NONE ctermfg=3 ctermbg=NONE
highlight SignHighComplexity guifg=#ff2222 guibg=NONE ctermfg=1 ctermbg=NONE
```

Works for me. If there's any issues, I guess they can be addressed in
the future.

#### Enable/Disable/Toggle functions

```
You can also turn flog off and on:

* Turn on flog
`:call FlogEnable()`

* Turn off flog
`:call FlogDisable()`

* Toggle flog
`:call FlogToggle()`
```

I've resolved conflicts in favor of `Flog*()` function names, because
they show right away from which plugin function comes from and easier
accessible with autocomplete, like `:call Fl`

#### RubyParser

The whole complex method `process_defs(exp)` is gone and replaced with
use of [RubyParser][2], which is used by Flog itself. It reduces
parsing blow-ups, but not all of them. There are some rare cases left.

#### Add ability to hide low and middle complexity levels

@alexbel awesome contribution. I've cherry-picked it and slightly
changed behaviour of how signs get 'placed' and 'unplaced'.

#### Unplace signs only in current buffer

Commit 784835d introduced a bug when you got multiple buffers opened in
multiple windows. See bed787a

#### Put dummy `FlogDummySign` before setting real signs

This is what [vim-gitgutter][3] also does. Without this the sign column
jumps back & forth when `show_complexity()` is executed and there's
no any signs to show.

--

So the whole plugin need to be refactored and there are still a few
bugs, but this can be a good start of it's new life.

[1]: https://github.com/onemanstartup/vim-flog
[2]: https://github.com/seattlerb/ruby_parser
[3]: https://github.com/airblade/vim-gitgutter