vim-htmldjango_omnicomplete
vim-htmldjango_omnicomplete copied to clipboard
Windows paths.
Backslashes in Windows paths makes suggestions unusebale.
I've replaced backslashes in get_template_names()
:
word' : os.path.join(root,f).replace(d,'').replace("\\","/")
and get_staticfiles()
:
matches.append(dict(word=path.replace("\\","/"),info=''))
and It's work... sort of.
I think in get_template_names(pattern)
we should change one line
d = d + ('/' if not d.endswith('/') else '')
to
d = d + (os.path.sep if not d.endswith(os.path.sep) else '')
And htmldjangocomplete(context, match)
:
for cmpl in all:
dictstr += '{'
for x in cmpl: dictstr += '"%s":"%s",' % (x,cmpl[x].replace("\\","\\\\")) # Windows slashes must be escaped
dictstr += '"icase":0},'
Thanks. Again If you have time to set this up as a pull request (rather than copying it in the ticket) I'd appreciate it. Otherwise I'll get to it when I have time later this week.
Hmm... how I can do this? I made a lot (or a few) changes: extract load_libs()
to external file load_libs.py
, python3, and so on....
Sure I see your work has diverged on your fork. Don't worry if it is too difficult, but a method would be to publish a compatible branch on your forked repository. It depends on how advanced you are with git branching and remotes
#get the main repository git remote add mjbrownie https://github.com/mjbrownie/vim-htmldjango_omnicomplete.git git fetch mjbrownie #create a new branch based on the original master, git checkout -b fix_18_template_dirs mjbrownie/master ... perform fix commits ... #push to your published fork git push origin fix_18_template_dirs .. on the website ... follow pull request instructions.
#then go back to your own work git checkout master
Explain. Thanks.