In my vim plugin, I have two files:
myplugin/plugin.vim
myplugin/plugin_helpers.py
I would like to import plugin_helpers from plugin.vim (using the vim python support), so I believe I first need to put the directory of my plugin on python's sys.path.
How can I (in vimscript) get the path to the currently executing script? In python, this is __file__
. In ruby, it's __FILE__
. I couldn't find anything similar for vim by googling, can it be done?
Note: I am not looking for the currently edited file ("%:p" and friends).
execute 'source ' . expand('<sfile>:p:h') . '/another.vim'
– Ciro Santilli TRUMP BAN IS BAD Jun 25 '15 at 8:44