<tab>, where others expect
I could not find a vim plugin or other extension that lets me pick vim-settings per git repository. The idea that I came up with, is to set the project specific vim-settings in the git-config itself. For example:
$ git config --add vim.settings 'tabstop=4 expandtab'
Now, in my
~/.vimrc, I have the following snippet:
let git_settings = system("git config --get vim.settings")
exe "set" git_settings
Editing a file in the git repository that contains the above vim.settings, now replaces my
<4-spaces>. Other repositories that do not have the
vim.settingswill fall-back to my vim defaults. If you can think of any improvements or suggestions, please share them.