[RDY] Move defines from vim.h - phase2

Move functionality from vim.h to header or c files.  Breaking up vim.h will allow the removal of the vim.h include at the top of every file, improving readability and build performance.