MarcWeber / ultisnips

Official Mirror of UltiSnips trunk on LaunchPad. Send pull requests to SirVer/ultisnips!
https://launchpad.net/ultisnips
25 stars 5 forks source link

Escape backslash in Python string when adding directories to sys.path #6

Closed telotortium closed 11 years ago

telotortium commented 11 years ago

Previously, you escaped ", but \ is also special in Python strings and needs to be escaped. This fixes UltiSnips on Windows since \ is used in Windows paths, and technically in Unix if anyone decides to use \ in a path there.

MarcWeber commented 11 years ago

This code has been rewritten. Previous code was bad style. It now looks like this;

call s:c.Py("sys.path.append(vim.eval('g:UltiSnips.py_code'))")

If you still have problems reopen and discuss the fix with me.