.dot is _vim under windows. Fixes bug 915048

This commit is contained in:
Holger Rapp 2012-01-12 12:57:35 +01:00
parent 3b865c035e
commit cd34039b02

View File

@ -5,6 +5,7 @@ from functools import wraps
import glob
import hashlib
import os
import platform
import re
import traceback
@ -34,6 +35,12 @@ def _to_scratch_buffer(text):
vim.buffers[-1][:] = text.splitlines()
def _dot_vim():
"""Under windows .vim is _vim"""
if platform.system() == "Windows":
return "_vim"
return ".vim"
def err_to_scratch_buffer(f):
@wraps(f)
def wrapper(*args, **kwds):
@ -1239,8 +1246,8 @@ class SnippetManager(object):
snippet_dirs = ["UltiSnips"] + vim.eval("g:UltiSnipsSnippetDirectories")
us = snippet_dirs[-1]
path = os.path.join(home, ".vim", us)
for dirname in [".vim", "vimfiles"]:
path = os.path.join(home, _dot_vim(), us)
for dirname in [_dot_vim(), "vimfiles"]:
pth = os.path.join(home, dirname)
if pth in rtp:
path = os.path.join(pth, us)