.dot is _vim under windows. Fixes bug 915048
This commit is contained in:
parent
3b865c035e
commit
cd34039b02
@ -5,6 +5,7 @@ from functools import wraps
|
|||||||
import glob
|
import glob
|
||||||
import hashlib
|
import hashlib
|
||||||
import os
|
import os
|
||||||
|
import platform
|
||||||
import re
|
import re
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
@ -34,6 +35,12 @@ def _to_scratch_buffer(text):
|
|||||||
|
|
||||||
vim.buffers[-1][:] = text.splitlines()
|
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):
|
def err_to_scratch_buffer(f):
|
||||||
@wraps(f)
|
@wraps(f)
|
||||||
def wrapper(*args, **kwds):
|
def wrapper(*args, **kwds):
|
||||||
@ -1239,8 +1246,8 @@ class SnippetManager(object):
|
|||||||
snippet_dirs = ["UltiSnips"] + vim.eval("g:UltiSnipsSnippetDirectories")
|
snippet_dirs = ["UltiSnips"] + vim.eval("g:UltiSnipsSnippetDirectories")
|
||||||
us = snippet_dirs[-1]
|
us = snippet_dirs[-1]
|
||||||
|
|
||||||
path = os.path.join(home, ".vim", us)
|
path = os.path.join(home, _dot_vim(), us)
|
||||||
for dirname in [".vim", "vimfiles"]:
|
for dirname in [_dot_vim(), "vimfiles"]:
|
||||||
pth = os.path.join(home, dirname)
|
pth = os.path.join(home, dirname)
|
||||||
if pth in rtp:
|
if pth in rtp:
|
||||||
path = os.path.join(pth, us)
|
path = os.path.join(pth, us)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user