Commits

Steve Losh committed 0a0ec65

Skeleton.

Comments (0)

Files changed (7)

-import threesomelib
+import vim, os, sys
+
+# Add the library to the Python path.
+for p in vim.eval("&runtimepath").split(','):
+   plugin_dir = os.path.join(p, "plugin")
+   if os.path.exists(os.path.join(plugin_dir, "threesomelib")):
+      if plugin_dir not in sys.path:
+         sys.path.append(plugin_dir)
+      break
 
 def ThreesomeInit():
-    threesomelib.init()
+    from threesomelib.init import init
+    init()
 function! s:ThreesomeInit()"{{{
     let python_module = fnameescape(globpath(&runtimepath, 'plugin/threesome.py'))
     exe 'pyfile ' . python_module
-    python "ThreesomeInit()"
+    python ThreesomeInit()
 endfunction"}}}
 
 "}}}

plugin/threesomelib.py

-import vim
-
-vim.echo('lololol')

plugin/threesomelib/__init__.py

Empty file added.

plugin/threesomelib/init.py

+def init():
+    pass

plugin/threesomelib/modes.py

+
+

plugin/threesomelib/util.py

+import sys
+
+def error(m):
+    sys.stdout.write(m + '\n')