refactor npm install logic
refactor macvim installation logic