Skip to content

Commit 476ba10

Browse files
authored
Merge pull request #366 from thomaspaulb/master
[FIX] Correctly deal with wildcards in Vim path
2 parents b7bce17 + 9c098f8 commit 476ba10

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

ftplugin/org.vim

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,16 @@ augroup END
106106
" Start orgmode {{{1
107107
" Expand our path
108108
exec s:py_env
109-
import vim, os, sys
109+
import glob, vim, os, sys
110110

111111
for p in vim.eval("&runtimepath").split(','):
112112
dname = os.path.join(p, "ftplugin")
113-
if os.path.exists(os.path.join(dname, "orgmode")):
114-
if dname not in sys.path:
115-
sys.path.append(dname)
116-
break
113+
matches = glob.glob(dname)
114+
for match in matches:
115+
if os.path.exists(os.path.join(match, "orgmode")):
116+
if match not in sys.path:
117+
sys.path.append(match)
118+
break
117119

118120
from orgmode._vim import ORGMODE, insert_at_cursor, get_user_input, date_to_str
119121
ORGMODE.start()

0 commit comments

Comments
 (0)