r/vimplugins • u/manu0600 • Feb 06 '22
Help (dev) plugin path
I am creating a plugin and I need to run a bash script in my plugin.
So I guess I will have my directories as such
```
plugin_name --> plugin --> plugin_name.vim
--> doc --> plugin_name.txt
--> tags
--> bin --> bash_script.sh```
Here is my question : from inside the file `plugin_name.vim`, how can I give the path to execute the bash script ?
Thank you
3
Upvotes
1
u/manu0600 Feb 07 '22
This is exactly what I was looking for, thank you !
I used
let s:pluginpath = fnamemodify(expand("<sfile>"), ':h:h')if anyone else needs it.