The structure of the srv directory should be:
/srv/
- salt
- pillar
Your vim.sls should be in the salt directory and not in the /srv directory.
In addition, and beware that for vim, depending on the OS familly (Redhat and others) the package name is not always the same. and for this, using pillars could be very helpful:
{% if grains['os_family'] == 'RedHat' %}
apache: httpd
git: git
gvim: vim-X11
vim: vim-enhanced
{% elif grains['os_family'] == 'Debian' %}
apache: apache2
{% else %}
apache: apache2
git: git
gvim: gvim
vim: vim
{% endif %}
By doing so, you cann do the following thing
deploy editors:
pkg.installed:
- pkgs:
- {{ pillar['vim'] }}
- {{ pillar['gvim'] }}
And no matter on which OS family your minion is located, the correct package will be deployed.
Edit:
Here is the way I'm using my pillars:
in /srv/pillars I've got a top.sls file with this in it
base:
'*':
- packages
Then at the same level as the top.sls I've got a packages.sls file with the content I've posted before in it. That its possible to use {{ pillar['vim'] }} in my salt recipes for instance. But in your case it's not needed. It's just an easy way to handle various Linux flavor (RHEL, Debian & co)
And If I want to add more variable data I can still add another sls at the same level