Embed vim settings in file
They’re called modelines and while I’m not sure the extent you can go with them, here’s a link to the vimtips wiki with some examples: http://vim.wikia.com/wiki/Modeline_magic help modeline from within vim to check out the official docs.