From 9c098f8be35a96d067fff064a2f757e69b57d294 Mon Sep 17 00:00:00 2001 From: Tom Blauwendraat Date: Tue, 19 Jan 2021 11:39:14 +0100 Subject: [PATCH] [FIX] Correctly deal with wildcards in Vim path --- ftplugin/org.vim | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ftplugin/org.vim b/ftplugin/org.vim index 6f4e5579..edb3b6ee 100644 --- a/ftplugin/org.vim +++ b/ftplugin/org.vim @@ -106,14 +106,16 @@ augroup END " Start orgmode {{{1 " Expand our path exec s:py_env -import vim, os, sys +import glob, vim, os, sys for p in vim.eval("&runtimepath").split(','): dname = os.path.join(p, "ftplugin") - if os.path.exists(os.path.join(dname, "orgmode")): - if dname not in sys.path: - sys.path.append(dname) - break + matches = glob.glob(dname) + for match in matches: + if os.path.exists(os.path.join(match, "orgmode")): + if match not in sys.path: + sys.path.append(match) + break from orgmode._vim import ORGMODE, insert_at_cursor, get_user_input, date_to_str ORGMODE.start()