Ernie Rael wrote:

> I'm working on a project with several files. I try to mostly work in a 
> "dev" location where I can run the various files individually; the files 
> usually have a in_dev flag, which sets things up to run standalone 
> (often simply adjusting imports). When ready to run in the application, 
> I copy the file to their "real" location and manually adjust what's 
> needed in the files. The manual step is a hassle.
> 
> If I could get the realpath of the file that's executing I could set the 
> flags when the file is first loaded (and remember to do "source %" and 
> not "source" while playing), and not need manual adjustments.
> 
> Then I can automate the update of the app files.

It's not clear what files you are working with.  If they are Vim script,
you can get the full path of the script with:

        echo expand('<sfile>:p')

or:

        echo expand('<script>:p')

-- 
hundred-and-one symptoms of being an internet addict:
61. Your best friends know your e-mail address, but neither your phone number
    nor the address where you live.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230129133354.7141E1C02DC%40moolenaar.net.

Raspunde prin e-mail lui