vim modelines in git config


I'm working on different Open Source projects and most of them have different coding style guidelines. Mostly spaces or tabs or different tabwidth. The easiest thing would be to store these information in the git config of the project. So here is a easy and secure way to have modelines in the git config. So first I set the modelines (here for the Samba project): git config --add vim.modeline "tabstop=8 shiftwidth=8 noexpandtab cindent" or for a specific language: git config --add vim.modeline-python "tabstop=4 shiftwidth=4 expandtab" Then copy this plugin into ~/.vim/plugin folder. The modeline you defined in your git config will be appended to the :setlocal command of vim. It only allows a limited set of setlocal commands to be…