some vim automation and kb refactoring