Hello,

"703designs" <[EMAIL PROTECTED]> wrote:

> OK, thanks. I'm writing a plugin [...]
> and I'm not sure how to find their path (I intend to
> distribute the plugin). How could I assign the absolute path of one
> of
> these scripts to a variable? I posed a separate but similar question
> earlier about finding the path to $HOME/.vim or $HOME/vimfiles. I
> don't need to load the script into Vim, rather, I have to pass its
> path into a shell command (using exec).

You're looking for this:
* To find the full pathname of the script from itself
   let s:script_name = expand('<sfile>:p')

* from elsewhere
   let path_to_script = globpath(&rtp, 'plugin/the_script.vim')
(which may require some other processing if the file is found several times)

-- 
Luc Hermitte
http://lh-vim.googlecode.com/
http://hermitte.free.fr/vim/

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to