Change $VIM detection

* update test env
* refactoring