Skip to content

Commit

Permalink
Merge pull request jceb#366 from thomaspaulb/master
Browse files Browse the repository at this point in the history
[FIX] Correctly deal with wildcards in Vim path
  • Loading branch information
jceb authored Jan 20, 2021
2 parents b7bce17 + 9c098f8 commit 476ba10
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions ftplugin/org.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 476ba10

Please sign in to comment.