From a5edd3369eb9bbe9a65f76363eaf5e79f26d4149 Mon Sep 17 00:00:00 2001 From: Mathew Attlee Date: Fri, 29 Apr 2016 17:32:57 +0100 Subject: [PATCH] Use relative path when determining `namespace` for PHP snippet --- UltiSnips/php.snippets | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/UltiSnips/php.snippets b/UltiSnips/php.snippets index 66abe5c..fc7d1d3 100644 --- a/UltiSnips/php.snippets +++ b/UltiSnips/php.snippets @@ -268,8 +268,8 @@ endsnippet snippet ns "namespace declaration" b namespace ${1:`!p -abspath = os.path.abspath(path) -m = re.search(r'[A-Z].+(?=/)', abspath) +relpath = os.path.relpath(path) +m = re.search(r'[A-Z].+(?=/)', relpath) if m: snip.rv = m.group().replace('/', '\\') `}; @@ -279,8 +279,8 @@ snippet class "Class declaration template" b