joonty/vim-sauce — pull request #5 by rodrigoq (2014-12-26 23:05:16+00:00)
Title: Autocomplete for windows

Hi, I made some changes to SauceNames() so it can work on windows.
I found that the best way to solve it was to use native functions instead of OS specific system calls.

I had to replace windows separators (lines 101-2) because substitution wasn't working, first because the code adds a '/' at the end of sauce_path, and also because the substitute function is a little picky, didn't know how to escape it well.
I also tried to solve it using fnamemodify() but couldn't make it return the last directory plus filename on full paths (so it didn't work recursively).

I tested it on gvim 7.4 windows 7 and console vim 7.3 on linux.

PD: SauceDelete() was repeated, and added ! to LoadSauce for easy sourcing while editing.

R.