load syntax as per file prefix
- by Richo
Firstly, I hope that this is the right place. I couldn't decide between here and superuser.
My home directory lives in an svn repo. all my dotfiles are in version control so that I can track them across multiple machines, and they all source an unversioned .local (ie, .screenrc.local, .vimrc.local etc) which can override/make local changes to the environment in a machine specific way.
The problem is that vim understands how I want to edit many of these config files, but loses it's mind when I open a .local, and honestly, I'm not really sure what it does to work out how to syntax highlight etc a file like .screenrc
the pseudocode for what I'm after is:
if OpenedFile.ends_with(".local")
behave_as_per OpenedFile[0:-6]
endif
I hope this makes sense and hopefully someone can shed light on whether or not this is possible.